agents

agents is a skill for Claude Code from itsmostafa/llm-engineering-skills. It costs 42 tokens per session (2,633 once invoked), scanned A, original, MIT.

A guide to building AI systems that can choose steps, use tools, and complete multi-step work. It explains the difference between fixed workflows and systems where the AI decides what to do next.

In plain words
What is it for?
Use it when designing AI agents, tool-using systems, multi-step reasoning, or workflows that need orchestration.
Why use it?
It helps you choose an appropriate design and understand the trade-offs between predictable workflows and more flexible AI-led processes.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the llm-engineering-skills plugin — 9 skills 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/itsmostafa/llm-engineering-skills/agents
Any agent
npx skills add itsmostafa/llm-engineering-skills --skill agents
Clone the repo
git clone --depth 1 https://github.com/itsmostafa/llm-engineering-skills

Made for: Claude Code.

Or install llm-engineering-skills, the plugin that ships this one along with the rest of its 9 skills.

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 agents

README.md
[![agentmods](https://agentmods.dev/badge/skills/itsmostafa/llm-engineering-skills/agents.svg)](https://agentmods.dev/skills/itsmostafa/llm-engineering-skills/agents)
Your own site
<a href="https://agentmods.dev/skills/itsmostafa/llm-engineering-skills/agents"><img src="https://agentmods.dev/badge/skills/itsmostafa/llm-engineering-skills/agents.svg" alt="Measured on agentmods" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,633 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.00042 $0.02633
Opus 5 $0.00021 $0.01316
Sonnet 5 $0.00008 $0.00527
Haiku 4.5 $0.00004 $0.00263

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

Security

Grade A, and why

agents 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 6d 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/agents/SKILL.md · 368 lines

How it starts

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

Building Agents

Agents are systems where LLMs dynamically direct their own processes and tool usage. This skill covers when to use agents vs workflows, common architectural patterns, and practical implementation guidance.

Table of Contents

Agents vs Workflows

Aspect Workflows Agents
Control flow Predefined code paths LLM determines next step
Predictability High - deterministic steps Lower - dynamic decisions
Complexity Simpler to debug and test More complex, harder to predict
Best for Well-defined, repeatable tasks Open-ended, adaptive problems

Key principle: Start with the simplest solution. Use workflows when the task is predictable; use agents when flexibility is required.

Workflow Patterns

1. Prompt Chaining

Decompose tasks into sequential LLM calls, where each step's output feeds the next.

async def prompt_chain(input_text):
    # Step 1: Extract key information
    extracted = await llm.generate(
        "Extract the main entities and relationships from: " + input_text
    )

    # Step 2: Analyze
    analysis = await llm.generate(
        "Analyze these entities for patterns: " + extracted
    )

    # Step 3: Generate output
    return await llm.generate(
        "Based on this analysis, provide recommendations: " + analysis
    )

Use when: Tasks naturally decompose into fixed sequential steps.

2. Routing

Classify inputs and direct them to specialized handlers.

async def route_request(user_input):
    # Classify the input
    category = await llm.generate(
        f"Classify this request into one of: [billing, technical, general]\n{user_input}"
    )

    handlers = {
        "billing": handle_billing,
        "technical": handle_technical,
        "general": handle_general,
    }

    return await handlers[category.strip()](user_input)

Read the full file on GitHub · 368 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. 6d ago First seen · 368 lines · 42 tokens per session scan A 0ef863916ba1

Subscribe to this mod's changes

agents is a skill published in the GitHub repository itsmostafa/llm-engineering-skills (23 stars, last pushed 4mo ago), licensed MIT. It adds 42 tokens to every session and 2,633 once invoked, about $0.0002 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-30.

Related

Other skills, from other repositories