askill
repo-source-code-review

repo-source-code-reviewSafety 95Repository

Review PRs and source code changes in Formisch packages/ and frameworks/. Use when reviewing pull requests, validating implementation patterns, or checking code quality before merging.

590 stars
11.8k downloads
Updated 2/6/2026

Package Files

Loading files...
SKILL.md

Reviewing Source Code Changes

Guide for reviewing PRs and source code changes in packages/ and frameworks/.

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 (FormStore, useField, createForm)
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 structureMethods: name.ts, index.ts. Primitives/components in their folder

Good — purity annotation:

// @__NO_SIDE_EFFECTS__
export function useField<TSchema, TFieldPath>(
  form: FormStore<TSchema>,
  config: UseFieldConfig<TSchema, TFieldPath>
): FieldStore<TSchema, TFieldPath> {
  return {
    /* ... */
  };
}

Bad — missing annotation:

export function useField<TSchema, TFieldPath>(
  form: FormStore<TSchema>,
  config: UseFieldConfig<TSchema, TFieldPath>
): FieldStore<TSchema, TFieldPath> {
  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 useField<
  TSchema extends Schema,
  TFieldPath extends RequiredPath<TSchema>,
>(
  form: FormStore<TSchema>,
  config: UseFieldConfig<TSchema, TFieldPath>
): FieldStore<TSchema, TFieldPath>;

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
PrimitivesCreates a ...
MethodsFocuses ..., Resets ..., Validates ...
ComponentsRenders a ...
UtilitiesReturns ..., Gets ..., Sets ...

Tests

CheckRequirement
Runtime tests.test.ts covers success cases, failure cases, edge cases
Type tests.test-d.ts validates type inference with expectTypeOf
Error handlingTests verify correct error messages and validation

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 namingPrimitives not using create/use prefix, wrong Store suffix
Side effects in pure codeMutations, I/O, or global state in primitive/method 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
  • Cross-framework consistency for shared APIs

Related Skills

  • repo-structure-navigate — Navigate the codebase
  • repo-source-code-document — JSDoc requirements

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

92/100Analyzed 2/12/2026

An exceptional skill document providing a detailed framework for code reviews. It includes specific technical requirements for TypeScript, JSDoc, and testing, supported by clear examples and a checklist.

95
100
65
95
98

Metadata

Licenseunknown
Version-
Updated2/6/2026
Publisheropen-circle

Tags

apitesting