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/modem-dev/hunk/hunk-extensionsnpx skills add modem-dev/hunk --skill hunk-extensionsgit clone --depth 1 https://github.com/modem-dev/hunkWhat 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.00105 | $0.04878 |
| Opus 5 | $0.00053 | $0.02439 |
| Sonnet 5 | $0.00021 | $0.00976 |
| Haiku 4.5 | $0.00011 | $0.00488 |
Grade A, and why
hunk-extensions 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.
How it starts
The opening of the file, as written. The whole thing — 327 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Building Hunk extensions
A Hunk extension is one TypeScript (or JSX/JS) file that default-exports a factory. Hunk imports it at startup and hands it an API object. No build step, no manifest required.
// ~/.config/hunk/extensions/hello.ts
import type { HunkExtensionAPI } from "hunkdiff/extension";
export default function (hunk: HunkExtensionAPI) {
hunk.on("startup", (_event, ctx) => ctx.notify("Hello"));
}
This skill is a map of the touchpoints, not a recipe. Decide what to build from the user's request; use the table below to find the call, then read the linked material before writing code.
Sources of truth — read before writing
| Source | What it answers |
|---|---|
docs/extensions.md |
The authoring guide. Every call, every rule. Start here. |
src/extension-api/types.ts |
The contract — exact field names, optionality, doc comments. |
examples/extensions/* |
Working extensions. Copy these patterns rather than invent. |
docs/extension-architecture.md |
Hunk's internals. Needed only when changing the host. |
docs/keybindings.md, docs/themes.md |
Chord grammar and theme token rules that extensions inherit. |
Outside a Hunk checkout the guide is split across
https://hunk.dev/docs/extend/extensions/ (discovery, trust, config) and its
companion pages — extension-api, file-previews, vcs-adapters, custom-panes —
and the contract ships as node_modules/hunkdiff/dist/npm/extension/index.d.ts.
The examples, by what they demonstrate:
review-triage/— pane + commands + all three dialog shapes + lifecycle events + the extension event bus + auseSyncExternalStorebridge.inline-edit/— an interactive file-viewmodedrivingctx.workspacewrites; its README explains the async lifetime rules better than anything else in tree.rendered-markdown/— a file view producing host-rendered rows from parsed Markdown, and a folder extension with an npm dependency.jsx-file-view/,jsx-file-view-gallery/— the experimental fixed-height JSX row component contract.
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 First seen · 327 lines · 105 tokens per session scan A 20213148fec6
hunk-extensions is a skill published in the GitHub repository modem-dev/hunk (8,933 stars, last pushed 2d ago), licensed MIT. It adds 105 tokens to every session and 4,878 once invoked, about $0.0005 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-30.
Other skills, from other repositories
revdiff
Review diffs, files, and documents with inline annotations in a TUI overlay, or answer questions about revdiff usage, configuration, themes, and keybindings. Opens revdiff in tmux/zellij/herdr/kitty/wezterm/cmux/ghostty/iterm2/emacs-vterm, captures annotations, and addresses them. Works in git, hg, and jj repos…
revdiff-plan
Review the last Codex assistant message (plan, analysis, or proposal) with inline annotations in a TUI overlay. Extracts the most recent response from Codex rollout files and opens it in revdiff for review and annotation. Activates on "revdiff-plan", "review plan with revdiff", "annotate plan", "review last response"…
critique
Git diff viewer. Renders diffs as web pages, images, and PDFs with syntax highlighting. Use this skill when working with critique for showing diffs, generating diff URLs, or selective hunk staging.
agent-code-analyzer
Agent skill for code-analyzer - invoke with $agent-code-analyzer.
foundry-config-setup
Resolve missing setup caused by a hardcoded Foundry project endpoint or model in a sample. Use when a sample fails because it uses a placeholder/hardcoded projectendpoint (for example "https://your-project.services.ai.azure.com") or a hardcoded model instead of reading them from the environment.
feishu
Work with Feishu or Lark bots, docs, sheets, bitables, approval flows, and OpenAPI/MCP setup without hardcoding credentials.