# autonomous-agent-patterns

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.

- skill · `type=skill` · Claude Code · 239 installs
- Author: davila7
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/skills/ai-research/autonomous-agent-patterns
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/skills/autonomous-agent-patterns

## What it 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.

## Install

### Claude Code (native platform)

1. **claude-code-templates**
```bash
npx claude-code-templates@latest --skill ai-research/autonomous-agent-patterns
```

2. **Skills CLI (Vercel)**
```bash
npx skills add davila7/claude-code-templates --skill autonomous-agent-patterns -a claude-code
```

3. **Manually: put the files in place**
- File: `~/.claude/skills/autonomous-agent-patterns/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/autonomous-agent-patterns/

### Codex

**Manually: put the files in place**
- File: `.agents/skills/autonomous-agent-patterns/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

**Manually: put the files in place**
- File: `.cursor/skills/autonomous-agent-patterns/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install davila7/claude-code-templates autonomous-agent-patterns
```

2. **Manually: put the files in place**
- File: `.github/skills/autonomous-agent-patterns/SKILL.md`

### Gemini CLI

**Platform CLI**
```bash
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/ai-research/autonomous-agent-patterns
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/autonomous-agent-patterns/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/skills/ai-research/autonomous-agent-patterns

## When to use it
- 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
- 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.

## Similar
- [setup-matt-pocock-skills](https://affpapa.org/en/nevibecode/skills/setup-matt-pocock-skills.md) — skill · 1052851 installs
- [ask-matt](https://affpapa.org/en/nevibecode/skills/ask-matt.md) — skill · 766587 installs
- [to-tickets](https://affpapa.org/en/nevibecode/skills/to-tickets.md) — skill · 711230 installs
- [writing-plans](https://affpapa.org/en/nevibecode/skills/writing-plans.md) — skill · 282859 installs
- [caveman-review](https://affpapa.org/en/nevibecode/skills/caveman-review.md) — skill · 411800 installs
- [caveman-compress](https://affpapa.org/en/nevibecode/skills/caveman-compress.md) — skill · 411500 installs

## Other versions with the same name
- [autonomous-agent-patterns · sickn33](https://affpapa.org/en/nevibecode/skills/sickn33-autonomous-agent-patterns.md) — 965 installs

From the same set: [davila7/claude-code-templates](https://affpapa.org/en/nevibecode/by/davila7/claude-code-templates.md) — 495 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
