ts-reuse-review

Installation
SKILL.md

TS Reuse Review

Scans a TypeScript/JavaScript diff for code that reinvents existing utilities. Reports a prioritized list of reuse opportunities — external libs (es-toolkit, date-fns, zod), ES2020+ native APIs, installed project libs (effect, remeda, ts-pattern, etc.), and already-existing internal helpers. Never applies edits.

Prerequisites

  • ripgrep — used for internal helper search. Install: brew install ripgrep or cargo install ripgrep.
  • ast-grep — structural pattern matching. Install: npm i -g @ast-grep/cli or brew install ast-grep.

If ast-grep is missing, fall back to ripgrep-only detection and flag the degraded mode in the report header. Do not abort.

Workflow

Do not read script source code. Run scripts directly and use --help for usage. Scripts live under scripts/ relative to this skill's directory.

Step 1: Determine review scope

If the scope is not already clear from the invocation, use AskUserQuestion:

Related skills

More from trancong12102/agentskills

Installs
13
GitHub Stars
5
First Seen
Apr 21, 2026