Back to list
ian-pascoe

writing-agents

by ian-pascoe

My dotfiles

1🍴 0📅 Jan 24, 2026

SKILL.md


name: writing-agents description: Use when creating, editing, or reviewing agent configuration files (AGENT.md or opencode.json agents). Covers frontmatter options, mode selection, tool permissions, and common patterns.

Writing Agents

Overview

Agents are specialized AI assistants with custom prompts, models, and tool access. Configure via markdown files or JSON.

When to Use

  • Creating a new agent for specific tasks
  • Editing agent prompts, permissions, or tool access
  • Choosing between primary vs subagent mode
  • Setting up task permissions for orchestration
  • Reviewing agent configuration quality

Don't use for: skill files (use writing-skills), system prompts without agent context, or MCP server config.

File Locations

~/.config/opencode/agent/<name>.md     # Global agents
.opencode/agent/<name>.md              # Project-local agents
opencode.json → agent.<name>           # JSON config (either location)

Filename becomes agent name (e.g., review.mdreview agent).

Frontmatter Reference

FieldRequiredValuesNotes
descriptionYesstringBrief description for agent selection
modeNoprimary, subagent, allDefault: all
modelNoprovider/model-idInherits from parent if unset
temperatureNo0.0-1.00.0-0.2 focused, 0.6-1.0 creative
maxStepsNointegerLimit agentic iterations
hiddenNobooleanHide from @ autocomplete (subagents only)
disableNobooleanDisable the agent
toolsNoobjectEnable/disable specific tools
permissionNoobjectConfigure ask/allow/deny per tool

Mode Selection

ModeUse Case
primaryMain agents user switches between (Tab key)
subagentInvoked by primary agents or via @ mention
allAvailable in both contexts (default)

Tool Configuration

tools:
  write: false # Disable write tool
  edit: false # Disable edit tool
  bash: false # Disable bash tool
  mymcp_*: false # Wildcards for MCP tools

Permission Configuration

permission:
  edit: deny # deny | ask | allow
  bash:
    "*": ask # Default for all commands
    "git status": allow # Specific command override
    "git push*": ask # Glob patterns supported
  webfetch: deny
  task:
    "*": deny # Block all subagent invocation
    "my-helper-*": allow # Allow specific subagents

Rule evaluation: Last matching rule wins. Put * first, specifics after.

Markdown Template

---
description: <what it does and when to use>
mode: subagent
model: anthropic/claude-sonnet-4-20250514
temperature: 0.1
tools:
  write: false
  edit: false
  bash: false
permission:
  edit: deny
---

<system prompt content>

Focus on:

- Point 1
- Point 2

JSON Template

{
  "agent": {
    "my-agent": {
      "description": "What it does",
      "mode": "subagent",
      "model": "anthropic/claude-sonnet-4-20250514",
      "prompt": "{file:./prompts/my-agent.txt}",
      "tools": {
        "write": false,
        "edit": false
      },
      "permission": {
        "bash": {
          "*": "ask",
          "git diff": "allow"
        }
      }
    }
  }
}

Common Patterns

Read-Only Reviewer

tools:
  write: false
  edit: false
  bash: false

Restricted Bash Access

permission:
  bash:
    "*": ask
    "git status": allow
    "git log*": allow
    "git diff*": allow

Orchestrator with Task Limits

permission:
  task:
    "*": deny
    "my-workers-*": allow

Common Mistakes

MistakeFix
Missing descriptionAlways provide clear description
Using hidden on primary agenthidden only works on subagents
Expecting * to be evaluated lastLast rule wins - put * first
Setting model on subagentSubagents inherit parent model if unset
Narrative prompt styleFocus on role and constraints, not conversation

Validation Checklist

  • Description clearly states purpose and trigger conditions
  • Mode matches intended usage (primary vs subagent)
  • Tools restricted appropriately for the role
  • Permissions use correct ask/allow/deny values
  • Bash permission rules ordered correctly (* first)
  • Prompt focuses on role, constraints, and focus areas

Score

Total Score

50/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon