prompt-engineering
Skill29 starsChanged 9 months agoMITView on GitHub
Manual-first workflow skill for redesigning, debugging, hardening, or productionizing LLM prompts and system prompts. Use when the user needs end-to-end prompt work such as stabilizing behavior, migrating across models, or preparing a prompt for production. Do not use for quick technique lookup or for general LLM-powered coding tasks.
63 other projects use a version of this.
Adopted by
Most recently taken up by
- niki914/zafirotheir own version, first seen Oct 3, 2026
- dimitritholen/1337-claudetheir own version, first seen Sep 23, 2026
- ZeroTokenClaw/agents-skillstheir own version, first seen Sep 21, 2026
- nahid-sparktales/agent-dispatchertheir own version, first seen Sep 21, 2026
- emtcmca/guildprooftheir own version, first seen Sep 20, 2026
- sabahattink/antigravity-fullstack-hqtheir own version, first seen Sep 20, 2026
Used with
Projects with it also use security-checklist, nextjs-app-router and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
atuljha23Skillsecurity-checklist
OWASP-style quick reference — authn/authz, injection, secrets, sessions, crypto, dependencies. Use during code review and before committing security-sensitive changes.
Also in 3 projects that use this
desilokesh1Skillnextjs-app-router
Next.js App Router best practices, Server Components, Server Actions, routing patterns, and data fetching strategies. Use when building Next.js applications with the App Router.
Also in 3 projects that use this
stefan-jansenSkillllm-evaluation
LLM evaluation and testing patterns including prompt testing, hallucination detection, benchmark creation, and quality metrics. Use when testing LLM applications, validating prompt quality, implementing systematic evaluation, or measuring LLM performance.
Also in 3 projects that use this
rohitg00Skilldata-engineering
Data engineering patterns for ETL pipelines, data warehousing, Apache Spark, and data quality validation
Also in 3 projects that use this
qodex-aiSkillmulti-agent-orchestration
Design and coordinate multi-agent systems where specialized agents work together to solve complex problems. Covers agent communication, task delegation, workflow orchestration, and result aggregation. Use when building coordinated agent teams, complex workflows, or systems requiring specialized expertise across domains.
Also in 3 projects that use this
mrgoonieSkillcontext-engineering
Master context engineering for AI agent systems. Use when designing agent architectures, debugging context failures, optimizing token usage, implementing memory systems, building multi-agent coordination, evaluating agent performance, or developing LLM-powered pipelines. Covers context fundamentals, degradation patterns, optimization techniques (compaction, masking, caching), compression strategies, memory architectures, multi-agent patterns, LLM-as-Judge evaluation, tool design, and project development.
Also in 7 projects that use this
Other versions63 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 63
- rohitg00/awesome-claude-code-toolkit★ 2.7ksame name
- NeoLabHQ/context-engineering-kit★ 1.7ksame name
- niki914/zafiro★ 221same name
- CodeAlive-AI/ai-driven-development★ 153same name
- nahid-sparktales/agent-dispatcher★ 59same name
- martinholovsky/claude-skills-generator★ 47same name
- Bbar0n234/learnflow-ai★ 35same name
- geekatron/jerry★ 35same name
- sabahattink/antigravity-fullstack-hq★ 30same name
- nimadorostkar/Claude-Skills-collection★ 28same name
53 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository24 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-architectSkill
- agentic-developmentSkill
- agent-lifecycle-managerSkill
- brainstormingSkill
- business-planSkill
- clarifySkill
- control-plane-auditorSkill
- deep-researchSkill
- editorial-reviewSkill
- entropy-reviewSkill
- future-aware-architectureSkill
- git-worktree-workflowsSkill
- hook-developmentSkill
- implementation-planningSkill
- issue-controllerSkill
- meta-loopSkill
- project-documentationSkill
- readme-craftsmanSkill
- repo-entropy-auditSkill
- reviewSkill
- skill-lifecycle-managerSkill
- skill-researcherSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
20 rules. 0 are common, 19 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 56 edited versions we read keep these.
19
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Use this skill when prompt work needs an actual workflow: define success, draft or repair the prompt, test it on real inputs, and harden it …
- Distinctive: line 59
Keep the main workflow lean.
- Distinctive: line 73
Before rewriting anything, pin down:
- Distinctive: line 81
Always collect at least:
- Distinctive: line 87
If you cannot explain what success means, do not jump into fancy prompting techniques yet.
- Distinctive: line 92
Start with the smallest change that could plausibly fix the problem, then escalate only if the evidence says you need more structure.
- Distinctive: line 103
Use this structure by default:
- Distinctive: line 113
Keep model-specific features explicit and removable.
- Distinctive: line 119
Treat prompt changes like code changes:
- Distinctive: line 129
Keep notes on what changed, why, and what improved
- Distinctive: line 131
If the task involves model migration, re-test on the target model directly.
- Distinctive: line 136
When the prompt is headed toward repeated or user-facing use:
- Distinctive: line 139
prefer API-level structure enforcement when the platform supports it
- Distinctive: line 148
Use the lightest tool that matches the problem.
- Distinctive: line 163
When updating the canonical skill in this repo, validate the package and eval fixture before projecting:
- Very specific: line 182
Treat skills/prompt-engineering/ as the canonical package.
- Distinctive: line 196
Start with the smallest prompt change that could fix the failure.
- Distinctive: line 198
Keep model-specific tricks explicit and easy to remove.
- Distinctive: line 199
Prefer API-level structure enforcement over prompt-only formatting when the platform supports it.
- Distinctive: line 201
Treat prompts as versioned artifacts, not disposable chat snippets.
“Common” is measured: kept by at least 6 in 10 of the 56 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.
Files
Prompt Engineering
Use this skill when prompt work needs an actual workflow: define success, draft or repair the prompt, test it on real inputs, and harden it for the target model and operating environment.
This skill is intentionally workflow-first. It is for prompt jobs with real tradeoffs, failure modes, or rollout concerns. It is not meant to be a general prompt encyclopedia.
Invocation posture: manual-first. This skill is broad and relatively
heavy, so false positives are more harmful than occasional misses.
When Not To Use
- Quick technique lookup such as "what is chain-of-thought?" or "show me a few-shot template"
- Explaining an existing prompt line by line without redesigning or validating it
- General coding, product, or research work that only happens to involve an LLM somewhere in the stack
- Tiny one-off prompt tweaks where no real evaluation, migration, or hardening decision is needed
When To Activate
- Drafting a new prompt or system prompt from requirements
- Debugging a prompt that is inconsistent, verbose, unsafe, or hard to steer
- Migrating prompt behavior between Claude, GPT, Gemini, or open-source models
- Hardening an agent prompt against injection, tool misuse, or output drift
- Turning an ad hoc prompt into a reusable template, chain, or production asset
- Setting up a realistic evaluation plan for prompt quality, format adherence, latency, or cost
Outputs
Depending on the request, produce one or more of:
- a revised prompt or system prompt
- a failure-mode diagnosis with targeted fixes
- a cross-model migration checklist
- a prompt evaluation plan with representative test cases
- a production hardening checklist for output control, safety, and monitoring
Reference Files
Keep the main workflow lean. Read deeper references only when the task needs them.
| Reference | When to read |
references/advanced-reasoning.md | You need structured reasoning patterns such as CoT, ToT, ReAct, self-consistency, or self-refine |
references/cross-model-guide.md | You are migrating prompts across Claude, GPT, Gemini, or open-source models |
references/production-patterns.md | You need versioning, evaluation, caching, rollout, monitoring, or prompt-chain design |
references/security-patterns.md | You are handling untrusted input, tool use, prompt injection, or output validation |
Core Workflow
Workflow 1: Scope The Prompt Job
Before rewriting anything, pin down:
- The task and the exact output shape
- What "good" looks like with 3-5 representative examples
- The constraints: model, context budget, latency, cost, determinism, safety
- The current failure modes: wrong format, wrong content, instability, unsafe behavior, or cross-model drift
Always collect at least:
- one happy-path input
- one edge case
- one adversarial or malformed case
If you cannot explain what success means, do not jump into fancy prompting techniques yet.
Workflow 2: Draft Or Repair With Minimum Necessary Complexity
Start with the smallest change that could plausibly fix the problem, then escalate only if the evidence says you need more structure.
| Level | Default move | Use when |
L1 | Clear direct instruction | First pass for almost every task |
L2 | Add explicit constraints and output format | The model drifts on brevity, style, or schema |
L3 | Add examples | The model still misclassifies, misformats, or misses edge cases |
L4 | Add reasoning scaffold | The task needs multi-step analysis or error checking |
L5 | Split into a chain or reusable template | Intermediate validation or multi-stage processing matters |
Use this structure by default:
[Role or system context]
[Task instructions]
[Examples, if needed]
[Input data]
[Output format]Keep model-specific features explicit and removable. Do not bury XML tags, prefilling tricks, or vendor-specific schema APIs inside a supposedly model-agnostic prompt.
Workflow 3: Evaluate On Real Work
Treat prompt changes like code changes:
- Record a baseline on representative inputs
- Change one variable at a time when possible
- Re-run the same cases on the revised prompt
- Compare:
- task accuracy or usefulness
- format compliance
- consistency across repeated runs
- latency and token cost
- Keep notes on what changed, why, and what improved
If the task involves model migration, re-test on the target model directly. Do not assume prompt portability just because two models are both strong.
Workflow 4: Productionize And Harden
When the prompt is headed toward repeated or user-facing use:
- version the prompt and template variables
- prefer API-level structure enforcement when the platform supports it
- isolate untrusted input from instructions
- restate critical boundaries when injection risk exists
- validate outputs before downstream actions depend on them
- define rollback or fallback behavior for high-impact uses
- monitor drift, edge cases, and cost regressions over time
Technique Selection Guide
Use the lightest tool that matches the problem.
| Need | Default move | Read next |
| Reliable structured output | Show the exact format first; use schema enforcement when available | references/production-patterns.md, references/cross-model-guide.md |
| Stronger analytical reasoning | Prefer model-native reasoning first; add a structured scaffold only if needed | references/advanced-reasoning.md |
| Cross-model migration | Remove vendor-specific tricks, normalize delimiters, then re-test on the target model | references/cross-model-guide.md |
| Injection resistance | Isolate data, repeat critical constraints, and validate outputs | references/security-patterns.md |
| Multi-step pipeline | Split into a chain only when intermediate validation adds value | references/production-patterns.md |
Validate And Evaluate
This canonical package ships a lightweight eval suite under eval/ for
realistic prompt-work scenarios.
When updating the canonical skill in this repo, validate the package and eval fixture before projecting:
uv run python skills/skill-lifecycle-manager/scripts/quick_validate.py skills/prompt-engineering
uv run python skills/skill-lifecycle-manager/scripts/validate_eval_suite.py skills/prompt-engineering/eval/eval-cases.jsonFor behavioral review, run the cases in eval/eval-cases.json as realistic
tasks and check whether the response:
- defines success before rewriting
- proposes the smallest effective prompt change
- calibrates advice to the target model or runtime
- includes a concrete validation plan
- treats safety and output control explicitly when risk is present
Projection And Install Notes
Treat skills/prompt-engineering/ as the canonical package. Generate runtime
surfaces from it rather than hand-editing copies:
uv run python skills/skill-lifecycle-manager/scripts/project_skill.py skills/prompt-engineering --platform all
uv run python skills/skill-lifecycle-manager/scripts/validate_projection.py skills/prompt-engineering --platform allprojection.json excludes author-only evaluation artifacts from runtime
projections so Codex and Claude Code only receive the execution-relevant
package.
Best Practices
- Start with the smallest prompt change that could fix the failure.
- Measure on representative inputs before and after edits.
- Keep model-specific tricks explicit and easy to remove.
- Prefer API-level structure enforcement over prompt-only formatting when the platform supports it.
- Treat prompts as versioned artifacts, not disposable chat snippets.
Common Pitfalls
| Pitfall | Why it hurts | Fix |
| Jumping to exotic techniques too early | Complexity hides the real failure mode | Define success and start at the lowest effective level |
| Shipping without negative cases | Edge failures appear only in production | Test happy-path, edge, and adversarial inputs |
| Assuming prompt portability | Vendor behaviors diverge in subtle ways | Re-test on the target model and remove model-specific tricks |
| Mixing trusted instructions with untrusted data | Injection risk rises sharply | Delimit, isolate, and restate boundaries |
| Changing many variables at once | You cannot tell what improved | Run one targeted fix at a time where practical |
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
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.

