with one click
prompt-editor
// Create and edit AI-facing prompts (agent / skill / rule / command, etc.) and self-check / fix them against prompt.md rules
// Create and edit AI-facing prompts (agent / skill / rule / command, etc.) and self-check / fix them against prompt.md rules
| name | prompt-editor |
| description | Create and edit AI-facing prompts (agent / skill / rule / command, etc.) and self-check / fix them against prompt.md rules |
| allowed-tools | Agent, Read, Write, Edit, Glob, Grep, Bash(ls:*), Bash(mkdir:*), Bash(find:*) |
Create or edit an AI-facing prompt (markdown). After producing the output, self-check it against .claude/rules/prompt.md and fix any violations.
Human-facing documentation (README, API references, design docs, etc.) is out of scope. That is governed by .claude/rules/document.md.
The user specifies one of:
If the argument is $ARGUMENTS, interpret it as the above. If the kind is not explicitly given, infer it from the target path:
.claude/agents/{name}.md → agent.claude/skills/{name}/SKILL.md → skill.claude/rules/{name}.md → rule.claude/commands/{name}.md → command.claude/skills/prompt-editor/templates/agent.md.claude/skills/prompt-editor/templates/skill.md.claude/skills/prompt-editor/templates/rule.md.claude/skills/prompt-editor/templates/command.md.claude/skills/prompt-editor/templates/prompt.md{...}) based on the requirements. Sections not addressed by the requirements may be removed. Add sections that are not in the template if the requirements call for them.mkdir -p.When a prompt is to be passed to the Agent tool and you embed it inside a triple-backtick code block in the body, write it as plain text:
# / ##, etc.), tables, or emphasis (** / * / __).- or 1.) for genuine enumerations and code / JSON snippets are allowed.{...} for placeholders (variables filled by the caller).When the prompt being edited contains a "markdown output template" (a skeleton of the produced markdown), do not embed it in a code block in the body. Split it out to an external file and reference it (avoids markdown-in-markdown):
templates/{name}.md under the relevant skill.Template: .claude/skills/{skill-name}/templates/{name}.md ({consumer} reads it to learn the skeleton).Exceptions (embedding in a code block is allowed):
.claude/rules/prompt.md.path:line.markdown (input-format examples and non-markdown formats are excluded). If found, externalize it in Step 3 and replace it with a path reference.If Step 2 detects violations, fix them with Edit. After fixing, re-run Step 2 to make sure no new violations were introduced. Repeat up to 2 times. If violations remain after the second pass, present the remaining list to the user and ask for judgment.
Reduce verbosity in the file produced in Step 1, including any sub-agent prompts embedded in code blocks within it. The format rules from Step 1 (e.g., plain text inside sub-agent prompt code blocks) still apply during compression. Apply Edit to remove the following:
x == a && x != b pattern) → keep only the first half.Decision criterion: if removing the text does not change the action the AI should take, remove it. Keep judgment WHY (constraints, premises, anti-misunderstanding notes).
Have a sub-agent read the file produced in Step 1 and verify whether it is interpreted without missing or misleading information (in particular, whether Step 4's compression damaged any meaning).
Prompt-interpretation tester. Read the target prompt and answer each checklist item. Do not propose fixes or edit.
Target prompt: {prompt_path}
Checklist:
1. {item 1}
2. {item 2}
...
Steps:
1. Read {prompt_path}.
2. For each item, answer in 1-2 sentences using only what is readable from the prompt. Do not use external knowledge or guesswork.
3. If an item cannot be answered from the prompt, or is ambiguous, or is contradictory, report it as unclear with a one-sentence reason.
Return value: {pass, unclear_items: [{item, reason}]} (pass: true if unclear_items is an empty array)
pass: true, finish.unclear_items are present, fix the relevant places with Edit and rerun this step. Repeat up to 3 times. If unclear items remain after the third pass, present the remaining list to the user and ask for judgment.Report the target path, the number of violations detected/fixed, whether compression occurred, and the test result (pass or remaining unclear items).
[HINT] Download the complete skill directory including SKILL.md and all related files