agent-creator

Create and configure Opencode Agents with YAML frontmatter and Markdown.

Updated Jun 15, 2025
One-click install
npx skills add https://github.com/patrickhaahr/dotfiles --skill agent-creator-patrickhaahr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-creator
Source: https://github.com/patrickhaahr/dotfiles/tree/main/opencode/.config/opencode/skills/agent-creator
Command: npx skills add https://github.com/patrickhaahr/dotfiles --skill agent-creator-patrickhaahr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill guides you through creating, configuring, and managing Opencode Agents. It helps you define agent files, set permissions and tools, and organize agent data for reuse across projects.

Core Features & Use Cases

  • Agent creation: Create Primary or Subagents with configurable prompts and roles.
  • Permissions management: Enable or restrict tools and execution environments per agent.
  • Project/global scopes: Save agent definitions to project directories or global user directories.
  • Use Case: When building an AI assistant for code review, create an agent that can access code tools but not destructive commands.

Quick Start

Use this skill to draft a new agent file named agent-name.md in the appropriate agent directory with a YAML frontmatter describing the agent and a system prompt in the body.

Frequently Asked Questions about agent-creator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create an Opencode Agent with specific permissions and tools?

Opencode Agents are defined using Markdown files containing YAML frontmatter for metadata and a body for the system prompt. This format allows you to configure agent roles, models, permissions, and available tools for automation tasks.

Can I scope Opencode Agents globally or save them to a specific project directory?

Yes, Opencode Agents can be scoped globally or per project. Global agents are saved to user directories for cross-project reuse, while project-scoped agents reside in local project directories for context-specific automation.

What is the file structure for configuring Opencode Agents?

Opencode Agent configuration relies on YAML frontmatter for metadata like permissions and models, alongside a Markdown body for the system prompt. This structure separates agent behavior definition from execution context settings.

How do I restrict an agent from running destructive commands during code review?

To restrict destructive commands, you define permissions within the agent's YAML frontmatter. This configuration allows you to enable specific code tools while blocking dangerous execution environments per agent.

When should I use a Subagent versus a Primary Opencode Agent?

Use a Primary Opencode Agent for standalone workflows and a Subagent for delegated, specialized roles. Both are configured via YAML frontmatter with distinct prompts, models, and permissions to organize agent management hierarchies.