Token导航 LogoToken导航

Agent Skill · 研究检索

opencode-dev(opencode DEV 搜索)

opencode-dev 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

opencode-dev 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 66,724。

总安装 259周安装 11GitHub Stars 2下载 91核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:opencode-dev(opencode DEV 搜索)
来源仓库:https://github.com/benjaminwestern/google-engineer-skills
仓库路径:skills/opencode-dev
安装命令:
npx skills add https://github.com/benjaminwestern/google-engineer-skills --skill opencode-dev
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/benjaminwestern/google-engineer-skills --skill opencode-dev

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

opencode-dev 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。它可结合来源仓库、安装命令和原始 README 继续核验具体用法。

安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。可通过 npx skills add 命令从 GitHub 仓库安装。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/opencode-dev

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/benjaminwestern/google-engineer-skills --skill…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

opencode-dev 怎么安装?

在终端执行 npx skills add https://github.com/benjaminwestern/google-engineer-skills --skill opencode-…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

opencode-dev 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

opencode-dev 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

opencode-dev 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

opencode-dev 用的人多吗?

公开数据是累计安装 259 次,近一周安装 11 次,下载 91 次,GitHub 2 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

opencode-dev 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
opencode-dev

opencode DEV 搜索 · 本页

2592接触敏感数据未明确未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

OpenCode Development

Create and manage OpenCode agents, tools, MCP servers, and workflows.

Quick Start

# Create a new agent
Create a documentation agent that reviews code and writes docs

# Create a custom tool
Create a tool called "deploy" that runs deployment scripts

# Add an MCP server
Add the PostgreSQL MCP server

# Create agent workflow
Create a workflow where a planner agent delegates to a coder agent

Finding Configuration Location

Search Order

  1. Project-specific: Look for .opencode/ folder in current directory
  2. Parent directories: Search up the tree for .opencode/ folder
  3. Global config: Default to ~/.config/opencode/opencode.json
# Find closest .opencode folder
find . -maxdepth 3 -type d -name ".opencode" 2>/dev/null | head -1

# Or search upward
pwd | tr '/' '\n' | tac | while read -r dir; do
  test -d "$dir/.opencode" && echo "$dir/.opencode" && break
done

Determine Target Path

// Logic to determine where to save configurations
function getTargetPath() {
  // 1. Check for .opencode in current and parent directories
  let currentDir = process.cwd();
  while (currentDir !== '/') {
    const opencodePath = path.join(currentDir, '.opencode');
    if (fs.existsSync(opencodePath)) {
      return opencodePath;
    }
    currentDir = path.dirname(currentDir);
  }

  // 2. Default to global config
  return path.join(os.homedir(), '.config/opencode');
}

Creating Agents

Method 1: Markdown Agent File

Best for: Simple agents with prompts and basic configuration

Location: .opencode/agents/<agent-name>.md or ~/.config/opencode/agents/<agent-name>.md

---
description: What this agent does
mode: subagent
model: anthropic/claude-sonnet-4-20250514
temperature: 0.3
tools:
  write: false
  edit: false
  bash: true
permissions:
  edit: deny
  bash:
    "*": ask
    "git *": allow
---

You are a specialized agent. Your purpose is to...

Focus on:
- Task 1
- Task 2
- Task 3

Method 2: JSON Configuration

Best for: Complex agents with detailed tool/permission configurations

Location: .opencode/opencode.json or ~/.config/opencode/opencode.json

{
  "$schema": "https://opencode.ai/config.json",
  "agent": {
    "my-agent": {
      "description": "What this agent does",
      "mode": "subagent",
      "model": "anthropic/claude-sonnet-4-20250514",
      "temperature": 0.3,
      "prompt": "You are a specialized agent...",
      "tools": {
        "write": false,
        "edit": false,
        "bash": true
      },
      "permissions": {
        "edit": "deny",
        "bash": {
          "*": "ask",
          "git *": "allow"
        }
      }
    }
  }
}

Agent Options Reference

OptionTypeDescription
descriptionstringRequired. What the agent does
modestringprimary, subagent, or all
modelstringModel ID (e.g., anthropic/claude-sonnet-4-20250514)
temperaturenumber0.0-1.0, creativity control
top_pnumber0.0-1.0, response diversity
stepsnumberMax agentic iterations
promptstringSystem prompt or {file:./path.txt}
toolsobjectTool enable/disable map
permissionsobjectPermission configuration
hiddenbooleanHide from @ autocomplete
colorstringUI color (hex or theme name)
disablebooleanDisable the agent

