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/mthines/agent-skills/ai-engineeringnpx skills add mthines/agent-skills --skill ai-engineeringgit clone --depth 1 https://github.com/mthines/agent-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/mthines/agent-skills/ai-engineering)<a href="https://agentmods.dev/skills/mthines/agent-skills/ai-engineering"><img src="https://agentmods.dev/badge/skills/mthines/agent-skills/ai-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.1 | $0.00161 | $0.03242 |
| Opus 5 | $0.00081 | $0.01621 |
| Sonnet 5 | $0.00032 | $0.00648 |
| Haiku 4.5 | $0.00016 | $0.00324 |
Grade A, and why
ai-engineering scanned grade A with 0 findings 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 2d 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 263 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AI Engineering
Prescriptive guidance for building and reviewing LLM/AI applications. Thirteen orthogonal concerns — load only the rules the current task needs.
This
SKILL.mdis a thin index. Detailed rules live inrules/*.mdand load on demand. Curated source URLs live inreferences/primary-sources.md. Date-flagged changes since 2024 live inreferences/recent-changes.md. Literal scaffolding lives intemplates/.
Mode Detection
Parse $ARGUMENTS (first token) and detect the mode:
| Mode | Default | Trigger |
|---|---|---|
guide |
yes | Default. Open question ("how should I …", "what's the best way to …"). |
review |
$0 == "review", or a file/path is supplied as $ARGUMENTS. |
|
design |
$0 == "design", or "scaffold a prompt / system prompt / eval". |
State the detected mode and the area(s) in scope before continuing:
Mode: review
Areas: prompt-writing, system-prompt-design
Targets: src/agents/triage.ts (system prompt at L24-78)
Area Routing
Map the user's request to one or more rule files. Load only the rules listed for the matched area(s).
| Area | Rule file | Load when |
|---|---|---|
| Writing user prompts | rules/prompt-writing.md |
"improve this prompt", few-shot questions, output format, CoT, structured outputs. |
| Designing system prompts | rules/system-prompt-design.md |
Persona, tool docs, ordering, refusals, agent stop conditions. |
| Token cost / latency | rules/token-optimization.md |
Prompt caching, model routing, batching, streaming, max_tokens. |
| Multimodal | rules/multimodal.md |
Image/audio/PDF inputs, vision-vs-OCR, voice agents, image token costs. |
| Retrieval-augmented generation | rules/rag.md |
Chunking, embeddings, hybrid search, reranking, query rewriting. |
| Agents & tool use | rules/agents-and-tools.md |
Tool schemas, agent loops, parallel tool calls, error recovery, workflow vs agent. |
| Resilience | rules/resilience.md |
Rate limits (429), retries with jitter, circuit breakers, fallback chains, timeouts, idempotency. |
| Memory & long-running state | rules/memory-and-state.md |
Conversation summarisation, structured memory, vector memory, memory tools, compaction. |
| Model migration & versioning | rules/model-migration.md |
Pin snapshots vs aliases, A/B a new model, deprecations, cross-provider migration, rollback. |
| Evaluation | rules/evals.md |
Golden sets, LLM-as-judge, regression CI, error analysis. |
| Testing (engineering) | rules/testing.md |
Unit/integration tests, mocks, VCR cassettes, snapshot tests, CI cost discipline. |
| Safety & guardrails | rules/safety-and-guardrails.md |
Prompt injection, jailbreaks, output validation, PII, scope control. |
| Observability & versioning | rules/observability-and-versioning.md |
Tracing, prompts-as-code, A/B releases, rollback. |
What ships with it
20 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.
- lens.md 2.8 KB
- references/primary-sources.md 7.3 KB
- references/recent-changes.md 3.7 KB
- rules/agents-and-tools.md 6.3 KB
- rules/evals.md 7.7 KB
- rules/memory-and-state.md 8.0 KB
- rules/model-migration.md 7.1 KB
- rules/multimodal.md 7.7 KB
- rules/observability-and-versioning.md 10 KB
- rules/prompt-writing.md 7.6 KB
- rules/rag.md 5.9 KB
- rules/resilience.md 7.4 KB
- rules/safety-and-guardrails.md 8.3 KB
- rules/system-prompt-design.md 7.3 KB
- rules/testing.md 12 KB
- rules/token-optimization.md 7.1 KB
- templates/eval-rubric.md 1.9 KB
- templates/golden-set.md 3.5 KB
- templates/system-prompt-skeleton.md 2.0 KB
- templates/tool-description.md 3.2 KB
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.
- 2d ago Changed c64572108dee
- 6d ago First seen · 263 lines · 161 tokens per session scan A b61e82eb2a6c
ai-engineering is a skill published in the GitHub repository mthines/agent-skills (12 stars, last pushed yesterday), licensed MIT. It adds 161 tokens to every session and 3,242 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
genkit-go-flows
Guides building AI features with Genkit for Go - flows, prompts, structured generation, tool calling, and middleware. Use when defining a Genkit flow, writing a prompt, calling genkit.Generate/GenerateData, defining a tool, debugging Genkit output with traces, or asked how Genkit differs from Google's Agent…
ai-llm-skills-guide
Guide for AI Agents and LLM development skills including RAG, multi-agent systems, prompt engineering, memory systems, and context engineering.
flockion_engineering_ai
Forces the simplest, shortest, safest AI solution that actually works. Lazy senior-engineer pragmatism for LLM features, agents, RAG, tool-calling, and prompts. Use a prompt before a chain, retrieval before fine-tuning, deterministic code before an agent, and one tool before a tool framework. Keep critical business…
ai-product
Every product will be AI-powered. The question is whether you'll build it right or ship a demo that falls apart in production. This skill covers LLM integration patterns, RAG architecture, prompt engineering that scales, AI UX that users trust, and cost optimization that doesn't bankrupt you. Use when "keywords…
ai-engineering-toolkit
6 production-ready AI engineering workflows: prompt evaluation (8-dimension scoring), context budget planning, RAG pipeline design, agent security audit (65-point checklist), eval harness building, an.
dspy
DSPy: declarative LM programs, auto-optimize prompts, RAG.