This page documents repository-specific slash commands, the skill layout, and custom tools shipped in this repo.
| Command | Purpose |
|---|---|
/research <task> |
RPI phase 1 - explores the codebase and writes a research doc to docs/thoughts/ |
/deep-research <task> |
Same as /research but uses Claude Opus for harder problems |
/plan <artifact-folder> |
RPI phase 2 - turns a research doc into a numbered implementation plan |
/implement <artifact-folder> |
RPI phase 3 - executes the plan step by step and runs the quality gate |
/skill <skill-name> "<description hint>" |
Scaffolds a new skill folder |
/security-profile [init|refresh] [project-name] |
Creates or refreshes a project-specific defensive security-profile skill from security-core |
The RPI workflow is research -> plan -> implement:
researchreads and maps the codebase onlyplanconverts findings into a step-by-step plan onlyimplementexecutes the plan and runs verification gates
For each project, run both commands so the repository gets and then maintains its security profile:
/security-profile init
/security-profile refreshinitscaffolds.opencode/skills/security-profile/withSKILL.md,GOTCHAS.md,HISTORY.md, andconfig.json.refreshupdates inferred metadata while preserving user-owned settings where possible.
The profile is defensive-only and intended to complement .opencode/skills/security-core/.
Skills are domain-knowledge folders loaded on demand. Each skill lives under .opencode/skills/<skill-name>/ and uses this structure:
| File / Dir | Purpose |
|---|---|
SKILL.md |
Reference facts, file map, config and memory guidance |
GOTCHAS.md |
Accumulated failure points and fixes - never deleted |
HISTORY.md |
Append-only change log - one entry per session that modified the domain |
assets/ |
Templates, static files, and output scaffolds |
scripts/ |
Helper scripts and libraries the agent can run or compose |
/skill <skill-name> "<short description hint>"Example:
/skill billing-lib "Internal billing library - edge cases, footguns, charge flow"After creation:
- Fill in
SKILL.md->## Key Factswith what the model needs to know (not do): file paths, data shapes, naming rules, API shapes. - Add reusable scripts to
scripts/and reference them in## File & Directory Map. - Add output templates or static assets to
assets/. - If the skill needs per-user config, keep
## Configurationand defineconfig.jsonshape. - If the skill benefits from memory, keep
## Memoryand choose a persistent log format. - Remove
## Configurationand## Memoryif not needed.
The custom tool .opencode/tools/pdftotext.ts exposes pdftotext with these arguments:
filePath(required): PDF path, absolute or relative to the current directoryfirstPage/lastPage(optional): 1-based page rangepreserveLayout(optional): usespdftotext -layoutrawOrder(optional): usespdftotext -rawmaxChars(optional): maximum characters returned (default40000)
Example prompt:
Read from docs/some-pdf-file.pdf, pages 2-4, preserving layout.