repo-source-code-review
Conducts automated reviews of source code changes, focusing on quality, types, and testing.
Install
mkdir -p .claude/skills/repo-source-code-review && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/6233" && unzip -o skill.zip -d .claude/skills/repo-source-code-review && rm skill.zipInstalls to .claude/skills/repo-source-code-review
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Review pull requests and source code changes in /library/src/. Use when reviewing PRs, validating implementation patterns, or checking code quality before merging. Covers code quality checks, type safety, documentation review, test coverage, and common issues to watch for.Key capabilities
- →Verify code naming conventions
- →Check for purity annotations on factory functions
- →Validate JSDoc completeness
- →Ensure type safety with test-d files
How it works
The skill provides a structured review process to verify that code follows established patterns for naming, purity, documentation, and testing.
Inputs & outputs
When to use repo-source-code-review
- →Perform code quality review on PRs
- →Validate type safety in source files
- →Check test coverage before merge
About this skill
Reviewing Source Code Changes
Guide for reviewing PRs and source code changes in /library/src/.
When to Use This Guide
- Reviewing pull requests modifying library source
- Validating implementation patterns before merging
- Checking code quality, types, documentation, and tests
Review Process
- Understand the change — Read PR description, identify affected files
- Check patterns — Verify code follows existing conventions
- Verify types — Ensure type safety and proper inference
- Review docs — Confirm JSDoc is complete and accurate
- Check tests — Validate runtime and type test coverage
What to Review
Code Quality
| Check | Requirement |
|---|---|
| Naming | Matches existing patterns (StringSchema, minLength, _parse) |
| Purity annotation | // @__NO_SIDE_EFFECTS__ before pure factory functions |
| Import extensions | All imports use .ts extension |
| Interface vs type | Use interface for object shapes, type for unions/aliases |
| Folder structure | Each API has: name.ts, name.test.ts, name.test-d.ts, index.ts |
Good — purity annotation:
// @__NO_SIDE_EFFECTS__
export function string(message?: ErrorMessage<StringIssue>): StringSchema {
return {
/* ... */
};
}
Bad — missing annotation:
export function string(message?: ErrorMessage<StringIssue>): StringSchema {
return {
/* ... */
};
}
Type Safety
| Check | Requirement |
|---|---|
| Generic inference | Types infer correctly without explicit annotations |
| Constraints | Generic parameters have appropriate extends clauses |
| Return types | Explicit return types on exported functions |
| Type tests | .test-d.ts file covers type inference scenarios |
Good — constrained generic:
export function minLength<
TInput extends LengthInput,
TRequirement extends number,
>(
requirement: TRequirement,
message?: ErrorMessage<MinLengthIssue<TInput, TRequirement>>
): MinLengthAction<TInput, TRequirement>;
Documentation
| Check | Requirement |
|---|---|
| JSDoc present | All exported functions have JSDoc |
| First line | Action verb matching function purpose (see below) |
@param tags | Every parameter documented |
@returns tag | Return value documented |
| Overloads | Every overload has its own complete JSDoc block |
First line patterns by category:
| Category | Pattern |
|---|---|
| Schemas | Creates a ... schema. |
| Actions | Creates a ... action. |
| Parse methods | Parses ... |
| Type guards | Checks if ... |
| Unwrap methods | Unwraps ... |
| Other methods | Creates a ..., Returns ..., Forwards ... |
See repo-source-code-document skill for full documentation rules.
Tests
| Check | Requirement |
|---|---|
| Runtime tests | .test.ts covers success cases, failure cases, edge cases |
| Type tests | .test-d.ts validates type inference with expectTypeOf |
| Issue messages | Tests verify correct error messages and issue structure |
Common Issues
| Issue | What to Look For |
|---|---|
| Missing purity annotation | Factory function without // @__NO_SIDE_EFFECTS__ |
| Incomplete JSDoc | Missing @param or @returns, wrong description format |
| No type tests | New API without .test-d.ts file |
| Wrong import extension | Imports without .ts suffix |
| Inconsistent naming | Schema not ending in Schema, action not ending in Action |
| Side effects in pure code | Mutations, I/O, or global state in schema/action creation |
Checklist
- Implementation follows existing patterns in similar files
-
// @__NO_SIDE_EFFECTS__on pure factory functions - All imports use
.tsextension -
interfaceused for object shapes - JSDoc complete on all exports
- Runtime tests in
.test.ts - Type tests in
.test-d.ts - Naming conventions followed
Related Skills
repo-structure-navigate— Navigate the codebaserepo-source-code-document— JSDoc requirements
When not to use it
- →When reviewing code outside of /library/src/
Limitations
- →Focused only on /library/src/ directory
- →Requires manual verification of JSDoc and test coverage
How it compares
It enforces specific library-wide conventions and purity annotations rather than performing general code style reviews.
Compared to similar skills
repo-source-code-review side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| repo-source-code-review (this skill) | 1 | 5mo | No flags | Intermediate |
| python-testing-patterns | 77 | 2mo | Review | Intermediate |
| dependency-upgrade | 26 | 5mo | Review | Intermediate |
| test-cases | 57 | 7mo | No flags | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by open-circle
View all by open-circle →You might also like
python-testing-patterns
wshobson
Implement comprehensive testing strategies with pytest, fixtures, mocking, and test-driven development. Use when writing Python tests, setting up test suites, or implementing testing best practices.
dependency-upgrade
wshobson
Manage major dependency version upgrades with compatibility analysis, staged rollout, and comprehensive testing. Use when upgrading framework versions, updating major dependencies, or managing breaking changes in libraries.
test-cases
cexll
This skill should be used when generating comprehensive test cases from PRD documents or user requirements. Triggers when users request test case generation, QA planning, test scenario creation, or need structured test documentation. Produces detailed test cases covering functional, edge case, error handling, and state transition scenarios.
reviewing-code
CaptainCrouton89
Systematically evaluate code changes for security, correctness, performance, and spec alignment. Use when reviewing PRs, assessing code quality, or verifying implementation against requirements.
wcag-audit-patterns
wshobson
Conduct WCAG 2.2 accessibility audits with automated testing, manual verification, and remediation guidance. Use when auditing websites for accessibility, fixing WCAG violations, or implementing accessible design patterns.
code-coverage-with-gcov
gadievron
Add gcov code coverage instrumentation to C/C++ projects