Publish GZH
Run the article pipeline as explicit checkpoints: intake, source-backed draft,
independent audit, optional image matching, deterministic validation, and WeChat
draft-box publishing. Keep credentials and private content outside the skill.
Choose The Path
- New article or rewrite: read workflow.md and
content-and-compliance.md.
- Teammate installation or a new machine: follow
quick-start.md. Read
setup.md for the full prerequisite matrix, then run
doctor before doing article work.
- Image matching or an old absolute-path image index: read
image-pipeline.md.
- Draft-box publishing or failure recovery: read
publishing.md and
troubleshooting.md.
- Audit-only: read the article and its source pack, then apply the publish gate
in workflow.md. Do not rewrite silently.
Hard Boundaries
- Set frontmatter
author: 桥博士; reject author: 宽论.
- Use only source-backed facts. Never invent people, dates, media mentions,
awards, trading results, testimonials, survey data, or user outcomes.
- Position Kuanlun/QMACD as quant-analysis technology and methodology education,
not investment advice, stock tips, account diagnosis, or guaranteed profit.
- Treat benchmark articles as structural references. Do not copy their wording,
opening paragraph, or full text into the deliverable or skill.
- Never store API keys, WeChat credentials, cookies, account state, private
source packs, QR codes, article corpora, or generated image indexes in this
skill or in git.
- Before sending article text to an external embedding API, disclose that data
transfer and require explicit operator confirmation.
- Publishing creates a WeChat draft only after the user has requested it and all
blockers pass. The final public send remains manual in the WeChat backend.
- Do not commit or push article/project changes unless the user separately asks.
Run The Checkpoints
- Intake: identify mode, audience, article path, project root, evidence
sources, asset availability, and whether draft publishing is in scope.
- Draft: write Markdown with YAML frontmatter. Save claims with a source
map; omit or mark unresolved claims instead of guessing.
- Audit: use an independent context or subagent when available. Return
PASS or FAIL, with blockers before style issues and exact locations.
- Images: make an insertion plan first. Use
add-images --write only after
the operator confirms external processing and reviews the plan.
- Validate: run the deterministic validator. A nonzero exit blocks publish.
- Publish: call
mcp__wenyan-mcp__publish_article with only the absolute
article file and theme_id: "orangeheart". Record the returned Media ID.
Resolve The CLI
Prefer the repository copy while developing this skill; otherwise use the
registered copy under $CODEX_HOME/skills or $HOME/.codex/skills.
$RepoCli = Join-Path (Get-Location) "skills\publish-gzh\scripts\publish_gzh.py"
$CodexHome = if ($env:CODEX_HOME) { $env:CODEX_HOME } else { Join-Path $HOME ".codex" }
$LocalCli = Join-Path $CodexHome "skills\publish-gzh\scripts\publish_gzh.py"
$Cli = if (Test-Path -LiteralPath $RepoCli) { $RepoCli } else { $LocalCli }
if (-not (Test-Path -LiteralPath $Cli)) { throw "publish-gzh CLI not found: $Cli" }
python $Cli doctor --project-root "C:\path\to\article-project" --mode full --json
python $Cli validate --article "C:\path\to\article.md" `
--asset-root "C:\path\to\article-project\assets" --json
For image commands, follow image-pipeline.md.
Never add --write during the planning pass.
Output Contract
At each checkpoint report:
- status:
PASS, FAIL, NEEDS_INPUT, or NEEDS_HUMAN
- artifact: absolute article or report path
- evidence: source files or validation result used
- blockers: exact issue and one concrete fix
- next action: the smallest safe next step
After successful draft publishing, report the article path, orangeheart
theme, Media ID, and that final public sending is still manual.
1---2name: publish-gzh3description: Use when creating, rewriting, auditing, image-matching, validating, or publishing Kuanlun/QMACD Chinese WeChat Official Account articles in the gzhpublisher workflow; also use for teammate setup, portable image-index migration, and wenyan-mcp troubleshooting.4---56# Publish GZH78Run the article pipeline as explicit checkpoints: intake, source-backed draft,9independent audit, optional image matching, deterministic validation, and WeChat10draft-box publishing. Keep credentials and private content outside the skill.1112## Choose The Path1314- New article or rewrite: read [workflow.md](references/workflow.md) and15 [content-and-compliance.md](references/content-and-compliance.md).16- Teammate installation or a new machine: follow17 [quick-start.md](references/quick-start.md). Read18 [setup.md](references/setup.md) for the full prerequisite matrix, then run19 `doctor` before doing article work.20- Image matching or an old absolute-path image index: read21 [image-pipeline.md](references/image-pipeline.md).22- Draft-box publishing or failure recovery: read23 [publishing.md](references/publishing.md) and24 [troubleshooting.md](references/troubleshooting.md).25- Audit-only: read the article and its source pack, then apply the publish gate26 in [workflow.md](references/workflow.md). Do not rewrite silently.2728## Hard Boundaries2930- Set frontmatter `author: 桥博士`; reject `author: 宽论`.31- Use only source-backed facts. Never invent people, dates, media mentions,32 awards, trading results, testimonials, survey data, or user outcomes.33- Position Kuanlun/QMACD as quant-analysis technology and methodology education,34 not investment advice, stock tips, account diagnosis, or guaranteed profit.35- Treat benchmark articles as structural references. Do not copy their wording,36 opening paragraph, or full text into the deliverable or skill.37- Never store API keys, WeChat credentials, cookies, account state, private38 source packs, QR codes, article corpora, or generated image indexes in this39 skill or in git.40- Before sending article text to an external embedding API, disclose that data41 transfer and require explicit operator confirmation.42- Publishing creates a WeChat draft only after the user has requested it and all43 blockers pass. The final public send remains manual in the WeChat backend.44- Do not commit or push article/project changes unless the user separately asks.4546## Run The Checkpoints47481. **Intake:** identify mode, audience, article path, project root, evidence49 sources, asset availability, and whether draft publishing is in scope.502. **Draft:** write Markdown with YAML frontmatter. Save claims with a source51 map; omit or mark unresolved claims instead of guessing.523. **Audit:** use an independent context or subagent when available. Return53 `PASS` or `FAIL`, with blockers before style issues and exact locations.544. **Images:** make an insertion plan first. Use `add-images --write` only after55 the operator confirms external processing and reviews the plan.565. **Validate:** run the deterministic validator. A nonzero exit blocks publish.576. **Publish:** call `mcp__wenyan-mcp__publish_article` with only the absolute58 article `file` and `theme_id: "orangeheart"`. Record the returned Media ID.5960## Resolve The CLI6162Prefer the repository copy while developing this skill; otherwise use the63registered copy under `$CODEX_HOME/skills` or `$HOME/.codex/skills`.6465```powershell66$RepoCli = Join-Path (Get-Location) "skills\publish-gzh\scripts\publish_gzh.py"67$CodexHome = if ($env:CODEX_HOME) { $env:CODEX_HOME } else { Join-Path $HOME ".codex" }68$LocalCli = Join-Path $CodexHome "skills\publish-gzh\scripts\publish_gzh.py"69$Cli = if (Test-Path -LiteralPath $RepoCli) { $RepoCli } else { $LocalCli }70if (-not (Test-Path -LiteralPath $Cli)) { throw "publish-gzh CLI not found: $Cli" }7172python $Cli doctor --project-root "C:\path\to\article-project" --mode full --json73python $Cli validate --article "C:\path\to\article.md" `74 --asset-root "C:\path\to\article-project\assets" --json75```7677For image commands, follow [image-pipeline.md](references/image-pipeline.md).78Never add `--write` during the planning pass.7980## Output Contract8182At each checkpoint report:8384- status: `PASS`, `FAIL`, `NEEDS_INPUT`, or `NEEDS_HUMAN`85- artifact: absolute article or report path86- evidence: source files or validation result used87- blockers: exact issue and one concrete fix88- next action: the smallest safe next step8990After successful draft publishing, report the article path, `orangeheart`91theme, Media ID, and that final public sending is still manual.