system-prompt-doctor
Audit, optimize, and benchmark a user-owned system prompt, developer prompt, CLAUDE.md, AGENTS.md, or agent instruction file against representative tasks. Use when the user wants to improve an agent's core instructions, make an agent more reliable, reduce instruction bloat, fix tool-use or ask-vs-act behavior, or prove whether a revised system prompt is actually better.
- License 许可
- MIT
- 所属仓库
- getedgehq/skills
- 最近更新
- 2026-11-12
- Stars
- ★ 5
- Forks
- 0
01 前言 Front Matter
- name
- system-prompt-doctor
- description
- Audit, optimize, and benchmark a user-owned system prompt, developer prompt, CLAUDE.md, AGENTS.md, or agent instruction file against representative tasks. Use when the user wants to improve an agent's core instructions, make an agent more reliable, reduce instruction bloat, fix tool-use or ask-vs-act behavior, or prove whether a revised system prompt is actually better.
02 资源文件 10
- 参考文档DERIVATION.json2.2 KB
- 参考文档eval-results/summary.json588 B
- 参考文档EVALS.md1006 B
- 许可证LICENSE1.0 KB
- 参考文档references/SOURCES.md2.5 KB
- 脚本scripts/audit_prompt.py3.5 KB
- 脚本scripts/render_card.py3.0 KB
- 脚本scripts/render.py1.2 KB
- 脚本scripts/scaffold_promptfoo.py1.6 KB
- 脚本scripts/test_audit_prompt.py857 B
03 SKILL.md 正文
System Prompt Doctor
Do not optimize a system prompt by taste. Optimize it against behavior.
Scope
This skill works on prompts/instruction files the user owns or can provide, including:
- system/developer prompts
CLAUDE.mdAGENTS.md- reusable agent instruction files
- agent persona/policy prompts
Do not claim access to hidden platform system prompts that the runtime does not expose.
Workflow
- Capture the contract. Record the target model, prompt surface, task family, tools, hard constraints, output shape, failure cases, latency/cost limits, and what must not change.
- Build the eval before editing. Prefer real historical failures and corrections. Otherwise create 8 to 20 representative cases plus hard negatives and at least a 20% holdout split.
- Baseline the current prompt. Preserve prompt hash, model/version, outputs, scores, token usage, tool behavior, and failures.
- Audit instruction architecture. Find contradictions, duplicate rules, vague defaults, missing completion criteria, tool-policy gaps, bad ask-vs-act calibration, stale examples, and context that should live outside the system prompt.
- Generate a small candidate beam. Always include:
- minimal-diff repair
- structure-first rewrite
- compact/progressive-disclosure variant Add a provider-specific adapter only when eval failures justify it.
- Optimize on train/validation only. If Promptfoo is available, use
promptfoo optimizewith a validation split. Never tune on the final holdout set. - Red-team important boundaries. Test conflicting instructions, ambiguous tasks, tool misuse, prompt injection exposure, refusal/escalation boundaries, and over/under-triggering where applicable.
- Battle the winner against the current prompt. Same model, same task manifest, same tool permissions. Report quality lift and token/cost/latency change.
- Prefer the smallest prompt that preserves measured behavior. A larger prompt is not a better prompt.
- Return evidence, not vibes. Include the optimized prompt, diff, eval set, before/after scores, regressions, token delta, residual risks, and a shareable result card.
Recommended references
The closest existing public primitive is Sentry's Apache-2.0 prompt-optimizer skill. Promptfoo's optimizer supplies the baseline → candidate → eval → held-out-selection loop. Anthropic's agent-development guidance provides a useful system-prompt structure template. See references/SOURCES.md for the source record.
Output
Produce:
Current prompt auditSuccess criteriaEval manifestOptimized promptBehavioral diffBattle result(only after real evals)Token/cost deltaRegressions / residual risksShare card
Never publish synthetic/demo scores as real benchmark results.
04 同仓库更多 Skills
zero-downtime-cloud-move
Runbook for moving a live app from one cloud to another (Google Cloud to AWS, AWS to Google Cloud, a PaaS to your own account, or one storage provider to another) without downtime. The agent inventories what is really running, builds the new stack next to the old one, keeps a one-line rollback for every phase, proves the new stack with real workloads before any traffic moves, cuts over with a checklist, watches a fixed window after the switch, copies data with an idempotent job whose second pass must report 0 left, and deletes the old cloud last. Use when someone asks to migrate, move or replatform a production app, switch cloud providers, move a backend, database files or object storage, plan a DNS cutover, or decommission an old cloud account.
zayats-ceo-branding
Build an evidence-based CEO positioning paper, Personal Branding Roadmap, and editorial workflow using Marina Zayats's public method. Use for executive branding, LinkedIn ghostwriting briefs, profile strategy, and recurring CEO-approved content planning.
yc-app-roast
YC App Roast: roast a YC or a16z Speedrun application. Use when a founder wants their YC or Speedrun answers scored, asks "what would a YC partner think", wants the weak answers found or rewritten, or wants their draft checked before they submit. Scores every answer 0-10 against public advice from YC and Speedrun partners, names the top issue with the exact words that cost points, and writes a rewrite from the founder's own facts. Works for YC and a16z Speedrun. Not affiliated with Y Combinator or a16z.
yc-app-review
YC App Review: get a YC or a16z Speedrun application reviewed by people you trust. Use when a founder wants friends, mentors or alumni to review their YC or Speedrun application, or asks to share their draft for feedback. Builds a shareable review page (one HTML file, application-portal look) where reviewers leave notes per question and press "Send my notes" to send them back as text, then parses the notes into proposed rewrites. Optional tracked private links per reviewer. Works for YC and a16z Speedrun. Not affiliated with Y Combinator or a16z.
x-growth-playbook
X Growth Playbook. Analyse a person's own X (Twitter) posts and tell them what to post next, with the numbers behind every claim. Compares quote posts vs originals, links vs no links, short vs long, time of day in their timezone, media vs text and the topics they name, reports medians with n, then writes a 10-step plan and the next 7 posts in their voice. Use when the user says "analyse my X posts", "what works on my Twitter", "how do I grow on X", "what should I post next on X", "audit my X account", or shares an X data archive, X API export or a list of their posts. Runs on the user's computer.
workplan
Create, update, or close work plans for multi-step tasks. Use when starting refactors, bug lists, feature work, migrations, or any task with 2+ steps. Also use after auto-compaction to re-orient. Triggers: "workplan", "work plan", "create a plan", "what's the plan", "where was I", or when Claude detects a multi-step task that needs tracking.