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 echoVic/blade-code --skill filesystem-search-and-atomic-patchinggit clone --depth 1 https://github.com/echoVic/blade-codeWrote 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/echovic/blade-code/filesystem-search-and-atomic-patching)<a href="https://agentmods.dev/skills/echovic/blade-code/filesystem-search-and-atomic-patching"><img src="https://agentmods.dev/badge/skills/echovic/blade-code/filesystem-search-and-atomic-patching/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/echovic/blade-code/filesystem-search-and-atomic-patching"><img src="https://agentmods.dev/badge/skills/echovic/blade-code/filesystem-search-and-atomic-patching.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.00151 | $0.02447 |
| Opus 5.5 | $0.00060 | $0.00979 |
| Sonnet 5.5 | $0.00030 | $0.00489 |
| Haiku 4.5 | $0.00015 | $0.00245 |
Grade A, and why
knowledge-filesystem-search-and-atomic-patching 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 1mo 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.
This is a copy
84% identical to knowledge-tool-and-automation-platform — 89 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 67 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Module Structure
文件工具在统一 FileSystemService 上实现读取和单文件写入,并用 Session 访问记录与
快照保护编辑;ApplyPatch 对本地文件另建完整事务协议,对 ACP 远端文件使用受限的
补偿事务。搜索工具独立选择高性能后端并返回有界结果。
Directory Layout
packages/cli/src/tools/builtin/file/— Read/Write/Edit/ApplyPatch、访问跟踪、快照和事务packages/cli/src/tools/builtin/search/— Glob/Grep 与多级搜索后端packages/cli/src/tools/builtin/notebook/— Notebook 结构化编辑packages/cli/src/services/FileSystemService.ts— 本地与 ACP 文件操作接口docs/reference/atomic-apply-patch.md— ApplyPatch 的事务与恢复契约
Key Entry Points
readTool/editTool/writeToolinpackages/cli/src/tools/builtin/file/— 单文件读取与编辑入口applyPatchToolinpackages/cli/src/tools/builtin/file/applyPatch.ts— 原子多文件变更入口SnapshotManagerinpackages/cli/src/tools/builtin/file/SnapshotManager.ts— 按 Session、workspace 和 message 保存回退点FileAccessTrackerinpackages/cli/src/tools/builtin/file/FileAccessTracker.ts— Read-Before-Write 与外部修改检测globTool/grepToolinpackages/cli/src/tools/builtin/search/— 文件名与内容检索
Gotchas
- 现有文件的
Write、Edit和本地ApplyPatch要求当前 Session 先成功登记Read;记录按 Session 隔离,并把符号链接别名与 canonical path 归并 (packages/cli/src/tools/builtin/file/FileAccessTracker.ts,packages/cli/src/tools/builtin/file/applyPatch.ts) FileAccessTracker.checkExternalModification()对 mtime 使用 2 秒缓冲,适合规避文件系统时间抖动但不是内容哈希锁;原子补丁另会在发布前逐字节重验旧内容 (packages/cli/src/tools/builtin/file/FileAccessTracker.ts,packages/cli/src/tools/builtin/file/applyPatchTransaction.ts)Edit不只做精确替换,还依次尝试行尾空白、智能引号、反转义、空白归一化、弹性缩进和块锚点;非唯一匹配仍会在replace_all=false时失败,不能把容错匹配当成模糊批改 (packages/cli/src/tools/builtin/file/edit.ts,git:300cc776)Edit/Write的快照创建或 post-state 登记失败只记录警告并继续报告文件写入成功,snapshot_created=false才是能否 rewind 的权威标志 (packages/cli/src/tools/builtin/file/edit.ts,packages/cli/src/tools/builtin/file/write.ts)ApplyPatch在提交前创建所有快照,任一快照失败会阻止整个提交;这与单文件 Edit/Write 的 best-effort 快照策略不同 (packages/cli/src/tools/builtin/file/applyPatch.ts)ApplyPatch工具声明isConcurrencySafe=true与parallelism='shared',因为它在内部解析全部路径并获取稳定排序的多路径锁;改回通用单路径锁会破坏多文件原子性 (packages/cli/src/tools/builtin/file/applyPatch.ts,packages/cli/src/tools/execution/FileLockManager.ts)- ACP 远端
ApplyPatch只支持 Update,Add/Delete/Move 必须 fail closed;每次远端写后 read-back,失败时按逆序补偿并再次校验,而不是错误写入同名本地路径 (packages/cli/src/tools/builtin/file/applyPatchTransaction.ts,packages/cli/tests/integration/apply-patch-transaction.test.ts) - ACP 模式的二进制
Write明确拒绝;绕过FileSystemService写本地文件会把远端编辑错误落到 Blade 宿主机 (packages/cli/src/tools/builtin/file/write.ts,packages/cli/src/services/FileSystemService.ts) - Snapshot rewind 只接受目标 message 对每个文件形成历史连续后缀,并要求当前文件哈希仍等于 Blade 最后写后哈希;否则整批回退前即拒绝 (
packages/cli/src/tools/builtin/file/SnapshotManager.ts) Glob达到max_results后主动销毁流并把truncated=true,此时total_matches只是已返回数量,不是实际总数 (packages/cli/src/tools/builtin/search/glob.ts)Grep的后端依次为系统rg、随包 vendorrg、可选@vscode/ripgrep,再降级到git grep、系统 grep 和 JavaScript;不同降级层的 ignore、glob 与 multiline 能力并不完全等价 (packages/cli/src/tools/builtin/search/grep.ts)- 当前仅
Read、Glob、Grep在本节点显式 opt-inisRetrySafe;Write、Edit、ApplyPatch 和 NotebookEdit 即使错误码看似瞬态也默认只调用一次 (packages/cli/src/tools/builtin/file/read.ts,packages/cli/src/tools/builtin/search/glob.ts,packages/cli/src/tools/builtin/search/grep.ts)
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.
- 1mo ago First seen · 67 lines · 151 tokens per session scan A 78891525cbeb
knowledge-filesystem-search-and-atomic-patching is a skill published in the GitHub repository echoVic/blade-code (181 stars, last pushed 3d ago), licensed MIT. It adds 151 tokens to every session and 2,447 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 84% identical to knowledge-tool-and-automation-platform, differing in 89 lines, and is treated as a copy.
Other skills, from other repositories
delegation
Delegates independent work to worker agents through the Task tool, choosing between the explore scout and the ml, biology, physics, chemistry and data specialists, writing a self-contained brief for a worker that cannot see the conversation, setting boundaries on files and compute, using two independent annotators…
Manage emails via Himalaya CLI. Use when the user wants to read, send, search, or organize emails. Triggers on "email", "inbox", "send email", "check mail", "reply to", "forward", or mentions of Gmail, Outlook, iCloud, Proton Mail.
install-jazz-github-action
Set up Jazz as a GitHub Action for automated PR code review and on-demand /jazz PR assistance. Use when the user asks to add Jazz to CI, create a GitHub Action workflow, set up PR review automation, enable /jazz commands on PRs, or integrate Jazz with GitHub.
create-workflow
Create Jazz workflow automation files (WORKFLOW.md). Use this for scheduling Jazz agents to run recurring tasks. For OS-level scripts/commands, use create-system-routine.
obsidian
Use the official Obsidian CLI (v1.12+) to manage vaults, notes, daily notes, search, tasks, tags, properties, links, templates, sync, publish, and workspaces. Use when the user mentions Obsidian, vaults, notes, or wants to automate note-taking and knowledge base workflows.
skill-creator
Create new Jazz skills for automating workflows. Use when the user asks to create a skill, make a skill, or wants to define custom automation behavior.