Skip to main content
All AI tricks
Guided workflowDevelopmentIntermediate

Claude in VS Code: Plan, Diff, Test

Use Claude Code in VS Code with focused file references, plan review and a small diff. Practise one integer-cent calculation fix with explicit acceptance checks.

15 min practiceClaudeUpdated · Last checked Oct 9, 2026
Jump to the lesson ↓
Claude Code Workflow: Plan → Diff → Test.
Original Genius Forges workflow diagram. Conceptual illustration, not a provider screenshot or product test.

The useful result

Review and validate one bounded code change in the Claude Code VS Code extension.

  • Review and validate one bounded code change in the Claude Code VS Code extension.
  • Inspect the supplied example and identify a result that fails the task.

Claude Code’s official VS Code extension supports file references, plan review and inline diffs. The trick is to make a task small enough that you can inspect both the proposed change and the evidence that it works. This lesson uses a fictional one-function bug and avoids deployment, commits and broad permissions.

Reviewed on 9 October 2026 against the linked official sources. These instructions teach a bounded practice task; account features and limits can differ. Expected outputs are illustrative rather than captured AI runs. Keep original inputs and verify the result before using it.

Before you start

  • VS Code and the official Claude Code extension meeting current prerequisites
  • An eligible Claude account or supported provider configuration
  • A clean practice repository with no secrets

Review evidence

Documentation-based review · 2026-10-09

Official capabilities checked; exercise prompts and expected outputs are original illustrative teaching material.

1

Use a disposable, clean practice file

Create a small practice file in a separate directory or clean branch. Write a function that currently adds cents and quantity instead of multiplying. Decide the behaviour before asking the assistant, including what happens to negative quantities.

Example / expected result

Illustrative example (not a recorded model result): function total(cents, quantity) { return cents + quantity; } Acceptance: total(199, 3) = 597; total(199, 0) = 0; negative quantity throws.

Check your result

Confirm the repository has no uncommitted work you cannot safely inspect and that the function reproduces the wrong result.

2

Reference the file and request a plan

Open the official extension, sign in and reference the practice file using its supported file mention or selected text. Choose Plan mode where available; the current documentation describes /plan, but feature availability depends on extension version.

Try this prompt
Inspect the referenced total function only. Plan a minimal change for the three acceptance cases. Preserve integer-cent arithmetic. Explain the failure and intended validation. Do not edit yet, change dependencies, commit or deploy.

Example / expected result

Illustrative example (not a recorded model result): A plan to multiply and guard negative quantity; no repository-wide refactor.

Check your result

Read the plan. Reject any unrelated files, new dependency, float conversion or unapproved deployment step.

3

Review the proposed diff

After the plan is suitable, allow the bounded edit with the permission mode you intend. Current documentation describes Manual mode for reviewing file and command actions. Inspect the actual proposed diff before accepting it.

Try this prompt
Implement only the approved total-function change. Show the diff. Leave fractional quantity and invalid-type policy explicit rather than silently expanding scope.

Example / expected result

Illustrative example (not a recorded model result): A multiplication expression and a negative-quantity check in the target function.

Check your result

Read every added and removed line; confirm other files and permissions were not broadened.

4

Run the acceptance cases independently

Run the three known cases in the project’s actual runtime or test setup. Ask the assistant to report what ran and what did not, then inspect the output yourself. A confident explanation is not evidence of an executed test.

Try this prompt
Run the approved checks: 199 and 3 gives 597; 199 and 0 gives 0; negative quantity throws. Report exact results and any check not run. Do not commit or deploy.

Example / expected result

Illustrative example (not a recorded model result): Three passing known cases, or a precise unresolved failure. The report identifies the command actually executed.

Check your result

Verify the output, inspect the final diff and keep the change only if it matches the intended behaviour.

When it goes wrong

If the extension cannot install, use the current official troubleshooting rather than guessing a command. Plan mode and review controls are version-dependent. Keep the task focused if the assistant proposes broad cleanup. A checkpoint or rewind is not a substitute for knowing which files and external actions changed.

Make it your own

Repeat with a different one-function bug and two ordinary cases plus one boundary case. Write the expected answers before asking Claude.

Useful next resources

Sources and review

Last checked Oct 9, 2026. Features and account limits can change. Verify important results against your original material.

Did this help you complete your task?

Tell us what needs improving. No account or private output required.

Was this useful?
Report incorrect information or a broken link

Genius Forges Editorial

Practical, documentation-reviewed AI exercises with explicit examples and independent result checks.

Keep building your AI habits

Keep learning useful AI tricks

Get practical lessons and resources when we publish them.

Turn this idea into a daily skill

Practice with a small input and check the result before sharing.

We use optional cookies for analytics and referral tracking. Learn more about our privacy policy