Skip to content
LinkedInX

Level 5 Practice: Move from Issue to Tests and PR in One Flow

Target audience: Readers who have completed Level 4 and want to delegate the full Issue → implementation → test → PR loop to Claude Code.
Prerequisites: Read Level 4

About This Tutorial

In Level 5, Claude Code uses a GitHub Issue as the starting point and moves through planning, code changes, testing, and pull request preparation as one flow. Claude Code can read project files, run commands, and explain the resulting changes[1]. A GitHub Pull Request is the review unit for discussing and merging proposed changes[2].

What This Level Builds

After Level 5, you can treat this workflow as one coherent task:

flowchart LR
    I["Read Issue"] --> P["Create plan"]
    P --> B["Create branch"]
    B --> C["Change code"]
    C --> T["Run checks"]
    T --> R["Prepare PR"]

Step 1: Clarify the Issue Done Criteria

Before asking Claude Code to implement anything, ask it to summarize the requirement and done criteria.

Read GitHub Issue #3, "Add a Contact form."

Do not implement yet. First summarize:

1. What the Issue asks for
2. Done criteria
3. Files likely to change
4. Open questions to resolve before implementation

Check that:

  • The Issue goal is understood correctly
  • The change scope is not expanding unnecessarily
  • Claude is not silently deciding unclear requirements

Step 2: Approve the Plan Before Editing

Next, ask for the implementation and testing plan.

Create an implementation plan.

Conditions:
- Follow the existing Next.js 14 + TypeScript structure
- Match the existing UI style
- Keep the changed files minimal
- Include the verification commands you will run

After the plan, do not edit files yet.

If the plan is sound, allow the edit.

Proceed with the plan.
After changing files, report the diff summary and verification results.

Step 3: Review Tests and Diff

After implementation, ask Claude Code to summarize the diff and checks.

Review the change.

1. Summarize git diff
2. List the tests and verification commands run
3. If any command failed, explain the cause and fix
4. Confirm whether Issue #3 done criteria are satisfied

If anything is still missing, fix it before preparing the PR.

Step 4: Draft the PR Body

The PR body should give reviewers enough information to decide.

Draft the Pull Request body for this change.

Include:
- Summary
- Testing
- Notes / Risks
- Closes #3

Example:

## Summary
- Add a contact form section to the portfolio site
- Add basic validation and accessible labels

## Testing
- npm run lint
- npm run typecheck

## Notes / Risks
- Email sending is not implemented in this level

Closes #3

Step 5: Final Check Before PR Creation

Before opening the PR, check the worktree and diff.

Run a final pre-PR check.

- git status
- Changed file list
- Confirm there are no unrelated changes
- Confirm there is no remaining work for Issue #3

If everything is clean, create the PR through the GitHub UI or gh pr create. GitHub CLI authentication varies by environment, so check login state before running CLI commands.

Common Failures

FailureCausePrevention
Unrelated files changeScope was not fixed up frontConfirm target files during planning
PR is opened without testsDone criteria did not include verification commandsFill in the Testing section before PR creation
PR body is too vagueReviewers lack decision contextAlways include Summary / Testing / Risks
This table scrolls horizontally. Keyboard users can focus the table and use the left and right arrow keys.

Summary: What Level 5 Taught You

  • After reading an Issue, clarify done criteria and change scope before implementation
  • Before editing files, confirm the implementation plan and testing plan
  • Before creating a PR, check diff, test results, and remaining work
  • Write PR bodies with enough information for reviewers to decide

Next Level

Level 6 Practice: Automatically Review Every PR builds a GitHub Actions workflow that posts Claude reviews on the PRs you create.

References

  1. Anthropic, Claude Code documentation
  2. GitHub Docs, About pull requests
Quiz