RE

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.zip

Installs 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.
273 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Intermediate

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

You give it
Pull request or source code changes
You get back
Review checklist and identified issues

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

  1. Understand the change — Read PR description, identify affected files
  2. Check patterns — Verify code follows existing conventions
  3. Verify types — Ensure type safety and proper inference
  4. Review docs — Confirm JSDoc is complete and accurate
  5. Check tests — Validate runtime and type test coverage

What to Review

Code Quality

CheckRequirement
NamingMatches existing patterns (StringSchema, minLength, _parse)
Purity annotation// @__NO_SIDE_EFFECTS__ before pure factory functions
Import extensionsAll imports use .ts extension
Interface vs typeUse interface for object shapes, type for unions/aliases
Folder structureEach 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

CheckRequirement
Generic inferenceTypes infer correctly without explicit annotations
ConstraintsGeneric parameters have appropriate extends clauses
Return typesExplicit 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

CheckRequirement
JSDoc presentAll exported functions have JSDoc
First lineAction verb matching function purpose (see below)
@param tagsEvery parameter documented
@returns tagReturn value documented
OverloadsEvery overload has its own complete JSDoc block

First line patterns by category:

CategoryPattern
SchemasCreates a ... schema.
ActionsCreates a ... action.
Parse methodsParses ...
Type guardsChecks if ...
Unwrap methodsUnwraps ...
Other methodsCreates a ..., Returns ..., Forwards ...

See repo-source-code-document skill for full documentation rules.

Tests

CheckRequirement
Runtime tests.test.ts covers success cases, failure cases, edge cases
Type tests.test-d.ts validates type inference with expectTypeOf
Issue messagesTests verify correct error messages and issue structure

Common Issues

IssueWhat to Look For
Missing purity annotationFactory function without // @__NO_SIDE_EFFECTS__
Incomplete JSDocMissing @param or @returns, wrong description format
No type testsNew API without .test-d.ts file
Wrong import extensionImports without .ts suffix
Inconsistent namingSchema not ending in Schema, action not ending in Action
Side effects in pure codeMutations, 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 .ts extension
  • interface used 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 codebase
  • repo-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.

SkillInstallsUpdatedSafetyDifficulty
repo-source-code-review (this skill)15moNo flagsIntermediate
python-testing-patterns772moReviewIntermediate
dependency-upgrade265moReviewIntermediate
test-cases577moNo flagsBeginner

Try saying

Example prompts that trigger this skill in your AI assistant.

More by open-circle

View all by open-circle

repo-website-api-create

open-circle

Create new API reference pages for the Valibot website at website/src/routes/api/. Use when adding documentation for new schemas, actions, methods, or types. Covers reading source code, creating properties.ts and index.mdx files, updating menu.md, and cross-referencing related APIs.

26

repo-prepare-release

open-circle

Prepare releases by analyzing changelogs, determining version bumps, and updating package.json and changelog files.

12

repo-source-code-document

open-circle

Write JSDoc comments and inline documentation for Valibot library source code in /library/src/. Use when documenting schemas, actions, methods, or utilities. Covers interface documentation, function overloads, purity annotations, inline comment patterns, and terminology consistency.

14

repo-structure-navigate

open-circle

Navigate the Valibot repository structure. Use when looking for files, understanding the codebase layout, finding schema/action/method implementations, locating tests, API docs, or guide pages. Covers monorepo layout, library architecture, file naming conventions, and quick lookups.

16

repo-website-api-update

open-circle

Update existing API documentation pages after source code changes. Use when syncing docs with library changes like new parameters, type constraint changes, interface updates, or function renames. Covers common change patterns and verification steps.

13

repo-website-guide-create

open-circle

Create conceptual documentation and tutorial pages for the Valibot website at website/src/routes/guides/. Use when adding guides about schemas, pipelines, async validation, migration, or other topics. Covers directory structure, MDX templates, frontmatter, and content guidelines.

16

Search skills

Search the agent skills registry