agentleFS
nrjdalalnrjdalal/zerostarter/.agents/skills/codebase-map/SKILL.md

codebase-map

Skill65 starsChanged 12 days agoMITView on GitHub

Orient in this repo: which file to edit for a change, how a change ripples across the stack, and how to search the code. Use at the start of a task in an unfamiliar area, or before a cross-cutting change.

  • Reads credentials

9 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

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

    Read AGENTS.md first for the rules.

    line 24

“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “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

Codebase Map

One Bun + Turborepo monorepo: two deployable apps over shared packages. Imports use @api/hono, @packages/*, and the @/ alias, never deep relative paths.

.generated/       # repo-root home for build-time generated assets (gitignored)
api/hono/         # backend (Hono): routers, middlewares, the AppType export
web/next/         # frontend (Next.js App Router): app/, components/, lib/, content/
packages/auth/    # Better Auth instance
packages/db/      # Drizzle schema + client
packages/env/     # type-safe env, one validated entry per consumer
packages/config/  # TS base, tsdown factory, and site.ts (brand identity)
packages/scripts/ # every build, CI and repo script, in bun TypeScript (codegen, sync-config, deps-manager, skills-manager, clean); never bundled
packages/cli/     # the zerostarter scaffolding CLI (canonical repo only; init strips it)
tests/            # the whole suite, mirroring each subject's path; *.e2e.test.ts drive a running stack (canonical repo only; forks take no tests)

Read AGENTS.md first for the rules; curl "$(bunx portless get zerostarter)/llms-full.txt" dumps the whole codebase as one context file.

Where to edit for X

GoalEdit hereThen
Add/change an API routeapi/hono/src/routers/<name>.ts → export from routers/index.ts → mount in src/index.ts .route() chainapi-endpoint skill
Change the database schemapackages/db/src/schema/<name>.ts → export from schema/index.ts; auth.ts is generated, see the row belowdb-migration skill
Add/change a pageweb/next/src/app/, route groups: (marketing) public, (protected) dashboard, (console) member and above, (content) docs+blog, (llms.txt) the plain-text mirrors-
Add/customize a UI componentweb/next/src/components/: ui/ is generated shadcn, don't hand-editdesign, shadcn-sync skills
Call the API from the web appweb/next/src/lib/api/client.ts (apiClient, unwrap)-
Rebrand (name, description, socials)packages/config/src/site.ts, one file-
Add or read an env varpackages/env/src/{api-hono,auth,db,web-next}.ts; read via @packages/env/*, never process.env. The root .env is loaded by src/load-dotenv.ts, which the server targets import and neither web-next nor the package index does; a new server target imports @/load-dotenv first. The exception is a variable the hosting platform injects rather than you configuring (PORT, VERCEL, VERCEL_ENV, VERCEL_GIT_COMMIT_*): those are read from process.env at the point of use and belong in neither the schema nor .env.example-
Configure auth (providers, cookies, hooks)packages/auth/src/index.ts-
Add or change an auth plugin, or a column on user/sessionpackages/auth/src/schema.ts (additionalFields for a column) → bun run auth:schema regenerates packages/db/src/schema/auth.tsdb-migration skill
Add a data tablecolocate data-columns.tsx + data-table.tsx in the page's components/ folder, composing web/next/src/components/data-table.tsx (reference: (console)/console/(access)/users/)design skill
Add a testtests/<path of the file under test>.test.ts; run the suite with bun run test. An end-to-end test is tests/<path of the router or page it drives>.e2e.test.ts on the tests/stack.ts helper, run against a stack with bun run test:e2edocker-test skill
Add a build or tooling scriptpackages/scripts/src/<name>.ts, with its deps on that package-
Change a tsconfig.json, or a package's type-check devDependencies or check-typespackages/scripts/src/sync-config/template.json for all, or the target's own patch beside it (web-next.json) → bun run sync:config; never the generated fileadd-package skill
Gate by rolethe ladder and every access decision live in packages/auth/src/access.ts (pure, unit-tested, imported as @packages/auth/access); web/next/src/lib/auth/console.ts gates the pages at member, api/hono/src/middlewares/console.ts requires admin for the whole console router via requireConsoleRole-
Change the error/response shapeapi/hono/src/lib/error.ts (the { error: { code, message } } handler)-
Change docs structure/sidebarweb/next/docs.config.ts, single source; meta.json is generated-

Trace a feature across the stack

Types flow downhill, so a change ripples predictably:

packages/db/src/schema  →  api/hono/src/routers  →  api/hono/src/index.ts (AppType)  →  web/next/src/lib/api/client.ts  →  app / components

To add a field end to end: edit and migrate the schema, then select and return it in the router. Every apiClient call site is retyped automatically, and the compiler becomes your worklist of what still must change.

Entry points (read these first)

  • api/hono/src/index.ts, the .route() chain and export type AppType, the whole API shape in one file.
  • web/next/src/app/layout.tsx, the web root.
  • packages/config/src/site.ts, brand identity and injectable content.

Fast find

rg -n "\.route\(" api/hono/src/index.ts               # every mounted router
rg -n "export const \w+Router" api/hono/src/routers   # every router definition
ls packages/db/src/schema                             # every schema file (tables)
rg -n "apiClient\." web/next/src                      # every API call site
rg -n "SOME_ENV_VAR" packages/env                     # where an env var is declared
ls .agents/skills                                     # every task skill available

Then

Load the task skill (the table's right column); dev runs and restarts the stack, and concept docs live under /docs.

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.