Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add pproenca/dot-skills --skill ast-grep-typescript-reactgit clone --depth 1 https://github.com/pproenca/dot-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/pproenca/dot-skills/ast-grep-typescript-react)<a href="https://agentmods.dev/skills/pproenca/dot-skills/ast-grep-typescript-react"><img src="https://agentmods.dev/badge/skills/pproenca/dot-skills/ast-grep-typescript-react.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00129 | $0.01266 |
| Opus 5 | $0.00064 | $0.00633 |
| Sonnet 5 | $0.00026 | $0.00253 |
| Haiku 4.5 | $0.00013 | $0.00127 |
Grade A, and why
ast-grep-typescript-react scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 68 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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
.tsor.tsxcode - 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
- Check the language. JSX-bearing files must run under
tsx, nevertypescript. This is the single most common cause of silent no-match. Seelang-tsx-for-jsx. - Debug the pattern's AST.
ast-grep run --pattern '<your pattern>' --lang tsx --debug-query=aston a real snippet shows the node kinds and revealsERRORnodes. Trust this over guessed kind names. - Wrap fragments. If the pattern is an attribute, prop, or type annotation, it needs
context+selector. Seectx-fragment-context-selector.
Rule Categories
| # | Category | Prefix | Covers |
|---|---|---|---|
| 1 | Language Selection | lang |
tsx-vs-typescript split, scanning .ts + .tsx, languageGlobs |
| 2 | Fragment Matching | ctx |
context/selector for JSX attrs, props, type annotations |
| 3 | JSX Node Kinds | jsx |
self-closing vs paired elements, attribute-value metavariables |
| 4 | TypeScript Constructs | ts |
type-only imports, as casts, React.FC generics |
| 5 | Rewrites & Codemods | fix |
re-emitting JSX metavars so children/props aren't dropped |
| 6 | Programmatic Use | napi |
@ast-grep/napi Lang.Tsx, NapiConfig shape |
What ships with it
14 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- AGENTS.md 3.3 KB
- assets/templates/_template.md 1023 B
- metadata.json 1.1 KB
- references/_sections.md 1.9 KB
- references/ctx-fragment-context-selector.md 1.4 KB
- references/fix-jsx-rewrite-completeness.md 1.2 KB
- references/jsx-attribute-metavars.md 1.2 KB
- references/jsx-self-closing-vs-paired.md 1.1 KB
- references/lang-scan-ts-and-tsx.md 1.4 KB
- references/lang-tsx-for-jsx.md 1.2 KB
- references/napi-lang-tsx-findall.md 1.2 KB
- references/ts-as-expression-casts.md 1.0 KB
- references/ts-generic-react-fc.md 1.6 KB
- references/ts-type-only-imports.md 1.1 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 68 lines · 129 tokens per session scan A 98e79e0b4f12
ast-grep-typescript-react is a skill published in the GitHub repository pproenca/dot-skills (203 stars, last pushed 23d ago), licensed MIT. It adds 129 tokens to every session and 1,266 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
frontend-conventions
Coding conventions, architecture patterns, and testing rules for the SkillHub React frontend. Ensures agents follow Feature-Sliced Design and use the generated OpenAPI types.
fast-typescript-check
Keep www-sacred's TypeScript fast to type-check and fast to run. Use when touching the ASCII/canvas animation components (the only real per-frame code here), tightening type-check wall-clock, or auditing a change for runtime or compiler regressions. Scoped to this repo — a React 19 / Next.js 16 component library plus…
typescript-react
Apply, review, and explain React conventions from the TypeScript Style Guide. Use automatically for TypeScript and TSX tasks involving prop-derived state, prop typing, component responsibilities, data flow, compound components, or client and server state.
electron-dev
Electron desktop apps with React, TypeScript, and Vite. Use for IPC, window/tray, PTY terminals, WebRTC, and packaging.
coding-standards
A set of general coding standards and practical patterns for TypeScript, JavaScript, React, and Node.js. It covers readable naming, simple designs, avoiding repetition, and delaying unnecessary features.
typescript-rules
React/TypeScript frontend development rules including type safety, component design, state management, and error handling. Use when implementing React components, TypeScript code, or frontend features.