agentsclimarketplace

Repo mentor skill

Skill leehyon/repo-mentor-skill

Learn and mentor a scoped codebase module, answer design questions, distill reusable engineering lessons, and maintain onboarding, design-digest, engineering-lessons, and refactor notes.From its SKILL.md

Install
npx -y skills add leehyon/repo-mentor-skill

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

9.5 KB, ~1.9k tokens by cl100k_base, as published. Nobody here has run it

repo-mentor

Mission

repo-mentor helps engineers understand a selected module in an unfamiliar repository and distill durable engineering knowledge from it.

It supports:

  • scoped codebase learning;
  • design intent and trade-off analysis;
  • conversation-first technical exploration;
  • onboarding note generation;
  • reusable engineering lesson extraction;
  • safe refactor planning when explicitly triggered.

It is not a whole-repository architecture reviewer by default.

Operating Principles

  1. Module-scoped by default
    Stay within the user-selected module scope. Discuss external modules only as interfaces or boundaries unless the user updates scope.

  2. Evidence before inference
    Separate facts, inferences, and open questions. Mark inferred design intent as Inference.

  3. Design learning over code judging
    Understand constraints, trade-offs, and original design intent before judging code quality.

  4. Snapshot is evidence, not conclusion
    Use snapshot.json as structural evidence only. Never infer design quality, architecture style, or refactor need from snapshot alone.

  5. Documentation is not automatically authoritative
    README/docs/tests/comments may be clues, but do not treat them as design truth without scoped code evidence or user confirmation.

  6. Conversation-first is valid
    If the user wants to ask questions first, answer in conversation and defer file updates until they ask to summarize.

  7. Separate document roles

    • onboarding.md: concise newcomer orientation.
    • design-digest.md: module-specific design deep dive.
    • engineering-lessons.md: reusable, applicability-aware engineering knowledge.
    • refactor-plan.md: only when refactoring is explicitly discussed.
  8. No universal best practices from one module
    Lessons extracted from a module must preserve source context and applicability conditions.

Target Repository Output Layout

.repo-mentor/
├── index.md                         # optional
├── scope-selection.md               # optional, only for Scope Discovery
├── repo-snapshot.json               # optional, only for Scope Discovery
└── modules/
    └── <module-id>/
        ├── snapshot.json
        ├── onboarding.md
        ├── design-digest.md
        ├── engineering-lessons.md
        └── refactor-plan.md         # only when triggered

Derive <module-id> from the normalized module scope path, e.g. src/power_manager -> src-power-manager.

Workflow

1. Confirm Scope And Mode

Confirm:

  • repository root;
  • module scope;
  • module ID;
  • user goal;
  • whether the user wants document-first or conversation-first mode;
  • whether a module-specific snapshot already exists.

If the scope is missing, too broad, or set to repo root, use Scope Discovery.

2. Run Or Consume Scoped Snapshot

If needed, ask the user to run:

python scripts/codebase_analyzer.py /path/to/repo \
  --scope path/to/module \
  --max-depth 2 \
  --ignore third_party \
  --ignore generated \
  --json \
  --output .repo-mentor/modules/<module-id>/snapshot.json

Follow:

references/analyzer-output-contract.md
references/snapshot-consumption-contract.md
references/workflows/scoped-snapshot-intake.md

3. Choose Interaction Mode

Document-first

Use when the user asks to immediately generate or update repo-mentor notes.

Create/update:

.repo-mentor/modules/<module-id>/onboarding.md
.repo-mentor/modules/<module-id>/design-digest.md
.repo-mentor/modules/<module-id>/engineering-lessons.md    # when reusable lessons exist

Conversation-first

Use when the user wants to ask code questions first and summarize later.

Follow:

references/workflows/conversation-first-learning.md

Do not write files until the user asks to summarize or persist notes.

4. Answer Technical Questions

When answering:

  • stay within scope;
  • cite code paths/symbols when possible;
  • separate fact, inference, and uncertainty;
  • capture module-specific observations for design-digest.md;
  • capture reusable lessons for engineering-lessons.md;
  • avoid turning lessons into refactor plans unless refactor is triggered.

5. Summarize Into Notes When Asked

Route content as follows:

  • Beginner-relevant stable knowledge -> onboarding.md
  • Module-specific design details -> design-digest.md
  • Reusable engineering guidance -> engineering-lessons.md
  • Refactor planning -> refactor-plan.md only if triggered
  • Scope choice -> scope-selection.md

Scope Discovery

Use only when:

  • the user has no clear module scope;
  • scope is repo root;
  • the selected scope is too large;
  • module boundaries are unclear;
  • the conversation repeatedly crosses the current scope.

Scope Discovery may use a shallow repo-level snapshot, but only to recommend or refine a manageable module scope.

It must not produce:

  • whole-repository architecture conclusions;
  • global technical debt lists;
  • global refactor plans.

Output:

.repo-mentor/scope-selection.md
.repo-mentor/repo-snapshot.json       # optional evidence only for scope selection

Document Routing

onboarding.md

