Sets hashtags and publishes articles for note.com draft articles via browser automation.
Trigger
Japanese:
- "Publish the note article"
- "Set the hashtags"
- "Publish the note draft"
- "Add tags to the article and publish it"
English:
- "Publish note article"
- "Set hashtags on note"
- "Publish draft on note.com"
- "Add tags and publish note article"
Prerequisites
- A draft article must already be created with the note-draft skill (or manually)
- Initial setup is shared with the note-draft skill (npm install, Playwright, .env)
Usage
Pre-publish confirmation flow
Before executing, confirm the following information with AskUserQuestion. Items the user has already specified in a command or message can be skipped.
Confirmation items:
- Target article: Article URL or article key (e.g.:
n1a2b3c4d5e6) - Hashtags: Comma-separated or obtained from the front matter of an MD file
- Whether to publish: Publish / Keep as draft (set tags only)
例: AskUserQuestion
question: "公開設定を確認します"
options:
- header: "対象記事"
- "URLを指定する"
- "記事キーを指定する"
- header: "ハッシュタグ"
- "タグを手動入力"
- "MDファイルのフロントマターから取得"
- "タグなし"
- header: "公開"
- "記事を公開する"
- "下書きのまま(タグ設定のみ)"
Commands
Set hashtags + publish:
cd "$SKILL_DIR" && node scripts/note-publish.mjs <article> --tags "AI,プログラミング" --publish
Set hashtags only (keep as draft):
cd "$SKILL_DIR" && node scripts/note-publish.mjs <article> --tags "AI,プログラミング"
Read tags from MD file:
cd "$SKILL_DIR" && node scripts/note-publish.mjs <article> --md <path/to/article.md> --publish
Arguments
| Argument | Description |
|---|---|
<article> |
Article URL or article key (required) |
--tags <csv> |
Comma-separated hashtags |
--md <path> |
MD file path (read tags from front matter) |
--publish |
Publish the article (saved as draft when unspecified) |
--yes |
Skip the confirmation prompt |
--help |
Show help |
--tags と --md If both are specified,--tags takes precedence.
Output
On success
✓ ハッシュタグを設定し、記事を公開しました
URL: https://note.com/username/n/n1a2b3c4d5e6
タグ: #AI, #プログラミング
ステータス: published
On failure
✗ 操作に失敗しました
エラー: ハッシュタグ入力欄が見つかりません。note.comのUI変更の可能性があります
対処: note.comのWebUIから手動で操作してください
Integrations
- note-draft: Draft posting skill. The output URL or article key can be passed to this skill's
<article>can be passed. - note-automation: Orchestration skill that runs everything from draft posting through publishing in one go
Selector health check
If the skill stops working due to a note.com UI change, you can verify selector validity with the following command:
cd "$SKILL_DIR" && node scripts/inspect-editor.mjs <articleKey> --check
Troubleshooting
- Selector not found: There may be a note.com UI change.
inspect-editor.mjs --checkCheck selector validity withlib/selectors.mjsPlease update - Login failure:
.envPlease check the credentials in - Timeout: Check your network connection and try again
- Playwright not installed:
npx playwright install --with-deps chromiumPlease run