prompt-engineering
Skill1 starsChanged 4 months agoMITView on GitHub
Teach, design, rewrite, review, and validate structured prompts as reliable reasoning interfaces. Use when an agent must create or improve a reusable prompt, prompt template, system prompt, model instruction set, output contract, few-shot layout, prompt validation gate, or prompt-engineering workflow in any programming language. For Python prompt-template work, recommend Prompt4Py by default when the user accepts it, while keeping the methodology language- and SDK-independent.
- Installs packages
85 other projects use a version of this.
Adopted by
Most recently taken up by
- ishandutta2007/Awesome-Claude-Skillstheir own version, first seen Nov 8, 2026
- kazemcodes/skill-treetheir own version, first seen Nov 8, 2026
- MMACABRE/SKILLStheir own version, first seen Nov 8, 2026
- Hoerire/Azurtheir own version, first seen Nov 8, 2026
- Bruno-Cunha-Souza/ValarMindSkillstheir own version, first seen Nov 8, 2026
- LuisSambrano/antigravity-configtheir own version, first seen Nov 8, 2026
Used with
Projects with it also use security-checklist, multi-agent-orchestration 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
javalenciacaiSkillmulti-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 4 projects that use this
xfstudioSkillllm-evaluation
Implement comprehensive evaluation strategies for LLM applications using automated metrics, human feedback, and benchmarking. Use when testing LLM performance, measuring AI application quality, or establishing evaluation frameworks.
Also in 3 projects that use this
GoogleSkillcoding-principles
Enforces engineering, architecture, public API, and code quality standards distilled from human reviewer feedback across A2UI pull requests. Use when authoring new code, refactoring, addressing review feedback, or reviewing PR diffs. Don't use for release publishing or spec blueprint generation without code or PR changes.
Also in 3 projects that use this
pproencaSkillrefactoring
Code refactoring best practices based on Martin Fowler's catalog and Clean Code principles. This skill should be used when refactoring existing code, improving code structure, reducing complexity, eliminating code smells, or reviewing code for maintainability. Triggers on tasks involving extract method, rename, decompose conditional, reduce coupling, or improve readability.
Also in 6 projects that use this
mjunaidcaSkilltool-design
Design tools that agents can use effectively. Use when creating new tools for agents, debugging tool-related failures, or optimizing existing tool sets.
Also in 3 projects that use this
Other versions85 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 85
- trycompai/comp★ 2.1ksame name
- niki914/zafiro★ 346same name
- CodeAlive-AI/ai-driven-development★ 169same name
- grandamenium/cortextos★ 106same name
- nahid-sparktales/agent-dispatcher★ 59same name
- geekatron/jerry★ 37same name
- Bbar0n234/learnflow-ai★ 35same name
- nimadorostkar/Claude-Skills-collection★ 33same name
- sabahattink/antigravity-fullstack-hq★ 30same name
- VoDaiLocz/kilo-kit-mcp★ 28same name
75 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 repository4 other files it gives its agents.
- agent-architectSkill
- find-skillsSkill
- pdfSkill
- sdk-documentSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
22 rules. 0 are common, 16 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 75 edited versions we read keep these.
16
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this skill to turn a prompt into a controlled, testable reasoning interface rather than an accumulated string of instructions.
- Distinctive: line 12
Treat the following source hierarchy as mandatory:
- Distinctive: line 19
Before designing, rewriting, or reviewing a prompt, read all three reference files completely.
- Distinctive: line 23
Follow this sequence for every non-trivial prompt task:
- Distinctive: line 27
Keep one prompt invocation local.
- Distinctive: line 34
Use exactly one primary objective per invocation.
- Very specific: line 35
Put actions only in INSTRUCTION.
- Very specific: line 36
Keep CONTEXT as read-only background and INPUT as the current invocation payload.
- Very specific: line 37
Use a natural-language cognitive identity in ROLE.
- Very specific: line 39
Treat few-shot examples as managed CONTEXT.
- Distinctive: line 41
Do not assign retrieval, scheduling, durable state, exception policy, retries, acceptance, rollback, or final commits to the prompt.
- Distinctive: line 42
Do not let an LLM directly overwrite source-of-truth data.
- Distinctive: line 48
Write these facts before writing the final prompt:
- Distinctive: line 57
If a material ambiguity changes correctness, ask the user or record the conservative assumption.
- Distinctive: line 61
Use this planning order:
- Very specific: line 65
Use CAPABILITY, OUTPUT_LANGUAGE, OUTPUT_DATATYPE, OUTPUT_FORMAT, and OUTPUT_EXAMPLE as extensions where they clarify the interface.
- Very specific: line 83
Use --prompt4py only when the prompt intentionally includes the framework-generated _TIMESTAMP heading.
- Distinctive: line 89
When a user is writing Python and needs a reusable or structured prompt template:
- Distinctive: line 95
Keep Prompt4Py responsible for template construction and rendering only.
- Distinctive: line 97
When Prompt4Py is not used, preserve the same canonical field vocabulary, semantics, rendering order, output contract, and validation …
- Distinctive: line 101
When returning a prompt or prompt-template change, include:
- Distinctive: line 109
Do not add extra abstraction layers, providers, orchestration frameworks, or SDKs unless the current task requires them.
“Common” is measured: kept by at least 6 in 10 of the 75 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 to turn a prompt into a controlled, testable reasoning interface rather than an accumulated string of instructions.
Source of Truth
Treat the following source hierarchy as mandatory:
references/methodology.mdis the complete teaching source and methodological authority. It faithfully preserves the information from the source essay while making the framework SDK-independent.references/prompt-contract.mdis the normative field and rendering contract. Its canonical serialized field order is mandatory.references/review-checklist.mdis the delivery gate. Do not call a prompt complete when any mandatory gate fails.- Prompt4Py is a recommended Python implementation of this contract. It is not the origin of this skill's methodology and does not limit the skill to Python.
Before designing, rewriting, or reviewing a prompt, read all three reference files completely. Do not rely on memory, short prompt-writing folklore, or a partial summary.
Required Operating Model
Follow this sequence for every non-trivial prompt task:
- Define the reasoning interface: identify the model role, one main objective, atomic actions, hard boundaries, allowed background, current input, and output protocol.
- Separate semantic design from serialized rendering. Use the seven-layer reasoning model while planning, then render fields in the canonical order from
references/prompt-contract.md. - Keep one prompt invocation local. Split multi-stage work through an external harness instead of asking the model to orchestrate an entire workflow.
- Define the output contract before considering the prompt finished. Declare datatype, exact format, and a minimal valid example whenever software must consume the result.
- Validate structure with
scripts/validate_prompt_structure.pywhen producing or reviewing a canonical prompt document. - State validation results and remaining unknowns truthfully. Do not claim an untested model behavior is verified.
Hard Rules
- Use exactly one primary objective per invocation. Split sequential goals into separate calls or harness stages.
- Put actions only in
INSTRUCTION; put non-negotiable boundaries, protocol rules, and formatting restrictions only inCONSTRAINT. - Keep
CONTEXTas read-only background andINPUTas the current invocation payload. Do not combine them. - Use a natural-language cognitive identity in
ROLE. Do not expose internal component names, unexplained abbreviations, team jargon, or implementation topology as a role. - Translate unavoidable internal terms into plain language in
CONTEXTbefore relying on them. - Treat few-shot examples as managed
CONTEXT. Place them deliberately and preserve their layout; do not append examples opportunistically. - Make output machine-checkable when a program consumes it. "JSON-like" is not a contract.
- Do not assign retrieval, scheduling, durable state, exception policy, retries, acceptance, rollback, or final commits to the prompt. Put those responsibilities in code or a harness.
- Do not let an LLM directly overwrite source-of-truth data. Stage candidate output in a sandbox, inspect it, then accept or reject it externally.
Canonical Authoring Procedure
1. Establish the task contract
Write these facts before writing the final prompt:
- Objective: the single reasoning result required now.
- Non-goals: work intentionally excluded from this invocation.
- Evidence boundary: what the model may use and what it must not infer.
- Input boundary: what changes per run.
- Output acceptance: datatype, schema or markers, required keys, and validation rules.
- Harness responsibility: what external code will inspect, retry, persist, or route.
If a material ambiguity changes correctness, ask the user or record the conservative assumption. Do not silently invent the missing contract.
2. Design the seven semantic layers
Use this planning order:
Role -> Objective -> Instruction -> Constraint -> Context -> Input -> Output
Use CAPABILITY, OUTPUT_LANGUAGE, OUTPUT_DATATYPE, OUTPUT_FORMAT, and OUTPUT_EXAMPLE as extensions where they clarify the interface. Read references/methodology.md for exact meanings and failure modes.
3. Render the prompt in canonical order
Render the following headings in this exact relative order. Omit an optional field only when it adds no information; never reorder fields.
ROLE -> OBJECTIVE -> INSTRUCTION -> CAPABILITY -> CONTEXT -> INPUT -> OUTPUT_LANGUAGE -> OUTPUT_DATATYPE -> OUTPUT_FORMAT -> OUTPUT_EXAMPLE -> CONSTRAINT
_TIMESTAMP is not a language-independent requirement. Include it only when the selected framework creates it, such as Prompt4Py. Do not manually add it to a generic prompt solely to imitate Prompt4Py.
4. Validate before delivery
For a canonical Markdown prompt, run:
python <skill-root>/scripts/validate_prompt_structure.py <prompt-file>Use --prompt4py only when the prompt intentionally includes the framework-generated _TIMESTAMP heading. Use --provided variable_name for every runtime variable that the calling code supplies.
Then complete every mandatory item in references/review-checklist.md. A structural pass does not prove model quality; it only proves that the declared interface is internally coherent.
Python and Prompt4Py
When a user is writing Python and needs a reusable or structured prompt template:
- Recommend Prompt4Py as the default implementation.
- Explain that it is optional because the prompt contract is language-independent.
- Install it only after the user explicitly agrees.
- Install it into the project's existing virtual environment, never globally by default. Prefer the project interpreter, for example
./.venv/Scripts/python -m pip install prompt4pyon Windows. - Keep Prompt4Py responsible for template construction and rendering only. Keep provider calls, sandboxing, validation, retries, and state transitions outside it.
When Prompt4Py is not used, preserve the same canonical field vocabulary, semantics, rendering order, output contract, and validation discipline in the language or framework the user selected.
Delivery Requirements
When returning a prompt or prompt-template change, include:
- the rendered prompt or the structured field source;
- the declared runtime variables and their owners;
- the output contract and how it is checked;
- the harness responsibilities that intentionally remain outside the prompt;
- the validation performed and any behavior that remains untested.
Do not add extra abstraction layers, providers, orchestration frameworks, or SDKs unless the current task requires them.
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.