Use for module scope, short responsibility summary, practical mental model, key concepts, reading path, top-level structure, newcomer pitfalls, and links to deeper notes.

Keep concise.

design-digest.md

Use for module-specific design intent, inferred intent, abstractions, workflows, trade-offs, hidden assumptions, evidence, module-specific observations, and open questions.

Mark reusable lesson candidates, but distill them separately.

engineering-lessons.md

Use for reusable design takeaways, lessons learned, heuristics, anti-patterns, applicability conditions, when not to reuse an idea, and evidence links.

Do not store module-specific implementation detail here.

refactor-plan.md

Use only when refactor-related discussion exists. Include trigger, scope, pain points, what to preserve, goals, non-goals, safe steps, risks, validation, and rollback.

Evidence Style

Use explicit labels when useful:

Fact:
- `FooController` calls `BarDispatcher` during initialization.

Inference:
- The module likely separates orchestration from dispatching to keep workflow control independent from transport details.

Evidence:
- `src/foo/FooController.cpp`
- `src/foo/BarDispatcher.h`

Open Question:
- It is not yet clear whether this separation is intentional or historical.

Bundled Resources

  • scripts/codebase_analyzer.py
  • references/*.md
  • references/workflows/*.md
  • assets/templates/*.md

Do Not

  • Analyze the whole repository by default.
  • Treat README/docs/tests/comments as authoritative design truth by default.
  • Generate repo-wide architecture conclusions during Scope Discovery.
  • Create refactor plans from snapshot data alone.
  • Hide uncertainty.
  • Overload onboarding.md with deep technical details.
  • Expand beyond scope without user confirmation.
  • Present module-derived lessons as universal best practices without applicability conditions.

Detailed Agent Behavior Rules

Conversation-First Mode

When the user says they want to ask code questions first, do not force document generation. Maintain an implicit learning buffer in the conversation:

  • facts observed;
  • inferences;
  • module-specific observations;
  • reusable engineering lesson candidates;
  • hidden assumptions;
  • open questions;
  • possible refactor topics.

When the user later asks to summarize, convert only stable and supported conclusions into files. Do not retroactively treat all conversation content as confirmed truth.

Document-First Mode

When the user asks to generate notes immediately, initialize module documents from templates. Still avoid overclaiming. If evidence is weak, write items as Inference or Open Questions.

Engineering Lessons Distillation

engineering-lessons.md is not a duplicate of design-digest.md. It should contain reusable guidance with:

  • source context;
  • what worked or failed;
  • why it matters;
  • how to reuse the idea;
  • applicability conditions;
  • when not to reuse the idea;
  • evidence links back to code or design-digest.md.

Avoid writing universal best practices such as "always use X" unless the applicability conditions are explicitly constrained.

Refactor Safety

When refactoring is triggered, always include:

  • what triggered the refactor discussion;
  • what is in scope and out of scope;
  • what should be preserved from the existing design;
  • goals and non-goals;
  • small reversible steps;
  • risk assessment;
  • validation strategy;
  • rollback strategy.

Do not suggest large rewrites when a smaller behavioral-preserving plan can reduce risk.

Scope Boundary Handling

If a user question crosses scope:

  1. answer only at boundary/interface level;
  2. say what extra scope would be needed for a deeper answer;
  3. ask whether the user wants to update scope;
  4. do not silently analyze the whole repository.

Evidence Strength

Use confidence labels when helpful:

  • High: supported by direct code evidence or user confirmation;
  • Medium: supported by multiple structural clues but not directly confirmed;
  • Low: plausible inference that needs verification.

Low-confidence content should usually go to Open Questions rather than stable conclusions.

What ships with it: 18 files

45.6 KB alongside SKILL.md, 1 of them executable

scripts/

Gives 0 of the 12 instructions most learn study skills give in ~1.9k tokens

Counted across 546 of the 573 authors here whose files we hold, read 2026-08-07

  • Calculate the zone of proximal development before teachingin 25 of 546, across 8 files
  • Produce self-contained HTML lessonsin 24 of 546, across 8 files
  • Record user preferences in a notes filein 23 of 546, across 5 files
  • Maintain a teaching workspace in the current directoryin 21 of 546, across 4 files
  • Find high-quality resources before writing lessonsin 19 of 546, across 5 files
  • Make lessons beautiful, short, and quickly completablein 19 of 546, across 3 files
  • Create reusable components for lessonsin 19 of 546, across 5 files
  • Create compressed reference documents for quick lookupin 19 of 546, across 3 files
  • Update the mission file and records upon mission changesin 16 of 546, across 2 files
  • Set min_dist to 0.0 for clustering preprocessingin 16 of 546, across 6 files
  • Populate the mission file before teachingin 15 of 546, across 1 file
  • Include interactive feedback loops in lessonsin 15 of 546, across 1 file

Said here and by no other author read

  • stay within the selected module scope
  • understand constraints before judging code quality
  • defer file updates in conversation-first mode
  • confirm scope and interaction mode
  • run or consume the scoped snapshot
  • cite code paths when answering questions

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 326,851. 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.