Workflow-006: Claude Code Development
FreshSource: Claude Code
Document Control
| Field | Value |
|---|---|
| Workflow ID | WF-006 |
| Version | 1.0 |
| Status | Active |
| Last Updated | 2024-12 |
Overview
Effective development workflows using Claude Code CLI for coding assistance.
Development Cycle
Common Commands
Session Control
| Command | Description |
|---|---|
claude | Start new session |
claude --resume | Resume last session |
claude --continue | Continue with context |
/clear | Clear context |
/exit | Exit session |
File Operations
| Action | Example |
|---|---|
| Add file to context | "Look at src/main.py" |
| Create new file | "Create a new config.json" |
| Edit file | "Update the function to..." |
| Delete file | "Remove the old helper.js" |
Code Actions
| Action | Example |
|---|---|
| Run tests | "Run the test suite" |
| Fix errors | "Fix the TypeScript errors" |
| Refactor | "Refactor this to use async/await" |
| Explain | "Explain how this function works" |
Workflow Patterns
Pattern 1: Feature Development
Pattern 2: Bug Fixing
| Step | Example |
|---|---|
| Describe | "Users report login fails after password reset" |
| Reproduce | "Look at the login and password reset code" |
| Analyze | Claude identifies the race condition |
| Fix | "Fix the race condition" |
| Verify | "Add a test to prevent regression" |
Pattern 3: Code Review
Claude analyzes:
- Security vulnerabilities
- Code quality issues
- Performance concerns
- Best practice violations
Best Practices
| Practice | Description |
|---|---|
| Be specific | "Add input validation to login" not "fix login" |
| Provide context | Share error messages, logs, requirements |
| Iterate | Review changes before accepting |
| Test early | Run tests after each change |
| Commit often | Small, focused commits |
MCP Integration
Example: "Query the users table and create a PR with the results"
Verification Checklist
- [ ] Claude Code installed and configured
- [ ] Project context understood
- [ ] Changes reviewed before accepting
- [ ] Tests pass after changes
- [ ] Commits are meaningful
- [ ] Documentation updated