mcpField
W
write-prompt

write-prompt

github.com/normanderwanその他18 回インストール1 日前に更新
リポジトリ

write-prompt について

AI モデルが指示として従うテキストを作成・編集するときに使用します。CLAUDE.md や AGENTS.md のルール、SKILL.md、スラッシュコマンド、フックメッセージ、サブエージェントまたはシステムプロンプト、変数付きプロンプトテンプレート、LLM API 呼び出し用プロンプトが対象です。また、こうしたプロンプトが一貫しない結果や誤った結果を出す場合にも使用します。一行のルールでも、草案を作る前に読み込んでください。

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/normanderwan/claude-casebook --skill write-prompt

インストール後、Claude Code で/write-promptを入力して読み込まれたか確認します。

同梱ファイル

SKILL.md と一緒にインストールされる参考資料やスクリプト。

SOURCES.md
LICENSES/
MIT-obra-superpowers.txt
MIT-wshobson-agents.txt
references/
persuasion-principles.md

README(原文)English

プロジェクトの README より

この README の日本語訳はまだありません。以下は英語の原文です。日本語の紹介はページ上部をご覧ください。

Write Prompt

Covers what Claude skips without this skill. Everything else about prompt writing, Claude already does: do not pad a prompt with it.

Prompts run in production (LLM API, templates)

A prompt that processes inputs nobody reviews one by one needs all three:

  • A worked example. At least one input with its exact expected output. Pick it from the hard cases (messy, multilingual, several items), never a clean one: "Show, Don't Tell: Examples are more effective than descriptions" [1], and an example that does not match the target task misleads ("Example pollution" [1]).
  • The exact output schema. Field names, types, formats (ISO 8601, ISO 4217...), allowed values. Say what to output when a field cannot be found (null, never a guess).
  • A rule for each edge case the input can produce. None, several, ambiguous, malformed: state the output for each, such as an empty list, one entry per item, or a review flag. "No error handling: Assuming outputs will always be well-formed" is a named pitfall [1].

Rules an agent reads (CLAUDE.md, hooks, skills, commands)

Claude scans bullet and tree structure more reliably than it parses paragraphs. Default to lists over prose for rules, steps, or conditions.

  • One item per condition, each stating the trigger and the action, or what is blocked and what to do instead.
  • Don't restate what Claude already knows. No explanation of what git, a branch, JSON or a tool Claude already understands is (e.g. what AskUserQuestion does): the reader is a model that knows them.

Persuasion principles

Writing a rule that must hold under pressure (a skill, a hook message, a sub-agent prompt) -> read references/persuasion-principles.md: seven principles (authority, commitment, scarcity, social proof, unity, reciprocity, liking), which to combine per skill type, and their ethical limits.


[1] wshobson/agents, prompt-engineering-patterns (MIT). Sources: SOURCES.md.

コメント