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/treefmtnpx skills add ncaq/konoka --skill treefmtgit 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/treefmt)<a href="https://agentmods.dev/skills/ncaq/konoka/treefmt"><img src="https://agentmods.dev/badge/skills/ncaq/konoka/treefmt.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.00045 | $0.02091 |
| Opus 5 | $0.00023 | $0.01045 |
| Sonnet 5 | $0.00009 | $0.00418 |
| Haiku 4.5 | $0.00005 | $0.00209 |
Grade A, and why
treefmt 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 — 195 lines — stays where its author put it; the contents beside it link to each section on GitHub.
treefmt-nix
概要
treefmtはプロジェクト内の複数言語ファイルを一コマンドで並列フォーマットするツールです。 treefmt-nixはNixモジュールシステムでtreefmtを設定・管理するラッパーです。
nix fmtコマンドはflakeのformatter出力を呼び出します。
treefmt-nixを組み込むとnix fmtの実体がtreefmtになり、
設定されたすべてのプログラムが実行されます。
FlakeはGitで追跡されているファイルのみを対象とするため、
新規ファイルがある場合は事前にgit ls-files --others --exclude-standard -z | git add --intent-to-add --pathspec-from-file=- --pathspec-file-nulを実行してください。
未追跡ファイルがなく空の入力でもエラーにはなりません。
フォーマッタだけではなくリンターも含む
nix fmtやtreefmtという名前から「フォーマッタだけ」と誤解されがちですが、
treefmt-nixのprogramsにはリンターやチェッカーが多数含まれています。
フォーマッタの例:
nixfmtprettierrustfmtshfmt
リンターの例:
actionlintdeadnixhlintshellcheckstatix
その他:
typos(スペルチェック)zizmor(GitHub Actionsセキュリティ)
treefmtのフォーマッタ仕様は「ファイルパスのリストを受け取り、変更があればファイルに書き戻す」というものです。 リンターはファイルを変更しませんが、エラー時に非ゼロ終了するためtreefmtがエラーとして検出します。
典型的な設定例
flake-partsを使う場合の例です。
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
treefmt-nix = {
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
inputs@{
flake-parts,
treefmt-nix,
...
}:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [
treefmt-nix.flakeModule
];
systems = [
"aarch64-linux"
"x86_64-linux"
];
perSystem = { pkgs, ... }: {
treefmt.config = {
projectRootFile = "flake.nix";
programs = {
nixfmt.enable = true;
prettier.enable = true;
shellcheck.enable = true;
shfmt.enable = true;
};
};
};
};
}
nix fmtで全プログラムが実行されます。
フォーマッタのカスタム設定をする際の注意
treefmtの設定モジュールを使ってカスタム引数を渡すこともできます。
しかしなるべくflake.nixに書くのではなく、 そのツール自体が標準的に使う設定ファイルなどに設定を書き込んでください。
そうするとそのツールをnix fmt経由以外で使うときも同じ設定が適用されるため一貫性が保たれます。
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 · 195 lines · 45 tokens per session scan A b903d156f807
treefmt is a skill published in the GitHub repository ncaq/konoka (3 stars, last pushed 6d ago), licensed Apache-2.0. It adds 45 tokens to every session and 2,091 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…