Research and extract an engineer's coding style, patterns, and best practices from their GitHub contributions. Creates structured knowledge base for replicating their expertise.
Extracts an engineer's coding style, patterns, and best practices from their GitHub contributions. Creates structured knowledge base for replicating expertise when onboarding new team members or training AI agents.
/plugin marketplace add jamesrochabrun/skills/plugin install all-skills@skills-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
scripts/extract_engineer.shExtract and document an engineer's coding expertise by analyzing their GitHub contributions, creating a structured knowledge base that captures their coding style, patterns, best practices, and architectural decisions.
Researches an engineer's work to create a "digital mentor" by:
Knowledge Preservation:
Consistency:
Learning:
Using GitHub CLI (gh), the skill:
Categorizes findings into:
Creates structured folders:
engineer_profiles/
└── [engineer_name]/
├── README.md (overview)
├── coding_style/
│ ├── languages/
│ ├── naming_conventions.md
│ ├── code_structure.md
│ └── formatting_preferences.md
├── patterns/
│ ├── common_solutions.md
│ ├── design_patterns.md
│ └── code_examples/
├── best_practices/
│ ├── code_quality.md
│ ├── testing_approach.md
│ ├── performance.md
│ └── security.md
├── architecture/
│ ├── design_decisions.md
│ ├── tech_choices.md
│ └── trade_offs.md
├── code_review/
│ ├── feedback_style.md
│ ├── common_suggestions.md
│ └── review_examples.md
└── examples/
├── by_language/
├── by_pattern/
└── notable_prs/
Contains:
Captures:
Example:
# Coding Style: [Engineer Name]
## Naming Conventions
### Variables
- Use descriptive names: `userAuthentication` not `ua`
- Boolean variables: `isActive`, `hasPermission`, `canEdit`
- Collections: plural names `users`, `items`, `transactions`
### Functions
- Verb-first: `getUserById`, `validateInput`, `calculateTotal`
- Pure functions preferred
- Single responsibility
### Classes
- PascalCase: `UserService`, `PaymentProcessor`
- Interface prefix: `IUserRepository`
- Concrete implementations: `MongoUserRepository`
## Code Structure
### File Organization
- One class per file
- Related functions grouped together
- Tests alongside implementation
- Clear separation of concerns
### Function Length
- Max 20-30 lines preferred
- Extract helper functions
- Single level of abstraction
Captures:
Example:
# Common Patterns: [Engineer Name]
## Dependency Injection
Used consistently across services:
\`\`\`typescript
// Pattern: Constructor injection
class UserService {
constructor(
private readonly userRepo: IUserRepository,
private readonly logger: ILogger
) {}
}
\`\`\`
**Why:** Testability, loose coupling, clear dependencies
## Error Handling
Consistent error handling approach:
\`\`\`typescript
// Pattern: Custom error types + global handler
class ValidationError extends Error {
constructor(message: string) {
super(message);
this.name = 'ValidationError';
}
}
// Usage
if (!isValid(input)) {
throw new ValidationError('Invalid input format');
}
\`\`\`
**Why:** Type-safe errors, centralized handling, clear debugging
Captures:
Example:
# Best Practices: [Engineer Name]
## Testing
### Unit Test Structure
- AAA pattern (Arrange, Act, Assert)
- One assertion per test preferred
- Test names describe behavior
- Mock external dependencies
\`\`\`typescript
describe('UserService', () => {
describe('createUser', () => {
it('should create user with valid data', async () => {
// Arrange
const userData = { email: 'test@example.com', name: 'Test' };
const mockRepo = createMockRepository();
// Act
const result = await userService.createUser(userData);
// Assert
expect(result.id).toBeDefined();
expect(result.email).toBe(userData.email);
});
});
});
\`\`\`
### Test Coverage
- Aim for 80%+ coverage
- 100% coverage for critical paths
- Integration tests for APIs
- E2E tests for user flows
## Code Review Standards
### What to Check
- [ ] Tests included and passing
- [ ] No console.logs remaining
- [ ] Error handling present
- [ ] Comments explain "why" not "what"
- [ ] No hardcoded values
- [ ] Security considerations addressed
Captures:
Example:
# Architectural Decisions: [Engineer Name]
## Decision: Microservices vs Monolith
**Context:** Scaling user service
**Decision:** Start monolith, extract services when needed
**Reasoning:**
- Team size: 5 engineers
- Product stage: MVP
- Premature optimization risk
- Easier debugging and deployment
**Trade-offs:**
- Monolith pros: Simpler, faster development
- Monolith cons: Harder to scale later
- Decision: Optimize for current needs, refactor when hitting limits
## Decision: REST vs GraphQL
**Context:** API design for mobile app
**Decision:** REST with versioning
**Reasoning:**
- Team familiar with REST
- Simple use cases
- Caching easier
- Over-fetching not a problem yet
**When to reconsider:** If frontend needs complex queries
Captures:
Example:
# Code Review Style: [Engineer Name]
## Review Approach
### Priority Order
1. Security vulnerabilities
2. Logic errors
3. Test coverage
4. Code structure
5. Naming and style
### Feedback Style
- Specific and constructive
- Explains "why" behind suggestions
- Provides examples
- Asks questions to understand reasoning
### Common Suggestions
**Security:**
- "Consider input validation here"
- "This query is vulnerable to SQL injection"
- "Should we rate-limit this endpoint?"
**Performance:**
- "This N+1 query could be optimized with a join"
- "Consider caching this expensive operation"
- "Memoize this pure function"
**Testing:**
- "Can we add a test for the error case?"
- "What happens if the API returns null?"
- "Let's test the boundary conditions"
**Code Quality:**
- "Can we extract this into a helper function?"
- "This function is doing too many things"
- "Consider a more descriptive variable name"
./scripts/extract_engineer.sh [github-username]
Interactive workflow:
Output: Structured profile in engineer_profiles/[username]/
./scripts/analyze_repo.sh [repo-url] [engineer-username]
Focuses analysis on specific repository contributions.
./scripts/update_profile.sh [engineer-username]
Adds new PRs and updates existing profile.
Pull Requests:
gh pr list --author [username] --limit 100 --state all
gh pr view [pr-number] --json title,body,files,reviews,comments
Code Changes:
gh pr diff [pr-number]
gh api repos/{owner}/{repo}/pulls/{pr}/files
Reviews:
gh pr view [pr-number] --comments
gh api repos/{owner}/{repo}/pulls/{pr}/reviews
Commits:
gh api search/commits --author [username]
Pattern Recognition:
Style Extraction:
Best Practice Identification:
Problem: New engineer needs to learn team standards Solution: Provide senior engineer's profile as reference
Benefits:
Problem: Teaching good code review skills Solution: Study experienced reviewer's feedback patterns
Benefits:
Problem: Senior engineer leaving, knowledge lost Solution: Extract their expertise before departure
Benefits:
Problem: Inconsistent coding styles across team Solution: Extract patterns from best engineers, create standards
Benefits:
Problem: Agent needs to code like specific engineer Solution: Provide extracted profile to agent
Benefits:
When an agent has access to an engineer profile, it can:
Code Generation:
Code Review:
Problem Solving:
Example Agent Prompt:
"Using the profile at engineer_profiles/senior_dev/, write a user service
following their coding style, patterns, and best practices. Pay special
attention to their error handling approach and testing standards."
DO:
DON'T:
Regular Updates:
Quality Control:
For Learning:
For Replication:
What This Extracts:
What This Doesn't Capture:
Potential additions:
engineer_profiles/
└── senior_dev/
├── README.md
│ # Senior Dev - Staff Engineer
│ Expertise: TypeScript, Node.js, System Design
│ Focus: API design, performance optimization
│
├── coding_style/
│ ├── typescript_style.md
│ ├── naming_conventions.md
│ └── code_structure.md
│
├── patterns/
│ ├── dependency_injection.md
│ ├── error_handling.md
│ └── examples/
│ ├── service_pattern.ts
│ └── repository_pattern.ts
│
├── best_practices/
│ ├── testing_strategy.md
│ ├── code_quality.md
│ └── performance.md
│
├── architecture/
│ ├── api_design.md
│ ├── database_design.md
│ └── scaling_approach.md
│
├── code_review/
│ ├── feedback_examples.md
│ └── review_checklist.md
│
└── examples/
└── notable_prs/
├── pr_1234_auth_refactor.md
└── pr_5678_performance_fix.md
This skill transforms an engineer's GitHub contributions into a structured, reusable knowledge base. It captures their expertise in a format that:
The goal: Make expertise scalable, learnable, and replicable.
"The best way to learn is from those who have already mastered it."
Use when working with Payload CMS projects (payload.config.ts, collections, fields, hooks, access control, Payload API). Use when debugging validation errors, security issues, relationship queries, transactions, or hook behavior.