Guidelines for exploring source code to understand context.
View on GitHubplugins/core/skills/discover-source/SKILL.md
February 4, 2026
Select agents to install to:
npx add-skill https://github.com/qmu/workaholic/blob/main/plugins/core/skills/discover-source/SKILL.md -a claude-code --skill discover-sourceInstallation paths:
.claude/skills/discover-source/# Discover Source Guidelines for finding and analyzing source code related to a ticket. Provides comprehensive exploration strategies for collecting rich codebase context. ## Exploration Phases ### Phase 1: Direct Matches Start with files directly matching the request keywords. - Glob for files matching keywords from request - Grep for function/class names mentioned - Read directly relevant files (5-10 files) - **Capture code snippets** from sections likely to be modified (store start/end lines and content) ### Phase 2: Import Chain Exploration Follow dependencies to understand context. - For each Phase 1 file, extract import statements - Follow imports to find upstream dependencies (depth 2 max) - Trace exports to find downstream consumers - Read dependency files that provide context (additional 5-10 files) ### Phase 3: Usage Discovery Find how code is used across the codebase. - Grep for function/class usage across codebase - Find example invocations in other modules - Locate integration points (additional 3-5 files) ### Phase 4: Related Test Files Understand expected behavior from tests. - For each source file `foo.ts`, check for `foo.test.ts`, `foo.spec.ts` - Search `__tests__/`, `tests/`, `spec/` directories - Read test files to understand expected behavior (additional 3-5 files) ### Phase 5: Configuration and Schema Files Find related configuration and type definitions. - Find related config files (package.json, tsconfig, webpack) - Locate schema definitions, type declarations (`*.d.ts`) - Check for related documentation files (additional 2-3 files) ## Depth Controls - **Hard limits per phase**: Phase 1 (8 files), Phase 2 (6), Phase 3 (3), Phase 4 (2), Phase 5 (1) - **Relevance scoring**: Prioritize files with higher keyword density - **Stop conditions**: Stop following chains when files become tangential - **Total budget**: Hard limit of 20 files total - stop exploration immediately upon reaching limit - **Time budget**: Complete exploratio