discover · zaxbyhub — Claude Code skill for repository discovery
This skill delegates repository discovery and maps project rules, code structure, and risk areas. Use it before a complex change when you need to understand the existing project first.
MIT ★ 539 updated 2026-10-29
npx skills add ZaxbyHub/opencode-swarm --skill discover -a claude-codeWhat discover does
In DISCOVER mode, the skill sends repository exploration to the active swarm’s explorer agent and waits for its findings. For complex work, it requests a second pass focused on gaps and risks, including hidden requirements, assumptions, scope, and patterns the implementation should follow. The mode is read-only.
After the explorer responds, the skill inspects public API surfaces in key files with symbols; for surveys across several files, it prefers batch_symbols. It checks complexity hotspots and searches for project governance files, then records MUST and SHOULD rules in .swarm/context.md with their source, scope, precedence, and any conflict. Conflicting rules stay separate. The described workflow relies on an active swarm and the symbols, batch_symbols, complexity_hotspots, and glob tools, so missing tools prevent parts of the discovery process.
What it helps with
- map project rules before changing code
- inspect public APIs in key files
- surface hidden requirements and scope risks
- record conflicting project instructions
Example prompts for the agent
- Use DISCOVER to inspect this repository and map its rules in
.swarm/context.md. - For this complex task, look for hidden requirements, scope risks, and existing project patterns.
- Inspect the key files and flag modules that need a security review or full gates.
How to install discover
1Skills CLI (Vercel)
npx skills add ZaxbyHub/opencode-swarm --skill discover -a claude-code2Manually: put the files in place
~/.claude/skills/discover/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/discover/
1Skills CLI (Vercel)
npx skills add ZaxbyHub/opencode-swarm --skill discover -a codex2Manually: put the files in place
.agents/skills/discover/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add ZaxbyHub/opencode-swarm --skill discover -a cursor2Manually: put the files in place
.cursor/skills/discover/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install ZaxbyHub/opencode-swarm .claude/skills/discover2Manually: put the files in place
.github/skills/discover/SKILL.md1Skills CLI (Vercel)
npx skills add ZaxbyHub/opencode-swarm --skill discover -a gemini-cli2Platform CLI
gemini skills install https://github.com/ZaxbyHub/opencode-swarm --path .claude/skills/discoverManually: put the files in place
.devin/skills/discover/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add ZaxbyHub/opencode-swarm --skill discover -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about discover
How do I install discover in Claude Code?
Run npx skills add ZaxbyHub/opencode-swarm --skill discover -a claude-code. The skill file is placed at ~/.claude/skills/discover/SKILL.md.
What does the discover skill do?
It delegates repository exploration to an explorer agent, then checks key APIs, complexity hotspots, and project governance files. It records extracted MUST and SHOULD rules in .swarm/context.md, including their sources and conflicts.
What goes into .swarm/context.md?
The skill records mandatory and recommended rules found in project governance files. Each entry carries its source, scope, precedence, and any conflict; conflicting rules are kept distinct.
Source text
SKILL.md · MIT
--- name: discover description: > Full execution protocol for MODE: DISCOVER -- read-only repository discovery and governance/context mapping. metadata: audience: swarm-plugin --- # Discover Protocol This protocol is loaded on demand by the architect runtime. The architect prompt keeps only activation, action, and hard safety constraints; the full execution details live here. ### MODE: DISCOVER Delegate to the active swarm's explorer agent. Wait for response. For complex tasks, make a second explorer call focused on risk/gap analysis: - Hidden requirements, unstated assumptions, scope risks - Existing patterns that the implementation must follow After explorer returns: - Run `symbols` tool on key files identified by explorer to understand public API surfaces - For multi-file module surveys: prefer `batch_symbols` over sequential single-file symbols calls - Run `complexity_hotspots` if not already run during project discovery (check context.md for existing analysis). Note modules with recommendation "security_review" or "full_gates" in context.md. - Check for project governance files using the `glob` tool with patterns `project-instructions.md`, `docs/project-instructions.md`, `CONTRIBUTING.md`, `INSTRUCTIONS.md`, `AGENTS.md`, and `CLAUDE.md` (process all matches found). For each file found: read it and extract all MUST (mandatory constraints) and SHOULD (recommended practices) rules. Write the extracted rules to `.swarm/context.md` under a `## Project Governance` section — append if the section exists, create it if not — PRESERVING PROVENANCE for every rule (issue #2131 finding 9): each entry records (a) its source file, (b) the subtree scope the file declares or implies (repo-wide when undeclared), (c) precedence — `AGENTS.md`/`project-instructions.md` outrank `CONTRIBUTING.md`/`INSTRUCTIONS.md`/`CLAUDE.md` when rules conflict, (d) strength (MUST vs SHOULD), and (e) a conflict flag naming the other file whose rule it contradicts, if any. Never flatten conflicting rules into one; surface the conflict. If no MUST or SHOULD rules are found in the file, skip writing. If no governance file is found: skip silently. Existing DISCOVER steps are unchanged.
© ZaxbyHub · MIT · ZaxbyHub/opencode-swarm
Similar skills
SKILL.md skills catalog →discover by other authors comes first.