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 as-const-satisfiesgit 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/as-const-satisfies)<a href="https://agentmods.dev/skills/ncaq/konoka/as-const-satisfies"><img src="https://agentmods.dev/badge/skills/ncaq/konoka/as-const-satisfies/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/as-const-satisfies"><img src="https://agentmods.dev/badge/skills/ncaq/konoka/as-const-satisfies.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.00039 | $0.00941 |
| Opus 5.5 | $0.00016 | $0.00376 |
| Sonnet 5.5 | $0.00008 | $0.00188 |
| Haiku 4.5 | $0.00004 | $0.00094 |
Grade A, and why
as-const-satisfies 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 2d 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
定数定義にはas constとas const satisfiesを使う
定数定義には基本的にas constを付けます。
リテラル型が保たれて型推論が厳密になり、型の上でreadonlyになるためです。
実行時にオブジェクトが凍結されるわけではありません。
名前の付いた型で型チェックもできる場合は、as const satisfies Typeにします。
as constの利点を保ったまま、その型を満たすことも保証できます。
const status = {
pending: "pending",
approved: "approved",
rejected: "rejected",
} as const satisfies Record<string, string>;
// status.pendingの型は"pending"
: Typeや、as constを付けないsatisfies Typeは、
要素をpushする配列のように可変性が必要な場合と、
リテラル型が保たれると問題になる場合に限って使います。
satisfiesに指定する型の配列が可変な場合
satisfiesに指定する型の配列がstring[]のように可変だと、
配列リテラルはエラーにならないまま、readonlyの付かないタプルに推論されます。
既にreadonlyな配列を渡した場合はエラーになります。
どちらの場合も、satisfiesに指定する型の側をreadonlyにします。
type Config = {
readonly values: readonly string[];
};
const config = {
values: ["a", "b", "c"],
} as const satisfies Config;
// config.valuesの型はreadonly ["a", "b", "c"]
既存の型をreadonlyにするにはReadonlyを使えます。
Readonlyは浅いreadonly化なので、
プロパティにある配列までreadonlyにするには、再帰的なDeepReadonlyを自前で定義します。
// プレーンオブジェクトと配列だけを対象にした定義です。
// Map、Set、Dateなどのビルトインオブジェクトを含む型には専用の対応が必要です。
type DeepReadonly<T> = T extends readonly (infer U)[]
? readonly DeepReadonly<U>[]
: T extends object
? { readonly [P in keyof T]: DeepReadonly<T[P]> }
: T;
DeepReadonlyやビルトインオブジェクトへの対応などで、
型の側の調整が複雑になりすぎる場合は、
as constにこだわらず、通常の型推論や型注釈で済ませて構いません。
リテラル型のために可読性を大きく犠牲にする必要はありません。
文字列ユニオン型はas const配列から導く
文字列ユニオン型は直接書かず、
先にas const配列を作って、そこから型を導きます。
// 避ける
type Foo = "a" | "b" | "c";
// 良い
const fooValues = ["a", "b", "c"] as const;
type Foo = (typeof fooValues)[number];
配列として値を持っていれば、
バリデーションのように実行時にも値の列挙が必要な場合に再利用できます。
特にincludesで型を絞り込みやすいのが利点です。
実行時の列挙が今は必要ない場合も、一貫性のためにこの書き方に統一します。 後から実行時に値が必要になっても書き換えが発生せず、 コードベースに2つの書き方が混在することも防げます。
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.
- 2d ago Changed · -89 lines 5e6559634ba5
- 2mo ago First seen · 176 lines · 39 tokens per session scan A 91935c7574a1
as-const-satisfies is a skill published in the GitHub repository ncaq/konoka (3 stars, last pushed today), licensed Apache-2.0. It adds 39 tokens to every session and 941 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-09-05.
as-const-satisfies compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| as-const-satisfiesncaq/konoka | Skill | 3 | today | Apache-2.0 | A | 39 | Claude Code |
| better-authsecondsky/claude-skills | Skill | 257 | yesterday | MIT | A | 53 | Claude Code |
| hono-routingsecondsky/claude-skills | Skill | 257 | yesterday | MIT | A | 41 | Claude Code |
| bun-bundlersecondsky/claude-skills | Skill | 257 | yesterday | MIT | A | 90 | Claude Code |
| bun-hot-reloadingsecondsky/claude-skills | Skill | 257 | yesterday | MIT | A | 42 | Claude Code |
| jest-generatorsecondsky/claude-skills | Skill | 257 | yesterday | MIT | A | 43 | Claude Code |
| language-typescriptdeveloper239/michals-opencode-cookbook | Skill | 1 | 1mo ago | none | A | 66 | Claude Code, Codex |