AGENT SKILL

navigable-codebases

Use when writing or updating a README, AGENTS.md, CLAUDE.md, GEMINI.md, ARCHITECTURE.md, or onboarding docs; when setting up a new repository; when adding or naming task-runner commands (mise tasks, Makefile, justfile, npm scripts); or when getting-started steps are missing, stale, or slow for newcomers.

License 许可
MIT
所属仓库
rahulmutt/devkit
最近更新
2026-10-19
Stars
★ 0
Forks
0

01 前言 Front Matter

name
navigable-codebases
description
Use when writing or updating a README, AGENTS.md, CLAUDE.md, GEMINI.md, ARCHITECTURE.md, or onboarding docs; when setting up a new repository; when adding or naming task-runner commands (mise tasks, Makefile, justfile, npm scripts); or when getting-started steps are missing, stale, or slow for newcomers.

02 资源文件 2

03 SKILL.md 正文

Navigable Codebases

A repo is navigable when the next contributor — a human, or an agent with a bounded context window — can answer four questions without reading the whole tree:

  1. Where do I start?
  2. How do I run things?
  3. Where does code live?
  4. Does first-run actually work?

While authoring, shape that discoverability surface and keep it single-sourced so it can't drift. Legibility and locality serve humans and agents at once. This is an authoring discipline — leave the repo navigable — not a recipe for reading someone else's.

Principles — each with its counter-pull

Each principle names the failure it prevents and the over-application it guards against, so neither humans nor agents apply it mechanically.

One obvious front door

A README quickstart and the agent-instruction files (AGENTS.md, CLAUDE.md, GEMINI.md, …) are the single, predictable entry point for both audiences; maintain them as the repo evolves. Counter-pull: don't scatter onboarding across a wiki of docs, and don't write fifty lines of onboarding for a three-file repo — depth matches repo size. Agent-instruction files carry only what is non-obvious and non-derivable from the code, and point to tasks rather than restating them. See references/agent-instruction-files.md.

Workflows as named tasks

Every workflow a contributor repeats — test, build, lint, run, regenerate — is one named command, defined once in the runner that developer-environment installs. This skill exposes and names the workflows; it never installs the runner. Counter-pull: don't wrap a trivial one-liner in indirection or mint a task for something run twice a year. Name what people actually repeat.

A codebase map that earns its keep

A map (ARCHITECTURE.md, or a section of the README for a small repo) tells a newcomer where things live and why the boundaries fall where they do — pairing with writing-clean-code's module boundaries. Counter-pull: a map that restates the directory tree is noise. Map the non-obvious — boundaries, data flow, "why this is split" — and keep it short enough to stay true. See references/codebase-map.md.

Onboarding you can actually run

Clone-to-running is a short, explicit sequence you verify by running it, so first-run can't silently rot. Counter-pull: don't re-specify environment steps the task runner or developer-environment already guarantee — verify, don't duplicate.

The throughline: single source of truth

What makes every principle survive a changing repo: the discoverability surface references executable tasks and the code itself; it never duplicates what will drift. The README points to task names instead of re-spelling commands; the map describes boundaries instead of mirroring the file tree. When you catch yourself copying a command or a file list into prose, stop — link to the source. This is what separates this skill from "just write docs."

Boundaries with sibling skills

  • Tool / runner installation → developer-environment.
  • Module boundaries and code structure → writing-clean-code (this skill documents and maps them; it doesn't decide where they fall).

navigable-codebases is the navigation and discoverability layer over those.

References

04 同仓库更多 Skills

rahulmutt
rahulmutt/devkit

writing-clean-code

Use when refactoring or restructuring code, splitting a file or module that has grown too large, deciding whether to extract a helper or inline it, naming things, removing dead or unused code, drawing module or package boundaries, handling errors, writing comments, applying DDD or hexagonal (ports and adapters) architecture, or checking a language's idiomatic style.

★ 0
rahulmutt
rahulmutt/devkit

using-devkit

Use when starting any conversation or new engineering task in a repo with devkit installed — establishes that devkit skills exist and must be checked before acting.

★ 0
rahulmutt
rahulmutt/devkit

testing-practices

Use when writing, adding, or reviewing tests; choosing between unit, integration, snapshot/golden, property, fuzz, mutation, e2e/UI, or formal methods; when a test is flaky or the suite or CI is slow; or when deciding what runs in pre-commit, PR CI, or nightly.

★ 0
rahulmutt
rahulmutt/devkit

security-practices

Use when code touches a trust boundary — HTTP endpoints, webhooks, file uploads, auth, sessions, permissions, SQL or shell built from input, deserialization, service-to-service calls — when handling secrets, API keys, or .env files, on a CVE or vulnerability alert, when writing a threat model, or when choosing secret, SCA, SAST, or container scanners.

★ 0
rahulmutt
rahulmutt/devkit

developer-environment

Use when installing or upgrading any tool, runtime, CLI, or library — brew, apt, npm i -g, pip install, cargo install, nvm, pyenv, asdf — editing mise.toml or .tool-versions, bumping or pinning versions, adding a dependency, hitting "command not found", setting up a dev or CI toolchain, reviewing Renovate or Dependabot version bumps, or considering Bazel.

★ 0
rahulmutt
rahulmutt/devkit

commits-and-releases

Use when writing commit messages or splitting work into commits; when cutting, versioning, or tagging a release; when editing a CHANGELOG or bumping a version number; when setting up or fixing release-please, semantic-release, or changesets; or when a release has the wrong version or is missing changelog entries.

★ 0