ワンクリックで
create-agent
How to create agents that work with the agent-runner
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
How to create agents that work with the agent-runner
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Design and create a town — a group of agents that work together.
Multi-agent orchestration over a shared SQLite event queue.
Collide two random notes into new ideas using oblique-strategy thinking. Generates 3 new ideas in the idea-collider/ folder.
Capture text into the note garden pipeline. Paste a transcript or idea and it flows through the zettelkasten pipeline.
Summarize recent activity in the note garden by reading breadcrumbs
How to use the event queue CLI
| name | create-agent |
| description | How to create agents that work with the agent-runner |
Agents are markdown files with YAML frontmatter that define a persona and event subscriptions. The agent runner loads these files, matches incoming events to each agent's listen patterns, and invokes matching agents as headless Claude Code instances.
Agents live in agents/ (configurable via --agents-dir). The filename
(without .md) becomes the agent's worker ID.
agents/
code-reviewer.md # worker ID: "code-reviewer"
test-runner.md # worker ID: "test-runner"
Use kebab-case for filenames.
---
description: Brief description of the agent's purpose
listen:
- "event.pattern"
allowed_tools:
- "Read"
- "Grep"
---
| Field | Type | Required | Description |
|---|---|---|---|
description | string | yes | Brief description of the agent's purpose. Included in the agent's system prompt header. |
listen | string[] | no | Event type patterns to subscribe to. Defaults to ["*"] if omitted. |
allowed_tools | string[] | no | Tool allowlist. ["*"] grants all tools. If omitted, the agent can only push events. |
| Pattern | Matches | Example |
|---|---|---|
"*" | All events (except from self) | Catches everything |
"task.created" | Exact event type | Only task.created events |
"task.*" | Prefix glob | task.created, task.done, task.failed, etc. |
An agent is invoked when any of its listen patterns match an incoming event.
Events emitted by the agent itself are always excluded from wildcard (*)
matching.
By default, agents can only push events. Use allowed_tools to grant access to
additional Claude Code tools. Use ["*"] to grant access to all tools.
File tools (Read, Write, Edit, Glob, Grep) are restricted to the project directory — the working directory where the agent runner was started. Agents cannot access files outside this directory.
| Entry | Meaning |
|---|---|
"*" | Allow all tools (no restrictions) |
"Read" | Allow the Read tool |
"Bash(git:*)" | Allow Bash only for commands starting with git |
"Bash(npm test:*)" | Allow Bash only for npm test commands |
The runner automatically injects permission to run busytown events push via
Bash, so you never need to include that yourself.
Read-only (search code, run git, push events):
allowed_tools:
- "Read"
- "Grep"
- "Glob"
- "Bash(git:*)"
Read-write (also edit files):
allowed_tools:
- "Read"
- "Grep"
- "Glob"
- "Edit"
- "Write"
- "Bash(git:*)"
Everything below the closing --- is the agent's system prompt. Write it as if
you are instructing a Claude instance:
---
description: Reviews code for issues
listen:
- "file.change"
---
When triggered by file changes, review the modified files for:
1. Type safety issues
2. Error handling gaps
3. Code smells
Agents should push events for every significant action. This is how agents communicate with each other and how you can observe the system's behavior.
review.started,
build.started)review.completed, test.passed)issue.found,
suggestion.created)review.failed, build.error)file.modified, file.created)Use dot-separated namespaces: <domain>.<action>
review.started
review.completed
issue.found
file.modified
test.passed
build.failed
The agent runner injects the busytown events push command into each agent's
system prompt. Agents can push events by running:
busytown events push --worker <agent-id> --db events.db --type review.completed --payload '{"files":["src/app.ts"],"issues":0}'
Include relevant data in the payload so downstream agents have context.
agents/code-reviewer.md:
---
description: Reviews TypeScript code changes for potential issues
listen:
- "file.change"
---
# Code Reviewer Agent
## Instructions
When triggered by file changes, review the modified TypeScript files for:
1. **Type safety issues** - Missing types, any usage, unsafe casts
2. **Error handling** - Unhandled promises, missing try/catch
3. **Code smells** - Long functions, deep nesting, code duplication
Provide a brief summary of findings. If no issues found, confirm the code looks
good.
Agents can claim events to coordinate work. The agent runner automatically injects claim CLI instructions into each agent's system prompt. Claims are first-claim-wins — only one worker can claim each event.
busytown events claim --worker <id:string> --event <id:string> to
atomically take ownership of an eventclaimed:false,
another worker already claimed it; move on---
description: Picks up work requests and reviews the code
listen:
- "work.requested"
allowed_tools:
- "Read"
- "Grep"
- "Glob"
---
When a work request event arrives, claim it before starting work. If the claim
response shows claimed:false, another agent already took it — move on.
The runner automatically grants Bash permission for busytown events commands,
including claim and check-claim. You don't need to add them to
allowed_tools.
"task.*" or exact matches over
"*" to avoid unnecessary invocations.code-reviewer.md, not codeReviewer.md or
code_reviewer.md.