agentleFS
shimo4228shimo4228/writing/.claude/skills/publish-article/SKILL.md

publish-article

Skill3 starsChanged yesterdayCC0-1.0View on GitHub

quality-gate PASS済みの対象稿1本について、Zennのfrontmatter・preview・予約またはDev.toのdry-run・予約、公開索引、push確認を扱うproject-local公開skill。Use when — 対象となるZenn稿またはEN稿自身のproject-local quality-gate PASSと著者GOの後。NOT for — 翻訳生成、prose review、security/quality判定、note/Substack投稿。

3 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

Publish Article Skill

このskillは公開操作だけを持つ。文章品質とpublic-safetyはproject-local quality-gate、Zenn形式は zenn-format、channel値は .claude/rules/publishing-channels.md が正本。

Usage

/publish-article articles/<slug>.md
/publish-article articles-en/<slug>.md

引数なしなら published: false のZenn原稿を列挙する。

Preconditions

  • 引数で指定した対象稿自身のproject-local quality-gateがPASS
  • 著者が最終タイトルと本文を通読済み
  • 著者が公開GOを出している

不足していれば公開操作を始めず、欠けた証跡を返す。

最初に対象pathをchannel contractの1行へ解決する。JP稿のPASSをEN稿へ流用しない。

Zenn / Dev.to publish flow

1. Validate target

npm run evidence -- articles/<slug>.md --online   # 構造・書式・実在・一致 + 外部URLの生死
npm run validate

deviationsが1件でもあれば公開操作を始めない。grandfatheredは検査導入前の既公開分なので blockしない。目視で数え直さず、scriptの出力をそのまま扱う。

Zenn稿のtitle、emoji、type、topics、slug、published_atはzenn-formatとchannel contractに従う。 EN稿はdevto-translator self-check済みであることを確認する。

2. Preview or dry-run

npm run preview

Zenn稿はhttp://localhost:8000でコードblock、画像、message/details、内部linkを確認する。

EN稿は実POSTせずdry-runする。

cd scripts && uv run python devto_crosspost.py post <slug> --dry-run

3. Schedule the resolved target

通常はfrontmatterを次の形にする。

published: true
published_at: 2026-04-15 09:00

format、rate-limit、cadenceは.claude/rules/publishing-channels.mdが正本。これはZenn channelだけに行う。

Dev.to channelではdry-runを著者へ提示し、既定(channel contract の Cadence)どおり公開GO後にpost <slug>で投稿する。

cd scripts && uv run python devto_crosspost.py post <slug>

著者が日時を指定したときだけschedule <slug> --at …で予約する。

cd scripts && uv run python devto_crosspost.py schedule <slug> --at "2026-07-07 22:00 Asia/Tokyo"

postが成功すると(直接実行でも、予約したlaunchd jobの実行でも)、実URLはschedule.jsonの該当entryへ自動書き戻しされ、one-shot jobは自己削除される。

4. Register production state

.claude/refs/schedule-schema.mdに従ってscripts/schedule.jsonへentryを追加する。

5. Cross-channel boundary

Zenn稿の公開実行からEN稿を生成・予約しない。crosspostする場合はこのrunを終了し、 devto-translatorでarticles-en/<slug>.mdを生成する。そのEN稿で review-prose / review-conventions のreview・ quality-gate(EN 訳の受け入れ条件は channel contract)・著者の公開GOを完了してから、別runとして /publish-article articles-en/<slug>.mdを実行する。

6. Regenerate the publication index

npm run generate:index
npm run check:index

note/Substack essayはscripts/corpus.ymlへentryを追加してから生成する。READMEのreading pathは scripts/reading_paths.ymlの著者判断であり、新記事を自動追加しない。

7. Announcement handoff(人間が実行)

公開を確認したら、新規公開1本につき1回、著者が告知する。告知は内容を変えない(ADR-0001の 配信レイヤー)。告知文の下書きが要ればsocial-postでX / Bluesky / Substack NotesのBuffer下書きに入れてよく、 予約と公開は著者がBufferの画面で行う。同じ公開物の繰り返し告知、他者の場での宣伝投稿、自動投稿はしない(判断の正本: personal-branding ADR-0005 / authorship-strategy ADR-0007 第2項の注記)。完了報告に「告知: 著者待ち」と1行残す。

8. Commit and push boundary

commit / pushはユーザーの明示依頼がある場合だけ行う。記事・schedule・索引をcommitした場合は、 未pushだとZenn予約とDev.to jobが反映されないため、必ずpush状態を確認してユーザーへ伝える。

Failure behavior

FailureAction
quality-gate receipt missing公開を開始せずgateへ戻す
frontmatter/index failurefieldを修正しnpm run validateから再実行
preview issue原稿またはassetを修正しpreviewを再確認
Dev.to API failuredry-runとAPI responseを確認。Zenn公開とは分離して記録
Zenn registration rejectedrate-limit解除後のpushでdeployを再trigger

Related

  • project-local writing-ecosystem / quality-gate
  • local zenn-format
  • .claude/rules/publishing-channels.md
  • .claude/refs/schedule-schema.md

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.