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 exceptiongit 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/exception)<a href="https://agentmods.dev/skills/ncaq/konoka/exception"><img src="https://agentmods.dev/badge/skills/ncaq/konoka/exception/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/exception"><img src="https://agentmods.dev/badge/skills/ncaq/konoka/exception.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.00058 | $0.01593 |
| Opus 5.5 | $0.00023 | $0.00637 |
| Sonnet 5.5 | $0.00012 | $0.00319 |
| Haiku 4.5 | $0.00006 | $0.00159 |
Grade A, and why
exception 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 yesterday.
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 — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.
例外処理の原則
純粋なコードから例外を投げない
errorは原則として使いません。
純粋なコードから投げた例外は呼び出し側で捕捉するのが難しく、
中身がStringで構造を持たないのでデバッグもしにくいためです。
捕捉が難しい理由はhaskell-tasuke:partial-functionにも書いています。
throw(導入されていれば、非純粋であることを名前で示すimpureThrow)は、
例外に型が付く点ではerrorよりましですが、
純粋なコードから例外を投げる点は同じなので、やはり推奨しません。
エラーの情報は、後述のようにMonadThrowで呼び出し側に伝播させます。
論理的に起こり得ない場所に限り、純粋なコードから例外を投げて構いません。 そこに到達するほどおかしなことが起きているなら、 アプリケーションごと終了させるのが適切だからです。 その場合も、なるべく例外の型を作って投げます。
undefinedはPRを出す前に取り除く
undefinedは、Rustのtodo!と同じように、開発中の仮の実装として使って構いません。
例えばテストを先に書くときに、
関数の本体をundefinedで埋めてコンパイルだけ通しておけます。
undefinedも純粋なコードから例外を投げるので、PRを出す前に全て取り除きます。
残っていれば警告が出るはずです。
例外に型を付ける
throwStringのような関数は使わず、例外の型を定義してthrowMなどで投げます。
例外の型のフィールドには、Textなどの文字列型ではなく、
なるべく状況を表す構造的なデータ型を持たせます。
循環importが起きる場合は、例外を投げる側でTextに変換して構いません。
失敗はEitherよりMonadThrowで伝える
失敗する可能性のある関数を定義するときは、
Either e aを返すのではなく、
なるべく(MonadThrow m) => ... -> m aの型にしてthrowMで失敗を伝えます。
検証やパースの関数を新しく書くときに特に当てはまります。
-- 避ける
parseArchitecture :: Text -> Either UnsupportedArchitecture Architecture
-- 良い
parseArchitecture :: (MonadThrow m) => Text -> m Architecture
parseArchitecture "x86_64" = pure X86_64
parseArchitecture "aarch64" = pure Aarch64
parseArchitecture other = throwM $ UnsupportedArchitecture other
IOなどの文脈から呼ぶとmがその文脈になるので、
結果をそのまま束縛でき、either throwM pureのような変換が要りません。
mをMaybeやEither SomeExceptionにすれば純粋なコードからも呼べます。
その場合は例外は投げられずNothingやLeftになるので、
純粋なコードから例外を投げないという原則とも両立します。
特定の例外型で分岐したい呼び出し側は、
tryやcatchでその型を指定して捕まえます。
失敗が例外的な状況ではなく、呼び出し側が必ず分岐して処理する正常系であれば、
後述のデータベースの例のようにMaybeやEitherを返して構いません。
テストではmをIOにして、
tryで例外型を捕まえ、得られたEitherを期待する値と直接比較します。
そのために例外型にはEqのインスタンスも導出しておきます。
直接比較する理由はhaskell-tasuke:test-equalに書いています。
try (parseArchitecture "sparc") `shouldReturn` Left (UnsupportedArchitecture "sparc")
エラーを握り潰さない
IOの文脈などで例外が起きたときに、捕捉して何もしないコードは書きません。
IOは例外が起こり得ることを既に示している文脈で、
例外が上位へ伝播することは許容されています。
握り潰すくらいなら、捕捉せずに上位に任せるほうが概ね適切です。
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.
- yesterday Changed · +38 lines · +15 tokens per session b22efff33919
- 6d ago Changed · -28 lines 36a28302afe9
- 3mo ago First seen · 97 lines · 43 tokens per session scan A 0228638f3f9b
exception is a skill published in the GitHub repository ncaq/konoka (3 stars, last pushed 2d ago), licensed Apache-2.0. It adds 58 tokens to every session and 1,593 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-31.
exception compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| exceptionncaq/konoka | Skill | 3 | 2d ago | Apache-2.0 | A | 58 | Claude Code |
| github-project-automationsecondsky/claude-skills | Skill | 257 | 4d ago | MIT | A | 45 | Claude Code |
| hono-routingsecondsky/claude-skills | Skill | 257 | 4d ago | MIT | A | 41 | Claude Code |
| bun-http-serversecondsky/claude-skills | Skill | 257 | 4d ago | MIT | A | 31 | Claude Code |
| api-testingsecondsky/claude-skills | Skill | 257 | 4d ago | MIT | A | 39 | Claude Code |
| bun-jest-migrationsecondsky/claude-skills | Skill | 257 | 4d ago | MIT | A | 25 | Claude Code |
| cloudflare-workers-migrationsecondsky/claude-skills | Skill | 257 | 4d ago | MIT | A | 49 | Claude Code |