From DeepSeek Copy-Paste to Claude Code - AI Coding Practice (Part 1)
Sharing the evolution journey of HotelByte project from DeepSeek copy-paste to Claude Code deep integration, and lessons learned at each stage.
Introduction
In March 2025, we started using DeepSeek for AI-assisted programming. From the initial copy-paste phase to today’s Claude Code deep integration, our AI coding practice has undergone significant evolution. This article shares the lessons learned throughout this journey.
Phase 1: The Copy-Paste Era (2025-03)
Early DeepSeek Usage
Initially, we used DeepSeek in a very simple and direct way:
// Copy code to DeepSeek
func (s *SupplierService) CreateSupplier(ctx context.Context, req *CreateSupplierRequest) (*Supplier, error) {
// ... code copied to AI
// then paste back
}
Typical workflow:
- Open DeepSeek dialog
- Copy the code that needs modification
- Enter prompt
- Copy AI-returned code
- Paste back into editor
- Manually adjust and test
Limitations of This Phase
🔴 Efficiency Bottlenecks
- Repetitive operations: Manual copy-paste every time
- Context loss: Unable to maintain complete understanding of project structure
- Version control issues: Difficult to track which code was generated by AI
🔴 Code Quality Issues
// AI might generate code like this
func CreateSupplier(name string, email string) (interface{}, error) {
// Undefined types, interface abuse
}
Common issues:
- Improper type usage
- Incomplete error handling
- Missing test code
- Not following team coding standards
🔴 Team Collaboration Difficulties
- Unable to share AI conversation history
- Inconsistent code style from different AI generations
- Difficult to establish best practices
Real Case: Supplier API Development
Scenario: Developing CRUD APIs for supplier management
Problems with Copy-Paste Approach:
// First AI call: Generate CreateSupplier
// ... manual paste ...
// Second AI call: Generate UpdateSupplier
// ... manual paste ...
// Found: Inconsistent error handling logic between the two functions
// Third AI call: Generate GetSupplier
// ... manual paste ...
// Found: Significant style differences from previous code
Result:
- Spent 4 hours completing basic CRUD
- Uneven code quality
- Needed 2 extra hours to fix issues
- Total: 6 hours
Phase 2: Structured Exploration (2025-06)
Repository Standardization
We realized the need for a more structured approach:
hotel-be/
├── .claude/ # Claude Code configuration
├── .cursor/ # Cursor configuration
├── .codebuddy/ # CodeBuddy configuration
├── docs/ # Documentation
├── pkg/ # Go packages
│ └── supplier/
│ ├── supplier.go
│ ├── supplier_test.go
│ └── models.go
└── Makefile
Introducing AI Tool Configuration
.claude/CLAUDE.md
# HotelByte AI Coding Guidelines
## Code Style
- Use standard Go conventions
- Always write tests
- Handle errors explicitly
## Project Structure
- Domain logic in pkg/
- Shared utilities in common/
- API routes in api/
## Testing
- Unit tests: *_test.go
- Integration tests: *_integration_test.go
- Minimum coverage: 50% for new code
.cursor/skills/
# docs-organization skill
name: docs-organization
description: Organize project documentation
steps:
- Check docs/ structure
- Update README.md
- Ensure API docs are current
Improvements in This Phase
✅ Code Quality Improvement
// AI now generates code like this
func (s *SupplierService) CreateSupplier(ctx context.Context, req *CreateSupplierRequest) (*Supplier, error) {
if err := s.validateCreateRequest(req); err != nil {
return nil, fmt.Errorf("validation failed: %w", err)
}
supplier := &Supplier{
ID: uuid.New(),
Name: req.Name,
Email: req.Email,
Status: SupplierStatusActive,
CreatedAt: time.Now(),
}
if err := s.repo.Create(ctx, supplier); err != nil {
return nil, fmt.Errorf("failed to create supplier: %w", err)
}
return supplier, nil
}
Improvements:
- Clear type definitions
- Complete error handling
- Follows project standards
- Auto-generated tests
✅ Efficiency Gains
Supplier API development time comparison:
| Phase | Dev Time | Code Quality | Test Coverage |
|---|---|---|---|
| Copy-Paste | 6 hours | ⭐⭐ | 0% |
| Structured | 3 hours | ⭐⭐⭐⭐ | 60% |
Phase 3: Deep Integration (2026-01)
Claude Code Deep Integration
We started fully leveraging Claude Code’s capabilities:
Project Context Management
# Claude Code automatically understands project structure
$ claude-code --project hotel-be
> Analyzing project structure...
> Found 150 Go files
> Loaded .claude/CLAUDE.md rules
> Loaded .cursor/skills/ configuration
Intelligent Code Generation
// Claude Code can operate directly on the project
// ❌ No more copy-paste
// ✅ Direct generation and modification of files
// Prompt: Add batch supplier creation interface in pkg/supplier/
// Result: Automatically creates or updates the following files
// - pkg/supplier/supplier.go (add BatchCreateSuppliers)
// - pkg/supplier/supplier_test.go (add tests)
// - api/supplier_routes.go (add routes)
Multi-Tool Collaboration
We integrated multiple AI tools, each with specific purposes:
AI Tool Matrix
┌─────────────┬─────────────────────────┬─────────────┐
│ Tool │ Primary Use │ Integrated │
├─────────────┼─────────────────────────┼─────────────┤
│ Claude Code │ Code generation & refactor│ 2025-12 │
│ Cursor │ Code completion & editing│ 2025-11 │
│ CodeBuddy │ Test code generation │ 2025-10 │
│ CCM │ Multi-model management │ 2025-10 │
│ Trae │ Code review │ 2025-09 │
└─────────────┴─────────────────────────┴─────────────┘
Real Case: Cluster Management Module
Task: Add machine management for hotel clusters
Workflow using Claude Code:
# 1. Define requirements (configured in .claude/)
cat > .claude/tasks/cluster-add-machine.md << EOF
Task: Add machine management to cluster module
Requirements:
- Add machine to cluster
- Remove machine from cluster
- List machines in cluster
- Health check
EOF
# 2. Claude Code automatic execution
$ claude-code task cluster-add-machine
> Analyzing existing cluster module...
> Creating pkg/cluster/machine.go...
> Creating pkg/cluster/machine_test.go...
> Updating api/cluster_routes.go...
> Running tests...
> ✅ All tests passed
# 3. Code review (using Trae)
$ tre review pkg/cluster/machine.go
> ✅ Code looks good
> ⚠️ Consider adding retry logic for network calls
Result:
- Development time: 2 hours
- Test coverage: 85%
- Code quality: ⭐⭐⭐⭐⭐
Lessons Learned
Evolution from Copy-Paste to Intelligent Toolchain
2025-03: DeepSeek Copy-Paste
↓ Lots of manual operations, little context
2025-06: Repository Structuring
↓ Initial config, local optimization
2025-10: Multi-model Integration
↓ Tool matrix, complementary capabilities
2026-01: Claude Code Deep Integration
↓ Project-level understanding, automated workflow
2026-02: Mature Multi-Tool Chain + Code as Documentation
↓ Complete toolchain, automated documentation
Key Lessons
1. Infrastructure First
Wrong approach: Use AI for rapid development first, optimize toolchain later Right approach: Build AI toolchain first, then do large-scale development
// ✅ Right: Configure tools first
.claude/CLAUDE.md # AI understands project rules
.cursor/skills/ # AI skill library
.ccm_config/models.yaml # Model configuration
Makefile (make doc) # Documentation automation
// Then start development
2. Context is More Important than Capability
DeepSeek is powerful, but without project context, it can only do “generic” code generation. Claude Code, through project configuration, gains context and can generate code that better fits the project.
3. Synergistic Effect of Toolchain
Single AI model ≈ 1.5x development efficiency
Configured toolchain ≈ 2.5x development efficiency
Multi-tool collaboration ≈ 3.5x development efficiency
4. Consistency Between Documentation and Code
In the copy-paste era, documentation often lagged. Now we have “code as documentation” implementation (detailed in the fourth article).
Data Comparison
| Metric | Copy-Paste Phase | Deep Integration Phase | Improvement |
|---|---|---|---|
| Dev Efficiency | 1x | 3.5x | +250% |
| Code Quality | ⭐⭐ | ⭐⭐⭐⭐⭐ | +150% |
| Test Coverage | 10% | 75% | +650% |
| Doc Consistency | 50% | 100% | +100% |
| Team Collaboration | ⭐⭐ | ⭐⭐⭐⭐⭐ | +150% |
Next Steps
In the next article, we will dive deep into Claude Code integration practices, including:
- .claude/ directory structure and configuration
- .cursor/ skill system
- Real-world case: Supplier onboarding process
- Custom skill development
Series Navigation:
- Introduction
- → Article 2: Claude Code Deep Integration
Comments