Individual skill
codebase-comprehension-algorithms
Mapping an unfamiliar codebase into feature/business domains — answering "what is this about", "which files implement feature X", "where is the architectural spine", or reviewing a refactor that crosses module boundaries. 47 algorithms across 9 categories — graph construction (omnipresent filter, multilayer, SCC), lexical preprocessing (Samurai, TF-IDF), community detection (Leiden, Infomap, SBM, MCL, Walktrap, spectral, HDBSCAN), architecture recovery (Bunch+MQ, ACDC, Limbo, Reflexion, DSM), topic modelling (LDA, LSI, NMF, HDP), evolutionary coupling (Gall, ROSE), information-theoretic (NCD, MI, MDL, naturalness), centrality (PageRank, HITS, betweenness, TextRank), validation (MoJoFM, ARI/NMI, resolution limit, consensus, co-change prediction, ablation). Trigger without explicit "clustering" mention — codebase grokking, dependency mapping, domain extraction, architecture-recovery validation all apply.
skills/.experimental/codebase-comprehension-algorithms/SKILL.md
Source commit cf93c57cac89d6fc3e4194686000411567f5caf3
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- No
- Repository scan complete
- No
- Skill scan complete
- Yes
- Observed behavior
- Not checked yet
- Last checked
- Nov 5, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 222
- Repository last updated
- Aug 15, 2026
- License
- MIT
Observed agent integration: codex
- engineering Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
AGENTS.mddoc · 16,277 bytesSKILL.mdcore · 14,737 bytesassets/templates/_template.mddoc · 2,594 bytesmetadata.jsonasset · 2,606 bytesreferences/_sections.mddoc · 6,105 bytesreferences/arch-acdc-subgraph-patterns.mddoc · 7,382 bytesreferences/arch-bunch-with-mq-fitness.mddoc · 7,526 bytesreferences/arch-dsm-partitioning.mddoc · 7,481 bytesreferences/arch-limbo-information-bottleneck.mddoc · 8,058 bytesreferences/arch-reflexion-model.mddoc · 7,775 bytesreferences/clust-hdbscan-density-based.mddoc · 6,402 bytesreferences/clust-infomap-mdl-on-random-walks.mddoc · 6,466 bytesreferences/clust-leiden-not-louvain.mddoc · 6,408 bytesreferences/clust-mcl-markov-clustering.mddoc · 6,205 bytesreferences/clust-spectral-laplacian-fiedler.mddoc · 6,671 bytesreferences/clust-stochastic-block-model.mddoc · 6,516 bytesreferences/clust-walktrap-short-random-walks.mddoc · 6,397 bytesreferences/evol-filter-large-commits.mddoc · 7,424 bytesreferences/evol-logical-coupling-as-architectural-signal.mddoc · 8,279 bytesreferences/evol-mine-cochange-with-lift-and-confidence.mddoc · 7,719 bytesreferences/evol-temporal-decay-on-edge-weights.mddoc · 7,114 bytesreferences/graph-bipartite-file-term-for-joint-structure.mddoc · 7,221 bytesreferences/graph-collapse-sccs-before-clustering.mddoc · 6,287 bytesreferences/graph-combine-signals-in-multilayer-graphs.mddoc · 6,665 bytesreferences/graph-filter-omnipresent-utilities-before-clustering.mddoc · 5,172 bytesreferences/graph-pick-edge-type-by-question-asked.mddoc · 5,584 bytesreferences/graph-weight-edges-by-information-content.mddoc · 5,761 bytesreferences/info-mdl-for-model-selection.mddoc · 7,425 bytesreferences/info-mutual-information-as-coupling.mddoc · 7,424 bytesreferences/info-naturalness-of-code-as-quality-signal.mddoc · 8,166 bytesreferences/info-normalized-compression-distance.mddoc · 7,506 bytesreferences/lex-build-programming-language-stop-words.mddoc · 6,488 bytesreferences/lex-expand-abbreviations-with-context.mddoc · 7,195 bytesreferences/lex-extract-verb-object-pattern-from-method-names.mddoc · 7,200 bytesreferences/lex-split-identifiers-with-samurai.mddoc · 6,734 bytesreferences/lex-stem-versus-subword-tokenization.mddoc · 6,543 bytesreferences/lex-tf-idf-and-bm25-on-identifiers.mddoc · 6,378 bytesreferences/rank-betweenness-centrality-for-bottlenecks.mddoc · 7,056 bytesreferences/rank-hits-hubs-and-authorities.mddoc · 6,527 bytesreferences/rank-pagerank-for-module-importance.mddoc · 6,647 bytesreferences/rank-textrank-for-cluster-labels.mddoc · 7,898 bytesreferences/topic-hdp-for-nonparametric-topic-count.mddoc · 7,091 bytesreferences/topic-lda-on-source-code.mddoc · 7,559 bytesreferences/topic-lsi-svd-on-term-document.mddoc · 6,490 bytesreferences/topic-nmf-non-negative-factorization.mddoc · 6,931 bytesreferences/topic-pick-topic-count-by-coherence-not-perplexity.mddoc · 7,861 bytesreferences/valid-ablate-each-input-signal.mddoc · 7,554 bytesreferences/valid-adjusted-rand-index-and-nmi.mddoc · 7,651 bytesreferences/valid-be-aware-of-resolution-limit.mddoc · 7,945 bytesreferences/valid-cochange-prediction-as-ground-truth-proxy.mddoc · 8,112 bytesreferences/valid-consensus-clustering-for-stability.mddoc · 7,509 bytesreferences/valid-mojofm-as-software-clustering-distance.mddoc · 7,455 bytes
Read excerpt
# Community Codebase Comprehension And Domain Mapping Algorithms Best Practices
A practitioner-oriented reference of the **algorithms that work for mapping a codebase into understandable feature/business domains**. Most of these techniques live in the Software Architecture Recovery and Mining Software Repositories literatures and are invisible to working engineers — yet they're the right tools for the job a coding agent is asked to do every day: *"what does this codebase do, and where?"*
The 47 rules are organized by **execution-lifecycle impact**: a wrong decision early in the pipeline (which graph to build, which identifiers to keep) propagates through everything downstream. The three CRITICAL categories (`graph-`, `clust-`, `valid-`) are the ones a wrong call cannot be recovered from later. Read them first.
**Scope**: proven algorithms with peer-reviewed citations or canonical books — Newman *Networks*, Leskovec-Rajaraman-Ullman *Mining of Massive Datasets*, Ganter-Wille *Formal Concept Analysis*, plus 40+ ICSE / FSE / TSE / PNAS / JMLR papers. No tutorial sites, no Stack Overflow, no marketing posts. Deliberately deferred to a future version: GNN/CodeBERT/code2vec (not "proven over decades" yet) and refactoring-recipe stuff (covered by sibling skills like `react-refactor` and `typescript-refactor`).
## When to Apply
Use these rules when:
- Onboarding an agent into an unfamiliar codebase: "explain what this codebase does, by domain"
- Producing an architecture map: "what are the main subsystems and how do they connect?"
- Locating a feature: "which files implement payments / authentication / search?"