ワンクリックで
create-agent
Guide for creating custom OpenCode agents using markdown files with YAML frontmatter
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Guide for creating custom OpenCode agents using markdown files with YAML frontmatter
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Render a document, a diagram, or a report as HTML for human visualisation.
Use when writing prose meant to read by humans: PR descriptions, docs, blog drafts, emails, design memos
Guidelines on creating issues on GitHub
Run a premortem on any plan, launch, product, hire, strategy, or decision. Assumes it already failed 6 months from now and works backward to find every reason why. Produces a revised plan with blind spots exposed. MANDATORY TRIGGERS: 'premortem this', 'premortem my', 'run a premortem', 'what could kill this', 'future-proof this', 'stress test this plan', 'what am i missing here', 'find the blind spots'. STRONG TRIGGERS: 'what could go wrong', 'am i missing anything', 'poke holes in this', 'where will this break', 'devil's advocate this'. Do NOT trigger on simple feedback requests, or factual questions. DO trigger when someone has a plan or commitment where the cost of being wrong is high.
Schedule a prompt to fire back at yourself at a future time or on a recurring cron pattern. Use when the user says "remind me", "every N minutes/hours/days", "at HH:MM tomorrow", "check X periodically", or otherwise asks for any time-based action. Triggered by the `schedule` tool plus the `/schedule` command for listing and deletion.
Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get roasted on their design, or mentions "brainstorm".
| name | create-agent |
| description | Guide for creating custom OpenCode agents using markdown files with YAML frontmatter |
Create custom OpenCode agents using markdown files with YAML frontmatter - the preferred method for readability and version control.
Create ~/.config/opencode/agents/my-agent.md:
---
description: What this agent does
mode: subagent | primary
temperature: 0.3
permission:
edit: deny
---
System prompt here...
File locations:
~/.config/opencode/agents/*.md.opencode/agents/*.md| Option | Description | Example |
|---|---|---|
description | When to use this agent (required) | "Code reviewer" |
mode | primary (Tab-switchable) or subagent (@mention) | subagent |
permission | Tool access control: allow, ask, or deny | edit: deny |
temperature | 0.0-1.0 (lower=focused) | 0.3 |
---
description: Research assistant with web access
mode: subagent
permission:
read: allow
webfetch: allow
websearch: allow
edit: deny
bash: deny
---
---
description: Planning mode without file changes
mode: primary
permission:
read: allow
edit: deny
bash: deny
---
---
description: Reviews code for quality and best practices
mode: subagent
permission:
read: allow
grep: allow
glob: allow
edit: deny
bash:
'*': ask
'git *': allow
---
Effective prompts include:
Common permissions to configure:
read / grep / glob - Code explorationedit / bash - File operations (deny for safety)webfetch / websearch - Internet accesstask - Invoking other subagentsquestion - Interactive user promptsUse allow, ask, or deny values. Use object syntax for granular control:
permission:
bash:
'*': ask
'git status': allow
'rm *': deny
Control approvals in YAML:
permission:
edit: ask # Prompt before edit
bash:
'*': ask # Ask all commands
'git status': allow # Except git status
Important: The
editkey controls ALL file modification tools:edit,write,patch, andmultiedit. There is no separatewrite:key — it is silently ignored if present. Always useedit:to restrict file writes.
Gotcha:
**is NOT a true globstar — it requires a literal/separator to work. Use*.mdfor files directly inside a directory; use**/*.mdonly when files are guaranteed to be in subdirectories.
permission:
edit:
"*": deny
"~/.config/opencode/memory/*.md": allow # correct — files directly in memory/
# "~/.config/opencode/memory/**/*.md": allow # WRONG — never matches flat files
Last matching rule wins. Always put the "*" catch-all first, specific overrides after:
permission:
edit:
"*": deny # catch-all first
"~/safe/subdir/*.md": allow # specific override last — this wins for matching paths
bash:
"*": ask # catch-all first
"git status": allow # specific override last
external_directory and edit: Are IndependentGotcha:
external_directoryonly gates access to out-of-project paths. Theedit:permission rules still run independently on top. You must configure both for agents that write to paths outside the project.
permission:
external_directory:
"~/.config/opencode": allow # gates out-of-project access
edit:
"*": deny
"~/.config/opencode/memory/*.md": allow # still required — edit rules apply independently
edit: deny to block all file writes (not write: deny — that key doesn't exist)*.md not **/*.md for files directly inside a directoryexternal_directory and edit: when writing outside the project root---
description: Security auditor that identifies vulnerabilities
mode: subagent
temperature: 0.2
permission:
read: allow
grep: allow
glob: allow
edit: deny
bash: deny
---
You are a security auditor. Focus on:
- Input validation vulnerabilities
- Authentication flaws
- Data exposure risks
- Dependency vulnerabilities
Provide specific recommendations with code examples.
Never modify files - only report findings.