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/arcadi4/nerdy/elementary-graph-algorithmsnpx skills add Arcadi4/nerdy --skill elementary-graph-algorithmsgit clone --depth 1 https://github.com/Arcadi4/nerdyWhat 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.00061 | $0.03814 |
| Opus 5 | $0.00030 | $0.01907 |
| Sonnet 5 | $0.00012 | $0.00763 |
| Haiku 4.5 | $0.00006 | $0.00381 |
Grade A, and why
elementary-graph-algorithms 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 — 348 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Elementary Graph Algorithms
Overview
Graph-search answers must bind the representation contract to the invariant being used. Breadth-first search is a layer and shortest-unweighted-path argument; depth-first search is an interval, ancestor, and finish-time argument; topological sorting and strongly connected components are finish-time applications, not just traversal recipes.
Shared CLRS Conventions
- Follow the parent
clrsskill for mathematical formatting: every expression, bound, inequality, or recurrence goes in a display LaTeX block, never in prose, tables, headings, or inline code spans. - Use CLRS graph notation and theorem numbers when they clarify the proof.
- State whether the graph is directed or undirected before classifying edges or claiming reachability.
- State the representation before giving a running time.
- Treat adjacency-list order as an input-order detail: it can change discovery order and predecessor trees, but not breadth-first distances.
When to Use
Use this skill for:
- Choosing adjacency lists, adjacency matrices, or augmented adjacency structures.
- Breadth-first search for unweighted single-source shortest paths, layers, reachability, and breadth-first trees.
- Depth-first search for timestamp intervals, ancestor reasoning, edge classification, cycle detection, articulation points, bridges, and biconnected components.
- Topological sorting of directed acyclic graphs.
- Strongly connected components using the two-pass transpose algorithm.
- Euler-tour existence in directed graphs and reachability questions that reduce to component condensation.
Do not use it as the main skill for weighted shortest paths, minimum spanning trees, maximum flow, matching, or dynamic graph maintenance unless the immediate task is the representation or the initial traversal invariant.
Quick Reference
| Problem shape | Use | Required precondition | Main proof hook |
|---|---|---|---|
| Sparse graph traversal | Adjacency lists | Neighbor iteration dominates | Scan each list once |
| Dense edge-existence queries | Adjacency matrix | Vertices have stable indices | Constant edge lookup, quadratic storage |
| Unweighted shortest paths from one source | Breadth-first search | Unit edge cost or edge count metric | Layer monotonicity |
| Ancestors, descendants, and cycle witnesses | Depth-first search | Fixed vertex and adjacency iteration order for exact forest | Parenthesis and white-path theorems |
| Linear order of prerequisites | Topological sort | Directed acyclic graph | Decreasing finish times |
| Mutual reachability classes | Strongly connected components | Directed graph | Component finish-time ordering on the transpose |
| Undirected cut vertices and bridges | Depth-first low values | Connected component considered with tree and back edges | Subtree escape to a proper ancestor |
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 · 348 lines · 61 tokens per session scan A b7a2104cb08f
elementary-graph-algorithms is a skill published in the GitHub repository Arcadi4/nerdy (7 stars, last pushed 4mo ago), licensed MIT. It adds 61 tokens to every session and 3,814 once invoked, about $0.0003 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
coding
编写并运行 Python 代码,验证脚本逻辑和输出。.
thermite
Thermite, the generic ISA-portable Rust SIMD library, and its thermite- companions (special, dual/autodiff, compensated/double-double, sort, sdf, geometry, ffi). Load when writing/reviewing/debugging code using thermite/thermite- crates - GenericVector/NumericVector/FloatVector bounds, the policy math library, masks…
java-algorithm-patterns
5 algorithm patterns with full Java implementations for common coding problems.
python-algorithm-cookbook
4 algorithm patterns with full Python implementations for common coding problems.
wxjava-module-selector
根据微信公众号、小程序、微信支付、企业微信、开放平台、视频号或微信小店、腾讯企点和微信智能对话等业务场景,为用户选择合适的 WxJava Maven 模块、BOM 和示例入口。适用于用户询问“该用哪个模块”、依赖坐标、产品边界或单/多账号 Starter 选择时。.
cpp-pro
Writes, optimizes, and debugs C++ applications using modern C++20/23 features, template metaprogramming, and high-performance systems techniques. Use when building or refactoring C++ code requiring concepts, ranges, coroutines, SIMD optimization, or careful memory management — or when addressing performance…