Agent Modes

  • primary: Main agents you interact with directly (switch with Tab key)
  • subagent: Invoked via @mention or by other agents via Task tool
  • all: Can be used as both primary and subagent

Creating Custom Tools

Simple Tool Definition

Location: .opencode/opencode.json or ~/.config/opencode/opencode.json

{
  "$schema": "https://opencode.ai/config.json",
  "customTools": [
    {
      "name": "deploy",
      "description": "Deploy the application to production",
      "command": "./scripts/deploy.sh {{environment}}",
      "parameters": {
        "environment": {
          "type": "string",
          "description": "Deployment environment",
          "enum": ["staging", "production"]
        }
      }
    }
  ]
}

Advanced Tool with Validation

{
  "customTools": [
    {
      "name": "database-query",
      "description": "Run a database query",
      "command": "psql -d {{database}} -c \"{{query}}\"",
      "parameters": {
        "database": {
          "type": "string",
          "description": "Database name"
        },
        "query": {
          "type": "string",
          "description": "SQL query to execute"
        }
      },
      "validation": {
        "database": {
          "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$",
          "message": "Invalid database name"
        }
      }
    }
  ]
}

Tool Parameters

PropertyTypeDescription
namestringRequired. Tool name
descriptionstringRequired. What the tool does
commandstringRequired. Shell command to execute
parametersobjectParameter definitions
validationobjectParameter validation rules

Parameter Types

{
  "parameters": {
    "stringParam": {
      "type": "string",
      "description": "A string parameter",
      "default": "default value"
    },
    "numberParam": {
      "type": "number",
      "description": "A numeric parameter",
      "minimum": 0,
      "maximum": 100
    },
    "booleanParam": {
      "type": "boolean",
      "description": "A boolean flag"
    },
    "enumParam": {
      "type": "string",
      "description": "A choice parameter",
      "enum": ["option1", "option2", "option3"]
    }
  }
}

Configuring MCP Servers

Basic MCP Server

{
  "$schema": "https://opencode.ai/config.json",
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-postgres", "postgresql://localhost/mydb"]
    },
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/home/user/projects"]
    }
  }
}

MCP Server with Environment Variables

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "{{env.GITHUB_TOKEN}}"
      }
    }
  }
}

MCP Server with Permissions

{
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-postgres", "postgresql://localhost/mydb"]
    }
  },
  "permissions": {
    "postgres_*": "ask"
  }
}

Managing Prompts

External Prompt Files

Create prompt files in .opencode/prompts/:

# Create prompts directory
mkdir -p .opencode/prompts

# Create a prompt file
cat > .opencode/prompts/code-reviewer.txt << 'EOF'
You are an expert code reviewer. Focus on:
- Security vulnerabilities
- Performance issues
- Code maintainability
- Best practices

Provide specific, actionable feedback.
EOF

Reference in agent config:

{
  "agent": {
    "reviewer": {
      "description": "Code reviewer agent",
      "mode": "subagent",
      "prompt": "{file:./prompts/code-reviewer.txt}"
    }
  }
}

Inline Prompts

{
  "agent": {
    "reviewer": {
      "description": "Code reviewer agent",
      "mode": "subagent",
      "prompt": "You are a code reviewer. Focus on security, performance, and maintainability."
    }
  }
}

Creating Agent Workflows

Subagent Delegation Pattern

Orchestrator Agent (primary):

{
  "agent": {
    "orchestrator": {
      "description": "Orchestrates complex tasks by delegating to subagents",
      "mode": "primary",
      "prompt": "You are a task orchestrator. For complex tasks:\n1. Break down into subtasks\n2. Use the Task tool to delegate to appropriate subagents\n3. Synthesize results\n\nAvailable subagents:\n- @planner: Creates implementation plans\n- @coder: Writes and edits code\n- @reviewer: Reviews code quality",
      "permissions": {
        "task": {
          "*": "allow"
        }
      }
    }
  }
}

Planner Subagent:

---
description: Creates detailed implementation plans
mode: subagent
tools:
  write: false
  edit: false
---

You are a technical planner. Create detailed, actionable plans.

Structure your plans:
1. Overview
2. Files to modify/create
3. Step-by-step implementation
4. Testing strategy
5. Potential risks

Coder Subagent:

{
  "agent": {
    "coder": {
      "description": "Writes and edits code based on plans",
      "mode": "subagent",
      "tools": {
        "write": true,
        "edit": true,
        "read": true
      }
    }
  }
}

Workflow Definition File

Create complex workflows in .opencode/workflows/:

# .opencode/workflows/feature-development.yaml
name: Feature Development

