draft

A command that creates a draft of an X Articles post in Markdown from a topic and target audience.

In plain words
What is it for?
Use it to prepare compact bilingual X Articles drafts, save them in the project’s .x-article directory, and pass the saved file to a later publishing step.
Why use it?
It provides a fixed article structure and writing rules, while hiding private project details and adapting tables and code for X Articles. It also saves each draft with a timestamp so versions do not get mixed up.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/signalcompose/claude-tools/draft
Clone the repo
git clone --depth 1 https://github.com/signalcompose/claude-tools
Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 972 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00010 $0.00972
Opus 5 $0.00005 $0.00486
Sonnet 5 $0.00002 $0.00194
Haiku 4.5 $0.00001 $0.00097

Measured 2d ago against content hash f02b352fe21b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

draft scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/x-article/commands/draft.md · 72 lines

What it actually says

X Articles ドラフト生成

Step 1: 記事構造ガイドを読む

${CLAUDE_PLUGIN_ROOT}/skills/x-articles-knowledge/references/article-structure.md必ず最初に読むこと。

Step 2: ドラフト生成(方針の厳守)

以下の方針をすべて厳守してドラフトを生成する:

プライバシー・公開範囲

  • プライベートなプロジェクト名・リポジトリ名は伏せる
    • 例: 「あるOSSプロジェクト」「チームで使っているツール」等に置き換え
  • パブリックな OSS・GitHub public リポジトリはそのまま記載可
  • コードは必ず抽象化(プロジェクト固有の変数名・ファイルパス等を除去)

文体・構成

  • コンパクトに書く(各セクション 300 字程度を目安)
  • For English Readers セクションと TL;DR は英語で書く
  • 読者が「何を検索すれば良いか」が伝わる書き方
  • 構成テンプレート(article-structure.md 参照)に従う

X Articles 制約の適用

  • テーブル → Before → After テキスト形式、または箇条書きに変換
  • コードブロック → [ここにコードを手動挿入: コードブロックボタンで追加] フラグに
  • 水平線 → [ここに仕切りを手動挿入: エディタの「─」ボタンで追加] フラグに

Step 3: ファイルとして保存

生成したドラフトをマークダウンファイルとして保存する。

ファイル名: タイムスタンプ付きで生成する(キャッシュ問題・バージョン混在を防ぐため)

draft-{トピックの英語スラッグ}-{YYYYMMDD}-{HHmm}.md
例: draft-draftjs-paste-tips-20260219-1430.md

タイムスタンプは現在時刻を使用すること。

保存先: .x-article/ ディレクトリ(存在しない場合は作成する)。 Write ツールには絶対パスが必要なため、pwd で取得したカレントディレクトリを先頭に付けて絶対パスを構築すること(例: pwd/Users/yamato/proj なら /Users/yamato/proj/.x-article/draft-xxx.md)。 このディレクトリは .gitignore 済みのワークスペースであり、/x-article:cleanup で一括削除できる。

保存後、ファイルパスを明示的に出力する(publishフェーズで引数として使用するため):

ドラフトを保存しました:
  ファイルパス: /path/to/draft-draftjs-paste-tips-20260219-1430.md

次のコマンドで公開できます:
  /x-article:publish /path/to/draft-draftjs-paste-tips-20260219-1430.md

Step 4: 次のステップを案内

ドラフト生成後、以下を案内する(ファイルパスを各コマンドに明記すること):

  1. /x-article:header --title "記事タイトル" でヘッダー画像を生成
  2. /x-article:review {ファイルパス} でファクトチェック
  3. /x-article:publish {ファイルパス} で公開

フェーズを分けるメリット: 下書きフェーズと公開フェーズを別セッションで実行できる。長文記事でコンテキストが枯渇した場合も、ファイルパスを引数に渡すことで新セッションから継続できる。

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 72 lines · 10 tokens per session scan A f02b352fe21b

Subscribe to this mod's changes

draft is a command published in the GitHub repository signalcompose/claude-tools (4 stars, last pushed 5d ago), licensed MIT. It adds 10 tokens to every session and 972 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.