| name | create-general-agent |
| description | Create ONE self-contained personal AI agent in its own folder, with a two-part brain: file-based memory plus a knowledge base built with Andrej Karpathy's "LLM wiki" method (append-only raw/ + distilled wiki/). The agent is standalone โ it does NOT report to or coordinate with any other agent. Use this whenever someone asks to "create an agent", "make/spawn/bootstrap a new agent", "set up a personal assistant/tutor/research agent", "scaffold an agent with memory and a knowledge base", or wants a dedicated agent for one topic, project, or domain. Do NOT use for multi-agent teams. |
Create General Agent
Scaffold one standalone personal agent. One folder, one git repo, one set of
instructions, optionally one tmux session. The agent works directly for its user and
reports to no one.
What makes this agent durable is its two-part brain, both living inside the agent's
own folder so they are portable and version-controlled:
- Memory (
memory/) โ Claude Code-style file-based memory: durable facts,
preferences, and recurring feedback. Fast to recall, small, frequently updated.
- Knowledge base (
knowledge-base/) โ Andrej Karpathy's "LLM wiki" method:
an append-only raw/ folder (every source verbatim, the single source of truth)
and a distilled wiki/ folder (encyclopedia articles with [[backlinks]] and an
index) that the agent writes and continuously revises.
A memory entry may point into the wiki with [[a-wiki-page]]. Rule of thumb:
memory = what to remember about the user and the work; wiki = what you've learned
about the subject.
Before you create
- Understand the mission from context. What is this agent for โ a tutor, a
research companion, a coding assistant, a writing partner, a domain expert? What
does "done" look like for it? Which CLI will it run in (Claude Code by default)?
- Pick a short kebab-case slug (e.g.
rust-tutor, paper-buddy, tax-helper).
- Choose a location. Default is
~/agents/<slug>. Override with --project-dir
if the user wants it somewhere specific (e.g. inside an existing repo or ~/dev).
- Optional: write a context file. If you have extra mission detail (goals,
constraints, starting material, links), drop it in a temp file and pass
--context-file so it gets embedded for the agent's first boot.
- Ask only if genuinely unclear. If the mission or a safety boundary can't be
reasonably inferred, ask one concise question. Otherwise choose sensible defaults
and proceed.
Create the agent
~/.claude/skills/create-general-agent/scripts/create_general_agent.sh \
<agent-slug> "<one-line mission>" \
--project-dir ~/agents/<agent-slug> \
--command claude \
--context-file /tmp/<agent-slug>-context.md
Useful options:
--project-dir PATH
--command CMD
--context-file PATH
--launch
--session NAME
--role ROLE
--no-git
--force-instructions
The simplest path creates files only; the user then runs the agent themselves:
cd ~/agents/<agent-slug> && claude
What gets created
<project-dir>/
โโโ CLAUDE.md # canonical instructions (mission + two-part brain + boot)
โโโ AGENTS.md -> CLAUDE.md # symlink for Codex/OpenCode/Cursor parity
โโโ .gitignore
โโโ docs/ # plans, specs (boot writes docs/plan.md)
โโโ tasks/ outputs/ scripts/ context/
โโโ memory/
โ โโโ MEMORY.md # index loaded every session
โ โโโ _template.md # one-fact-per-file format
โโโ knowledge-base/
โโโ README.md # the Karpathy update loop
โโโ raw/ # APPEND-ONLY sources (single source of truth)
โโโ wiki/
โโโ index.md # map of all articles
โโโ _templates/article.md # distilled-article format
Verify
ls -la <project-dir>
cat <project-dir>/CLAUDE.md
tmux has-session -t <session> && tmux list-panes -t <session> -F '#{pane_id} #{@role_name}'
Then point the new agent at its boot sequence (read CLAUDE.md โ context/ โ
memory/MEMORY.md โ wiki/index.md โ write docs/plan.md).
Design notes
- Standalone by design. There is no reporting line, no parent agent, no shared
message bus. If the user later wants agents to talk to each other, that's a
different (multi-agent) setup โ this skill deliberately keeps each agent independent.
- Self-contained. The created agent depends only on a normal shell, git, and the
chosen CLI. No external memory service, no special infrastructure.
- Talking between agents (optional). This kit ships
tm-send, a hardened
tmux send-keys wrapper. If you ever run more than one agent and want them (or you)
to message each other's panes, use tm-send -s <session> <role> "<msg>" instead of
raw tmux send-keys โ it targets the right pane and handles per-CLI submit quirks.
Install it once with bin/install-tm-send.sh (puts it on your PATH).
- Keep the brain alive. The whole value is the loop: as the agent works, it writes
durable facts to
memory/ and distills sources into knowledge-base/wiki/. The
CLAUDE.md instructs the agent to do this on every task. An agent that doesn't update
its brain decays into a plain chatbot.