agent-prompt-engineering

agent-prompt-engineering is a skill for Claude Code, Codex from agentailor/fullstack-langgraph-nextjs-agent. It costs 111 tokens per session (2,997 once invoked), scanned C, original, MIT.

A guide for writing and reviewing instructions for autonomous AI agents, systems that decide and act through repeated tool-using steps. It covers how to define their role, inputs, rules, and decision-making approach.

In plain words
What is it for?
Use it to create or improve system prompts for coding agents and other tool-using agents that work in loops.
Why use it?
It addresses the difficulty of making agents behave reliably without relying on rigid instructions or unexplained assumptions. It provides production-oriented principles for refining prompts based on observed behavior.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code; installed under .agents/ (shared by several agents).

Good fit Use it to create or improve system prompts for coding agents and other tool-using agents that work in loops.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/agentailor/fullstack-langgraph-nextjs-agent/agent-prompt-engineering
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.

Any agent
npx skills add agentailor/fullstack-langgraph-nextjs-agent --skill agent-prompt-engineering
Clone the repo
git clone --depth 1 https://github.com/agentailor/fullstack-langgraph-nextjs-agent

Made for: Claude Code, Codex.

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 agent-prompt-engineering

README.md
[![agentmods](https://agentmods.dev/badge/skills/agentailor/fullstack-langgraph-nextjs-agent/agent-prompt-engineering/github.svg)](https://agentmods.dev/skills/agentailor/fullstack-langgraph-nextjs-agent/agent-prompt-engineering)
Your own site
<a href="https://agentmods.dev/skills/agentailor/fullstack-langgraph-nextjs-agent/agent-prompt-engineering"><img src="https://agentmods.dev/badge/skills/agentailor/fullstack-langgraph-nextjs-agent/agent-prompt-engineering/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for agent-prompt-engineering

Your own site · 80×15
<a href="https://agentmods.dev/skills/agentailor/fullstack-langgraph-nextjs-agent/agent-prompt-engineering"><img src="https://agentmods.dev/badge/skills/agentailor/fullstack-langgraph-nextjs-agent/agent-prompt-engineering.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 111 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,997 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00111 $0.02997
Opus 5.5 $0.00044 $0.01199
Sonnet 5.5 $0.00022 $0.00599
Haiku 4.5 $0.00011 $0.00300

Measured 1mo ago against content hash 6583d16f0e99, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

agent-prompt-engineering scanned grade C 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 1mo 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.

Hidden instructionshighPrompt injection

Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.

<!-- Instructions -->
.agents/skills/agent-prompt-engineering/SKILL.md · 394 lines

How it starts

The opening of the file, as written. The whole thing — 394 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agent Prompt Engineering

Overview

Agent prompt engineering differs fundamentally from traditional prompt engineering. Agents operate autonomously in loops, making decisions and using tools without human intervention. This requires conceptual engineering: providing heuristics, principles, and decision-making frameworks rather than rigid templates.

This skill distills Anthropic's production experience building agents like Claude Code into actionable principles for creating reliable, production-ready agent prompts.

Core Principles

1. Start Simple, Iterate Based on Reality

Begin with a straightforward prompt defining role and core task. Avoid premature optimization.

Initial structure:

<!-- Role -->
You are [Agent Name], a [domain] assistant.
Your task is to [primary objective].

<!-- Dynamic Content -->
You will be provided with [data sources].
<data_source>
{{VARIABLE}}
</data_source>

<!-- Instructions -->
When [handling requests], follow these steps:
1. [Step 1]
2. [Step 2]
3. [Step 3]

<!-- Repeat Critical Instructions — only in long prompts, see note below -->
Remember to [most important constraint].

On repeating the critical instruction: this earns its place in a long prompt, where the constraint would otherwise sit hundreds of lines from the decision it governs. On a frontier model with a short prompt it's unnecessary by default — the instruction was already read, and the restatement just spends tokens. Start without it and add it back if a constraint is actually being missed.

Perfect prompts emerge through iteration. Use AI to draft initial versions, then refine through testing.

2. Think Like Your Agent

Critical rule: If a human cannot follow your instructions with only the tools provided, neither can the agent.

Simulate being the agent: given only your prompt and tool descriptions, can you accomplish tasks?

Common gaps to check:

  • Missing tool usage instructions: "To access [data], use the tool_name(params) tool"
  • Unclear data locations: Specify where information lives and how to retrieve it
  • Ambiguous decision criteria: Define when to use which approach
  • Undefined success conditions: Clarify what "complete" means

Read the full file on GitHub · 394 lines

Files

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.

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. 1mo ago First seen · 394 lines · 111 tokens per session scan C 6583d16f0e99

Subscribe to this mod's changes

agent-prompt-engineering is a skill published in the GitHub repository agentailor/fullstack-langgraph-nextjs-agent (134 stars, last pushed 1mo ago), licensed MIT. It adds 111 tokens to every session and 2,997 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it C with 1 finding (hidden instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.

Related

Other skills, from other repositories

tenuo-denial-triage

Diagnose a denied Tenuo call and make the legitimate call work with the smallest change to authority. Use when a call, test, or agent step fails with a Tenuo denial, monotonicity, proof-of-possession, chain, expiry, approval, or unknown-argument error. Do not use to design new authority from scratch (use…

tenuo-ai/tenuo · 111 tokens

tenuo-agent-authorization

Add or retrofit Tenuo authorization for AI-agent tools and effects. Use when implementing Tenuo, protecting an MCP or framework tool, choosing a gateway, sidecar, or embedded enforcement boundary, or testing that an agent cannot exceed delegated authority. Do not use for a review-only audit of an existing warrant.

tenuo-ai/tenuo · 69 tokens

using-superpowers

Use when starting any conversation - establishes how to find and use skills, requiring Skill tool invocation before ANY response including clarifying questions.

Onelevenvy/flock · 29 tokens

tenuo-audit

Audit, explain, or compare existing Tenuo warrants and delegation chains. Use for review-only requests about effective authority, blast radius, chain validity, or authorization risk. Do not use to implement enforcement in an application or tool boundary (use tenuo-agent-authorization).

tenuo-ai/tenuo · 59 tokens

code-review

This skill should be used when the user asks for a code review of a change — a pull request, merge request, branch, commit range, working-tree change, or pasted diff — covering correctness, security, performance, structure, and repository-specific rules. Trigger on phrases like "review this PR", "review this MR"…

srtab/daiv · 164 tokens

plan

This skill should be used when the user asks to explore a codebase and design implementation plans without making any changes. Trigger when users say 'plan how to implement X', 'design an approach for Y', 'explore the codebase before changing Z', 'create an implementation strategy', 'analyze how to refactor X', 'map…

srtab/daiv · 90 tokens