cmd/sgai/skel/.sgai/skills/meta/create-opencode-agents/SKILL.md
Guide for creating custom opencode agents with proper configuration, tools, permissions, and reasoning for specific tasks. When creating new opencode agents for security auditing, code review, planning, documentation, or specialized workflows; when built-in agents don't suffice; when configuring agents with restricted tools or custom prompts
npx skillsauth add sandgardenhq/sgai create-opencode-agentsInstall 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.
OpenCode agents are specialized AI assistants configured for specific tasks with custom prompts, models, tools, and permissions. Creating effective agents requires understanding the configuration options and applying them appropriately to the agent's purpose.
Use this skill when:
Don't use for:
Start with a clear description of what the agent does:
description: Performs security audits and identifies vulnerabilities
Include when to use it in the description for better discoverability.
Key options from OpenCode docs:
For security auditing agents:
Create markdown file in .sgai/agent/ (project) or ~/.config/opencode/agent/ (global):
---
description: Performs security audits and identifies vulnerabilities
mode: subagent
temperature: 0.1
tools:
write: false
edit: false
bash: false
permissions:
edit: deny
bash: deny
webfetch: allow
---
You are a security expert specializing in code analysis. Focus on identifying potential security issues including:
- Input validation vulnerabilities
- Authentication and authorization flaws
- Data exposure risks
- Dependency vulnerabilities
- Configuration security issues
Provide detailed analysis with specific code locations and severity levels. Do not make changes to code.
| Task Type | Mode | Tools | Permissions | |-----------|------|-------|-------------| | Security Audit | subagent | read-only | deny edit/bash | | Code Review | subagent | read-only | deny edit | | Planning | primary | restricted | ask for changes | | Documentation | subagent | write allowed | allow file ops |
Properly configured agents:
documentation
Start, stop, and steer agentic sessions in sgai workspaces. Use when you need to launch AI agent sessions, halt running sessions, or inject steering instructions to guide the agent mid-execution without stopping it.
development
Monitor sgai workspace status, events, progress, diffs, and workflow diagrams. Use when you need to observe what agents are doing, track progress, get the current state of all workspaces, subscribe to real-time updates via SSE, or inspect code changes.
development
Access agents, skills, and code snippets available in sgai workspaces. Use when you need to discover what agents are defined in a workspace, browse available skills, get skill instructions, find code snippets by language, or retrieve snippet content for a specific task.
data-ai
Handle agent questions and work gates in sgai workspaces. Use when an agent is blocked waiting for human input, when you need to respond to multi-choice questions, approve work gates, or provide free-text answers to agent queries.