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 avoid-forgit 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/avoid-for)<a href="https://agentmods.dev/skills/ncaq/konoka/avoid-for"><img src="https://agentmods.dev/badge/skills/ncaq/konoka/avoid-for/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/avoid-for"><img src="https://agentmods.dev/badge/skills/ncaq/konoka/avoid-for.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.00063 | $0.02245 |
| Opus 5 | $0.00032 | $0.01123 |
| Sonnet 5 | $0.00013 | $0.00449 |
| Haiku 4.5 | $0.00006 | $0.00225 |
Grade A, and why
avoid-for 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.
How it starts
The opening of the file, as written. The whole thing — 248 lines — stays where its author put it; the contents beside it link to each section on GitHub.
for文をなるべく避ける
for文は強力すぎて、
コードの意図が読み取りにくくなります。
構造化プログラミングにおいてgoto相当の機能を避けるのと同じ理由で、
for文もなるべく避けてください。
避ける対象は以下の全てです。
- C言語方式の
for (let i = 0; i < n; i++) for...offor...in
forではありませんが、 同じくループ構文の以下も避けてください。
whiledo...while
なぜ避けるのか
for文は何でもできてしまいます。
- 要素の変換
- 絞り込み
- 集計
- 検索
- 副作用の実行
どの操作をしているのかはループ本体を注意深く読まないと分かりません。
mapやfilterのような高抽象度の関数は、
名前を見ただけで「変換している」「絞り込んでいる」と意図が伝わります。
gotoが制御フローを自由にしすぎて構造化プログラミングで避けられたのと同じく、
forはデータの流れを自由にしすぎます。
より弱く意図の限定された関数に置き換えることで、
読み手の負担が減ります。
Arrayの場合
Arrayのメソッドでやりたいことに対応するものを選びます。
| やりたいこと | forの代替 |
|---|---|
| 各要素を変換する | map |
| 変換して一段平坦化する | flatMap |
| 条件で絞り込む | filter |
| 最初の一致を探す | find / findIndex |
| 最後の一致を探す | findLast / findLastIndex |
| 含まれるか調べる | includes |
| 位置を調べる | indexOf / lastIndexOf |
| 一つでも満たすか調べる | some |
| すべて満たすか調べる | every |
| 単一の値に集計する | reduce / reduceRight |
| 副作用だけ実行する | forEach |
| ネストした配列を平坦化する | flat |
| 文字列に連結する | join |
| 並べ替える | toSorted |
| 逆順にする | toReversed |
変換と絞り込みはチェーンで素直に書けます。
// 避ける
const result = [];
for (let i = 0; i < users.length; i++) {
if (users[i].active) {
result.push(users[i].name);
}
}
// 良い
const result = users.filter((user) => user.active).map((user) => user.name);
大域脱出が必要な場合
途中で打ち切りたい(break相当の)場合は、
専用のメソッドで表現できます。
- 一つでも条件を満たすか:
some - すべて満たすか:
every - 最初の一致を取得:
find
// 避ける
let found = false;
for (const user of users) {
if (user.id === targetId) {
found = true;
break;
}
}
// 良い
const found = users.some((user) => user.id === targetId);
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 · 248 lines · 63 tokens per session scan A 41b40d9724de
avoid-for is a skill published in the GitHub repository ncaq/konoka (3 stars, last pushed yesterday), licensed Apache-2.0. It adds 63 tokens to every session and 2,245 once invoked, about $0.0003 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
bun-bundler
This skill should be used when the user asks about "bun build", "Bun.build", "bundling with Bun", "code splitting", "tree shaking", "minification", "sourcemaps", "bundle optimization", "esbuild alternative", "building for production", "bundling TypeScript", "bundling for browser", "bundling for Node", or…
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.
better-auth
Skill for integrating Better Auth - comprehensive TypeScript authentication framework for Cloudflare D1, Next.js, Nuxt, and 15+ frameworks. Use when adding auth, encountering D1 adapter errors, or implementing OAuth/2FA/RBAC 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.
bun-hot-reloading
Use when implementing hot reloading with Bun (--hot, --watch), HMR, or automatic code reloading during development. Covers watch mode, hot mode, and HTTP server reload.
tanstack-form-composition
Migrate a React @tanstack/react-form codebase from the prop-drilled useForm + erased-form-type pattern to the official createFormHook composition API (useAppForm / withForm / field.X). Use when a project threads a form object (often cast to an any-erased type like ReactFormExtendedApi ) through field-wrapper…