Introduction
A well-designed workflow can dramatically improve your productivity with Claude Code. This tutorial walks you through creating your first automated workflow.
Setting Up Your Project
Start by creating a CLAUDE.md file in your project root. This file tells Claude Code about your project’s conventions:
# My Project
## Tech Stack
- Language: TypeScript
- Framework: React
- Testing: Vitest
## Conventions
- Use functional components
- Prefer named exports
- Write tests for all utilitiesThe Development Loop
A typical Claude Code workflow follows this pattern:
- Describe the task - Be specific about what you want to build
- Review the plan - Claude will outline its approach
- Watch the implementation - Code is written in real-time
- Test and iterate - Request changes or fixes
Example: Adding a Feature
Let’s add a dark mode toggle to a React app:
User: Add a dark mode toggle to the header. It should:
- Use system preference as default
- Persist choice to localStorage
- Apply a 'dark' class to the bodyClaude Code will:
- Create the toggle component
- Add the theme logic
- Update the header
- Add CSS variables for theming
Automating Commits
With the git-local MCP server, you can commit directly:
User: Commit these changes with a descriptive messageClaude analyzes the diff and creates an appropriate conventional commit.
Tips for Beginners
- Start small - Begin with single-file changes
- Be specific - Detailed prompts get better results
- Use context - Reference existing code patterns
- Iterate - Refine through conversation
Next Steps
- Explore MCP Tool Selection
- Try the Rails MCP Server for Rails projects
- Learn about Advanced Workflows