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/microwind/algorithms/claude-mdgit clone --depth 1 https://github.com/microwind/algorithmsWhat 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.02106 | $0.02106 |
| Opus 5 | $0.01053 | $0.01053 |
| Sonnet 5 | $0.00421 | $0.00421 |
| Haiku 4.5 | $0.00211 | $0.00211 |
Grade A, and why
algorithms CLAUDE.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 — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
本文件为 Claude Code (claude.ai/code) 在本仓库中工作时提供指引。
仓库定位
本仓库是一个教学参考型代码库,使用多种编程语言(C、C++、Java、Kotlin、Python、JavaScript、TypeScript、Go、Rust、Swift、Dart、C#、Objective-C)并行实现常见数据结构与算法。它不是一个库或应用程序——没有项目级的构建系统、包管理器或测试运行器。每个源文件都是独立可运行的演示程序,面向学习者。
主要受众使用中文阅读:README.md(中文)是核心说明,README_en.md 是其英文镜像。代码注释也使用中文。
架构
一种语言一个文件,每个算法平铺存放
每个算法/数据结构都有自己的目录。各语言实现作为同级文件直接放在该目录下(而非嵌套在 implementations/<lang>/ 之下)。例如,sorting/bubblesort/ 中包含 bubble_sort.c、bubble_sort.py、BubbleSort.java、bubble_sort.go、bubble_sort.rs 等,连同一个 README.md 平铺在一起。
注意:
STRUCTURE.md描述的是一种"理想化"的嵌套结构(implementations/c/、implementations/java/等),但仓库并未采用该结构。新增文件时请遵循现有的扁平约定,否则会破坏 README 中的链接表。
每个文件都是完整可运行的演示
每个实现文件都:
- 包含署名为
[email protected]的版权头 - 定义算法本体并提供
main函数(或if __name__ == "__main__":等入口) - 内嵌测试数据(排序类通常使用
[7, 11, 9, 10, 12, 13, 8])并打印结果 - 通常在同一文件中包含同一算法的多个变体(例如
bubbleSort1/2/3/4,或 quicksort 的 7 种变体),用以对比优化策略与各语言惯用写法 - 在文件末尾以多行注释形式给出预期 stdout 输出——这就是测试基准。修改算法行为时,必须同步更新该末尾注释。
仓库中没有独立于实现的单元测试文件。验证方式是运行文件,将其输出与文件末尾的预期输出注释进行对比。
每个目录的 README 即为规范
每个算法目录下的 README.md 是该算法的"权威说明":包含算法解释、mermaid 图、复杂度分析以及指向各语言文件的链接表。新增某种语言的实现时,务必更新该目录的 README.md,使链接/表格保持完整。仓库根目录的 README.md 与 README_en.md 同样直接链接到具体语言文件——尽量保持文件名稳定。
顶层目录组织(按教学路径,而非工程模块)
start-here/ 入门指南与学习路线(仅 Markdown)
data-structures/ array、linked、stack、queue、tree、heap、graph、hash、map、set、list、struct
algorithmic-thinking/ greedy、divide-and-conquer、dynamic-programming、backtracking、
branch-and-bound、random-algorithm、search-algorithms
sorting/ searching/ string/ tree/ graph/ 经典算法分类
array/ recursion/ bit-manipulation/ math/ date-time/ 专题算法集合
compression/ cryptography/ network-flow/ 专项算法
practice-projects/ 实战项目(bloom-filter、cache-system、rate-limiter、
consistent-hashing 等)——这些项目**确实**采用了
src/<lang>/ + tests/ + docs/ + requirements.txt 的常规布局
problem-sets/ LeetCode 风格题库,按 easy/medium/hard/interview 分级
docs/ resources/ 辅助文档、书籍、图片资源
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 · 118 lines · 2,106 tokens per session scan A 1129c3e8abb4
algorithms CLAUDE.md is an instructions file published in the GitHub repository microwind/algorithms (174 stars, last pushed 2mo ago), licensed MIT. It adds 2,106 tokens to every session, about $0.0105 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
stewie-pixel guidelines
Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid overcomplication, make surgical changes, surface assumptions, and define verifiable success criteria.
Pass-LLM-with-LLM AGENTS.md
Instructions for Tenstu/Pass-LLM-with-LLM, covering agents.md, project contract, harness engineering rules, runtime modes and session start.
n8n-skills CLAUDE.md
Instructions for czlonkowski/n8n-skills, covering claude.md, project overview, repository structure, the 14 skills and 1. n8n expression syntax.
Tutorial_AwesomeModernCPP AGENTS.md
Instructions for Awesome-Embedded-Learning-Studio/Tutorial_AwesomeModernCPP, covering agents.md, 这是什么, 通用 essentials(所有 agent 必读) and 你来做什么?(按场景路由).
Nothan-OS CLAUDE.md
Instructions for Vinalinux-Org/Nothan-OS, covering claude.md — nothanos, hard rules, toolchain, driver and design philosophy.
python-cheatsheet copilot-instructions.md
Copilot instructions for labex-labs/python-cheatsheet, covering python cheatsheet - ai coding assistant instructions, project overview, architecture & key patterns, content structure and routing & layout system.