Ast Grep Typescript React
Use this skill when writing, debugging, or reviewing ast-grep patterns, YAML rules, or codemods against TypeScript or React (.ts/.tsx) code — searching for JSX elements, props, hooks, imports, or type constructs, and rewriting them. Covers the TS/React-specific traps — the tsx-vs-typescript language split, JSX and TypeScript node kinds, fragment matching, rewrites, and the @ast-grep/napi API. Complements the general-purpose ast-grep skill (rule mechanics) — reach for this one whenever the target code is TypeScript or React.
Install
npx skills add pproenca/dot-skills --skill ast-grep-typescript-reactgit clone --depth 1 https://github.com/pproenca/dot-skills.git /tmp/dot-skills
mkdir -p ~/.claude/skills
cp -r /tmp/dot-skills/skills/.experimental/ast-grep-typescript-react ~/.claude/skills/ast-grep-typescript-reactPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# ast-grep for TypeScript & React The wrong defaults a capable model hits when pointing ast-grep at `.ts`/`.tsx` code — mostly cases where a rule **silently matches nothing** because the language or a node kind was guessed wrong. This skill assumes you already know ast-grep's rule mechanics (patterns, meta-variables, `all`/`any`/`has`/`inside`, constraints); it corrects only what TypeScript and React add on top. For general ast-grep rule-writing mechanics, use the companion `ast-grep` skill. ## When to Apply - Writing an ast-grep pattern or YAML rule whose target is `.ts` or `.tsx` code - Searching for JSX elements, props, React hooks, imports, or TS type constructs - Building a codemod that rewrites JSX or TypeScript (rename a component, strip `React.FC`, migrate imports) - A rule "matches nothing" on TSX and you don't know why (usually the language or a node kind) - Driving ast-grep programmatically from a JS/TS script via `@ast-grep/napi` ## First moves when a TS/React rule misbehaves 1. **Check the language.** JSX-bearing files must run under `tsx`, never `typescript`. This is the single most common cause of silent no-match. See [`lang-tsx-for-jsx`](references/lang-tsx-for-jsx.md). 2. **Debug the pattern's AST.** `ast-grep run --pattern '<your pattern>' --lang tsx --debug-query=ast` on a real snippet shows the node kinds and reveals `ERROR` nodes. Trust this over guessed kind names.
Details
- Skill name
ast-grep-typescript-react- Repository
- pproenca/dot-skills
- Path
skills/.experimental/ast-grep-typescript-react/SKILL.md- License
- MIT
- Repo updated
- 15 August 2026
FAQ
What does the Ast Grep Typescript React skill do?
Use this skill when writing, debugging, or reviewing ast-grep patterns, YAML rules, or codemods against TypeScript or React (.ts/.tsx) code — searching for JSX elements, props, hooks, imports, or type constructs, and rewriting them. Covers the TS/React-specific traps — the tsx-vs-typescript language split, JSX and TypeScript node kinds, fragment matching, rewrites, and the @ast-grep/napi API. Complements the general-purpose ast-grep skill (rule mechanics) — reach for this one whenever the target code is TypeScript or React.
How do I install the Ast Grep Typescript React skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add pproenca/dot-skills --skill ast-grep-typescript-react. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Ast Grep Typescript React popular?
It lives in pproenca/dot-skills, which has 228 GitHub stars and 19 forks.
Related skills
12 Factor App
228pproenca/dot-skills
The Twelve-Factor App methodology for building scalable, maintainable cloud-native applications. Use when designing backend services, APIs, microservices, or any software-as-a-service application. Triggers on deployment patterns, configuration management, process architecture, logging, and infrastructure decisions.
37signals Rails
228pproenca/dot-skills
37signals Rails coding principles and conventions from DHH, Jorge Manrubia, and the Fizzy/Basecamp/HEY codebase. This skill should be used when writing, reviewing, or refactoring Ruby on Rails code following the 37signals philosophy — vanilla Rails, CRUD controllers, rich domain models, concerns, no service objects, Hotwire, Turbo, Stimulus, Solid Queue, Solid Cache, Solid Cable, multi-tenancy, Minitest, custom auth, or DHH conventions.
Acceptance Pipeline Catalog
228pproenca/dot-skills
Use when implementing, reviewing, or debugging a Gherkin acceptance-test pipeline with mutation testing. Covers parser, JSON IR, generator, runtime, step handlers, test runner, mutator, value mutation rules, execution, result classification, reporting, project layout, conformance, and agent setup. Based on Uncle Bob's Acceptance Pipeline Specification. Trigger even when the user mentions Gherkin parsing, acceptance test generation, mutation testing for acceptance tests, or building a portable test pipeline.
Base UI Migrator
228pproenca/dot-skills
Migrates React UI code to Base UI (`@base-ui/react`) — replacing bespoke modals, custom dropdowns, raw `<dialog>`/`<select>` elements, ad-hoc popovers/menus/tooltips, or other component libraries (Radix UI, Headless UI, Reach UI). Ships a 37-component catalog (snapshotted from base-ui.com/llms.txt) and scripts to refresh it, scan for migration candidates, and verify the migration compiles. Triggers on phrases like "migrate to base-ui", "use base-ui instead of X", "replace this dialog/popover/menu with base-ui", or when scanning a React codebase for components Base UI can replace. Trigger even
Apple Design
100adriannoes/awesome-agentic-ai
Apple's approach to interface design and fluid, physical motion, translated for the web. Use when building or reviewing gesture-driven UI, spring animations, drag/swipe/sheet interactions, momentum and interruptible transitions, translucent materials and depth, typography (optical sizing, tracking, leading), reduced-motion, or the design foundations (feedback, spatial consistency, restraint) behind Apple-style interfaces.
Better Auth
228pproenca/dot-skills
Better Auth in TypeScript — setting up the auth instance, picking adapters, wiring framework route handlers, configuring sessions and cookies, adding plugins (2FA, organization, admin, magicLink, JWT), or porting from NextAuth/Auth.js, Clerk, Auth0, or Supabase Auth. Covers Next.js, SvelteKit, Hono, Express, Nuxt, Astro, and React/Vue/Svelte clients. Trigger when writing, reviewing, or migrating Better Auth code — and even when the user doesn't explicitly mention Better Auth but is working on TypeScript authentication, session cookies, OAuth providers, or auth-library migration. Contains 42 ru
Browse the most popular Claude skills, all frontend & design skills, or write your own with the skills generator.