agentleFS
jggomezjggomez/expert-ai-developer-skills/skills/repo-research/SKILL.md

repo-research

Skill30 starsChanged 4 days agoApache-2.0View on GitHub

Analyze a repository's structure, stack, commands, and invariants to create a high-signal Codebase Map (.agents/rules/project-context.md <= 80 lines) and bootstrap/sync root AGENTS.md and context/memory/MEMORY.md.

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run the analyzer script to extract directory layout, languages, package managers, config files, and entry points into …

    line 25
  2. Distinctive:

    When researching a target repository:

    line 38
  3. Very specific:

    Bootstrap/Sync Root AGENTS.md (<= 90 lines): If missing or stale, create/update root AGENTS.md with verified build/lint/test commands, …

    line 39
  4. Very specific:

    Claude Code: Run repo_analyzer.py via Bash, selectively read entry/config files, then refine project-context.md (<= 80 lines) and sync root …

    line 51

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Repository Research Skill

Overview

This skill maps a repository's stack, directory boundaries, executable commands, and architectural invariants into a concise, high-signal Codebase Map at .agents/rules/project-context.md (<= 80 lines), while bootstrapping or synchronizing target-project root AGENTS.md (<= 90 lines) and context/memory/MEMORY.md (<= 80-100 lines). It prioritizes deterministic script extraction over speculative file reading to conserve tokens.

When to Use

Trigger Scenarios

  • Onboarding onto an unfamiliar repository or refreshing .agents/rules/project-context.md.
  • Bootstrapping or syncing a target repository's root AGENTS.md and context/memory/MEMORY.md.
  • Verifying build, lint, and test commands alongside entry points and layer invariants.
  • Reconciling contradictions between stale documentation and actual source code.

When NOT to Use

  • Bulk-reading entire source trees without running repo_analyzer.py first.
  • Deep code smell or SOLID auditing: Route to code-smells-expert or code-critic.
  • Feature-level PRD, UI design, or MADR authoring: Route to discovery skills (docs/<feature-name>/).

Process

Phase 1: Automated Repository Extraction

Run the analyzer script to extract directory layout, languages, package managers, config files, and entry points into .agents/rules/project-context.md:

python3 ./skills/repo-research/scripts/repo_analyzer.py

Phase 2: High-Signal Codebase Map Refinement (<= 80 lines)

Inspect only high-signal config and entry files (pyproject.toml, package.json, Makefile, pubspec.yaml, main entry points) to replace [...] placeholders across the 4 core sections — keeping .agents/rules/project-context.md strictly <= 80 lines:

  1. Stack & Entry Points: Verified runtime versions, frameworks, data stores, and entry modules.
  2. Directory & Layer Map: Concise tree plus domain, interface/UI, and test directory ownership.
  3. Run, Build & Test Commands: Exact, verified install, dev, lint/typecheck, scoped test, and full test commands.
  4. Key Architectural & Env Invariants: Layer boundaries, required env vars (names only, zero secrets), and runtime constraints.

Phase 3: Target AGENTS.md & context/memory/MEMORY.md Bootstrap/Sync

When researching a target repository:

  1. Bootstrap/Sync Root AGENTS.md (<= 90 lines): If missing or stale, create/update root AGENTS.md with verified build/lint/test commands, core coding conventions, and explicit links to root DESIGN.md (if UI exists) and context/memory/MEMORY.md.
  2. Bootstrap/Sync context/memory/MEMORY.md (<= 80-100 lines): Ensure cross-AI handoff state, active branch, and links to architecture.md and conventions.md are initialized or synchronized without duplicating full codebase trees.
  3. Surface Contradictions: Report any mismatch as Documented vs. Actual vs. Action Taken.

Usage

Commands & Automation Scripts

# Generate or refresh .agents/rules/project-context.md from workspace configs
python3 ./skills/repo-research/scripts/repo_analyzer.py

Host Execution Instructions

  • Claude Code: Run repo_analyzer.py via Bash, selectively read entry/config files, then refine project-context.md (<= 80 lines) and sync root AGENTS.md + context/memory/MEMORY.md.
  • Antigravity: Execute repo_analyzer.py via run_command during State 0 orientation, then finalize the Codebase Map and root governance links.

Red Flags

  • Producing bloated 10-section codebase dumps (> 80 lines) or speculative prose.
  • Reading dozens of source files before running repo_analyzer.py.
  • Leaving unresolved [...] placeholders or unverified run/test commands.
  • Failing to bootstrap or synchronize root AGENTS.md (<= 90 lines) and context/memory/MEMORY.md in target projects.

Verification

  • Analyzer executed cleanly:
    python3 ./skills/repo-research/scripts/repo_analyzer.py
  • .agents/rules/project-context.md is <= 80 lines with all 4 sections populated and zero [...] placeholders.
  • Target-project root AGENTS.md (<= 90 lines) and context/memory/MEMORY.md (<= 80-100 lines) are present and synchronized.
  • All build, lint, and test commands match actual project manifests.

References

  • Project Context Template

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.