prompt-engineering
Skill3 starsChanged 4 months agoMITView on GitHub
Use when designing prompts, evals, or LLM-powered features — prompt architecture, model selection, guardrails, and eval harnesses for prompt-as-product surfaces. Triggers on "prompt engineering", "LLM feature", "eval harness", "prompt design", "提示词工程", "LLM 特性", "prompt 设计".
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 6 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
CloudAI-XSkilldatabase-design
Designs database schemas, indexing strategies, query optimization, and migration patterns for SQL and NoSQL databases. Use when designing tables, optimizing queries, fixing N+1 problems, planning migrations, or when asked about database performance, normalization, ORMs, or data modeling.
Also in 4 projects that use this
dylantarreSkillperformance-optimization
Use when animation runs slow, janky, or causes frame drops
Also in 4 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
- liqiongyu/my-agents★ 29same 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 repository49 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- brainstormSkill
- oss-strategySkill
- specSkill
- researchSkill
- api-designSkill
- architectureSkill
- codebase-designSkill
- design-researchSkill
- domain-modelingSkill
- frontend-designSkill
- imagegenSkill
- image-to-codeSkill
- prototypeSkill
- schema-designSkill
- auth-implementationSkill
- breakdownSkill
- context-engineeringSkill
- error-handlingSkill
- i18nSkill
- implementSkill
- multi-agent-orchestrationSkill
- cost-optimizationSkill
- performanceSkill
- refactoringSkill
- simplifySkill
- api-testingSkill
- e2e-testingSkill
- load-testingSkill
- tddSkill
- test-generationSkill
- a11y-reviewSkill
- code-reviewSkill
- debuggingSkill
- lintingSkill
- security-reviewSkill
- ci-cdSkill
- deprecation-migrationSkill
- git-workflowSkill
- oss-polishSkill
- shippingSkill
- documentation-auditSkill
- handoffSkill
- incident-responseSkill
- observabilitySkill
- purity-auditSkill
- skill-authoringSkill
- using-skillsSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 56 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 44
Context / retrieved data: only the facts the model needs (not the whole knowledge base — context bloat degrades accuracy and raises cost)
- Distinctive: line 77
Use real production inputs where possible.
“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
Design prompts and evals as a first-class engineering deliverable. context-engineering
assembles context for a coding agent; this skill designs the prompt-as-product surface — the
prompts, model choices, guardrails, and eval harnesses behind LLM-powered features. A prompt
without an eval is an opinion; an eval without a prompt is a benchmark. Ship neither blind.
When to use
- Designing an LLM-powered feature (chat, summarization, extraction, classification, generation)
- Building or refining a prompt for production use
- Creating an eval harness to measure prompt/model quality
- Selecting a model for a specific task against cost/latency/quality trade-offs
- Triggers on "prompt engineering", "LLM feature", "eval harness", "prompt design", "提示词工程", "LLM 特性"
Not for: assembling context for a coding agent (use context-engineering); general research
on a topic (use research); API contract design for non-LLM endpoints (use api-design).
Steps
1. Define the task and success criteria
State the task in one sentence, then define measurable success criteria — without these, prompt iteration is vibes-driven. Pull from the product spec:
- Input space: what inputs will the prompt receive? (vary by length, language, edge case, adversarial)
- Output contract: structured output (JSON schema), free text, or classification?
- Quality bar: accuracy %, format adherence %, hallucination rate, latency target, cost per call
- Failure modes to prevent: what must the model NEVER do? (leak PII, invent facts, refuse valid input)
Verify: success criteria are written as measurable thresholds, not "good responses."
2. Design the prompt architecture
Structure the prompt as components, not a wall of text — each component has a job:
- System / role: who the model is, what it must and must not do (guardrails live here)
- Task instruction: the operation, stated precisely with the output format
- Context / retrieved data: only the facts the model needs (not the whole knowledge base — context bloat degrades accuracy and raises cost)
- Few-shot examples: 2–5 input→output pairs covering the happy path and an edge case; place before the actual input, after the instruction
- Output format: explicit schema or template; use structured output (JSON mode / function calling) when the downstream system parses the result
Separate stable parts (system, format) from variable parts (user input, retrieved context) so prompt caching applies to the stable prefix. Verify: each prompt component is labeled and serves one purpose; no component is duplicated.
3. Select the model
Match the model to the task's quality, latency, and cost profile — don't default to the most capable model for every call:
- Complex reasoning / generation: most capable model, accept higher latency and cost
- Classification / extraction / routing: smaller, faster, cheaper model — these tasks are over-served by frontier models
- High-volume, low-stakes: the cheapest model that meets the quality bar; route edge cases to a stronger model (cascaded / routed architecture)
- Evaluate multiple models against the eval harness (step 4) before committing — model choice is empirical, not reputational
Verify: model choice is documented with the eval comparison and the cost/latency/quality trade-off that justified it.
4. Build the eval harness
An eval harness is the test suite for prompts. It runs the prompt against a labeled dataset and scores the output against the success criteria:
- Dataset: 50–200 examples minimum, covering happy path, edge cases, and known failure modes. Use real production inputs where possible; synthesize adversarial cases for gaps.
- Metrics: automated where possible (exact match, JSON schema validity, BLEU/ROUGE for generation, classifier-based safety); human review for quality dimensions automation can't score.
- Regression suite: the eval harness runs on every prompt or model change — a prompt tweak that improves one case but regresses three others is a bug, not an improvement.
Verify: the eval harness runs from one command, produces a scorecard, and is committed alongside the prompt.
5. Add guardrails
Production prompts need defenses the prompt itself cannot provide:
- Input validation: reject malformed, oversized, or disallowed inputs before they reach the model
- Output validation: parse and schema-check model output; reject and retry (or fallback) on malformed output
- Content filters: safety classifiers for harmful content (input and output)
- PII redaction: strip sensitive data from prompts before logging; never log raw user input that may contain PII to a shared prompt-logging system
- Rate limits and cost caps: bound per-user and aggregate spend; a prompt bug that loops can burn a budget in minutes
Verify: every guardrail has a defined failure behavior (reject, retry, fallback) — silent pass-through is not a guardrail.
6. Iterate against evals
Iterate the prompt against the eval harness — change one variable at a time (instruction, examples, model, temperature), re-run evals, keep the change only if the scorecard improves without regression. Document prompt versions and their eval scores alongside the prompt, the way code commits pair with test results.
Output: docs/design/PROMPT.md — the prompt design document: task definition, success
criteria, prompt architecture (component breakdown), model selection rationale, eval harness
description and dataset, guardrails, and version history with eval scores.
Verify
- Task stated in one sentence; success criteria are measurable thresholds
- Prompt structured into labeled components (system, instruction, context, examples, format)
- Stable and variable parts separated for prompt caching
- Model selected via eval comparison, not reputation; trade-off documented
- Eval harness: 50+ examples, automated metrics, runs from one command, committed
- Guardrails on input, output, content, PII, and cost — each with a failure behavior
- Prompt changes paired with eval re-runs; no regression accepted
docs/design/PROMPT.mdproduced with architecture + eval + guardrails + version history
Red flags: a single wall-of-text prompt with no structure; choosing the most expensive model for a classification task; shipping a prompt with no eval; logging raw prompts with user PII; no output schema validation (trusting the model to always return valid JSON); prompt iteration by vibes without a scorecard; no cost cap on a production prompt.
References
- ${CLAUDE_PLUGIN_ROOT}/references/engineering-principles.md — shared discipline (surface assumptions, verify don't assume, goal-driven execution)
- references/prompt-architecture.md — prompt component breakdown, few-shot patterns, structured-output techniques, model selection matrix, eval-harness setup, guardrail catalog
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.

