A meta-skill for openCode that helps plan and build complete agent frameworks for new projects.
# Global — available for all projects
cp -r agent-framework-builder ~/.config/opencode/skills/
# Or project-local
cp -r agent-framework-builder .opencode/skills/Create an empty folder for your project and open openCode inside it:
mkdir my-project
cd my-project
opencodeInside openCode (TUI or Web), just type:
Load the agent-framework-builder skill and plan an agent framework for the following task: [your task]
The skill will then guide you through 9 steps:
- Understand the project (task, tools, autonomy, budget)
- Plan the file structure
- Build opencode.json (agents, MCP, permissions)
- Build AGENTS.md (main rules)
- Write system prompts
- Create memory files (memory.md, variables.md, progress.md)
- Create commands (/start, /status, etc.)
- Configure MCP
- Check the checklist
After setup, open memory/variables.md and enter all values marked MISSING.
For example:
AIRTABLE_BASE_ID=appXXXXXXXXXXXXXX
AIRTABLE_TABLE_NAME=MyTable
N8N_API_KEY=your-api-key
AUTONOMY_LEVEL=3
# 1 = Agent asks at every step
# 2 = Agent asks between phases
# 3 = Agent works fully autonomously
For example:
n8n Workflow as template:
REF_1=n8n-workflow-id:12345
Documentation:
REF_2=https://docs.n8n.io/integrations/airtable
Example project:
REF_3=https://github.com/user/repo
Local file:
REF_4=./examples/template.json
The agent automatically loads these on the next /start and
uses them as context and templates during construction.
# Start TUI
cd my-project
opencode
# Or web interface
opencode webThen select the correct agent:
- TUI: Press Tab until the agent appears
- Web: Type
@agent-name /start
Start the process with:
/start
or in the web:
@main-agent /start
The agent automatically reads all memory files and continues where it last left off — or starts Phase 1 if everything is new.
You can adjust this at any time in memory/variables.md:
AUTONOMY_LEVEL=1 # Agent asks at every step
AUTONOMY_LEVEL=2 # Agent asks between phases
AUTONOMY_LEVEL=3 # Agent works completely autonomously
The new value will apply automatically on the next /start.
| Command | What it does |
|---|---|
/start |
Start session — reads memory and continues |
/status |
Show current status without doing anything |
/build-node 3 |
Execute a specific step (project-specific) |
my-project/
+-- AGENTS.md <- Main rules (auto-loaded)
+-- memory/
+-- memory.md <- Project status & insights
+-- variables.md <- All configuration values + AUTONOMY_LEVEL
+-- progress.md <- Progress checklist
+-- .opencode/
+-- agents/ <- Sub-agent definitions
+-- commands/ <- /start, /status, etc.
+-- prompts/ <- System prompts
+-- skills/ <- Project-specific skills
+-- opencode.json <- Agent & MCP configuration
| Task | Example Prompt |
|---|---|
| Workflow builder | "Plan an agent that builds n8n workflows" |
| Data pipeline | "Plan an agent that pulls data from APIs and stores it in Airtable" |
| Research agent | "Plan an agent that researches websites and summarizes them" |
| Code generator | "Plan an agent that generates and tests React components" |
- Set
AUTONOMY_LEVEL=3at the beginning and lower it only if needed. - Fill in all variables before typing
/start— it saves follow-up questions. - For MCP errors: always set
type: "local"andcommandas an array. - Prompt files: every
{file:...}reference inopencode.jsonmust actually exist. - No umlauts in AGENTS.md and system prompts — this avoids encoding issues.