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 writer-functiongit 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/writer-function)<a href="https://agentmods.dev/skills/ncaq/konoka/writer-function"><img src="https://agentmods.dev/badge/skills/ncaq/konoka/writer-function/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/writer-function"><img src="https://agentmods.dev/badge/skills/ncaq/konoka/writer-function.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.01186 |
| Opus 5.5 | $0.00016 | $0.00474 |
| Sonnet 5.5 | $0.00008 | $0.00237 |
| Haiku 4.5 | $0.00004 | $0.00119 |
Grade A, and why
writer-function 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 — 81 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Nixのwriter系関数
ファイルやスクリプトを生成するderivationを作るための関数群です。
シェルスクリプトにはwriteShellApplicationを優先する
シェルスクリプトを書く場合は、
writeShellScriptやwriteShellScriptBinよりもwriteShellApplicationを優先して使います。
以下の利点があるためです。
set -o errexit、set -o nounset、set -o pipefailが自動で適用されます。bashOptionsで変えられます。- ビルド時にshellcheckが自動で実行されます。
runtimeInputsでPATHを管理できて、実行時の依存が明示されます。runtimeEnvで環境変数を設定できます。
無印とBinサフィックスの違い
多くのwriter関数には、無印版とBinサフィックス版があります。
- 無印(
writeShellScriptなど):$outがファイルそのものです。${myScript}でファイルのパスを直接参照できます。 Bin(writeShellScriptBinなど):$out/bin/<name>にファイルを出力し、meta.mainProgramを設定します。 パスはlib.getExe myPkgか${myPkg}/bin/<name>で得られます。lib.getExeのほうを推奨します。$outがファイルそのものではないので、environment.systemPackagesやruntimeInputsに入れて$PATHに載せられます。
writeShellApplicationは名前にBinが付いていませんが、
$out/bin/<name>に出力するのでBin系と同じ構造です。
trivial-builders (pkgs.*)
nixpkgs/pkgs/build-support/trivial-builders/default.nix に定義されています。
writeTextFile: テキスト系の全てのwriterの基盤になる関数です。writeText name text: テキストファイルを生成します。writeTextDir path text: ディレクトリ構造付きでテキストファイルを生成します。writeScript name text/writeScriptBin name text: 実行可能なスクリプトを生成します。 シバンは自分で書きます。writeShellScript name text/writeShellScriptBin name text: シバンが自動で付き、構文チェックがあります。writeShellApplication: シェルスクリプト用の最も高機能なwriterです。writeCBin pname code: Cのソースをコンパイルしてバイナリを生成します。concatTextFile: 複数のファイルを連結します。concatText name files:concatTextFileのラッパーです。concatScript name files: 連結した実行可能なファイルを生成します。writeClosure paths: ランタイム依存のクロージャのパスの一覧を書き出します。writeDirectReferencesToFile path: 直接参照のパスの一覧を書き出します。writeStringReferencesToFile string: 文字列コンテキストの依存パスを書き出します。
writers (pkgs.writers.*)
言語ごとのwriterは、
nixpkgs/pkgs/build-support/writers/scripts.nix
に定義されています。
以下の各関数には、writeBashBinのようにBinサフィックスを付けた版があり、$out/bin/に配置します。
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 · -51 lines c8b3b90420cb
- 3mo ago First seen · 132 lines · 39 tokens per session scan A e3ec5b7254d0
writer-function is a skill published in the GitHub repository ncaq/konoka (3 stars, last pushed yesterday), licensed Apache-2.0. It adds 39 tokens to every session and 1,186 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.
writer-function compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| writer-functionncaq/konoka | Skill | 3 | yesterday | Apache-2.0 | A | 39 | Claude Code |
| github-project-automationsecondsky/claude-skills | Skill | 257 | today | MIT | A | 45 | Claude Code |
| hono-routingsecondsky/claude-skills | Skill | 257 | today | MIT | A | 41 | Claude Code |
| api-testingsecondsky/claude-skills | Skill | 257 | today | MIT | A | 39 | Claude Code |
| bun-http-serversecondsky/claude-skills | Skill | 257 | today | MIT | A | 31 | Claude Code |
| bun-jest-migrationsecondsky/claude-skills | Skill | 257 | today | MIT | A | 25 | Claude Code |
| cloudflare-workers-migrationsecondsky/claude-skills | Skill | 257 | today | MIT | A | 49 | Claude Code |