skills/pre-work-research/SKILL.md
Use before starting implementation - research repository documentation, codebase patterns, and external resources to inform the approach
npx skillsauth add troykelly/codex-skills pre-work-researchInstall 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.
Research before coding. Understand the landscape before changing it.
Core principle: Measure twice, cut once.
Announce at start: "I'm researching the codebase and documentation before implementing."
Research is appropriate when:
| Situation | Research Needed | |-----------|-----------------| | Unfamiliar area of codebase | Yes | | New library or API | Yes | | Complex integration | Yes | | Performance-sensitive code | Yes | | Security-sensitive code | Yes | | Simple, isolated change | Minimal |
Before researching implementation:
# Project overview
cat README.md
# Architecture/design docs
ls -la docs/
find . -name "*.md" -path "./docs/*"
# Contributing guidelines
cat CONTRIBUTING.md
# API documentation
cat docs/api*.md
cat docs/architecture*.md
Look for:
# Find similar features
grep -r "similar keyword" src/
# Find related tests
grep -r "similar keyword" **/*.test.*
# Find imports of relevant modules
grep -r "import.*ModuleName" src/
# How are similar things done?
# Look at 2-3 examples of similar functionality
# Example: If adding an API endpoint
grep -r "router\." src/routes/
cat src/routes/[existing-endpoint].ts
# Example: If adding a service
ls -la src/services/
cat src/services/[existing-service].ts
# What utilities exist?
ls -la src/utils/
cat src/utils/[relevant-util].ts
# Are there shared helpers?
grep -r "export function" src/utils/
When using external APIs or libraries:
# Read the docs for dependencies
pnpm info [package-name]
# Then visit documentation URL
Search: "[library-name] documentation"
Search: "[library-name] getting started"
Search: "[library-name] [specific feature]"
For external APIs:
Create a research summary:
## Pre-Work Research: Issue #[NUMBER]
### Requirements Understanding
- [Key requirement 1]
- [Key requirement 2]
### Codebase Patterns
- Pattern for [X]: See `src/example/pattern.ts`
- Utilities available: `src/utils/helper.ts`
- Test pattern: See `src/example/example.test.ts`
### External Dependencies
- [Library]: [Key findings]
- [API]: [Authentication method, rate limits]
### Approach
Based on research, the approach is:
1. [Step 1]
2. [Step 2]
3. [Step 3]
### Risks/Considerations
- [Risk 1]
- [Consideration 1]
If research reveals important context:
gh issue comment [ISSUE_NUMBER] --body "## Pre-Implementation Research
### Approach
[Summary of planned approach]
### Considerations
- [Important finding 1]
- [Important finding 2]
### Questions (if any)
- [Question needing clarification]
"
| Task Size | Research Depth | |-----------|---------------| | Trivial (typo, config) | None needed | | Small (single file) | Quick pattern check | | Medium (feature) | Full protocol | | Large (system) | Extended research |
# Just verify pattern
grep -r "pattern" src/ | head -5
cat src/similar/example.ts | head -50
Complete Steps 1-6 above.
| Look For | Why | |----------|-----| | Architecture diagrams | Understand system structure | | Coding standards | Match existing style | | Decision records | Understand why things are done a way | | API contracts | Maintain compatibility |
| Look For | Why | |----------|-----| | Similar features | Follow established patterns | | Test patterns | Write consistent tests | | Error handling | Handle errors consistently | | Logging patterns | Log appropriately |
| Look For | Why | |----------|-----| | Official examples | Use recommended patterns | | Common pitfalls | Avoid known issues | | Performance tips | Optimize appropriately | | Security guidance | Implement securely |
After research, you should know:
Before starting implementation:
This skill is called by:
issue-driven-development - Step 5This skill informs:
tdd-full-coverage - How to write testsstrict-typing - Type patterns to useinline-documentation - Documentation patternsdata-ai
Defines behavior protocol for spawned worker agents. Injected into worker prompts. Covers startup, progress reporting, exit conditions, and handover preparation.
development
Defines context handover format when workers hit turn limit. Posts structured handover to GitHub issue comments enabling replacement workers to continue seamlessly.
data-ai
Use to spawn isolated worker processes for autonomous issue work. Creates git worktrees, constructs worker prompts, and handles worker lifecycle.
tools
Entry point for ALL work requests - triages scope from trivial to massive, asks clarifying questions, and routes to appropriate planning skills. Use this when receiving any new work request.