agentleFS
zircotezircote/improver/skills/improve-prompt/SKILL.md

improve-prompt

Skill0 starsChanged 4 months agoMITView on GitHub

This skill should be used when the user asks to "improve this prompt", "refine my prompt", "enrich this prompt", "make this prompt better", "strengthen this prompt", or pastes a rough prompt draft and asks for a stronger version. Enriches a draft prompt against the researched prompt rule pack, folding any missing information into the output as clarifying questions.

7 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run these four steps in order.

    line 17
  2. Distinctive:

    Never silently convert it.

    line 33
  3. Very specific:

    Run the draft against every rule's gap_check.

    line 40
  4. Distinctive:

    NEVER use placeholders like [LANGUAGE], [FILE], [TOPIC].

    line 99
  5. Distinctive:

    Keep the improved prompt concise but complete.

    line 104
  6. Very specific:

    When the user asks why a change was made ("why did you add X?"), cite the specific rule id and its finding_refs — resolved to the full …

    line 105

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Improve Prompt

Enrich the user's draft prompt into a complete, ready-to-use prompt by applying the prompt rule pack. Enrichment is not generation from nothing: strengthen the draft the user already wrote, fill structural gaps, tighten ambiguity — never redirect the stated intent.

Pipeline

Run these four steps in order.

1. Load the rule pack

Read ${CLAUDE_PLUGIN_ROOT}/rules/prompt-rules.json (equivalently ../../rules/prompt-rules.json from this skill's base directory). Every enrichment decision traces to a rule in that pack; the pack maps each rule to the research finding(s) behind it via finding_refs, resolvable in ${CLAUDE_PLUGIN_ROOT}/rules/findings-index.json.

2. Confirm the artifact kind

The invocation of this skill is the explicit classification: the draft is a prompt. If the draft clearly reads as a different artifact kind instead — a goal (a desired end state) or a loop (a recurring cadence or open-ended monitoring task) — surface that mismatch as the first clarifying question. Never silently convert it. In default single-turn mode, honor the explicit invocation: enrich the draft as a prompt anyway, with the mismatch question folded in as the first line of the returned artifact. In --interactive mode, ask the mismatch question first, before any other gap.

3. Detect gaps

Run the draft against every rule's gap_check. Produce an internal gap list of {rule_id, finding_refs, description} records, carrying every finding ref the rule cites. This one list feeds both elicitation modes below — never maintain mode-specific notions of what counts as a gap.

4. Elicit and synthesize

Default (single-turn): fold each gap into the returned prompt as a concise clarifying question at the point where the answer belongs. Nothing is invented; nothing is a placeholder token.

--interactive (only when the argument includes the flag): render the same gap list as AskUserQuestion calls — at most 4 questions per call, batched until every gap is resolved — then synthesize the enriched prompt with the answers folded in as real content. If the user declines or skips a question, fall back to folding that gap into the output as a clarifying question — never invent an answer.

Synthesize by applying every applicable rule from the pack. Structured output is the default: emit the prompt with explicit XML-tagged sections (role / context / task / constraints / output-format — the section set that targets the prompt's purpose). When the prompt's output will be machine-parsed, include an explicit JSON Schema output contract instead of prose format descriptions. Freeform prose output is the exception and requires a genuine reason — a judgment made internally, never stated in the output.

Output format

Return ONLY the improved prompt inside a code block. Nothing else. Exception: when the user explicitly asks for the rationale or grounding behind changes, append the per-change citations (rule id → finding @id) after the code block.

[improved prompt here]

Example

<example> Draft: "summarize customer feedback"

Improved:

<role>You are a customer-insights analyst.</role>
<context>Feedback arrives as free-text survey responses. Which product or time period this covers is unstated — see the question in <task>.</context>
<task>Summarize the recurring themes in the provided feedback. Clarify first: which product and time period should this cover, and roughly how many responses are in scope?</task>
<constraints>Base every theme on at least two distinct responses; quote one representative response per theme; do not speculate beyond the provided text.</constraints>
<output-format>A ranked list of themes, each with a one-sentence summary, a count of supporting responses, and one representative quote.</output-format>
</example>

Critical rules

  • Return ONLY the code block with the improved prompt — no analysis, no explanations, no "Changes Made".
  • The improved prompt must be COMPLETE and READY TO USE immediately, including any clarifying questions needed to proceed.
  • NEVER use placeholders like [LANGUAGE], [FILE], [TOPIC]; NEVER create templates. If information is missing, fold a concise clarifying question into the prompt; do not invent details.
  • Preserve the original intent: add specificity, structure, and missing elements; never substitute a different task.
  • Keep the improved prompt concise but complete.
  • When the user asks why a change was made ("why did you add X?"), cite the specific rule id and its finding_refs — resolved to the full finding @id and source URL via rules/findings-index.json — not a restated heuristic.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.