autonomous-agent-patterns · davila7 — Claude Code skill for agent design
This skill outlines how autonomous coding agents can plan work, call tools, and involve a person in decisions. Use it when shaping an agent’s architecture or tool APIs.
npx claude-code-templates@latest --skill ai-research/autonomous-agent-patternsWhat autonomous-agent-patterns does
The examples walk through an agent cycle: the model considers a task, chooses an action, runs a tool, then receives its result. Python snippets show tool calls being added to conversation history, alongside a model-selection pattern for planning, analysis, and code generation.
The material also covers JSON Schema for tools, file operations, terminal commands, browser actions, and asking the user a question. One sample loop sets max_iterations=50; when it reaches that limit, it returns a message instead of continuing the task.
What it helps with
- map out an autonomous agent’s action cycle
- define a JSON Schema for a file-reading tool
- route planning and code generation to different models
- give an agent file and terminal operations
- add a user approval step to an agent workflow
Example prompts for the agent
- Design an autonomous agent loop that plans actions, calls tools, and incorporates their results.
- Show a JSON Schema for a file-reading tool that requires a path.
- Suggest a permission flow that asks the user before an agent takes an action.
How to install autonomous-agent-patterns
1claude-code-templates
npx claude-code-templates@latest --skill ai-research/autonomous-agent-patterns2Skills CLI (Vercel)
npx skills add davila7/claude-code-templates --skill autonomous-agent-patterns -a claude-code3Manually: put the files in place
~/.claude/skills/autonomous-agent-patterns/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/autonomous-agent-patterns/
Manually: put the files in place
.agents/skills/autonomous-agent-patterns/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/autonomous-agent-patterns/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install davila7/claude-code-templates autonomous-agent-patterns2Manually: put the files in place
.github/skills/autonomous-agent-patterns/SKILL.mdPlatform CLI
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/ai-research/autonomous-agent-patternsManually: put the files in place
.devin/skills/autonomous-agent-patterns/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about autonomous-agent-patterns
How do I install autonomous-agent-patterns in Claude Code?
Run npx claude-code-templates@latest --skill ai-research/autonomous-agent-patterns.
What does autonomous-agent-patterns do?
It provides design patterns for autonomous coding agents, including their action cycle, tool calls, and ways to involve a user.
Which agent tools does the skill cover?
Its examples include file operations, shell commands, browser actions, and asking the user for input.
Similar skills
All skills for Agent setup: memory, context, orchestration →autonomous-agent-patterns by other authors comes first.