skills/find-rules/SKILL.md
Discover, vet, and generate project-relevant OpenCode rules by searching registries (GitHub, skills.sh) and local template catalog. Used by /init-project setup/refresh to provision project-specific rules alongside skills and agents.
npx skillsauth add Thomashighbaugh/opencode find-rulesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Find and generate the right OpenCode rules for a project's tech stack by searching registries, scanning local templates, and presenting candidates for installation.
/init-project setup or /init-project refresh to scaffold project rules@stack-detector has produced a stack fingerprint, before project-config-composer runs| Source | Search Method | Signal |
|--------|--------------|--------|
| Local templates | ls ~/.config/opencode/rule-templates/*/ | Known-good templates |
| GitHub | gh search repos --topic opencode-rules --topic agent-rules | Stars, description |
| skills.sh | npx skills search <term> | Install count |
A list of rule candidates with installation status:
{
"rules": {
"from_templates": [
{ "name": "coding-style", "template": "coding-style/typescript.md", "status": "available" },
{ "name": "framework", "template": "framework/nextjs.md", "status": "available" },
{ "name": "testing", "template": "testing/vitest.md", "status": "available" }
],
"from_registries": [
{ "name": "prisma-conventions", "source": "github:user/rules", "status": "found" }
],
"selected": [
"coding-style", "framework", "testing", "api-design"
]
}
}
After stack-recommender produces the rule recommendations, find-rules is called to:
project-config-composer for generationRules are generated (not installed from registries) by project-config-composer into .opencode/rules/.
tools
Create valid, type-safe TypeScript tools for OpenCode — generates correct boilerplate, typed interfaces, and handler stubs. Use when building new tools for global config or per-project .opencode/tools/.
testing
Explore multiple solution branches in parallel, evaluate each, and recommend the best path. Use when the user explicitly invokes /ideation tree-of-thoughts or asks for "tree of thought" / "branching exploration".
testing
Run multiple independent reasoning passes and find consensus. Use when the decision is critically important, the stakes are high, or the user explicitly requests "run it multiple times" / "check consistency" / "self-consistency".
testing
Optimization by PROmpting — generate candidate prompt variations, test each against a benchmark, and report the best performer. Use when the user invokes /ideation opro or asks for "prompt optimization" / "OPRO".