Agent skill
discovery
MANDATORY for discovering CI commands, features, functions, patterns, or tests in a codebase. Uses progressive disclosure - load specific discovery type as needed.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/testing/discovery
SKILL.md
Mandatory
MANDATORY: Use this skill to discover anything in a codebase.
CRITICAL: Load the specific discovery type file for detailed guidance.
NO EXCEPTIONS: Guessing = wasted time = broken builds.
Subagent Context
IF YOU ARE A SUBAGENT: Follow the discovery process directly and return findings to the primary agent.
Discovery Types
Available Discovery Types
This skill provides discovery patterns for different contexts. Load the appropriate file based on what you're discovering:
| Type | File | Use Case |
|---|---|---|
ci |
$HOME/.config/opencode/skills/discovery/ci.md |
CI/CD commands, test/lint/build commands |
feature |
$HOME/.config/opencode/skills/discovery/feature.md |
Feature implementations, patterns, conventions |
function |
$HOME/.config/opencode/skills/discovery/function.md |
Function definitions, usages, call graphs |
pattern |
$HOME/.config/opencode/skills/discovery/pattern.md |
Coding patterns, conventions, style guides |
test |
$HOME/.config/opencode/skills/discovery/test.md |
Test patterns, fixtures, mocking strategies |
Progressive Disclosure:
- This SKILL.md provides overview
- Read specific
$TYPE.mdfor detailed guidance - Follow that file's discovery process exactly
Usage
Invocation
Use /code:discovery $TYPE where $TYPE is one of: ci, feature, function, pattern, test
Example:
/code:discovery ci
/code:discovery feature authentication
/code:discovery function process_payment
Core Principles
-
Source of truth matters
- CI files > project files > guessing
- Existing code > documentation > assumptions
-
Exact replication
- Use EXACT commands/patterns found
- Don't modify, simplify, or "improve"
-
Never guess
- If not found, ask for guidance
- Report what was searched
-
Context awareness
- Check parent directories for monorepos
- Consider project structure
Quick Reference
| Discovery Type | Primary Sources | Fallback |
|---|---|---|
ci |
.github/workflows/*.yml, .gitlab-ci.yml |
package.json, mix.exs, etc. |
feature |
Existing implementations, tests | Ask user |
function |
Codebase search, LSP | Ask user |
pattern |
Existing code, style guides | Ask user |
test |
Test files, fixtures | Ask user |
Anti-Rationalization
THESE EXCUSES NEVER APPLY
"I know what commands to run" WRONG: Discover from source of truth
"I'll simplify the command" WRONG: Use EXACT command found
"Similar to other projects" WRONG: Every project has unique patterns
NO EXCEPTIONS
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?