Skip to content

tomekness/agent-framework-builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

agent-framework-builder Skill

A meta-skill for openCode that helps plan and build complete agent frameworks for new projects.


Installation

# Global — available for all projects
cp -r agent-framework-builder ~/.config/opencode/skills/

# Or project-local
cp -r agent-framework-builder .opencode/skills/

Step 1 - Create a New Project

Create an empty folder for your project and open openCode inside it:

mkdir my-project
cd my-project
opencode

Step 2 - Call the Skill and Plan the Framework

Inside 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:

  1. Understand the project (task, tools, autonomy, budget)
  2. Plan the file structure
  3. Build opencode.json (agents, MCP, permissions)
  4. Build AGENTS.md (main rules)
  5. Write system prompts
  6. Create memory files (memory.md, variables.md, progress.md)
  7. Create commands (/start, /status, etc.)
  8. Configure MCP
  9. Check the checklist

Step 3 - Fill in Variables

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

You can also set the autonomy level here:

AUTONOMY_LEVEL=3
# 1 = Agent asks at every step
# 2 = Agent asks between phases
# 3 = Agent works fully autonomously

You can also add References, like Documentation, examples, articals.

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.


Step 4 - Start the Agent

# Start TUI
cd my-project
opencode

# Or web interface
opencode web

Then 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.


Change Autonomy Level

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.


Useful Commands (Generated by the Skill)

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)

What the Skill Generates

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

Typical Use Cases

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"

Tips

  • Set AUTONOMY_LEVEL=3 at 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" and command as an array.
  • Prompt files: every {file:...} reference in opencode.json must actually exist.
  • No umlauts in AGENTS.md and system prompts — this avoids encoding issues.

About

A meta-skill for openCode that helps plan and build complete agent frameworks for new projects.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages