opencode-audit

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

OpenCode Audit Skill

OpenCode审核Skill

What this skill does

该Skill的功能

This skill runs a practical OpenCode audit and outputs:
  • a 100-point score with grade
  • category-by-category findings
  • concrete, ready-to-use commands and config snippets
  • a short remediation plan
此Skill可执行实用的OpenCode审核并输出以下内容:
  • 带评级的100分制得分
  • 分类别检测结果
  • 可直接使用的具体命令和配置代码片段
  • 简短的修复计划

When to use

使用场景

Use this skill when the user asks to:
  • audit OpenCode setup quality
  • improve OpenCode safety and permissions
  • review agents, commands, skills, MCP, or plugins
  • prepare a hardening checklist before team rollout
当用户提出以下需求时使用此Skill:
  • 审核OpenCode部署配置的质量
  • 提升OpenCode的安全性与权限管理
  • 审核agents、commands、skills、MCP或插件
  • 在团队推广前准备安全加固检查清单

Required inputs

所需输入

  • Target repo or config path
  • Optional focus area (permissions, agents, skills, runtime checks)
  • 目标仓库或配置路径
  • 可选的重点领域(权限、agents、skills、运行时检查)

Audit workflow

审核流程

  1. Load
    references/OPENCODE-AUDIT.md
    .
  2. Discover project and global OpenCode files.
  3. Score all 8 rubric categories.
  4. Build prioritized findings with evidence paths.
  5. Produce copy-paste remediation snippets.
  6. Return total score, grade, and 7-day plan.
  1. 加载
    references/OPENCODE-AUDIT.md
    文件。
  2. 发现项目级和全局级的OpenCode文件。
  3. 对全部8个评分类别进行打分。
  4. 构建带有证据路径的优先级检测结果。
  5. 生成可直接复制粘贴的修复代码片段。
  6. 返回总分、评级以及7天修复计划。

Discovery checklist

发现清单

  • AGENTS.md
    ,
    .opencode/AGENTS.md
    ,
    ~/.config/opencode/AGENTS.md
  • .opencode/config.json
    ,
    .opencode/opencode.json
    ,
    .opencode/opencode.jsonc
  • ~/.config/opencode/config.json
    ,
    ~/.config/opencode/opencode.json
    ,
    ~/.config/opencode/opencode.jsonc
  • .opencode/agents/*.md
    ,
    ~/.config/opencode/agents/*.md
  • .opencode/commands/*.md
    ,
    ~/.config/opencode/commands/*.md
  • .opencode/skills/*/SKILL.md
    ,
    ~/.config/opencode/skills/*/SKILL.md
  • .claude/skills/*/SKILL.md
    ,
    ~/.claude/skills/*/SKILL.md
    when present
  • MCP and plugin sections in config
  • AGENTS.md
    ,
    .opencode/AGENTS.md
    ,
    ~/.config/opencode/AGENTS.md
  • .opencode/config.json
    ,
    .opencode/opencode.json
    ,
    .opencode/opencode.jsonc
  • ~/.config/opencode/config.json
    ,
    ~/.config/opencode/opencode.json
    ,
    ~/.config/opencode/opencode.jsonc
  • .opencode/agents/*.md
    ,
    ~/.config/opencode/agents/*.md
  • .opencode/commands/*.md
    ,
    ~/.config/opencode/commands/*.md
  • .opencode/skills/*/SKILL.md
    ,
    ~/.config/opencode/skills/*/SKILL.md
  • 若存在
    .claude/skills/*/SKILL.md
    ,
    ~/.claude/skills/*/SKILL.md
    也需包含
  • 配置中的MCP和插件部分

Output contract

输出规范

Return in this order:
  1. Total score and grade.
  2. Category scores.
  3. Top findings with severity.
  4. Ready-to-use fixes.
  5. 7-day action plan.
按以下顺序返回结果:
  1. 总分与评级。
  2. 各类别得分。
  3. 带严重程度的重点检测结果。
  4. 可直接使用的修复方案。
  5. 7天行动计划。

Guardrails

约束规则

  • Stay OpenCode-specific; do not use non-OpenCode terminology unless compatibility paths are relevant.
  • Do not invent files; only cite discovered paths.
  • Keep fixes actionable and minimal.
  • Prefer least-privilege recommendations for permissions.
  • 仅使用OpenCode专属术语;除非涉及兼容路径,否则不要使用非OpenCode术语。
  • 不要虚构文件;仅引用已发现的路径。
  • 确保修复方案可执行且精简。
  • 权限相关建议优先遵循最小权限原则。