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 agentmods add skills/ncaq/konoka/exceptionnpx 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.svg" alt="Measured on agentmods" 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 | $0.00043 | $0.01208 |
| Opus 5 | $0.00022 | $0.00604 |
| Sonnet 5 | $0.00009 | $0.00242 |
| Haiku 4.5 | $0.00004 | $0.00121 |
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 3d 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
例外処理の原則
error関数の禁止
純粋関数空間の中で例外を投げられるerror関数の使用は原則として禁止です。
haskell-tasuke:partial-function でも触れましたが、 純粋関数空間で例外を投げてしまうと、 呼び出し側で捕捉するのが困難だからです。
また例外に入っているのがStringという非構造化されたデータであると、
デバッグが難しくなります。
throw(導入されている場合は非純粋であることを明示したimpureThrow)の方が、
例外に型がついているという点ではまだマシですが、
こちらも純粋関数空間で例外を投げているのは同じなのでやはり推奨されません。
呼び出し側にMonadThrowやEitherなどを使ってエラー情報を伝播させてください。
例外
論理的にどう考えても発生しないはずの場所なら許容されます。
そんなおかしなことが起きているなら、 アプリケーション自体を終了させるのが適切なレベルの話です。
それでもなるべく型を作って例外を投げるのが望ましいです。
undefinedはPRを出すときにはクリーンアップしましょう
Haskell標準で用意されているundefinedは、
開発中に仮の実装として使うのは便利です。
Rustのtodo!と同じように使えます。
例えばテストファーストで開発をする時に、
とりあえずコンパイルを通すだけの関数シンボルをundefinedで埋めて、
テストコードを書いてから実装を進めるといった使い方ができます。
しかしundefinedは結局は純粋空間でも例外を投げる関数なので、
PRを出すときにはundefinedをクリーンアップしてください。
残っていると警告が出るはずなので見落としはあまりないとは思いますが。
例外は型をつけよう
throwStringのような関数を使うより、
ちゃんと例外に型をつけてthrowMなどで型がついた例外を使いましょう。
例外の状況を伝えるデータ型は、
Textなどの文字列型を使うのではなく、
なるべく構造的なデータ型をフィールドとして持ってください。
ただしcycle importが発生する場合は、
呼び出し側でTextに変換するのもやむを得ないでしょう。
エラーを握り潰すのは禁止
IOの文脈などで例外が生じた場合に、
単に握りつぶして何もしない行為は禁止です。
IOは文脈的に既に例外が発生する可能性があることを示しているので、
例外が上位に伝播することは許容されています。
なので握りつぶすぐらいなら、
例外をそのまま上位に任せてしまう方が概ね適切です。
例外が生じた時に、 そこで例外を処理するのが完全に適切なら、 問題の程度に応じたログを出して処理してください。
単にデバッグを楽にするだけで解決は出来ない場合は例外を再送出してください。
例外だけではなくEitherのLeftなども適切に処理してください。
Leftに対してデフォルト値やフォールバック値を使ってください。
想定外で対処不能ならMonadThrowの文脈に載せて上位に任せてください。
IOが既にコンテキストにある状態でMaybeやEitherで包むのは微妙
IOは例外が発生する可能性がある文脈を十分に表現しているモナドなので、
その中でMaybeやEitherを使って例外的な状況を示すのは二重にネストしていて混乱を招きます。
素直に例外を投げてしまうのが良いでしょう。
基底モナドなどでIO的な操作をしているがIOそのものではないモナドの場合は、
MonadThrowやMonadIOの型クラスが役に立ちます。
例外
データベースやネットワークと通信してデータを取得するような操作は、 存在しないというケースが頻繁に発生する正常系として扱われます。
その場合はIO (Maybe a)のようなシグネチャを使うことは分かり易く適切です。
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.
- 3d 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 5d ago), licensed Apache-2.0. It adds 43 tokens to every session and 1,208 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-08-31.
Other skills, from other repositories
api-testing
HTTP API testing for TypeScript (Supertest) and Python (httpx, pytest). Test REST APIs, GraphQL, request/response validation, authentication, and error handling.
api-gateway-configuration
Configures API gateways for routing, authentication, rate limiting, and request transformation in microservice architectures. Use when setting up Kong, Nginx, AWS API Gateway, or Traefik for centralized API management.
api-response-optimization
Optimizes API performance through payload reduction, caching strategies, and compression techniques. Use when improving API response times, reducing bandwidth usage, or implementing efficient caching.
espalier-migrate
Migrate an existing harness/espalier install to the current Espalier version — auto-detects which of v0.1→v0.2, v0.3→v0.4, v0.4→v0.5, the v0.5.3 coder-agent patch, v0.5→v0.6 (Stage 1 grill), v0.6→v0.7 (read-only /espalier-ask lane), v0.7→v0.8 (requirements approval gate), the v0.8.1 impact-analysis agent patch, the…
recursive-decomposition
Handle tasks that exceed the context window by decomposing them: size and filter the input, chunk it, run recursive sub-agents on independent parts, verify on small windows, and synthesise programmatically, following the Recursive Language Models (RLM) research by Zhang, Kraska and Khattab (2025). Use when a task…
math-unicode
Use when a response needs mathematical notation (equations, filters, set-builder notation, statistics, calculus, linear algebra, logic, ratios, drops, counts) and the output goes to a terminal or TUI that cannot render LaTeX: Claude Code, Codex CLI, SSH and tmux sessions, CI logs. Load it before composing, including…