codebase-tour
Get a newcomer (a new engineer, or the agent itself) oriented in an unfamiliar repository before they make one specific change, with a short tour scoped to that change. It gives the install, run and test commands taken from CI, package scripts and the Makefile; the path the change touches, traced through the code with file:line citations; where the change goes; the conventions the code actually follows; the traps (generated files, a second copy of the logic, untested code, env vars, flags); and a first step that can be checked. Use when someone says "I'm new to this repo", "get me oriented", "where would I make this change", "walk me through the code for X", "onboard me before I start this ticket", or "how do I run and test this".
Other ways to install
With the sibling skills it hands off to:
The whole pack it belongs to:
By hand, from a clone of the repo:
In Claude Code, with the dev-team plugin installed, invoke it as:
Try it
A realistic prompt from the skill's acceptance evals:
I'm new to this repo (it's the current directory) and my first ticket is to add a `carrier` filter to GET /shipments, so dispatchers can see one carrier's shipments at a time. Get me oriented before I start: how to run it, where the change goes, and anything that will bite me.
What a good result looks like
Example output
Worked example: tallyhall, before adding a refund window · the skill's own worked example, source
A fictional FastAPI ticketing service. The README is two releases stale, one rule has a second copy, and one module is generated.
I've just joined and my first ticket is "refunds must be requested within 14 days of the event ending". I've never opened this repo. Get me oriented. The repo is the current directory.
The files that mattered, with the line numbers the tour cites:
README.md
5 ## Run it
7 make dev
12 Settings live in `settings.toml`.
Makefile
1 .PHONY: run test lint
3 run:
4 uvicorn tallyhall.main:app --reload
7 test:
8 pytest -q -m "not e2e"
10 lint:
11 ruff check tallyhall tests
.github/workflows/ci.yml
17 - run: pip install -e ".[dev]"
19 - run: make lint
21 - run: make test
23 env:
24 TALLYHALL_DB_URL: sqlite:///ci.db
pyproject.toml
14 [tool.pytest.ini_options]
15 markers = ["e2e: needs the payment sandbox"]
tallyhall/main.py
6 app = FastAPI()
7 app.include_router(refunds.router)
tallyhall/api/refunds.py
18 @router.post("/orders/{order_id}/refunds", status_code=201)
19 def create_refund(order_id: int, db=Depends(get_db)):
20 order = orders.get(db, order_id)
22 check_refundable(order, now=utcnow())
24 except RefundRejected as e:
25 raise HTTPException(422, {"code": e.code, "message": str(e)})
27 return refunds.create(db, order)
tallyhall/rules/refunds.py
4 class RefundRejected(Exception):
9 def check_refundable(order, now):
10 if order.status != "paid":
11 raise RefundRejected("not_paid", "only paid orders can be refunded")
12 if order.refunded_at is not None:
13 raise RefundRejected("already_refunded", "order already refunded")
tallyhall/admin/bulk_refund.py
27 if order.status == "paid" and order.refunded_at is None:
28 refunds.create(db, order)
tallyhall/models_gen.py
1 # generated by datamodel-codegen:
2 # filename: schemas/order.json
tallyhall/settings.py
6 DB_URL = os.environ["TALLYHALL_DB_URL"]
tests/rules/test_refunds.py (test_rejects_unpaid, test_rejects_already_refunded)
tests/api/test_refunds_e2e.py (marked e2e)
The fact lister also reported: make dev named at README.md:7 with no dev target in the Makefile, and settings.toml named at README.md:12 and not present. No test file imports tallyhall/admin/bulk_refund.py. The Order model (tallyhall/models_gen.py) has an event_ends_at field.
Output
What matters for this change
- The rule goes in
check_refundable(tallyhall/rules/refunds.py:9). Every other refund rule lives there, and the API calls it attallyhall/api/refunds.py:22. - There is a second copy of the refund rules in the support bulk-refund tool (
tallyhall/admin/bulk_refund.py:27). It doesn't callcheck_refundable, so it won't pick up the window unless someone changes it. Whether it should is the first question for a maintainer. - Ignore the README's
make devandsettings.toml. Neither exists. Run withmake run(Makefile:3); settings come from env vars (tallyhall/settings.py:6). tallyhall/models_gen.pyis generated fromschemas/order.json. Don't edit it. The field the window needs,event_ends_at, is already there.make testskips the e2e tests (Makefile:8, marker atpyproject.toml:15). The rule tests intests/rules/do run.
Tour: tallyhall, for "refunds within 14 days of the event ending"
Read on 2026-10-20. Scope: POST /orders/{order_id}/refunds from the app bootstrap to refunds.create. Skipped on purpose: ticket purchase, the payment-provider client, deployment config.
[assumption] "Within 14 days of the event ending" means now - order.event_ends_at <= 14 days, with the boundary day allowed.
Run it
| To | Command | Source | Status |
|---|---|---|---|
| Install | pip install -e ".[dev]" | .github/workflows/ci.yml:17 | read, not run |
| Test (whole suite) | make test → pytest -q -m "not e2e" | .github/workflows/ci.yml:21, Makefile:8 | ran: passed (14 passed, 3 deselected) |
| Test (this area) | pytest -q -m "not e2e" tests/rules/test_refunds.py | derived from Makefile:8 | ran: passed (2 passed) |
| Lint | make lint → ruff check tallyhall tests | .github/workflows/ci.yml:19, Makefile:11 | ran: passed |
| Run locally | make run | Makefile:3 | read, not run (needs TALLYHALL_DB_URL) |
Needs: TALLYHALL_DB_URL, read at tallyhall/settings.py:6 with no default; CI sets sqlite:///ci.db at .github/workflows/ci.yml:24.
The path this change touches
tallyhall/main.py:7: the refunds router is mounted on the app.tallyhall/api/refunds.py:19create_refund: loads the order (line 20).tallyhall/api/refunds.py:22: callscheck_refundable(order, now=utcnow()).tallyhall/rules/refunds.py:9check_refundable: raisesRefundRejectedfor an unpaid order (line 10) or one already refunded (line 12).tallyhall/api/refunds.py:25:RefundRejectedbecomes a 422 with{code, message}.tallyhall/api/refunds.py:27:refunds.createwrites the refund. This is the far edge.
Where the change goes
tallyhall/rules/refunds.pycheck_refundable: add the window check after line 13, raisingRefundRejected("refund_window_closed", …). This follows the two rules already there.- Must change with it: nothing generated.
event_ends_atalready exists intallyhall/models_gen.py. Whethertallyhall/admin/bulk_refund.py:27changes too is open (question 1).
Conventions the code follows
- Errors: a rule raises
RefundRejected(code, message)with a snake_case code (tallyhall/rules/refunds.py:11); the route maps it to 422 (tallyhall/api/refunds.py:25). - Time: the route passes
nowin, so rules are tested without a clock (tallyhall/api/refunds.py:22). - Tests: one
test_rejects_<reason>per rule, undertests/rules/(tests/rules/test_refunds.py). - Config: env vars read in
tallyhall/settings.py; a missing var fails at import (tallyhall/settings.py:6).
Traps
- Generated:
tallyhall/models_gen.pyfromschemas/order.json(tallyhall/models_gen.py:1-2). No regenerate command is defined in the Makefile, pyproject or CI; see question 2. CI drift check: none found. - Second copy:
tallyhall/admin/bulk_refund.py:27repeats the paid and not-refunded checks inline. - Untested on the path: none on the API path. Off the path,
tallyhall/admin/bulk_refund.pyhas no test. - Tests the default command skips:
e2e(Makefile:8,pyproject.toml:15):tests/api/test_refunds_e2e.py, which needs the payment sandbox. - Env vars and flags on the path:
TALLYHALL_DB_URLonly. No feature flags found. - Vendored: none.
Where the README is wrong
- README says
make dev(README.md:7); the Makefile hasrun,testandlintonly (Makefile:1). Usemake run. - README says settings live in
settings.toml(README.md:12); there is no such file, and settings are env vars (tallyhall/settings.py:6).
Tests for this area
- Covered by:
tests/rules/test_refunds.py(unpaid and already-refunded rejections). - Run just these:
pytest -q -m "not e2e" tests/rules/test_refunds.py(derived fromMakefile:8). - Not covered: the 422 mapping is exercised only by the e2e test, which
make testskips.
First step
Add test_rejects_refund_after_window to tests/rules/test_refunds.py, with an order whose event_ends_at is 15 days before now. Run pytest -q -m "not e2e" tests/rules/test_refunds.py. It fails until check_refundable checks the window. Add a 14-day case that passes, to pin the boundary.
Open questions for a maintainer
- Should the bulk-refund tool (
tallyhall/admin/bulk_refund.py:27) apply the window, or is it the support override that skips it? - How is
tallyhall/models_gen.pyregenerated? Nothing in the repo defines the command. - Is the window measured from
event_ends_atin UTC?utcnow()is used attallyhall/api/refunds.py:22, but the schema doesn't say what timezone the event times are in.
Why this passes the bar: every command has a source and a status, both README claims are contradicted with citations, the second copy is named and left as a question rather than silently changed or ignored, the generated file is called out before anyone edits it, and the first step names a file, a command and the failure that proves it.
How it's checked
Measured against plain Claude Code (2026-10-23): it met 85% of its checks, against 45% without it, and a blind judge preferred it. How skills are checked
40 assertions across 5 acceptance evals, and 10 trigger queries. Every skill's checks
What the output must do
When it should and shouldn't activate
Should activate:
- I'm new to this repo and need to add rate limiting to the login endpoint. Get me oriented.
- Before I start this ticket, walk me through the code that handles invoice exports
- Where would I make this change? I've never seen this codebase
- How do I run and test this project, and where does the payment retry logic live?
- Onboard me to this repo so I can fix the timezone bug in the scheduler
Should leave to another skill:
- Reverse-engineer the architecture of this whole system and draw the as-is diagram
- Write an AGENTS.md for this repo so agents stop running the wrong commands
- Implement the carrier filter on GET /shipments with tests, here are the acceptance criteria
- Review my diff before I merge it
- Make an interactive diagram of how a request flows through our services
Hands off to
- feature-implement-loop — when the tour names where the change goes and a first step. Implement the change against acceptance criteria, starting from the tour's first step and running the area's test command it found.
Related skills
agents-md-generator, architecture-diagrams, interactive-diagram, pre-merge-review, reverse-architecture
Source
SKILL.md · the whole folder on GitHub.