Generate a structured, hierarchical map of a repository or directory for quick orientation. Use when starting work in an unfamiliar codebase, when the task mentions "project structure", "codebase overview", "directory layout", "what does this repo contain", or when you need a bird's-eye view before diving into…
Patterns for invoking the GitHub CLI (gh v2.98.0+) from agents. Use when the task mentions GitHub, gh, pull requests/PRs, issues, releases, gists, Actions/workflow runs, forks, repo cloning, reviews, or you need exact gh commands. Covers pagination, repo targeting, search vs list, discussions, projects, rulesets…
Prepare a tagged release with release notes, a SemVer version bump, and a gh release command. Use when cutting a release, drafting a changelog, tagging a version, or the task mentions "release", "changelog", "version bump", "tag", or "publish a new version".
Use when requirements are ambiguous before planning or implementing — ask ONE question at a time, prefer multiple choice, until intent is clear. Triggers include "grill", "interview", ambiguous requirements, clarifying questions.
Compact the current conversation into a handoff document for the next agent session. Use when handing off work, ending a long session, or the task mentions "handoff", "交接", "hand over", "continue in next session". References artifacts by path — never copies.
Author and modify OpenCode config in this repository — opencode.json, agents, skills, commands, permissions. Use when editing opencode.json, adding or changing an agent, writing a skill or command, adjusting model routing/permissions, or the task mentions "opencode config", "agent prompt", "SKILL.md", "command", or…
Answer a design question with a throwaway, one-day prototype instead of a spec or a long conversation. Use when a decision hinges on "will this feel right", "does this interaction work", "is this layout better", or the task mentions "spike", "quick prototype", "visualize the options", "try it out before committing".…
Review recent work to identify recurring friction and propose minimal, durable improvements to the opencode config. Use when the user says "reflect", "what can we improve", "review our setup", "optimize the config", or after a series of related sessions reveals a pattern worth codifying.
Safely find and delete dead code — unused files, exports, functions, variables, and imports — with verification before each removal. Use when the task mentions "dead code", "unused code", "remove slop", "clean up" (dead code cleanup), "prune", "delete unused", "orphaned files", or after a refactor leaves unused code…
Use when a question needs open-ended investigation against primary sources and the findings written to a cited Markdown file — not when verifying a single, specific API against its docs before coding (that's verify-with-docs). Triggers include "research X", "look into this topic", "gather docs and facts", or…
Use when resolving git merge/rebase conflicts. Resolve each hunk by finding primary sources (commit messages, PRs, issues) to understand original intent. Preserve both intents where possible; never invent new behavior and never --abort.
Audit code changes for security vulnerabilities before merging. Use when reviewing a diff/PR, hardening code, or the task mentions security, injection, XSS, SSRF, secrets, auth, deserialization, path traversal, or "is this safe?". Reports findings; never auto-fixes silently.
Use when the task mentions domain language, CONTEXT.md, terminology, shared vocabulary, or when the same concepts are being explained repeatedly in different sessions. Builds and maintains a shared language document.
Behavior-preserving code simplification — reduce complexity without changing what the code does. Use when the task mentions "simplify", "reduce complexity", "too clever", "hard to read", "reduce nesting", or after a feature lands and the code needs polishing. Assigned to the oracle agent for deep analysis before…
Run a lightweight, spec-driven change workflow — proposal (WHY/WHAT), specs (WHAT), design (HOW), tasks checklist, then archive. Use when the task is a non-trivial feature or behavior change that benefits from durable, git-tracked planning artifacts, or when the request mentions "spec", "proposal", "propose a change"…
Audit a codebase for technical debt and report a prioritized, read-only findings list. Use when the user asks to audit tech debt or code health, or the task mentions "tech debt", "技术债", "code audit", "audit", "refactor", "debt".
Use when a decision or set of facts can't be answered from the conversation and must be collected from someone off-channel as a one-off questionnaire filled in async — not for a live requirements interview (that's grilling). Triggers include "questionnaire", "survey", "ask the stakeholder", "what should I ask X".
Verify a specific or fast-moving library, framework, or API against its current documentation before writing code — retrieval-first, never from memory. Use when implementing against a named dependency (especially one that changes fast or whose exact signatures matter), when unsure of an API's current shape, or when…
Use when a user message is confusing or doesn't land — restate it in one sentence to confirm before acting. Triggers include "wait what", unclear requests, ambiguous instructions.
Navigate the fog of a large, unfamiliar codebase before any plan. Use when starting work in a huge/legacy/multi-repo codebase, when the task is a multi-step feature with unknown scope, or when the task mentions "too big to hold in context", "where do I even start", "fog of war", "map the unknown", or "navigate a large…
Use when a human must manually walk through steps only they can perform — provisioning infrastructure, setting up credentials or CI secrets, navigating an unfamiliar dashboard, or running a one-off migration or cutover. Not for steps the agent can do itself. Triggers include "setup wizard", "walk me through"…
Use when writing or editing a document an agent consumes — a skill, an AGENTS.md / CLAUDE.md, or any doc reached by a pointer. Triggers include "write a skill", "improve this doc", "agent instructions". For opencode config mechanics use opencode-config instead.