Core Workflows & Commands
From the course Claude Code: AI Terminal Agent
Claude Code excels at complex, multi-step development workflows that go far beyond simple code completion.
Essential Commands
/init— Generate a CLAUDE.md from your project/compact— Compress conversation to save context/clear— Reset conversation history/cost— Check token usage and costs/doctor— Diagnose configuration issues/memory— Edit CLAUDE.md memory files
Workflow: Bug Fixing
"Look at the failing test in tests/auth.test.ts, understand why it's failing, fix the underlying bug in the auth module, and make sure all tests pass."
Claude Code will:
- Read the failing test and error output
- Trace the issue through the codebase
- Identify the root cause
- Apply the fix across relevant files
- Run the test suite to verify
Workflow: Feature Implementation
"Add a rate limiting middleware to our Express API. Use Redis for storage, apply it to all /api routes with a limit of 100 requests per minute per IP. Include bypass for authenticated admin users."
Workflow: Code Review & Refactoring
"Review the authentication module for security issues. Check for SQL injection, improper token handling, and missing input validation. Fix any issues you find."
Workflow: Documentation
"Generate comprehensive JSDoc comments for all exported functions in the src/utils directory. Include parameter types, return types, and usage examples."
Headless Mode
Run Claude Code non-interactively for CI/CD:
claude -p "Update all deprecated API calls" --allowedTools edit,read
This enables automated code maintenance, PR reviews, and batch operations.
Key Takeaways
- •Claude Code handles complex multi-step workflows like bug fixes and feature implementation
- •Slash commands manage context, costs, and configuration
- •Headless mode enables CI/CD integration for automated code tasks
- •Describe the full desired outcome and let Claude plan the execution
Progress is kept in this browser only.