ai-engineering

ai-engineering is a skill for Claude Code from mthines/agent-skills. It costs 161 tokens per session (3,242 once invoked), scanned A, original, MIT.

A guide for building and reviewing applications that use large language models, the systems behind tools such as chat assistants.

In plain words
What is it for?
It covers prompts, cached prompts, image and other media inputs, retrieval of supporting information, agent steps and tools, retries, memory, model changes, evaluations, security, testing, and monitoring.
Why use it?
It helps address unreliable responses, high request costs, slowdowns, unsafe inputs, weak testing, and difficult-to-observe agent behavior.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: positional $N argument.

Part of the mthines-agent-skills plugin — 54 skills, 4 agents shipped together

Install

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.

agentmods
npx agentmods add skills/mthines/agent-skills/ai-engineering
Any agent
npx skills add mthines/agent-skills --skill ai-engineering
Clone the repo
git clone --depth 1 https://github.com/mthines/agent-skills

Made for: Claude Code.

Or install mthines-agent-skills, the plugin that ships this one along with the rest of its 54 skills, 4 agents.

Wrote 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.

agentmods badge for ai-engineering

README.md
[![agentmods](https://agentmods.dev/badge/skills/mthines/agent-skills/ai-engineering.svg)](https://agentmods.dev/skills/mthines/agent-skills/ai-engineering)
Your own site
<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>
Per session 161 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,242 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 2d ago against content hash c64572108dee, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

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.

skills/quality/ai-engineering/SKILL.md · 263 lines

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.md is a thin index. Detailed rules live in rules/*.md and load on demand. Curated source URLs live in references/primary-sources.md. Date-flagged changes since 2024 live in references/recent-changes.md. Literal scaffolding lives in templates/.


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.

Read the full file on GitHub · 263 lines

Changes

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.

  1. 2d ago Changed c64572108dee
  2. 6d ago First seen · 263 lines · 161 tokens per session scan A b61e82eb2a6c

Subscribe to this mod's changes

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.

Related

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…

shennawardana23/skillme · 76 tokens

ai-llm-skills-guide

Guide for AI Agents and LLM development skills including RAG, multi-agent systems, prompt engineering, memory systems, and context engineering.

gmh5225/awesome-skills · 35 tokens

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…

error505/Flockion_AI_Engineering · 187 tokens

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…

omer-metin/skills-for-antigravity · 74 tokens

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.

ranbot-ai/awesome-skills · 0 tokens

dspy

DSPy: declarative LM programs, auto-optimize prompts, RAG.

davidtoby/agent-skills · 19 tokens