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 ncaq/konoka --skill react-component-conventiongit clone --depth 1 https://github.com/ncaq/konokaWrote 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/ncaq/konoka/react-component-convention)<a href="https://agentmods.dev/skills/ncaq/konoka/react-component-convention"><img src="https://agentmods.dev/badge/skills/ncaq/konoka/react-component-convention/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/ncaq/konoka/react-component-convention"><img src="https://agentmods.dev/badge/skills/ncaq/konoka/react-component-convention.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.00032 | $0.01227 |
| Opus 5 | $0.00016 | $0.00613 |
| Sonnet 5 | $0.00006 | $0.00245 |
| Haiku 4.5 | $0.00003 | $0.00123 |
Grade A, and why
react-component-convention 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 4d 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
Reactコンポーネントの規約
ファイル内の構造順序を守る
すべてのコンポーネントファイルは、上から順に次の流れで構成します。
- デザイン定義 —
sva/cva/cssなどのstyled-system呼び出し - props定義 —
type Props = ...やinterface Props { ... } - Functional Component定義 —
export const Foo: React.FC<Props> = ...やexport function Foo(props: Props): React.ReactElement { ... }
import群は当然この前に置きます。 純粋な振る舞いだけのコンポーネントならデザイン定義は省略可能ですが、 それ以外で順序の入れ替えは認めません。
理由: 「見た目」「インターフェース」「振る舞い」の責務分離をファイル内の縦方向で表現することで、 コンポーネントを読むときの認知の階段を一定に保つため。
1ファイル1コンポーネント
1つのファイルの中にexport/非exportを問わずコンポーネントを2つ以上書かないでください。
ファイル内で再利用される小さなコンポーネントが必要になった場合は、必ず別ファイルに切り出します。
切り出した先のファイル名はIDEのQuick Openで識別しやすい名前にし、
index.tsxやindex.tsといった汎用名を新規作成しないでください。
既存のindex.tsxを大幅に書き換える場合も、
リファクタリングの一環として適切なファイル名にリネームします。
例外として、他のコンポーネントのrender propに渡すためのごく小さなコンポーネントは、
その場で定義することを許容します。
<DataGrid renderRow={...} />やcolumns[i].render、
react-hook-formのControllerのrenderなどが該当します。
ただし次の条件をすべて満たすこと。
- 呼び出し元のrender関数の引数型にそのまま当てはめられる、数行〜十数行程度の軽量なものに限る
- ファイル内で1度しか使われない。使い回される可能性が出てきた時点で別ファイルに切り出す
- どのrender propに渡すために定義しているのかを説明するコメントを直前に付ける
例:
// DataGridのrenderRowに渡すための行コンポーネント。このファイル内でしか使わない
const DeviceRow: React.FC<{ device: Device }> = ({ device }) => (
<tr>
<td>{device.id}</td>
<td>{device.name}</td>
</tr>
);
ファイル内で複数回使う場合、それなりの行数がある場合、 呼び出し側から渡される関数でなく通常のJSXの一部として使っている場合などは、 必ず別ファイルに切り出してください。
コンポーネントが肥大化してきたら分割する
「関数の始まりからJSXが登場するまでに30行程度かかっている」状態は、 コンポーネントが過剰な責務を持っている兆候です。 次のいずれかの方法で責務を逃します。
- ロジックをカスタムフックに切り出す。state、副作用、メモ化、ハンドラの寄せ集めはほぼ必ずフック化できます
- 表示の塊を子コンポーネントに切り出す
- 算出値をモジュールスコープの純粋関数に切り出す
ただし、JSX自体が長くなることは必ずしも悪ではありません。 判定すべきは「行数」ではなく「認知負荷」です。 次のような状態は危険信号として扱ってください。
- 同一の構造が縦に並んでいるが、わずかな差異があってループに落とせていない
- 条件分岐ごとにJSXの枝が派生しており、どの枝が描画されるかを脳内でトラッキングする必要がある
- 1つの要素のクラス名/propsを組み立てるために手前で何段ものローカル変数を準備している
- 同じblock内でユーザー情報・支払い情報・通知設定のように複数のドメイン概念を扱っている
逆に、整然と並んだ単純な要素列が長いだけであれば、無理に分割する必要はありません。 「他人がこのコンポーネントを上から下まで一気に読めるか」を基準にしてください。
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.
- 4d ago First seen · 81 lines · 32 tokens per session scan A d9041e884d69
react-component-convention is a skill published in the GitHub repository ncaq/konoka (3 stars, last pushed yesterday), licensed Apache-2.0. It adds 32 tokens to every session and 1,227 once invoked, about $0.0002 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-05.
Other skills, from other repositories
cloudflare-nextjs
Deploy Next.js to Cloudflare Workers via the OpenNext adapter (@opennextjs/cloudflare). Use for SSR/ISR/SSG/App or Pages Router, getCloudflareContext, bindings (D1/R2/KV/AI/Hyperdrive), caching tiers, skew protection, multi-worker, custom worker, env vars, or worker…
aceternity-ui
100+ animated React components (Aceternity UI) for Next.js with Tailwind. Use for hero sections, parallax, 3D effects, or encountering animation, shadcn CLI integration errors.
auto-animate
AutoAnimate (@formkit/auto-animate) zero-config animations for React. Use for list transitions, accordions, toasts, or encountering SSR errors, animation libraries complexity.
base-ui-react
MUI Base UI unstyled React components with Floating UI. Use for accessible components, Radix UI migration, render props API, or encountering positioning, popup, v1.0 rc / pre-GA issues.
bun-nextjs
This skill should be used when the user asks about "Next.js with Bun", "Bun and Next", "running Next.js on Bun", "Next.js development with Bun", "create-next-app with Bun", or building Next.js applications using Bun as the runtime.
bun-react-ssr
Use when building server-rendered React with Bun, including streaming SSR, hydration, renderToString, or custom SSR without a framework.