repo-research
Skill28 starsChanged 3 months agoApache-2.0View on GitHub
Analyze a repository's structure, technologies, and patterns to create or update a project context document. Use when asked to research, analyze, or understand a codebase.
In this repository34 other files it gives its agents.
- bigquery-query-optimizationSkill
- build-and-ci-gatesSkill
- cdc-scd-patternsSkill
- code-implementerSkill
- code-smells-expertSkill
- commit-expertSkill
- compliance-verifierSkill
- context-captureSkill
- context-restoreSkill
- database-migration-expertSkill
- design-spec-expertSkill
- documentation-expertSkill
- flutter-architecture-decisionsSkill
- flutter-performance-profilingSkill
- flutter-release-engineeringSkill
- flutter-review-checklistSkill
- flutter-senior-orchestrationSkill
- flutter-test-strategySkill
- flutter-upgrade-migrationSkill
- gcp-data-engineeringSkill
- guidelines-karpathySkill
- loop-engineeringSkill
- performance-scalabilitySkill
- product-analystSkill
- pull-request-expertSkill
- python-expertSkill
- qa-testerSkill
- refactoring-code-expertSkill
- security-auditSkill
- senior-architect-engineeringSkill
- senior-dev-orchestratorSkill
- sql-query-optimizationSkill
- test-driven-developmentSkill
- testing-expertSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 3 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Speculative bulk reading of entire codebases: Run Phase 1 automated extraction first.
- Very specific: line 30
Verify that .agents/rules/project-context.md was generated or refreshed.
- Very specific: line 34
Identify Entry Points: Read top-level imports in entry files (e.g.
- Very specific: line 35
Scan Route Definitions: Read routing files (e.g. routes.py, app.js, controller directories) to map the *API Surface / Route Map*.
- Very specific: line 36
Analyze Database / Models: Read schema files or models/ directories to compile the *Data Model Overview*.
- Distinctive: line 38
Resolve Glossary: Add definitions for domain-specific terminology encountered during review.
- Distinctive: line 41
If source code contradicts existing documentation:
- Very specific: line 60
Claude Code: Run repo_analyzer.py via bash, then selectively view only the high-value entry files.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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.
Files
Repository Research Skill
Overview
This skill analyzes repository structures, technologies, architectures, and runtime dependencies to produce or update a centralized project context document at .agents/rules/project-context.md. It acts as a Repository Intelligence Specialist and Systems Cartographer, minimizing LLM token consumption by prioritizing automated AST and configuration extraction over speculative file reading.
When to Use
Trigger Scenarios
- Initial onboarding or orientation when starting work on a new repository.
- Generating or updating
.agents/rules/project-context.mdwith current codebase facts. - Mapping entry points, route handlers, data models, and local development runbooks.
- Resolving inconsistencies between legacy documentation and actual source code.
When NOT to Use
- Speculative bulk reading of entire codebases: Run Phase 1 automated extraction first.
- Deep code smell diagnosis: Route to
code-smells-expert. - Software design specification for new features: Route to
design-spec-expert. - Automated test suite execution: Route to
test-driven-development.
Process
Phase 1: Automated Repository Analysis
Execute the repository analyzer to map directory trees, detect language frameworks, package configurations, and bootstrap the context document:
python3 ./skills/repo-research/scripts/repo_analyzer.pyVerify that .agents/rules/project-context.md was generated or refreshed.
Phase 2: Targeted Manual Refinement
Using the generated project structure and config summary in project-context.md, read only the necessary files to fill in placeholders [...] or resolve unknown details:
- Identify Entry Points: Read top-level imports in entry files (e.g.
main.py,index.ts,app.dart) to resolve Architectural Patterns and Runtime Dependency Graph. - Scan Route Definitions: Read routing files (e.g.
routes.py,app.js, controller directories) to map the API Surface / Route Map. - Analyze Database / Models: Read schema files or
models/directories to compile the Data Model Overview. - Compile Runbook: Confirm actual local run commands in configs (
package.json,Makefile,pubspec.yaml) to populate the Local Dev Runbook. - Resolve Glossary: Add definitions for domain-specific terminology encountered during review.
Phase 3: Inconsistency Resolution & Reporting
If source code contradicts existing documentation:
- Report the contradiction clearly:
- Documented: What the legacy docs state.
- Actual: What the source code actually implements.
- Recommendation: How to reconcile the difference.
Usage
Commands & Automation Scripts
# Analyze workspace and scaffold/update project-context.md
python3 ./skills/repo-research/scripts/repo_analyzer.pyExample Prompts
- "Analyze this repository and generate an up-to-date project context document in .agents/rules/."
- "Map the API route surface and database models for this service."
- "Identify what frameworks, build tools, and entry points are used across this codebase."
Host Execution Instructions
- Claude Code: Run
repo_analyzer.pyvia bash, then selectively view only the high-value entry files. - Antigravity: Execute
repo_analyzer.pyas an orientation step before initiating feature development.
Red Flags
- Bulk-reading dozens of source files speculatively without using automated tooling (wasting context tokens).
- Silently overwriting manually curated project context without merging additions.
- Leaving unverified
[...]placeholders inproject-context.md. - Failing to verify commands listed in the Local Dev Runbook.
Verification
- Automated analyzer executed and generated valid output:
python3 ./skills/repo-research/scripts/repo_analyzer.py .agents/rules/project-context.mdexists and contains verified technology stack and entry points.- No speculative full-repository file dumps performed.
- Inconsistencies between documentation and code highlighted and resolved.
References
For the standardized project context schema and layout:
- Project Context Template
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
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.

