agentsclimarketplace

Mine codebase

Skill sigmabaryon/lean-vault/skills/mine-codebase

Mine an existing codebase into grounded, connected, vault-useful knowledge — context, concepts, patterns, fixes, pitfalls — that compounds and feeds emergent synthesis. Uses five grounded mining sources (git archaeology, trap-marker comments, regression tests, defensive code, a targeted hazard sweep), distills the pitfalls into a failure-class mental model, verifies every claim against a concrete artifact, and files the result as distilled judgment (never a code mirror — serena serves structure live). Triggers on: "/mine-codebase", "mine codebase", "mine this repo", "mine [repo] into the vault", "extract knowledge from [repo]", "codebase gotchas", "gotchas from the repo", "what breaks in this codebase", "build the knowledge base for [repo]".From its SKILL.md

Install
npx -y skills add sigmabaryon/lean-vault --skill mine-codebase

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

4.7 KB, as published. Nobody here has run it

mine-codebase: extract a codebase into grounded vault knowledge

Draft (v0). The invocable form of [[codebase-to-vault-guide]] — read that page for the full rationale. Proper, hardened implementation (hermetic tests, ingest-pipeline integration, the accuracy-standard gate) is tracked as an evolution task; this is the working procedure.

What it produces (and does NOT)

Distilled, code-verified judgment per project: subsystem-map, gotchas (with a failure-class mental model on top), patterns, decisions, grounded concept pages, and a working-cadence. It NEVER mirrors code structure (serena serves that live and accurately) and NEVER ingests code, data, or secrets — only what the code doesn't say and doesn't drift.

Non-negotiable rules

  1. Ground everything — every item cites a concrete artifact (SHA / file:line / test / spec §). Can't ground it → drop it or quarantine under "unverified". Precision over recall — a confidently-wrong page poisons every future decision and emergent synthesis.
  2. Code is truth; docs drift — mine code (serena) → git → tests → comments. Generated/prose docs are claims to verify, never inputs.
  3. Distill to a mental model — the highest-leverage output is the 2–4 failure classes that generalize the specifics. Coverage comes from distillation, not an exhaustive bug list (which overfits the snapshot).

Procedure

  1. Recon (read-only, targeted). Language, build, size, how work flows, and sensitivity (secrets, customer data, shared vs solo repo) — this sets the egress/trust posture. Confirm serena is set up (bin/setup-serena.sh <repo>); use it for structure — do not snapshot it.
  2. Git archaeology (strongest signal). Over the active era (git log --grep), scan for fix, bug, regression, revert, hotfix, workaround, race, deadlock, leak, idempoten, retry, careful, corrupt, dedup, null, timezone, migration. For each revert/fix read the diff — the pre-fix code is the trap, the fix is the avoidance. Cluster by subsystem + theme.
  3. Trap markers, regression tests, defensive code. grep HACK|FIXME|XXX|WARNING|GOTCHA| WORKAROUND|"do not"|careful|must|note that; find tests named/commented as regressions (each encodes a past bug + its guard); note idempotency guards / retries / null-shape validation with explanatory comments.
  4. Targeted hazard sweep for the platform's specific classes — find the concrete code evidence, don't assert generically.
  5. Distill concepts, patterns, the subsystem map — each verified against code, not docs.
  6. Synthesize the failure-class mental model — the few principles that explain most pitfalls. Put it at the top of gotchas; the specifics are worked examples behind it.
  7. Verify adversarially — an independent pass (ideally a different model family — parallel subagents, one per finding) returning HELD / WRONG / OVERSTATED with the artifact. Fix or drop what fails.
  8. Connect + stamp provenance — grounded typed edges (so it joins the graph and feeds emergence), honest trust: / source_url / verified: stamps.
  9. Establish the working cadence — turn the failure classes into a Definition-of-Done + review lens for the project, and push the mental model into the repo's git-excluded CLAUDE.local.md (always-loaded), so extraction becomes ongoing discipline, not a one-off dump.

Guardrails

  • Authoritative sources (specs, RFCs, official docs) → ingest/edge freely, trust: authoritative. Arbitrary web → untrusted; vet before it drives a change; don't auto-ground its edges.
  • Ground on the primary source, never a prior summary (lossy telephone + laundered provenance).
  • Proportional: extract as you touch — don't pre-document the tree (a doc you won't maintain rots into drift). The mental model is the leverage; a little grounded synthesis beats a large dump.

Keep looking

Skills are one crate of 607,533. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.