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 shinpr/ai-coding-project-boilerplate --skill frontend-typescript-rulesgit clone --depth 1 https://github.com/shinpr/ai-coding-project-boilerplateWrote 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/shinpr/ai-coding-project-boilerplate/frontend-typescript-rules)<a href="https://agentmods.dev/skills/shinpr/ai-coding-project-boilerplate/frontend-typescript-rules"><img src="https://agentmods.dev/badge/skills/shinpr/ai-coding-project-boilerplate/frontend-typescript-rules/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/shinpr/ai-coding-project-boilerplate/frontend-typescript-rules"><img src="https://agentmods.dev/badge/skills/shinpr/ai-coding-project-boilerplate/frontend-typescript-rules.svg" alt="Reviewed on agentmods" width="80" 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.00029 | $0.01417 |
| Opus 5.5 | $0.00012 | $0.00567 |
| Sonnet 5.5 | $0.00006 | $0.00283 |
| Haiku 4.5 | $0.00003 | $0.00142 |
Grade A, and why
frontend-typescript-rules scanned grade A with 1 finding 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 1mo 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
const raw: unknown = await (await fetch(url)).json() How it starts
The opening of the file, as written. The whole thing — 76 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TypeScript Development Rules (Frontend)
Frontend-specific React/TypeScript rules for implementation: thresholds, boundary type safety, component/state design, error handling, and project conventions.
Prerequisite Detection
Inspect TypeScript, bundler/framework, lint/format, path-alias, React compiler, and representative component configuration before applying a project convention. Treat a convention as observed when configuration or an established repository pattern supports it; label a conclusion from limited examples as inferred. When conflicting patterns affect public behavior, compatibility, or component boundaries, stop and name the required source or decision.
Anti-patterns and Thresholds
Signals that trigger a design change:
- Prop drilling through 3+ levels → lift to Context or state management
- Component over 300 lines → split
- Props count over 10 → split the component (3-7 is the working range)
- Optional props over 50% → introduce defaults or Context
- Props nesting deeper than 2 levels → flatten
Type Safety at Boundaries
Receive untrusted or unavailable types as unknown and narrow them with a type guard. Use as only when a runtime/framework invariant proves the asserted type and record that invariant in a nearby comment. Existing generated or third-party declarations that contain any are boundary inputs to wrap, not justification for spreading any into application contracts.
Inside the app, React Props/State are type-guaranteed — no unknown needed. At every external boundary, receive as unknown and narrow with a type guard before use: API responses, localStorage/sessionStorage, URL parameters, parsed JSON. Controlled-component form input stays type-safe through React synthetic events.
const raw: unknown = await (await fetch(url)).json()
if (!isUser(raw)) throw new ValidationError('invalid user')
const user = raw // narrowed to User
Component and State Design
- Function components only. Class components are allowed solely for Error Boundaries (no hook equivalent exists)
- Type Props explicitly with a named type and destructure:
function UserCard({ user, onSelect }: UserCardProps). Type props directly on the function so the props contract stays explicit - Props-driven: pass dependencies as props when one explicit parent owns them. Use Context or established global state when multiple non-adjacent descendants share the value and prop forwarding would add intermediate components with no ownership role
- Custom hooks are the unit of logic reuse and dependency injection (inject collaborators through the hook for testability)
- Function parameters: 0-2 positional; for 3+ take a single options object
- State shape: type state explicitly; for multi-field state with discrete transitions, use
useReducerwith a discriminated-union action type rather than manyuseStatecalls - Server/Client boundary (RSC frameworks only — e.g. Next.js App Router): default to server components for data fetching/rendering and isolate interactivity behind a
"use client"boundary at the smallest scope that needs it; keep browser-only APIs (window,localStorage, event handlers) inside client components, since calling them in a server component breaks the render. N/A for client-only SPAs (e.g. Vite) — skip when the project has no server-component runtime
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.
- 1mo ago Changed · -1 lines 8992691f84cd
- 1mo ago Changed 46fb2c08c2c3
- 1mo ago First seen · 77 lines · 29 tokens per session scan A a772baaa70f4
frontend-typescript-rules is a skill published in the GitHub repository shinpr/ai-coding-project-boilerplate (234 stars, last pushed yesterday), licensed MIT. It adds 29 tokens to every session and 1,417 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
frontend-ai-guide
Applies React/TypeScript-specific technical decision criteria, anti-pattern detection, debugging, and frontend quality gates. Use when reviewing components, hooks, browser behavior, or frontend implementation completeness.
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.
V3 CLI Modernization
CLI modernization and hooks system enhancement for claude-flow v3. Implements interactive prompts, command decomposition, enhanced hooks integration, and intelligent workflow automation.
react-best-practices
Modern React development guidelines covering hooks, component patterns, state management, performance optimization, and TypeScript integration.
react-dev
Type-safe React 18-19 with TypeScript: components, generic components, hooks, events, Server Components, TanStack Router and React Router. Use when React TypeScript or React 19 is involved.
frontend-scaffolding
Scaffolds React/TypeScript frontend components with MVVM architecture.