Exam Scenarios/Practice Scenarios
Advanced15 min

Scenario: Code Generation with Claude Code

Architect code generation workflows using Claude Code. Master slash commands, CLAUDE.md configuration, plan mode, rules with glob patterns, and iterative refinement strategies.

Quick Reference

  • .claude/commands/ stores slash commands shared with the whole team via git
  • Plan mode (shift+tab) creates a plan before executing — essential for large refactors
  • .claude/rules/ files with glob patterns apply conventions to specific file types or directories
  • context: fork in skills prevents subcommands from polluting the parent conversation
  • Input/output examples in prompts outperform abstract instructions for code style enforcement

Scenario Description

You are a senior engineer responsible for rolling out Claude Code across a 40-person development team. The codebase is a large TypeScript monorepo with a React frontend, Node.js backend, and a shared library of utilities. Different directories follow different conventions: the frontend uses functional components with Tailwind CSS, the backend uses a service-repository pattern with dependency injection, and the shared library follows strict pure-function conventions with exhaustive JSDoc comments.

Your goals are: (1) create reusable slash commands for common workflows like code review, test generation, and documentation; (2) configure Claude Code so it automatically applies the correct conventions based on which files are being edited; (3) use plan mode effectively for large-scale refactoring tasks; and (4) establish patterns for iterative code refinement that work reliably across the team. The team ranges from junior developers who need guardrails to senior engineers who want power-user features.