typescript-react-abstraction-police

Detects and validates leaky abstraction boundaries in TypeScript and React codebases.

2|Updated May 6, 2026
One-click install
npx skills add https://github.com/bpcakes/jig-skills --skill typescript-react-abstraction-police-bpcakes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript-react-abstraction-police
Source: https://github.com/bpcakes/jig-skills/tree/main/plugins/jig-typescript/skills/typescript-react-abstraction-police
Command: npx skills add https://github.com/bpcakes/jig-skills --skill typescript-react-abstraction-police-bpcakes

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve? TypeScript and React codebases accumulate leaky abstractions where exported components, hooks, and adapters force consumers to understand hidden implementation details like query libraries, form libraries, or internal state machines. This Skill finds and validates those leaks with concrete consumer evidence instead of reporting superficial code smells. ## Core Features & Use Cases - Evidence-Based Leak Detection: Confirms a leak only when a boundary, hidden detail, consumer burden, change amplification, and ownership mismatch are all demonstrated in source code. - Dependency-Free Candidate Scanner: Runs a Node.js standard-library scanner that flags leads such as exported Context objects, raw state setters, boolean prop clusters, deep imports, and pass-through wrappers. - Structured Findings Report: Produces severity-ranked findings with rule IDs (AP-TSR-xxx), change tests, counterevidence analysis, and minimal ownership corrections. - Use Case: Before replacing React Query with another cache, run this Skill on your shared hooks to identify which consumers would need unrelated edits, revealing which boundaries actually hide the query library and which merely pretend to. ## Quick Start Ask the agent to review the abstraction boundaries in your TypeScript/React project for leaky abstractions and report validated findings with file locations without editing code.

Frequently Asked Questions about typescript-react-abstraction-police

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

FAQPage Schema
How do I find leaky abstractions in a React codebase?

Run the bundled scanner with node scripts/scan.mjs on your target directory to generate investigation leads, then validate each lead by tracing real consumers and applying the change test. Only leaks with demonstrated consumer burden and change amplification are reported.

What counts as a leaky abstraction in TypeScript React code?

A leak exists when an exported boundary hides an implementation detail that consumers must understand, preserve, or work around, and a semantics-preserving internal change would force unrelated consumer edits. Examples include raw query results, raw state setters, and form-library types crossing public boundaries.

Does the scanner require installing npm dependencies?

No, the scanner uses only Node.js standard-library modules and requires Node.js 18 or later. It performs no network access and installs no packages, so it runs offline in any repository.

Can this skill edit code or only report findings?

It defaults to read-only review and reports validated findings without editing. It modifies code only when the user explicitly requests a fix or refactor, preferring the smallest ownership correction or deleting fake abstractions.

Why does the scanner output not count as final findings?

Scanner output is a heuristic lead list, not confirmed architecture findings. Each lead must be validated against real consumers, counterevidence, and a change-amplification test before it qualifies as a reportable leak.