.opencode/skill/agent-architect/SKILL.md
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 subagent_type, configure permissions - user: "Make my agent faster" → suggest smaller models, reduce allowed-tools, tighten permissions
npx skillsauth add igorwarzocha/opencode-workflows agent-architectInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Create and refine opencode agents through a guided Q&A process.
<core_approach>
Agent creation is conversational, not transactional.
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:
bash, read, write, edit permissions. Rely on system defaults."*": "deny" and explicit allows, regardless of tool permissions.</question_tool>
<reference>| Scope | Path |
|-------|------|
| Project | .opencode/agent/<name>.md |
| Global | ~/.config/opencode/agent/<name>.md |
---
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
| Mode | Description |
|------|-------------|
| (undefined) | Standard agent, visible to user and tools (Default) |
| subagent | specialized task tool agent, hidden from main list |
Ask these first—they shape everything else:
"What should this agent do?"
"What should trigger this agent?"
description field"What expertise/persona should it have?"
MUST NOT assume knowledge is current. After understanding the broad strokes:
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.
"What permissions does this agent need?" (Use Question Tool)
bash, read, write, edit to config. Rely on defaults.* if needed."Should this agent use any skills?"
permission.skill with "*": "deny" and explicit allows."Is this a subagent?"
mode: subagentmode undefined (standard)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>
# 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 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:
<outer><inner></inner></outer><context> tags..."Example:
<instructions>
1. Analyze the code in <code> tags
2. List issues in <findings> tags
3. Suggest fixes in <recommendations> tags
</instructions>
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
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
read, write, edit, bash) unless the user explicitly asks for restrictions or non-standard access.permission.skill to 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
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:
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>---
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.
---
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...
</examples>
<quality_checklist>
Before showing the final agent to the user:
description has concrete trigger examplesmode discussed and set appropriately</quality_checklist>
references/agent-patterns.md - Design patterns and prompt engineeringreferences/opencode-config.md - Full frontmatter schema, tools, permissionsdevelopment
Handle structured co-authoring of professional documentation. Use for proposals, technical specs, and RFCs. Use proactively when a collaborative drafting process (Gathering -> Refinement -> Testing) is needed. Examples: - user: "Draft a technical RFC for the new API" -> follow Stage 1 context gathering - user: "Refine the introduction of this proposal" -> use iterative surgical edits - user: "Test if this document is clear for readers" -> run reader testing workflow
development
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
testing
Apply professional visual themes to documents and presentations. Use for styling artifacts with consistent color palettes and font pairings. Use proactively to quickly improve the aesthetic quality of deliverables. Examples: - user: "Apply a modern theme to this deck" -> use Modern Minimalist theme - user: "I want a tech aesthetic for this doc" -> apply Tech Innovation theme - user: "Create a custom theme for my project" -> generate new color/font specification
tools
Guide for creating effective opencode skills. Use for creating or updating skills that extend agent capabilities with specialized knowledge, workflows, or tool integrations. Examples: - user: "Create a skill for git workflows" → define SKILL.md with instructions and examples - user: "Add examples to my skill" → follow the user: "query" → action pattern - user: "Update skill description" → use literal block scalar and trigger contexts - user: "Structure a complex skill" → organize with scripts/ and references/ directories - user: "Validate my skill" → check structure, frontmatter, and discovery triggers