trigger: primary agent delegates feature requests

steps:
  1_plan:
    agent: planner
    prompt: "Analyze requirements and create implementation plan for: {{task}}"
    output: plan

  2_implement:
    agent: coder
    prompt: "Implement based on plan:\n{{plan}}"
    tools: [write, edit, read]

  3_review:
    agent: reviewer
    prompt: "Review the implementation for quality and issues"
    tools: [read]
    optional: true

  4_finalize:
    agent: orchestrator
    prompt: "Summarize changes and suggest next steps"

Configuration Structure

Complete opencode.json Example

{
  "$schema": "https://opencode.ai/config.json",

  "agent": {
    "build": {
      "mode": "primary",
      "model": "anthropic/claude-sonnet-4-20250514"
    },
    "plan": {
      "mode": "primary",
      "permissions": {
        "edit": "ask",
        "bash": "ask"
      }
    },
    "docs-writer": {
      "description": "Writes technical documentation",
      "mode": "subagent",
      "prompt": "{file:./prompts/docs-writer.txt}",
      "tools": {
        "bash": false
      }
    },
    "security-auditor": {
      "description": "Performs security audits",
      "mode": "subagent",
      "tools": {
        "write": false,
        "edit": false
      }
    }
  },

  "customTools": [
    {
      "name": "deploy",
      "description": "Deploy to environment",
      "command": "./scripts/deploy.sh {{env}}",
      "parameters": {
        "env": {
          "type": "string",
          "enum": ["staging", "production"]
        }
      }
    }
  ],

  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-postgres", "postgresql://localhost/mydb"]
    }
  },

  "permissions": {
    "bash": "ask",
    "edit": "allow",
    "postgres_*": "ask"
  }
}

Directory Structure

.opencode/
├── opencode.json          # Main configuration
├── agents/                # Markdown agent definitions
│   ├── docs-writer.md
│   ├── security-auditor.md
│   └── code-reviewer.md
├── prompts/               # External prompt files
│   ├── docs-writer.txt
│   ├── security-prompt.txt
│   └── code-reviewer.txt
├── workflows/             # Workflow definitions
│   └── feature-development.yaml
└── tools/                 # Custom tool scripts
    ├── deploy.sh
    └── test-runner.sh

Examples

Example 1: Create a Documentation Agent

# 1. Find or create .opencode directory
mkdir -p .opencode/agents .opencode/prompts

# 2. Create the prompt file
cat > .opencode/prompts/docs-writer.txt << 'EOF'
You are a technical documentation writer. Create clear, comprehensive documentation.

Guidelines:
- Use clear, concise language
- Include code examples
- Structure with headers and lists
- Explain "why" not just "how"
EOF

# 3. Create the agent
cat > .opencode/agents/docs-writer.md << 'EOF'
---
description: Writes and maintains technical documentation
mode: subagent
temperature: 0.3
tools:
  bash: false
---

You are a technical writer. Create documentation that is:
- Clear and concise
- Well-structured
- Includes examples
- Accessible to the target audience
EOF

Example 2: Create a Code Review Agent

{
  "agent": {
    "code-reviewer": {
      "description": "Reviews code for quality and best practices",
      "mode": "subagent",
      "model": "anthropic/claude-sonnet-4-20250514",
      "temperature": 0.1,
      "prompt": "You are an expert code reviewer. Focus on:\n- Security vulnerabilities\n- Performance issues\n- Maintainability\n- Best practices\n\nProvide specific, actionable feedback.",
      "tools": {
        "write": false,
        "edit": false,
        "read": true,
        "grep": true
      },
      "permissions": {
        "edit": "deny"
      }
    }
  }
}

Example 3: Create a Deployment Tool

{
  "customTools": [
    {
      "name": "deploy-app",
      "description": "Deploy application to specified environment",
      "command": "bash scripts/deploy.sh --env {{environment}} --version {{version}}",
      "parameters": {
        "environment": {
          "type": "string",
          "description": "Target deployment environment",
          "enum": ["development", "staging", "production"],
          "default": "staging"
        },
        "version": {
          "type": "string",
          "description": "Version to deploy (git tag or branch)",
          "default": "main"
        }
      }
    }
  ]
}

Example 4: Create Agent Workflow

Orchestrator (primary agent):

{
  "agent": {
    "feature-orchestrator": {
      "description": "Orchestrates feature development workflow",
      "mode": "primary",
      "prompt": "You coordinate feature development:\n1. Use @planner to create implementation plan\n2. Use @implementer to write code\n3. Use @tester to verify\n4. Summarize results\n\nDelegate tasks using Task tool.",
      "permissions": {
        "task": {
          "planner": "allow",
          "implementer": "allow",
          "tester": "allow"
        }
      }
    }
  }
}

