
agent-architect
Create and refine OpenCode agents via guided Q&A. Use proactively for agent creation, performance improvement, or configuration design. Examples: - user: "Create an agent for code reviews" → ask about scope, permissions, tools, model preferences, generate AGENTS.md frontmatter - user: "My agent ignores context" → analyze description clarity, allowed-tools, permissions, suggest improvements - user: "Add a database expert agent" → gather requirements, set convex-database-expert in subagenttype, configure permissions - user: "Make my agent faster" → suggest smaller models, reduce allowed-tools, tighten permissions
- Installs
- 318
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/igorwarzocha/opencode-workflows --skill agent-architect- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads agent-architect automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Agent Architect
Create and refine opencode agents through a guided Q&A process.
<core_approach>
Agent creation is conversational, not transactional.
- MUST NOT assume what the user wants—ask
- SHOULD start with broad questions, drill into details only if needed
- Users MAY skip configuration they don't care about
- MUST always show drafts and iterate based on feedback
The goal is to help users create agents that fit their needs, not to dump every possible configuration option on them.
</core_approach>
<question_tool>
Batching: Use the question tool for 2+ related questions. Single questions → plain text.
Syntax: header ≤12 chars, label 1-5 words, add "(Recommended)" to default.
CRITICAL Permission Logic:
- You MUST ask the user about permissions explicitly.
- If user selects "Standard/Default" or "No extra", do NOT list
bash,read,write,editpermissions. Rely on system defaults. - Only add explicit permission blocks for tools when the user requests NON-STANDARD access (e.g., restrictive, or specific allows).
- EXCEPTION: Skills MUST ALWAYS be configured with
"*": "deny"and explicit allows, regardless of tool permissions.
</question_tool>
<reference>Agent Locations
| Scope | Path |
|---|---|
| Project | .opencode/agent/<name>.md |
| Global | ~/.config/opencode/agent/<name>.md |
Agent File Format
---
description: When to use this agent. Include trigger examples.
model: anthropic/claude-sonnet-4-20250514 # Optional
mode: subagent # Optional (defaults to undefined/standard)
permission:
skill: { "*": "deny", "my-skill": "allow" }
bash: { "*": "ask", "git *": "allow" }
---
System prompt in markdown body (second person).
Full schema: See references/opencode-config.md
Agent Modes
| Mode | Description |
|---|---|
(undefined) | Standard agent, visible to user and tools (Default) |
subagent | specialized task tool agent, hidden from main list |
Phase 1: Core Purpose (Required)
Ask these first—they shape everything else:
-
"What should this agent do?"
- Get the core task/domain
- Examples: "review code", "help with deployments", "research topics"
-
"What should trigger this agent?"
- Specific phrases, contexts, file types
- Becomes the
descriptionfield
-
"What expertise/persona should it have?"
- Tone, boundaries, specialization
- Shapes the system prompt
Phase 1.5: Research the Domain
MUST NOT assume knowledge is current. After understanding the broad strokes:
- Search for current best practices in the domain
- Check for updates to frameworks, tools, or APIs the agent will work with
- Look up documentation for any unfamiliar technologies mentioned
- Find examples of how experts approach similar tasks
This research informs better questions in Phase 2 and produces a more capable agent.
Example: User wants an agent for "Next.js deployments" → Research current Next.js deployment patterns, Vercel vs self-hosted, App Router vs Pages Router, common pitfalls, etc.
Phase 2: Capabilities (Ask broadly, then drill down)
-
"What permissions does this agent need?" (Use Question Tool)
- Options: "Standard (Recommended)", "Read-Only", "Full Access", "Custom"
- Standard: Do NOT add
bash,read,write,editto config. Rely on defaults. - Read-Only: Explicitly deny write/edit/bash.
- Full Access: Allow bash
*if needed. - Custom: Ask specific follow-ups.
-
"Should this agent use any skills?"
- If yes: "Which ones?"
- ALWAYS configure
permission.skillwith"*": "deny"and explicit allows. - This applies even if other permissions are standard.
-
"Is this a subagent?"
- If yes: set
mode: subagent - If no: leave
modeundefined (standard)
- If yes: set
Phase 3: Details (Optional—user MAY skip)
- "Any specific model preference?" (most users skip)
- "Custom temperature/sampling?" (most users skip)
- "Maximum steps before stopping?" (most users skip)
Phase 4: Review & Refine
- Show the draft config and prompt, ask for feedback
- "Here's what I've created. Anything you'd like to change?"
- Iterate until user is satisfied
Key principle: Start broad, get specific only where the user shows interest. MUST NOT overwhelm with options like top_p unless asked.
Be flexible: If the user provides lots of info upfront, adapt—MUST NOT rigidly follow the phases. If they say "I want a code review agent that can't run shell commands", you already have answers to multiple questions.
</workflow><system_prompt_structure>
Recommended Structure
# Role and Objective
[Agent purpose and scope]
# Instructions
- Core behavioral rules
- What to always/never do
## Sub-instructions (optional)
More detailed guidance for specific areas.
# Workflow
1. First, [step]
2. Then, [step]
3. Finally, [step]
# Output Format
Specify exact format expected.
# Examples (optional)
<examples>
<example>
<input>User request</input>
<output>Expected response</output>
</example>
</examples>
XML Tags (Recommended)
XML tags improve clarity and parseability across all models:
| Tag | Purpose |
|---|---|
<instructions> | Core behavioral rules |
<context> | Background information |
<examples> | Few-shot demonstrations |
<thinking> | Chain-of-thought reasoning |
<output> | Final response format |
Best practices:
- Be consistent with tag names throughout
- Nest tags for hierarchy:
<outer><inner></inner></outer> - Reference tags in instructions: "Using the data in
<context>tags..."
Example:
<instructions>
1. Analyze the code in <code> tags
2. List issues in <findings> tags
3. Suggest fixes in <recommendations> tags
</instructions>
Description Field (Critical)
The description determines when the agent triggers.
Primary Agents: Keep it extremely concise (PRECISELY 3 words). The user selects these manually or via very clear intent.
Any Other Agents: Must be specific and exhaustive to ensure correct routing by the task tool.
Template (Any Other Agents): [Role/Action]. Use when [triggers]. Examples: - user: "trigger" -> action
Good (Primary):
Code review expert.
Good (Any Other Agents):
Code review specialist. Use when user says "review this PR", "check my code",
"find bugs".
Examples:
- user: "review" -> check code
- user: "scan" -> check code
Prompt Altitude
Find the balance between too rigid and too vague:
| ❌ Too Rigid | ✅ Right Altitude | ❌ Too Vague |
|---|---|---|
| Hardcoded if-else logic | Clear heuristics + flexibility | "Be helpful" |
| "If X then always Y" | "Generally prefer X, but use judgment" | No guidance |
</system_prompt_structure>
<agentic_components>
For agents that use tools in a loop, SHOULD include these reminders:
# Persistence
Keep working until the user's request is fully resolved. Only yield
control when you're confident the task is complete.
# Tool Usage
If unsure about something, use tools to gather information.
Do NOT guess or make up answers.
# Planning (optional)
Think step-by-step before each action. Reflect on results before
proceeding.
</agentic_components>
<permissions>Control what agents can access.
CRITICAL: Avoid Overengineering
- Do NOT list permissions for standard tools (
read,write,edit,bash) unless the user explicitly asks for restrictions or non-standard access. - Rely on system defaults for most agents.
- Skills are the exception: You MUST always configure
permission.skillto whitelist specific skills and deny others.
# Standard Agent (minimal config)
permission:
skill:
"*": "deny"
"my-skill": "allow"
# Restricted Agent (explicit config)
permission:
edit: "ask"
bash:
"*": "deny"
skill:
"*": "deny"
Full reference: See references/opencode-config.md
Legacy Configuration
Agents may occasionally work on legacy projects using outdated frontmatter (e.g., tools:, maxSteps:). You MUST correct these to the modern permission: and steps: fields when encountered.
<enhancement_workflow>
When improving an agent, diagnose through questions:
- "What's not working well?" — Get specific symptoms
- "Can you show me an example where it failed?" — Understand the gap
- "What should it have done instead?" — Define success
Then propose targeted fixes:
| Symptom | Likely Cause | Fix |
|---|---|---|
| Triggers too often | Description too broad | Add specific contexts |
| Misses triggers | Description too narrow | Add trigger phrases |
| Wrong outputs | Prompt ambiguous | Add explicit instructions |
| Executes dangerous commands | Loose bash permissions | Restrict with patterns |
| Uses wrong skills | No skill restrictions | Configure permission.skill |
MUST show proposed changes and ask for confirmation before applying.
</enhancement_workflow>
<examples>Restricted Code Review Agent
---
description: Safe code reviewer.
mode: primary
permission:
edit: "ask"
bash: "deny"
write: "deny"
external_directory: "deny"
---
You are a code review specialist. Analyze code for bugs, security issues,
and improvements. Never modify files directly.
Deployment Agent (Any Other Agents)
---
description: |-
Deployment helper. Use when user says "deploy to staging", "push to prod",
"release version".
Examples:
- user: "deploy" -> run deployment
- user: "release" -> run deployment
mode: subagent
permission:
bash:
"*": "deny"
"git *": "allow"
"npm run build": "allow"
"npm run deploy:*": "ask"
skill:
"*": "deny"
"deploy-checklist": "allow"
---
You are a deployment specialist...
<quality_checklist>
Before showing the final agent to the user:
- Asked about core purpose and triggers
- Researched the domain (MUST NOT assume knowledge is current)
-
descriptionhas concrete trigger examples -
modediscussed and set appropriately - System prompt uses second person
- Asked about tool/permission needs (MUST NOT assume)
- Output format is specified if relevant
- Showed draft to user and got feedback
- User confirmed they're happy with result
</quality_checklist>
References
references/agent-patterns.md- Design patterns and prompt engineeringreferences/opencode-config.md- Full frontmatter schema, tools, permissions
FAQ
What does the agent-architect skill do?
Create and refine OpenCode agents via guided Q&A. Use proactively for agent creation, performance improvement, or configuration design. Examples: - user: "Create an agent for code reviews" → ask about scope, permissions, tools, model preferences, generate AGENTS.md frontmatter - user: "My agent ignores context" → analyze description clarity, allowed-tools, permissions, suggest improvements - user: "Add a database expert agent" → gather requirements, set convex-database-expert in subagenttype, configure permissions - user: "Make my agent faster" → suggest smaller models, reduce allowed-tools, tighten permissions
How do I install agent-architect?
Run npx skills add https://github.com/igorwarzocha/opencode-workflows --skill agent-architect in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/agent-architect/ (personal) or .claude/skills/agent-architect/ (project).
Which AI agents can use agent-architect?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is agent-architect safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains agent-architect?
It is published by igorwarzocha in igorwarzocha/opencode-workflows. It has 318 recorded installs.
More from igorwarzocha/opencode-workflows
powerpoint
igorwarzocha/opencode-workflows
Handle PowerPoint (.pptx) creation, design, and analysis. Use for pitch decks, status updates, and visual storytelling. Use proactively when precise layout positioning and design principles are needed. Examples: - user: "Create a 10-slide deck for the board meeting" - use design principles + html2pptx - user: "Convert this report into a presentation" - extract text and map to template - user: "Audit this deck for layout issues" - generate thumbnail grid for inspection
word
igorwarzocha/opencode-workflows
Handle Word document (.docx) creation, editing, and analysis with high-fidelity visual review. Use for professional reports, legal documents, and tracked changes. Use proactively when quality and precise formatting are critical. Examples: - user: "Create a professional report in Word" - use python-docx with render loops - user: "Draft a legal contract with redlines" - use ooxml redlining workflow - user: "Extract text from this DOCX while preserving structure" - use pandoc markdown conversion
security-nextjs
igorwarzocha/opencode-workflows
Review Next.js security audit patterns for App Router and Server Actions. Use for auditing NEXTPUBLIC exposure, Server Action auth, and middleware matchers. Use proactively when reviewing Next.js apps. Examples: - user: "Scan Next.js env vars" → find leaked secrets with NEXTPUBLIC prefix - user: "Audit Server Actions" → check for missing auth and input validation - user: "Review Next.js middleware" → verify matcher coverage for protected routes - user: "Check Next.js API routes" → verify auth in app/api and pages/api - user: "Secure Next.js headers" → audit next.config.js for security headers
create-opencode-plugin
igorwarzocha/opencode-workflows
Create OpenCode plugins using the @opencode-ai/plugin SDK. Use for building custom tools, event hooks, auth providers, or tool execution interception. Use proactively when developing new plugins in .opencode/plugin/ or /.config/opencode/plugin/. Examples: - user: "Create a plugin to block dangerous commands" → implement tool execution before hook with blocking logic - user: "Add a custom tool for jira" → design tool schema and implementation using SDK context - user: "Show toast on file edit" → react to file edit events and display status message - user: "Build a custom auth provider" → implement auth flow for new model provider - user: "Intercept git commits" → add hook to validate commit messages before execution
opencode-config
igorwarzocha/opencode-workflows
Edit opencode.json, AGENTS.md, and config files. Use proactively for provider setup, permission changes, model config, formatter rules, or environment variables. Examples: - user: "Add Anthropic as a provider" → edit opencode.json providers, add API key baseEnv var, verify with opencode run test - user: "Restrict this agent's permissions" → add permission block to agent config, set deny/allow for tools/fileAccess - user: "Set GPT-5 as default model" → edit global or agent-level model preference, verify model name format - user: "Disable gofmt formatter" → edit formatters section, set languages.gofmt.enabled = false
skill-creator
igorwarzocha/opencode-workflows
Architect and refine OpenCode skills to extend agent capabilities. Handles directory scaffolding, SKILL.md authoring, frontmatter optimization, and resource organization (scripts/references/assets). Use proactively for creating new skills, updating existing workflows, or fixing skill discovery issues. Examples: - user: "Create a new skill for database management" → scaffold directory and initial SKILL.md - user: "My skill isn't triggering correctly" → analyze and refine frontmatter description - user: "Add a python script to the image-processing skill" → structure scripts/ directory - user: "How should I structure a skill for API docs?" → design references/ layout
Popular data & databases skills
supabase-postgres-best-practices
supabase/agent-skills
Postgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill BEFORE writing or changing anything that lives in a Postgres database: creating or altering tables and columns (including choosing column types), schema design, migrations and declarative schema files, RLS policies and the tests that verify them, indexes, triggers, database functions, queues and scheduled jobs (pgcron, pgmq), vector/semantic search (pgvector), and restoring dumps (pgrestore) or importing data. Also load it when diagnosing slow queries, high CPU, timeouts, EXPLAIN plans, connection exhaustion, locking, bloat, or rows visible to the wrong user or tenant. This is not just a performance guide — schema, migration, security, and SQL authoring tasks need these rules too, even for a one-column change or a single query.
prisma-client-api
prisma/skills
Prisma Client API reference covering model queries, filters, operators, and client methods. Use when writing database queries, using CRUD operations, filtering data, or configuring Prisma Client. Triggers on "prisma query", "findMany", "create", "update", "delete", "$transaction".
prisma-database-setup
prisma/skills
Deprecated compatibility name for prisma-orm-setup. Use only when a user or existing integration explicitly invokes prisma-database-setup; otherwise select prisma-orm-setup.
prisma-cli
prisma/skills
Prisma ORM 7 CLI reference for existing Prisma 7 applications or explicitly selected Prisma 7 workflows. Covers prisma init, generate, migrate, db, dev, studio, and mcp. For setup, connection repair, or Prisma 8, use prisma-orm-setup; not the Prisma Platform CLI.
prisma-postgres
prisma/skills
Deprecated compatibility name for prisma-postgres-setup. Use only when a user or existing integration explicitly invokes prisma-postgres; otherwise select prisma-postgres-setup.
prisma-driver-adapter-implementation
prisma/skills
Required reference for Prisma ORM 7 SQL driver adapter work. Use when implementing or modifying adapters, adding database drivers, or touching SqlDriverAdapter, Transaction, savepoint, result mapping, or DriverAdapterError behavior. Covers current transaction lifecycle, optional savepoint hooks, original database-error preservation, and verification.