Skip to content
repo-understanding logo

Skill: Repository Understanding

repo-understanding

Build a complete mental model of a repository's structure, commands, dependencies, and conventions. Invoke as @repo-understanding.

SKILL.md

Full skill instructions

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:

# 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):

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:

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

# 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.)

More skills from diegosouzapw

accessibility logo
diegosouzapw/awesome-omni-skill

accessibility

Accessibility guidelines for VS Code features — covers accessibility help dialogs, accessible views, verbosity settings, accessibility signals, ARIA alerts/status announcements, keyboard navigation, and ARIA labels/roles. Applies to both new interactive UI surfaces and updates to existing feature...

62 1
View
mermaid-diagrams logo
diegosouzapw/awesome-omni-skill

mermaid-diagrams

Mermaid diagram creation for flowcharts, sequences, ERDs, and more. Generate diagrams from text in markdown files. Use for documentation, architecture diagrams, and visual representations. Triggers on mermaid, flowchart, sequence diagram, ERD, entity relationship, gantt chart, pie chart, class di...

62 1
View
tauri2-react-rust logo
diegosouzapw/awesome-omni-skill

tauri2-react-rust

Guides development of cross-platform desktop apps with Tauri 2, TypeScript, React, and Rust. Use when building Tauri apps, implementing IPC, designing Rust backend or TypeScript/React frontend, when researching or cloning a website (open site, snapshot elements), when verifying local dev or built...

62 1
View
fp-ts-errors logo
diegosouzapw/awesome-omni-skill

fp-ts-errors

Handle errors as values using fp-ts Either and TaskEither for cleaner, more predictable TypeScript code. Use when implementing error handling patterns with fp-ts.

62 0
View
ring:pre-dev-research logo
diegosouzapw/awesome-omni-skill

ring:pre-dev-research

Gate 0 research phase for pre-dev workflow. Dispatches 3 parallel research agents to gather codebase patterns, external best practices, and framework documentation BEFORE creating PRD/TRD. Outputs research.md with file:line references.

62 0
View
create-assistant logo
diegosouzapw/awesome-omni-skill

create-assistant

Create and configure Vapi voice AI assistants with models, voices, transcribers, tools, hooks, and advanced settings. Use when building voice agents, phone bots, customer support assistants, or any conversational AI that handles phone or web calls.

62 0
View
codex-headless logo
diegosouzapw/awesome-omni-skill

codex-headless

Delegiere Aufgaben an OpenAI Codex CLI im Headless-Mode. Nutzt ChatGPT Subscription (KEIN API Key). Nur Workspace-Zugriff, KEIN System-Zugriff. Auto-Accept mit --full-auto. Web-Recherche mit --search.

62 0
View
social-media-scheduler logo
diegosouzapw/awesome-omni-skill

social-media-scheduler

Generate a full week of social media content for any topic. Outputs platform-optimized posts for Twitter/X, LinkedIn, and Instagram with hashtags and posting times.

62 0
View
Data Privacy Compliance logo
diegosouzapw/awesome-omni-skill

Data Privacy Compliance

Data privacy and regulatory compliance specialist for GDPR, CCPA, HIPAA, and international data protection laws. Use when implementing privacy controls, conducting data protection impact assessments, ensuring regulatory compliance, or managing data subject rights. Expert in consent management, da...

62 0
View
triple-review logo
diegosouzapw/awesome-omni-skill

triple-review

Reviews a task using the TRIPLE protocol, as the review agent.

62 0
View
Tech Stack & Architecture Decision logo
diegosouzapw/awesome-omni-skill

Tech Stack & Architecture Decision

Define and document the technology stack and architecture decisions for a project. Use when the user needs to choose a tech stack, make architecture decisions, define infrastructure choices, or document technology selections. Triggers on requests like "define the tech stack", "choose technologies...

62 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View