repo-understanding
Build a complete mental model of a repository's structure, commands, dependencies, and conventions. Invoke as @repo-understanding.
Best use case
repo-understanding is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Build a complete mental model of a repository's structure, commands, dependencies, and conventions. Invoke as @repo-understanding.
Teams using repo-understanding should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/repo-understanding/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How repo-understanding Compares
| Feature / Agent | repo-understanding | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Build a complete mental model of a repository's structure, commands, dependencies, and conventions. Invoke as @repo-understanding.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Skill: Repository Understanding ## Purpose Before making changes, understand how the repo is organized, what commands it provides, how tests run, and what conventions the team follows. ## When to Use This Skill - Starting work on a new repository - Onboarding to a project - Planning a large refactoring or feature - Before making cross-cutting changes ## Steps ### 1) Understand the directory structure Read the repo root and understand: - `/crates`, `/src`, `/packages`: source code directories - `/tests`, `/test`: test files - `/docs`: documentation - `/scripts`: build/CI scripts - `/infra`, `/deploy`: infrastructure/deployment configs - `/assets`, `/static`: non-code files Example output: ``` markenz/ crates/ # Rust libraries (physics, world, rng) apps/ # Rust applications (engine) tests/ # Integration tests docs/ # Documentation observability/ # Logging schemas and conventions runbooks/ # Incident response playbooks scripts/ci/ # CI helper scripts ``` ### 2) Read the AGENTS.md file This is the authoritative source for: - Canonical commands (lint, test, format, typecheck, build) - Directory-scoped rules and conventions - How to run the project locally - How to contribute Example: ```markdown # Canonical Commands - cargo build # Build all crates - cargo test --all # Run all tests - cargo clippy --all # Linter ``` ### 3) Identify main entrypoints For applications: - Which files are the main entry points? (main.rs, index.js, server.py) - How does the app start? (CLI args, env vars, configs) - What are the key services or modules? For libraries: - What is the public API? (exported functions, types, classes) - What are the main invariants and constraints? ### 4) Understand the dependency graph - What external dependencies does the project use? - Which modules depend on which? - Are there circular dependencies or tight coupling? Example (Rust): ```bash cargo tree ``` ### 5) Review the test structure - Where are tests located? (same file, separate directory, docs) - How do you run tests? (`npm test`, `pytest`, `cargo test`) - Are there separate test suites? (unit, integration, e2e) - What's the coverage target? ### 6) Understand the build/CI process - How does the code get built? (npm, cargo, Python setuptools) - What CI system is used? (.github/workflows, GitLab CI, etc.) - What are the quality gates? (linters, type checkers, tests) - How are artifacts packaged and released? Example: ```bash cat .github/workflows/ci.yml | grep "run:" | head -10 ``` ### 7) Identify the tech stack - Language(s): JavaScript, Rust, Python, etc. - Frameworks: React, Express, Django, Actix, etc. - Databases: PostgreSQL, MongoDB, Redis, etc. - Testing: Jest, pytest, cargo test, etc. - CI: GitHub Actions, GitLab CI, Jenkins, etc. ### 8) Review the GLOBAL_RULES or standards Read the governance files: - AGENTS.md (repo-level rules) - GLOBAL_RULES.md (shared across team) - .windsurf/ (Windsurf-specific conventions) Understand: - Code style guidelines - Security requirements (secrets, validation, redaction) - Observability requirements (logging, metrics, tracing) - Test coverage targets - Documentation standards ### 9) Capture key mental models Document these in your head: - Data flow: How does data enter, flow through, and exit the system? - Error paths: How are failures handled and logged? - Concurrency model: Is it single-threaded, multi-threaded, async? - Deployment: How does code get to production? ### 10) Ask clarifying questions If anything is unclear: - Check the README and docs - Look for comments in key files - Check the git log for recent changes - Ask the team or open issues ## Quality Checklist - [ ] Directory structure understood - [ ] AGENTS.md read and key commands identified - [ ] Main entrypoints identified - [ ] Dependency graph understood - [ ] Test structure known - [ ] Build/CI process clear - [ ] Tech stack documented - [ ] Governance rules reviewed - [ ] Data flow understood - [ ] Can run tests locally ## Verification Commands ```bash # Understand structure ls -la cat AGENTS.md cat README.md # Identify commands grep -r "\"scripts\":" package.json | head -20 cat Justfile | grep "^[a-z]" grep "^##" AGENTS.md | head -20 # Run a basic test npm test cargo test --lib python -m pytest # Check dependencies cargo tree | head -50 npm list | head -50 # Understand CI cat .github/workflows/ci.yml | head -30 ``` ## KAIZA-AUDIT Compliance When using this skill as part of another task, your KAIZA-AUDIT block should include: - **Scope**: Modules/areas touched - **Key Decisions**: Explain how your changes respect the repo's conventions and tech stack - **Verification**: Confirm commands from AGENTS.md pass (lint, tests, etc.)
Related Skills
SharePoint Automation
SharePoint Automation: manage sites, lists, documents, folders, pages, and search content across SharePoint and OneDrive
repository-analyzer
Comprehensive repository analysis using Explore agents, web search, and Context7 to investigate codebase structure, technology stack, configuration, documentation quality, and provide actionable insights. Use this skill when asked to analyze, audit, investigate, or report on a repository or codebase. | Exploreエージェント、Web検索、Context7を用いた包括的なリポジトリ分析。コードベース構造、技術スタック、設定、ドキュメント品質を調査し、実用的な洞察を提供。リポジトリやコードベースの分析、監査、調査、レポート作成を依頼された場合に使用。
reporter
Communication specialist - generates Worker instructions and formats user feedback
Report Development
Create QWeb PDF reports and report actions in Odoo.
repo-research-analyst
Conducts thorough research on repository structure, documentation, conventions, and implementation patterns. Use when onboarding to a new codebase or understanding project conventions.
readiness-report
Evaluate how well a codebase supports autonomous AI development. Analyzes repositories across nine technical pillars (Style & Validation, Build System, Testing, Documentation, Dev Environment, Debugging & Observability, Security, Task Discovery, Product & Analytics) and five maturity levels. Use when users request `/readiness-report` or want to assess agent readiness, codebase maturity, or identify gaps preventing effective AI-assisted development.
perseus:report
Use when generating the final executive security report (Phase 4)
monorepo-architect
Expert in monorepo architecture, build systems, and dependency management at scale. Masters Nx, Turborepo, Bazel, and Lerna for efficient multi-project development. Use PROACTIVELY for monorepo setup,
mcp-repo-scan
Comprehensive RE-Engine repository health audit, issue resolution, and architectural enhancement through systematic codebase analysis
incident-report-debugging
Create comprehensive incident reports with knowledge graphs. Use when debugging production issues where you need to trace root cause through multiple code entities. Documents debug process, entity relationships, reasoning→pattern→codebase chain, and prevention strategies.
generate-status-report
Comprehensive system status report with services, infrastructure, performance metrics, and recommendations
existing-repo
Analyze existing repositories, maintain structure, setup guardrails and best practices