Claude Code is an agentic coding tool that can read code, edit files and run commands. Install and authenticate using Anthropic’s current official instructions for your platform.
1. Enter the repository with a clean baseline
Use version control, confirm the current tests/build status, then start Claude Code from the project directory.
2. Ask for a repository map
Before editing, ask Claude to identify architecture, entry points, relevant files, test commands and project-specific instructions such as CLAUDE.md.
3. Plan the smallest viable change
Describe one task and require a plan that names files, expected behavior and verification steps.
4. Execute with permission boundaries
Allow routine edits and tests, but keep secrets, destructive commands, production deploys and irreversible actions under explicit human approval.
5. Review and close the loop
Read the diff, run tests, reproduce the behavior manually when possible, and ask Claude to summarize risks or untested paths before you commit.
Inspect this repository first. Do not change files yet. Identify the architecture, relevant files, test commands, local instructions, and the minimal implementation plan for: [task]. Include a rollback plan. After approval, make the change and verify it.
Running the agent outside the intended repository; giving it broad destructive permissions; pasting secrets into prompts; accepting generated tests that only mirror the implementation; skipping manual diff review.
Finish check
A safe Claude Code session should end with a reviewable diff, passing relevant checks, no exposed secrets and a known rollback path.