Subagents:

---
description: Creates implementation plans
mode: subagent
tools:
  write: false
  edit: false
---

Create detailed implementation plans with file structure, steps, and considerations.
---
description: Implements code based on plans
mode: subagent
tools:
  write: true
  edit: true
  read: true
---

Implement features according to the provided plan. Follow best practices.

Example 5: Add MCP Server

{
  "mcpServers": {
    "sqlite": {
      "command": "uvx",
      "args": ["mcp-server-sqlite", "--db-path", "./data.db"]
    }
  },
  "permissions": {
    "sqlite_*": "ask"
  }
}

Helper Scripts

Script: opencode-init.sh

Initialize OpenCode configuration in current project:

#!/bin/bash
# opencode-init.sh - Initialize OpenCode configuration

OPENCODE_DIR=".opencode"

# Create directory structure
mkdir -p "$OPENCODE_DIR"/{agents,prompts,workflows,tools}

# Create base opencode.json
cat > "$OPENCODE_DIR/opencode.json" << 'EOF'
{
  "$schema": "https://opencode.ai/config.json",
  "agent": {},
  "customTools": [],
  "mcpServers": {},
  "permissions": {}
}
EOF

echo "OpenCode configuration initialized in $OPENCODE_DIR/"

Script: create-agent.sh

Create a new agent:

#!/bin/bash
# create-agent.sh - Create a new OpenCode agent

AGENT_NAME="$1"
AGENT_MODE="${2:-subagent}"

if [ -z "$AGENT_NAME" ]; then
  echo "Usage: create-agent.sh <agent-name> [mode]"
  exit 1
fi

# Find .opencode directory
OPENCODE_DIR=""
CURRENT_DIR="$(pwd)"
while [ "$CURRENT_DIR" != "/" ]; do
  if [ -d "$CURRENT_DIR/.opencode" ]; then
    OPENCODE_DIR="$CURRENT_DIR/.opencode"
    break
  fi
  CURRENT_DIR="$(dirname "$CURRENT_DIR")"
done

# Default to global if not found
if [ -z "$OPENCODE_DIR" ]; then
  OPENCODE_DIR="$HOME/.config/opencode"
  mkdir -p "$OPENCODE_DIR/agents"
fi

cat > "$OPENCODE_DIR/agents/$AGENT_NAME.md" << EOF
---
description: $AGENT_NAME agent
mode: $AGENT_MODE
---

You are a $AGENT_NAME agent. Your purpose is to...
EOF

echo "Created agent: $OPENCODE_DIR/agents/$AGENT_NAME.md"

Best Practices

Agent Design

  1. Clear descriptions: Make agent purpose obvious from description
  2. Appropriate restrictions: Limit tools based on agent role
  3. Specific prompts: Give clear instructions and guidelines
  4. Temperature tuning: Use low temps (0.1-0.3) for analysis, higher (0.5-0.7) for creative tasks

Tool Design

  1. Validate inputs: Use parameter validation
  2. Clear descriptions: Help LLM understand when to use the tool
  3. Safe defaults: Set sensible defaults for optional parameters
  4. Idempotent: Tools should be safe to run multiple times

MCP Server Security

  1. Use permissions: Set ask for destructive operations
  2. Limit scope: Configure servers with minimal required access
  3. Env variables: Store secrets in environment variables, not config

Workflow Organization

  1. Single responsibility: Each agent should have a focused purpose
  2. Clear handoffs: Define what each subagent returns
  3. Error handling: Plan for subagent failures
  4. Progress tracking: Use todo lists for complex workflows

Troubleshooting

Agent not appearing

  • Check agent file has correct YAML frontmatter
  • Verify JSON syntax in opencode.json
  • Restart OpenCode to reload config

Tools not available

  • Check permissions configuration
  • Verify tool is enabled (not set to false)
  • Check for conflicting permission rules

MCP server errors

  • Verify MCP server is installed (npm list -g or pip list)
  • Check server command is in PATH
  • Review server logs for errors

Permission denied

  • Check global permissions first
  • Verify agent-specific permissions aren't more restrictive
  • Use glob patterns carefully (order matters)

References

平台分布

Codex

35.93%
按下载量换算33

Claude

26.72%
按下载量换算24

Cursor

17.96%
按下载量换算16

Gemini CLI

9.61%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

未通过

Snyk

可疑

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills