Review is your job
Claude Code can help you ship faster, but you still own the HackIndia repo you submit.
Before submission, prove three things: project context exists, safe settings exist, and code changes were reviewed before commit or pull request.
Start with git
Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.
0 of 4 done
git status
git branch --show-current
git diff --stat
git diffSafe project context
This example is a college fest UPI expense splitter. The context tells Claude how to check the project and how money should be handled.
The shared settings deny environment file reads. Permission rules are deny-first, so another allow rule cannot override this deny.
File: CLAUDE.md
Project: FestSplit
Commands:
- npm test
- npm run lint
- npm run build
Conventions:
- Use TypeScript for all app logic.
- Keep money amounts in paise internally.
- Display rupees only at the UI boundary.
- Do not read or modify .env files.
Architecture:
- src/lib contains pure calculation helpers.
- src/components contains React UI components.
- Tests live next to the file as *.test.ts.
File: .claude/settings.json
{
"permissions": {
"deny": [
"Read(./.env)",
"Read(./.env.*)"
]
}
}Review the change
The old code used rupees and floating point numbers. The new code keeps paise internally and handles remainders.
Test names should explain the behaviour. This helps your teammate trust the repo during the last hackathon hour.
Before: src/lib/split.ts
export function splitAmount(totalRupees: number, people: number): number[] {
const share = totalRupees / people;
return Array.from({ length: people }, () => share);
}
After: src/lib/split.ts
export function splitAmountPaise(totalPaise: number, people: number): number[] {
if (!Number.isInteger(totalPaise) || totalPaise < 0) {
throw new Error("totalPaise must be a non-negative integer");
}
if (!Number.isInteger(people) || people <= 0) {
throw new Error("people must be a positive integer");
}
const baseShare = Math.floor(totalPaise / people);
const remainder = totalPaise % people;
return Array.from({ length: people }, (_, index) => {
return index < remainder ? baseShare + 1 : baseShare;
});
}
After: src/lib/split.test.ts
import { describe, expect, it } from "vitest";
import { splitAmountPaise } from "./split";
describe("splitAmountPaise", () => {
it("splits an amount evenly", () => {
expect(splitAmountPaise(9000, 3)).toEqual([3000, 3000, 3000]);
});
it("distributes remaining paise without losing money", () => {
expect(splitAmountPaise(10000, 3)).toEqual([3334, 3333, 3333]);
});
it("rejects invalid people count", () => {
expect(() => splitAmountPaise(10000, 0)).toThrow("people");
});
});
Commands:
git diff -- src/lib/split.ts src/lib/split.test.tsRun checks
Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.
0 of 4 done
npm test
npm run lint
npm run build
Focused prompt to Claude Code:
The command npm test fails after the splitAmountPaise change.
Only inspect src/lib/split.ts and src/lib/split.test.ts.
Keep money in paise internally.
Explain the cause first, then propose the smallest fix.Ask for review
After your own pass, run local diff review. The Code Review docs point to the /code-review command for this.
Use Manual/default for review. It asks before edits or commands and shows diffs for approval. Bypass permissions is only for sandboxed containers or VMs.
Inside Claude Code:
/code-review
Follow-up prompt:
Review the current uncommitted diff for:
1. logic errors
2. edge cases in money splitting
3. mismatch with CLAUDE.md conventions
4. accidental secret or environment file exposure
5. changes that are not needed for this feature
Do not edit files yet. Give findings with file names and line-level suggestions where possible.Do not commit junk
Avoid git add . unless you have checked git status carefully. Do not commit .env, .env.local, API keys, database dumps, generated build folders, or personal notes.
Claude’s review is not approval. Read the diff again before accepting changes or committing.
Safer staging:
git add CLAUDE.md .claude/settings.json src/lib/split.ts src/lib/split.test.ts
git status
git diff --staged
git commit -m "Add paise-based expense splitting"Do this now
Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.
0 of 5 done