384a9a2591391f71cfd7309d2e143ab822a338ca
OpenAgent Library Template
This is the default template for OpenAgent configuration libraries. Fork this repository to create your own library with custom skills, commands, tools, rules, and agents.
Structure
library/
├── skill/ # Reusable skills (SKILL.md + reference files)
├── command/ # Slash commands (markdown with YAML frontmatter)
├── tool/ # Custom TypeScript tools (@opencode-ai/plugin)
├── rule/ # Reusable instruction sets
├── agent/ # Custom agent configurations
├── mcp/ # MCP server configurations (servers.json)
├── opencode/ # OpenCode plugin configs (oh-my-opencode.json)
└── workspace-template/ # Workspace templates (distro/skills/env/init script)
Built-in Library Tools
This template includes tools for managing library content programmatically:
library-skills.ts
list_skills- List all skills in the libraryget_skill- Get full skill content by namesave_skill- Create or update a skilldelete_skill- Delete a skill
library-commands.ts
list_commands- List all slash commandsget_command- Get command contentsave_command- Create or update a commanddelete_command- Delete a commandlist_tools- List custom toolsget_tool- Get tool source codesave_tool- Create or update a tooldelete_tool- Delete a toollist_rules- List rulesget_rule- Get rule contentsave_rule- Create or update a ruledelete_rule- Delete a rule
library-git.ts
status- Get library git statussync- Pull latest changes from remotecommit- Commit changes with a messagepush- Push to remoteget_mcps- Get MCP server configurationssave_mcps- Save MCP configurations
Usage
- Fork this repository
- Configure your OpenAgent instance with
LIBRARY_REMOTE=git@github.com:your-username/your-library.git - Add skills, commands, and tools via the dashboard or using the library tools
Creating Skills
Skills are directories containing a SKILL.md file with YAML frontmatter:
---
name: my-skill
description: Description of what this skill does
---
Instructions for the agent on how to use this skill...
Creating Commands
Commands are markdown files with YAML frontmatter:
---
description: What this command does
model: claude-sonnet-4-20250514
---
Prompt template for the command...
Creating Tools
Tools are TypeScript files using @opencode-ai/plugin:
import { tool } from "@opencode-ai/plugin"
export const my_tool = tool({
description: "What this tool does",
args: {
param: tool.schema.string().describe("Parameter description"),
},
async execute(args) {
// Tool implementation
return "Result"
},
})
Description
Languages
TypeScript
59%
Python
41%