fsd-review

Reviews code against Feature-Sliced Design standards with duplication checks and quality scoring.

Updated Mar 4, 2026
One-click install
npx skills add https://github.com/gmolike/Claude-Template --skill fsd-review-gmolike
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fsd-review
Source: https://github.com/gmolike/Claude-Template/tree/main/.claude/skills/fsd-review
Command: npx skills add https://github.com/gmolike/Claude-Template --skill fsd-review-gmolike

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jscpd.

What problem does it solve? Ensuring consistent code quality and architectural compliance in a Feature-Sliced Design (FSD) monorepo is tedious and error-prone when done manually. This Skill automates structured code reviews that validate layer hierarchies, shared type usage, TypeScript strictness, documentation, and code duplication in one pass. ## Core Features & Use Cases - FSD Architecture Validation: Checks layer import rules, cross-slice imports, and public API barrel exports across app, routes, pages, widgets, features, entities, and shared layers. - Duplication Detection: Runs jscpd to find code clones and identifies candidates for shared packages across web and API apps. - Structured Review Reports: Produces a scored report (X/7 categories) with blockers, warnings, and concrete recommended actions including file paths. - Use Case: Before merging a pull request, run the review on the staged diff to catch FSD violations, missing Zod schemas, or duplicated types between apps before they reach the main branch. ## Quick Start Ask the assistant to review the staged changes or a specific path such as apps/web/src/features against the FSD project standards.

Frequently Asked Questions about fsd-review

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review code against Feature-Sliced Design rules?

Run the review on a file path, staged git diff, or the entire src directory. It checks layer import hierarchy, cross-slice imports, and public API barrel exports, then outputs a scored report with blockers and fixes.

How to detect code duplication in a TypeScript monorepo?

The review runs jscpd with a 50-token minimum to detect clones across the scoped path. It flags cross-app duplication between web and api packages and recommends moving repeated code into shared packages.

What does the FSD review check in TanStack Query code?

It verifies that queryOptions factories live in entities api folders, mutations stay in features, routes remain thin with logic in FSD pages, and route loaders use queryClient.ensureQueryData for prefetching.

Can I review only specific files instead of the whole project?

Yes, pass a file or folder path as the argument to scope the review. Without arguments it reviews the staged git diff or the last commit, and passing 'all' reviews the entire src directory.

What are the limitations of automated FSD code review?

The review relies on static import analysis and jscpd token matching, so it cannot judge business logic correctness or runtime behavior. Architectural intent and naming quality still require human judgment for final decisions.