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 instructions/shellraining/hlchunk.nvim/agents-mdgit clone --depth 1 https://github.com/shellRaining/hlchunk.nvimWhat 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.00906 | $0.00906 |
| Opus 5 | $0.00453 | $0.00453 |
| Sonnet 5 | $0.00181 | $0.00181 |
| Haiku 4.5 | $0.00091 | $0.00091 |
Grade A, and why
hlchunk.nvim AGENTS.md 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 — 65 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
项目定位
hlchunk.nvim 是一个 Neovim(>= 0.10.0)缩进与代码块高亮插件,用 Lua 编写。核心能力:indent line、chunk 高亮(基于 treesitter 或括号匹配)、行号高亮、blank 修饰。所有渲染通过 nvim_buf_set_extmark 的 virt_text overlay 实现。
技术栈约束
- Lua(LuaJIT),运行于 Neovim 内,不引入任何外部 Lua 依赖
- 可选依赖:
nvim-treesitter(indent 模块的 treesitter 缩进) - 渲染靠 Neovim extmark + namespace;性能关键路径用 FFI 直调 Neovim C API(见
lua/hlchunk/utils/cFunc.lua) - 测试用
plenary.nvim的 busted 格式,headless 运行
本地命令
make ci # 本地预演 CI:selene + stylua + test
make test # 跑 plenary busted 测试(headless)
make selene # selene 静态检查(linter)
make stylua # 格式校验(只读 --check)
make fmt # 格式写入(stylua 原地格式化)
make lua-language-server # 类型检查(基于 .luarc.json + neodev 类型库)
make dependencies # 按 Makefile 中 pin 的 commit 拉取 plenary/neodev
CI 等价命令:make selene && make stylua && make test。
make lua-language-server 对应单独的 typecheck workflow。
目录地图
详细架构与数据流见 ARCHITECTURE.md。
用户向配置说明见 docs/en/<mod>.md 与 docs/zh_CN/<mod>.md。
lua/hlchunk/
init.lua 入口:setup() 遍历用户配置,按需加载 mod
mods/
base_mod/ BaseMod/BaseConf 基类,所有 mod 继承自它
chunk/ 块高亮(treesitter 优先,括号匹配回退)
indent/ 缩进线
line_num/ 块内行号高亮
blank/ 空白字符修饰(继承自 indent)
utils/ 工具:class/scope/cache/timer/ffi/indent/chunk/filetype/ts_node_type
test/features/ plenary busted 测试,命名 *_spec.lua
docs/ 用户文档
核心约定
- 新增模块继承
BaseMod,配置继承BaseConf,严格遵守UserXxxConf/XxxConf二元类型模式 - 所有公开类型用
---@class/---@field注解,函数用---@param/---@return - 错误处理:生命周期方法(enable/disable/render)用 pcall 包裹 +
self:notify,不向上抛 - 性能:渲染必须可被
max_file_size和exclude_filetypes关闭;高频回调用utils/timer.lua的 debounce/throttle - 不引入新依赖;优先 FFI 或纯 Lua 实现
- 行/列索引:API 层 0-index(row/col);vim.fn 层 1-index。混用时显式 ±1 并注释
- 修改
lua/hlchunk/utils/ts_node_type/下文件后,必须在init.lua注册
PR 流程
- 本地通过
make selene && make stylua && make test - 新增功能补
test/features/*_spec.lua - 用户可见行为变化同步更新
docs/en与docs/zh_CN - commit message 遵循现有风格(见
git log,如feat(chunk): ...、fix(indent): ...)
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 · 65 lines · 906 tokens per session scan A f23d91cd3430
hlchunk.nvim AGENTS.md is an instructions file published in the GitHub repository shellRaining/hlchunk.nvim (919 stars, last pushed 26d ago), licensed MIT. It adds 906 tokens to every session, about $0.0045 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 instructions, from other repositories
fff AGENTS.md
Instructions for dmtrKovalenko/fff, covering to clankers, development commands, building, testing and development tools and code quality.
review.nvim CLAUDE.md
Instructions for vuki656/review.nvim, covering claude.md, commands, lint, run all tests and run a single test file.
codecompanion-spinners.nvim GEMINI.md
Instructions for lalitmee/codecompanion-spinners.nvim, covering codecompanion spinner - comprehensive context, project overview, architecture, core components and event handling.
cc.nvim CLAUDE.md
Claude Code instructions for robcmills/cc.nvim, covering cc.nvim, architecture, testing, style and gotchas.
fff CLAUDE.md
Instructions for dmtrKovalenko/fff, a project described as: The fastest and the most accurate file search SDK for AI agents, Neovim, Rust, C, Python, Bun and NodeJS.
opencode.nvim AGENTS.md
Instructions for nickjvandyke/opencode.nvim, covering opencode.nvim — agent guide, what it is, entrypoints, config quirks and dependencies.