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 MuhammadUsmanGM/claude-code-best-practices --skill component-newgit clone --depth 1 https://github.com/MuhammadUsmanGM/claude-code-best-practicesWrote 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/muhammadusmangm/claude-code-best-practices/component-new)<a href="https://agentmods.dev/skills/muhammadusmangm/claude-code-best-practices/component-new"><img src="https://agentmods.dev/badge/skills/muhammadusmangm/claude-code-best-practices/component-new/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/muhammadusmangm/claude-code-best-practices/component-new"><img src="https://agentmods.dev/badge/skills/muhammadusmangm/claude-code-best-practices/component-new.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00045 | $0.00521 |
| Opus 5.5 | $0.00018 | $0.00208 |
| Sonnet 5.5 | $0.00009 | $0.00104 |
| Haiku 4.5 | $0.00005 | $0.00052 |
Grade A, and why
component-new 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 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.
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.
What it actually says
Component New
Scaffold a new component. Ask once for name and placement if ambiguous; then create the files without further prompting.
Steps
- Pick a location.
- If the component is reusable and presentational →
src/components/<Name>/. - If it belongs to a feature →
src/features/<feature>/components/<Name>/. - If the project has neither folder, ask the user before creating new top-level structure.
- If the component is reusable and presentational →
- Read a sibling component in the target folder to match its style (props pattern, default vs. named export, test shape, hooks placement). If no sibling exists, use the shape below.
- Create three files:
<Name>.tsx— the component<Name>.test.tsx— a failing-first test with onetoBeInTheDocumentassertionindex.ts—export * from './<Name>';(only if the folder contains one)
- Do not add it to a barrel file in
src/unless one already exists. - Report the paths created. Stop.
Default shape (if no sibling to mirror)
// src/components/<Name>/<Name>.tsx
import type { ReactNode } from 'react';
export interface <Name>Props {
children?: ReactNode;
}
export function <Name>({ children }: <Name>Props) {
return <div>{children}</div>;
}
// src/components/<Name>/<Name>.test.tsx
import { render, screen } from '@testing-library/react';
import { <Name> } from './<Name>';
describe('<Name>', () => {
it('renders children', () => {
render(<<Name>>hello</<Name>>);
expect(screen.getByText('hello')).toBeInTheDocument();
});
});
Rules
- Never default-export. Named export only (per project convention).
- No
any. Useunknownor define the type. - Don't add third-party dependencies.
- Don't wire the component into any routes or parent components — that's a follow-up prompt.
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 First seen · 65 lines · 45 tokens per session scan A d47e55b0ce95
component-new is a skill published in the GitHub repository MuhammadUsmanGM/claude-code-best-practices (98 stars, last pushed today), licensed MIT. It adds 45 tokens to every session and 521 once invoked, about $0.0002 per session on Opus 5.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-08-30.
Other skills, from other repositories
prism-component
Implement a reusable, accessible, typed component from a design spec. Use when asked to "create a component", "build a widget", "implement this design", or "reusable UI element".
software-frontend
Builds web frontend UI and rendering. Use when implementing components or fixing hydration, SSR, routing, or state; UX, accessibility, and performance audits have other owners.
software-localisation
Implements production-grade i18n/l10n for React, Vue, Angular, and Next.js with ICU format and RTL support. Use when setting up or debugging localisation.
theokit-agents
TheoKit agent/LLM integration — agents/.ts convention (AgentBuilder), the tool() builder, capabilities (advanced/DI), useAgent client hook.
theokit-frontend
TheoKit frontend — file-based routing, layouts, theoFetch typed client, useAgent, React patterns.
dev-nextjs
Next.js development (App Router, Server Components, caching, streaming). Trigger when the user works with Next.js, modifies app/, pages/, next.config, or talks about RSC, Server Actions, Route Handlers, middleware.