system-prompt-curator
Create or improve production-grade system prompts for autonomous coding agents using evidence-gated workflow, explicit tool contracts, and completion criteria. Use when "write a system prompt", "improve an agent prompt", "curate system prompt", "autonomous agent prompt", or "review my agent prompt".
What this skill does
# System Prompt Curator — production agent prompt extension `extend` op-cell: turn a role, task class, and tool surface into a durable autonomous-agent system prompt; or correct an existing prompt until its workflow and completion gates are load-bearing. Optimize for agents that must act in a repository, recover from tool failures, verify their work, and deliver evidence rather than analysis. Keep the prompt self-contained. Do not depend on tribal context, hidden tools, model names, or sibling documents. The generated prompt must tell the agent who it is, where it works, what tools exist, what phases it must follow, what evidence gates completion, and how to recover when reality disagrees. Core payloads: - `references/principles.md` — ten research-backed prompt principles and the invariant each protects. - `references/anti-patterns.md` — failure mode → why it fails → fix table used by `--improve`. - `references/templates.md` — mandatory template, GitHub-issue template, research template, and harness-level reinforcements. ## When to Apply - User asks to write, curate, review, or improve a system prompt for an autonomous coding agent, research agent, issue-to-PR agent, review agent, or orchestrator-dispatched worker. - Existing prompt lets an agent stop after reading, answer instead of acting, discover tools lazily, skip verification, or call completion without concrete artifacts. - A team needs a prompt that survives no-human-in-loop execution: repository exploration, code edits, failure recovery, tests, commit/PR, and evidence summary. - The prompt will run inside a harness with tools and completion actions that can be made explicit. ## When NOT to Apply - User wants a one-off chat reply, user-facing copy, marketing prose, or a normal instruction message. - The target is a short non-agent prompt where no tools, workflow, or completion gate exists. - The desired behavior depends on a harness feature that does not exist and cannot be expressed in the prompt. Report the missing harness primitive instead of pretending text can enforce it. - The user asks for adversarial jailbreak language, hidden-policy bypasses, or threats. Replace with structured gates and normal imperative language. ## Workflow ### Mode A — create 1. **Clarify by axis with `ask`.** If role, tool surface, autonomy level, or deliverable is underspecified, ask single-select axes. Mark one boring default as Recommended. - Role anchor: software engineer / technical analyst / reviewer / orchestrator / domain specialist. - Execution mode: autonomous end-to-end / human-in-the-loop / read-only research / review-only. - Tool surface: filesystem, search, shell, editor, git, issue tracker, PR API, browser, debugger, memory, custom tools. - Deliverable: patch, PR, report, review findings, plan, migration, diagnosis. - Verification: unit tests, typecheck, lint, e2e, repro script, source citations, manual QA, external check. 2. **Select template.** Use `references/templates.md` mandatory skeleton unless the role exactly fits the GitHub-issue or research template. Preserve section order: IDENTITY → ENVIRONMENT → TOOLS → WORKFLOW → COMPLETION → TIPS → WHAT NOT TO DO → EXAMPLES. 3. **Instantiate concretely.** Replace every placeholder with real role, project context, tool docs, commands, completion fields, and failure-recovery guidance. Never invent tools. If a tool is unknown, omit it and state the assumption outside the prompt. 4. **Add a worked trajectory.** Include at least one complete successful path. For coding agents, show explore → fail/recover → patch → verify → deliver. For research agents, show source selection → conflicting evidence → uncertainty statement. 5. **Add harness recommendations.** For autonomous or orchestrator-dispatched agents, include harness-level reinforcements from `references/templates.md`: completion validation, separate help path, observation formatting, empty-output handling, truncation rules, environment suppression, history compression, malformed-output retry. 6. **Self-evaluate before returning.** Run the validation gate below. Fix violations before output. 7. **Output.** Return the prompt in a fenced block, followed by a compact design note: identity choice, completion gate, verification evidence, token estimate, and any harness assumptions. ### Mode B — `--improve` 1. **Read target first.** Inspect the full prompt file or pasted prompt. Do not rewrite from memory. 2. **Classify scope.** Determine agent role, autonomy level, tools, deliverable, completion action, and expected evidence. 3. **Scan anti-patterns.** Use `references/anti-patterns.md`; report every confirmed issue. Certainty: - HIGH: explicit text causes the failure (`complete immediately`, no phases, no completion preconditions, no tools, no verification). - MEDIUM: structure permits the failure (tools only discoverable, vague role, weak deliverable, no recovery example). - LOW: style risk or missing reinforcement (aggressive language, token bloat, weak harness hints). 4. **Check all principles.** Evaluate each principle in `references/principles.md` as PASS / FAIL / PARTIAL. Do not skip principles because the prompt is short. 5. **Report findings table before rewrite.** Columns: Severity, Principle, Evidence, Risk, Fix. Keep evidence concrete: quote the phrase or section name. 6. **Rewrite.** Apply all HIGH and MEDIUM fixes. Apply LOW fixes when they reduce entropy without changing the intended role. Preserve useful domain content; delete ceremony, threats, hidden assumptions, placeholders, and duplicated instructions. 7. **Explain delta.** After the improved prompt, list material changes by invariant: identity, tool contract, workflow, completion, verification, examples, harness recommendations. 8. **Self-evaluate before returning.** Run the validation gate below against the rewritten prompt. ## Findings Severity | Severity | Meaning | Required Action | |---|---|---| | HIGH | Prompt can complete without work, call finish without evidence, use nonexistent tools, or skip verification | Fix before returning | | MEDIUM | Prompt likely drifts: vague identity, weak phases, no recovery guidance, lazy tool discovery, missing example | Fix unless user explicitly requested minimal prompt | | LOW | Style or harness hardening issue: aggressive phrasing, token bloat, missing observation formatting, no output truncation rule | Fix when cheap; otherwise recommend | ## Constitutional Rules 1. **Identity is behavioral.** Name the work the agent performs: senior software engineer, technical analyst, security reviewer. Avoid abstract labels that do not imply action. 2. **Autonomy is explicit.** If the agent is autonomous, it continues until the deliverable exists or a named blocker is proven. Analysis is not completion. 3. **Tools are declared upfront.** Every tool used by the workflow appears in the prompt with when-to-use guidance. No hidden tool discovery. 4. **Phases are ordered.** Explore → Plan → Implement → Verify → Deliver for coding work. Research substitutes Scope → Investigate → Analyze → Report. Do not let Plan or Analyze be an exit. 5. **Completion is evidence-gated.** The finish path requires concrete artifacts: modified files, tests or citations, commit/PR/report URL, blockers tried, and summary. 6. **Failure recovery is taught.** Include at least one command/tool failure path and instructions to change approach before retrying. 7. **Tone is firm, not theatrical.** Use normal imperative language and checklists. Threats, all-caps warnings, and panic language add noise. 8. **Self-contained over clever.** The prompt must survive being copied into a fresh harness. Embed the necessary rules; do not rely on references available only to the author. ## Validation Gates Before returning any created or improved prompt, verify: | Gate | Pass Criteria | Blocking | |---|---|---| | Role anchor | Identity matches task type and implies the correct behavior | Yes | | Tool con
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.