Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/n-n-code/n-n-code-skills/prompt-engineeringnpx skills add n-n-code/n-n-code-skills --skill prompt-engineeringgit clone --depth 1 https://github.com/n-n-code/n-n-code-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/n-n-code/n-n-code-skills/prompt-engineering)<a href="https://agentmods.dev/skills/n-n-code/n-n-code-skills/prompt-engineering"><img src="https://agentmods.dev/badge/skills/n-n-code/n-n-code-skills/prompt-engineering.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00087 | $0.01720 |
| Opus 5 | $0.00044 | $0.00860 |
| Sonnet 5 | $0.00017 | $0.00344 |
| Haiku 4.5 | $0.00009 | $0.00172 |
Grade B, and why
prompt-engineering scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Asks the agent to reveal its instructionsmediumSystem prompt leakage
Directions to print, repeat or translate the system prompt extract configuration the operator did not intend to expose.
description: Prompt engineering workflow for designing, rewriting, debugging, evaluating, and optimizing LLM prompts, system prompts, developer prompts, few-shot examples, structured-output instructions, tool-use prompts How it starts
The opening of the file, as written. The whole thing — 189 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Prompt Engineering
Treat prompts as small behavioral specs. Improve them by naming the job, testing the behavior, changing one important thing at a time, and preserving the prompt's operating context.
Core Workflow
- Scope the prompt job. Identify the target model or provider, audience, runtime surface, inputs, tools, output contract, constraints, and where the prompt will live. If the prompt belongs to a repo, inspect existing prompts, schemas, examples, tool definitions, evals, logs, and docs before asking avoidable questions.
- Define success before rewriting. State the desired behavior, hard requirements, acceptable variation, known failure modes, and evidence that would prove the prompt improved. If success is vague, turn it into 3-7 concrete cases before editing.
- Choose the lightest pattern that fits. Use direct instructions for simple tasks, structured sections for context control, few-shot examples for format or judgment calibration, schemas for machine-readable output, tool-use instructions for action boundaries, and repetition only when the model repeatedly drops critical constraints.
- Draft with clean boundaries. Put task, context, constraints, examples, tools, and output format in separate labeled sections. Delimit user-controlled or retrieved content clearly. Keep stable instructions before variable content when prompt caching, reuse, or maintainability matters.
- Evaluate against reality. Test representative, edge, adversarial, and regression cases. Compare outputs against explicit criteria instead of intuition. Record which failures changed and which remained.
- Iterate deliberately. Change one major variable at a time: instruction wording, context ordering, examples, output schema, tool contract, reasoning guidance, or model settings. Preserve the previous prompt and test cases until the new version wins on the target criteria.
- Ship the prompt with evidence. Return the final prompt, assumptions, changed behavior, eval cases, expected outputs or grading criteria, remaining risks, and any provider-specific settings the caller must preserve.
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 189 lines · 87 tokens per session scan B 18d90e8f47bb
prompt-engineering is a skill published in the GitHub repository n-n-code/n-n-code-skills (4 stars, last pushed 6d ago), licensed MIT. It adds 87 tokens to every session and 1,720 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it B with 1 finding (asks the agent to reveal its instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
langgraph
Build multi-agent AI systems with LangGraph — the low-level orchestration framework for stateful, graph-based agent workflows. Covers supervisor, swarm, and hierarchical multi-agent patterns; subgraph composition; state management (checkpointers/stores); persistence; evals; and production debugging. Reach for this…
dspy
Optimize and build programmatic prompt systems with Stanford DSPy. Signatures, modules (Predict, ChainOfThought, ReAct), optimizer/teleprompter selection, compilation, caching, evaluation. Use when doing programmatic prompt optimization or building compiled prompt programs. Do not use this skill for unrelated…
better-prompt
当用户明确要求"优化 prompt"、"改进提示词"、"润色指令"或"将简陋 prompt 转换为最佳实践版本"时使用。基于 OpenAI 和 Anthropic 官方最佳实践,对用户提供的简陋 prompt 进行结构化优化,输出符合社区标准的高质量版本。.
prompt-programming
当用户明确要求“把 prompt 改写成伪代码”“将提示词翻译成可编程自然语言”“输出具有程序结构的人类语言指令”或直接提到 prompt-programming 时使用。将用户原始 prompt 翻译为一种简洁、严谨、可组合的 Prompt Program 方言:形式上像假代码,语义上仍是人类自然语言。.
langchain
Build LLM applications with LangChain. Use when working with LangChain or comparing LLM application frameworks. Do not use this skill for unrelated requests; route to the nearest named specialist.
metodo-3w1h
Dê a habilidade para agentes de IA de estruturar e otimizar prompts de imagens utilizando rigorosamente o método 3W1H (Who, What, Where, How) criado pelo Mário Lúcio. Utilize esta skill sempre que o usuário mencionar termos como 'gerar imagem', 'criar prompt de imagem', 'engenharia de prompt de imagem', 'fotorrealismo…