Communitygithub.com

Ally1212/vx-auto-codex-skill

用于微信公众号文章自动化工作流的 Codex 技能

What is vx-auto-codex-skill?

vx-auto-codex-skill is a Codex agent skill that 用于微信公众号文章自动化工作流的 Codex 技能.

Works with~Claude CodeCodex CLI~Cursor
npx skills add Ally1212/vx-auto-codex-skill

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

VX Auto

Overview

Use this skill to operate a bundled VX Auto project template for WeChat Official Account article generation, rewriting, draft publishing, web-console review, and scheduler deployment.

The project template lives at assets/project-template. The initializer lives at scripts/setup-vx-auto.mjs.

First-Use Rule

Before the first VX Auto run for a target directory, check whether these files exist and are populated:

  • .env
  • accounts/<account>.yml
  • .vx-auto/skill-setup.json

If they are missing or incomplete, ask the user for startup configuration before running generation, publishing, web server, or deployment commands. Ask only for what is needed:

  • Target project directory.
  • Account short name, public account display name, author, role, persona prompt, and default topic scope.
  • LLM provider: LLM_API_BASE, LLM_API_KEY, LLM_MODEL.
  • WeChat publishing credentials: wechat_app_id and wechat_app_secret or WECHAT_APP_ID_<ACCOUNT> / WECHAT_APP_SECRET_<ACCOUNT>. Make clear these are optional for dry runs but required for real draft publishing.
  • Optional services: APPFLINT_API_KEY, IMAGE_API_KEY, image model/base URL, and SCHEDULER_SECRET.
  • Intended first action: web console, CLI dry run, publish to draft box, or deployment.

Do not pressure the user to reveal secrets in chat. If they prefer, initialize placeholders and tell them which local files or platform secret fields to fill.

Quick Start

For a fresh local instance, run the initializer:

node scripts/setup-vx-auto.mjs --target ./vx-auto

After setup:

cd ./vx-auto
bun install
bun run web

Open http://localhost:3210/, /console, or /workspace.

Daily Operations

  • Dry run single account: bun start <account> --dry-run
  • Dry run with direction: bun start <account> --dry-run --topic "本次写作方向"
  • Publish to WeChat draft box: bun start <account>
  • Batch dry run: bun src/run-all.ts --dry-run
  • Web console: bun run web or PORT=3211 bun run web
  • Type check: bunx tsc --noEmit
  • Tests: bun test

Prefer dry runs before any real publishing. Publishing requires valid WeChat Official Account credentials and may be blocked by the WeChat IP allowlist.

Configuration Notes

Read references/configuration.md when configuring accounts, .env, scheduler, deployment, or troubleshooting startup failures.

Key files in an initialized project:

  • .env: global LLM, AppFlint, image, scheduler, and optional env-based WeChat credentials.
  • accounts/<account>.yml: account persona and WeChat draft publishing credentials.
  • accounts/<account>.md: optional source material. Non-empty local material takes priority.
  • accounts/<account>.prompts.yml: optional account-level prompt workbench output.
  • .vx-auto/scheduler/config.json: web-console scheduler config.

Deployment

Use deployment only after a local dry run succeeds.

  • Render: the template includes render.yaml; configure platform secrets and start with bun run web.
  • Hugging Face Spaces: use Docker SDK; see docs/huggingface-space-setup.md in the initialized project.
  • Scheduler endpoint: POST /api/scheduler/run with header X-Scheduler-Secret: $SCHEDULER_SECRET.
  • Verify deployment: bun run verify:deployment "$VX_AUTO_BASE_URL" --scheduler-secret "$SCHEDULER_SECRET".

Safety

  • Never commit .env, live WeChat credentials, API keys, or private account files to a public repo.
  • Do not run real publishing commands unless the user explicitly asks for publishing or accepts that bun start <account> writes to the WeChat draft box.
  • If WeChat returns 40013, verify AppID starts with wx and is not the gh_ original ID. If it returns 40164, check the platform egress IP allowlist.

Related Skills