subagent-driven-development
OBobra/superpowers298k近 7 天新增 2,631 个 star
Transform any rough prompt, request, or idea into a well-structured, context-engineered prompt using Andrej Karpathy's context engineering principles. Use this skill whenever the user asks to improve, rewrite, restructure, optimize, or "engineer" a prompt; mentions prompt engineering or context engineering; pastes a prompt and asks to make it better; wants help writing a system prompt or instructions for an AI; or says things like "turn this into a good prompt", "make this prompt work better", or "Claude isn't giving me what I want with this prompt". Also use it when the user shares a vague request and explicitly wants it converted into a reusable, high-quality prompt. Do NOT use this skill to answer or execute the original prompt itself, to write general (non-prompt) documents, or for code or content generation that isn't about crafting a prompt.
Convert a raw prompt or request into a structured prompt built on context engineering principles.
The guiding idea, from Andrej Karpathy: context engineering is "the delicate art and science of filling the context window with just the right information for the next step." A prompt is not one clever sentence — it is everything the model sees. The job is to supply each piece of context the task genuinely needs (task framing, background, examples, constraints, output format) and ruthlessly exclude everything it doesn't. Too little or wrongly-formed context and the model can't perform; too much or irrelevant context and quality degrades and cost rises.
Follow these four steps in order.
Read the user's original prompt or request and determine:
Context component checklist:
| Component | What it answers |
|---|---|
| Task definition | What exactly should the model do? What does "done" look like? |
| Role / perspective | What expertise or persona should the model adopt, if any? |
| Background / data | What facts, documents, or domain knowledge does the task depend on? |
| Audience | Who consumes the output, and at what expertise level? |
| Examples (few-shot) | Would 1–3 input→output examples disambiguate the task? |
| Constraints | Length, tone, scope, things to avoid, edge-case handling |
| Output format | Structure: prose, list, JSON, table, markdown, specific template |
| State / history | For multi-turn or agentic prompts: what prior state must be carried? |
| Success criteria | How will the user judge whether the output is good? |
Not every prompt needs every component. A component is only worth including if its absence would plausibly change the output. Adding components a task doesn't need is itself a context engineering failure — it dilutes the signal.
For each missing component:
Then, before writing the final prompt, present a single compact confirmation block:
If the user confirms everything or doesn't care ("just go ahead"), proceed with the inferences. If the raw prompt is already complete and unambiguous, skip the questions entirely and go straight to Step 3 — don't manufacture questions for their own sake.
Exception — speed mode: if the user says anything like "don't ask, just rewrite it", skip all questions, infer everything, and list the assumptions beneath the finished prompt instead.
Assemble the structured prompt. Apply these principles:
<task>, <context>, <examples>, <output_format>). Markdown headers are an acceptable alternative if the user prefers. Separate instructions from data — never interleave them.{{VARIABLE_NAME}} and explain each slot briefly.Use the template skeletons in references/templates.md as starting points — read that file when you reach this step, pick the skeleton matching the task type, and adapt it. Don't force a skeleton onto a task it doesn't fit.
Present the result in this structure:
Keep the commentary brief. The prompt is the deliverable; the explanation is a footnote.
A successfully engineered prompt should pass this self-check before delivery:
OBobra/superpowers298k近 7 天新增 2,631 个 star
MAmattpocock/skills288k近 7 天新增 10,178 个 star
MAmattpocock/skills288k近 7 天新增 10,178 个 star
MAmattpocock/skills288k近 7 天新增 10,178 个 star
AFaffaan-m/ECC278k近 7 天新增 4,046 个 star
AFaffaan-m/ECC278k近 7 天新增 4,046 个 star