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 commands/exponen-agi/recursive-agentic-improvements/extend-agentgit clone --depth 1 https://github.com/exponen-agi/recursive-agentic-improvementsWrote 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/commands/exponen-agi/recursive-agentic-improvements/extend-agent)<a href="https://agentmods.dev/commands/exponen-agi/recursive-agentic-improvements/extend-agent"><img src="https://agentmods.dev/badge/commands/exponen-agi/recursive-agentic-improvements/extend-agent.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.00000 | $0.03506 |
| Opus 5 | $0.00000 | $0.01753 |
| Sonnet 5 | $0.00000 | $0.00701 |
| Haiku 4.5 | $0.00000 | $0.00351 |
Grade A, and why
extend-agent 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 3d 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 — 408 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/extend-agent — Research, Plan, and Add a New Capability
Add any new capability to an existing agent without breaking what already works. The skill researches what tools and patterns actually exist for the capability before writing code.
Usage: /extend-agent [framework] [agent-path]
Examples:
/extend-agent agno agents/travel-assistant/agent.py/extend-agent crewai src/research-crew/extend-agent langgraph src/my-agent/extend-agent google-adk my_agent/extend-agent(will ask)
Step 1 — Clarify the Extension
If $ARGUMENTS is provided, parse framework and agent path. Ask all remaining questions at once:
- Which agent are you extending? File path and framework.
- What new capability do you want to add? Describe freely — no need to match a preset category. Examples:
- "Add flight search so the travel agent can find real-time prices"
- "Add a human approval step before any booking is confirmed"
- "Add a fact-checker agent to the research crew"
- "Return structured JSON output instead of plain text"
- "Connect to our internal CRM via MCP"
- "Add memory so the agent remembers user preferences across sessions"
- Why is this needed? What user problem does it solve?
- Are there constraints? Things the new capability must NOT do (e.g., "never auto-book, always confirm first").
Step 2 — Read the Current Agent & Test Suite
Before changing anything, read the full current state:
- Read the spec (INSTRUCTIONS / INSTRUCTION / SYSTEM_PROMPT / agents.yaml + tasks.yaml).
- Read all existing tool definitions and their docstrings.
- Note the current output format and any constraints already in place.
- Note what imports and dependencies are already present.
- Identify where the new capability fits in the existing flow — does it add to, replace, or wrap something existing?
- Locate and read the Test Constitution at
tests/TEST_CONSTITUTION.mdand the existing test filetests/test_<slug>.py(or equivalent) to understand current unit/behavioral coverage.
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.
- 3d ago First seen · 408 lines · 0 tokens per session scan A 87e56f5a56ad
extend-agent is a command published in the GitHub repository exponen-agi/recursive-agentic-improvements (2 stars, last pushed 7d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,506 tokens. 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 commands, from other repositories
git
Git operations with intelligent commit messages and workflow optimization.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.