This is an orchestration skill that combines note-draft (draft posting) and note-publish (tag setting + publishing) to run everything from a Markdown file through to publishing in one go.
Trigger
Japanese:
- "Post an article to note and publish it"
- "note auto-posting"
- "Write Markdown and publish it to note"
- "Automate posting to note"
English:
- "Automate note publishing"
- "Post and publish to note"
- "Full pipeline: draft and publish to note.com"
Prerequisites
- Initial setup is shared with the note-draft skill (npm install, Playwright, .env)
Usage
Pre-execution confirmation flow
Before executing, confirm the following information with AskUserQuestion.
AskUserQuestion:
question: "note自動投稿の設定を確認します"
Q1: "入力を指定してください"
options:
- "MDファイルを指定する"
- "既存の下書き記事URL/キーを指定する"
Q2: "実行するステップを選択してください"
options:
- "フル実行: 下書き投稿 → タグ設定 → 公開(推奨)"
- "下書き投稿のみ(--draft-only)"
- "タグ設定 + 公開のみ(--skip-draft): 既存下書きに対して"
- "下書き投稿 + タグ設定のみ(--skip-publish): 公開はスキップ"
Q3: "ハッシュタグを指定してください"
options:
- "フロントマターから自動取得(推奨)"
- "手動で入力する"
- "タグなし"
Q4: "公開しますか?"(Q2でフル実行またはタグ設定+公開選択時のみ)
options:
- "公開する"
- "下書きのまま(タグ設定のみ)"
Pipeline execution
Full pipeline (default)
Executes from MD file to draft posting → hashtag setting → publishing.
Step 1: note-draft (draft posting)
cd "$SKILL_DIR" && node scripts/publish.mjs <path/to/article.md>
Extract the articleKey from the output of Step 1:
✓ 記事を下書き保存しました
URL: https://note.com/username/n/n1a2b3c4d5e6 ← ここから "n1a2b3c4d5e6" を抽出
記事ID: 12345678
Extraction pattern: the string after the trailing path /n/ in the URL (n alphanumeric string starting with
Step 2: note-publish (tag setting + publishing)
cd "$SKILL_DIR" && node scripts/note-publish.mjs <articleKey> --tags "tag1,tag2" --publish
<articleKey> Use the value extracted in Step 1 for
--tags Use the tags read from the front matter or user-specified tags for
--skip-draft (tag setting + publishing for an existing draft)
cd "$SKILL_DIR" && node scripts/note-publish.mjs <articleURL or key> --tags "tag1,tag2" --publish
Skips Step 1 and operates on an existing draft article specified by the user.
--skip-publish (draft posting + tag setting only, skip publishing)
After executing Step 1, execute Step 2 without --publish :
cd "$SKILL_DIR" && node scripts/publish.mjs <path/to/article.md>
cd "$SKILL_DIR" && node scripts/note-publish.mjs <articleKey> --tags "tag1,tag2"
--draft-only (draft posting only)
cd "$SKILL_DIR" && node scripts/publish.mjs <path/to/article.md>
Skips Step 2 and executes only note-draft.
Step control options
| Option | Execution step | Use case |
|---|---|---|
| (unspecified) | note-draft → note-publish (tags + publishing) | From MD file through to publishing in one go |
--skip-draft |
note-publish only | Tags + publishing for an existing draft article |
--skip-publish |
note-draft → note-publish (tags only) | Up to draft posting + tag setting |
--draft-only |
note-draft only | Draft posting only |
Output
On full pipeline success
=== note-automation パイプライン ===
[Step 1/2] note-draft: 下書き投稿
✓ 記事を下書き保存しました
URL: https://note.com/username/n/n1a2b3c4d5e6
記事ID: 12345678
[Step 2/2] note-publish: タグ設定 + 公開
✓ ハッシュタグを設定し、記事を公開しました
URL: https://note.com/username/n/n1a2b3c4d5e6
タグ: #AI, #プログラミング
ステータス: published
=== 完了 ===
On error
If an error occurs at any step, the pipeline stops at that point and displays the error details and how to handle it.
If Step 1 succeeded, the draft article remains saved, so Step 2 can be re-executed with --skip-draft .
Related skills
- note-draft: Draft posting skill (used in Step 1)
- note-publish: Tag setting + publishing skill (used in Step 2)