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 Arcadi4/nerdy --skill binary-search-treesgit clone --depth 1 https://github.com/Arcadi4/nerdyWrote 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/arcadi4/nerdy/binary-search-trees)<a href="https://agentmods.dev/skills/arcadi4/nerdy/binary-search-trees"><img src="https://agentmods.dev/badge/skills/arcadi4/nerdy/binary-search-trees.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.1 | $0.00042 | $0.03327 |
| Opus 5 | $0.00021 | $0.01664 |
| Sonnet 5 | $0.00008 | $0.00665 |
| Haiku 4.5 | $0.00004 | $0.00333 |
Grade A, and why
binary-search-trees 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 6d 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 — 261 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Binary Search Trees
Overview
Binary search trees are not mainly a recommendation to hand-roll pointer trees. They teach an ordered-set mindset: keep ordering separate from representation, treat height as the operational risk, make local navigation decisions from invariants, and use small pointer rewrites to preserve object identity while changing structure.
When applying this chapter in industrial contexts, answer both questions:
- What invariant makes the operation correct?
- What data-shape, identity, duplicate, cache, or library constraint makes the textbook implementation inappropriate or appropriate?
Shared CLRS Conventions
Also follow the parent clrs skill for mathematical formatting, theorem preconditions, proof tone, and chapter-skill routing. Put formal bounds in display LaTeX blocks, not inline prose.
When to Use
Use this skill for:
- Ordered dictionaries, ordered sets, range scans, predecessor and successor queries, nearest-neighbor-by-key questions, and sorted traversal.
- Basic BST operations:
TREE-SEARCH,TREE-MINIMUM,TREE-MAXIMUM,TREE-SUCCESSOR,TREE-PREDECESSOR,TREE-INSERT,TREE-DELETE, andTRANSPLANT. - Red-black-tree invariants, rotations, insertion fixup, deletion fixup, and height guarantees.
- Questions asking whether a plain BST, balanced BST, B-tree, skip list, hash table, array, or standard library container is the right production choice.
- Debugging pointer-tree code where the ordering relation is correct but parent links, external handles, rotations, or color/black-height repair are suspicious.
Do not use this skill as the primary guide for:
- Unordered exact lookup with no rank, range, predecessor, or sorted-order need; prefer hash-table reasoning.
- External-memory indexes, storage engines, or database indexes where B-trees or LSM-style structures dominate.
- Full sorting problems unless the point is to contrast inorder traversal with sorting or range enumeration.
- Implementing a production ordered map when the language standard library already provides one and no special invariant is required.
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.
- 6d ago First seen · 261 lines · 42 tokens per session scan A 8ce270d24d6d
binary-search-trees is a skill published in the GitHub repository Arcadi4/nerdy (7 stars, last pushed 4mo ago), licensed MIT. It adds 42 tokens to every session and 3,327 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
ljg-word
Deep-dive English word mastery tool. Deconstructs a single English word into core semantics and epiphany. Use when user asks to explain/master a specific English word.
coding
A coding guide for writing and running Python programs in a sandbox. It requires scripts to be small and reproducible, with their actual output or errors reported.
golang-stay-updated
Golang ecosystem watch list — official sources (go.dev/blog, pkg.go.dev, tour.golang.org, golang-nuts), newsletters (Golang Weekly, Awesome Go Newsletter), communities (r/golang, gophers.slack.com, Go Forum, go.dev/wiki), blogs (Dave Cheney, Ardan Labs, Rob Pike), YouTube channels (Gopher Academy, GopherCon EU/UK)…
rust-learner
Learn Rust language features and crate updates. Use when user asks about Rust version changelog, what's new in Rust, crate updates, Cargo.toml dependencies, tokio/serde/axum features, or any Rust ecosystem questions.
course
A Python helper that displays tutorials, group information, source-code links, and other resources for the python-office library in a terminal.
llvm-learning
Comprehensive learning resources and tutorials for LLVM, Clang, and compiler development. Use this skill when helping users learn LLVM internals, find educational resources, or understand compiler concepts.