Chapter 18: Best Practices and Optimization Tips
> 💡 This chapter provides best practices and optimization recommendations for using MiniClaw.
---
18.1 Daily Usage Recommendations
18.1.1 Starting a Conversation
Recommended practices:
1. Clarify the project context
- "I'm developing a React project using TypeScript" 2. State the current task
- "I need to implement user authentication" 3. Provide relevant files
- "Please look at the files under
src/auth/" - Overly brief prompts
- Providing no context
- Asking multiple unrelated questions at once
- "Please remember that I use pnpm instead of npm" 2. Review MEMORY.md regularly
- Check that stored memories are accurate
- Delete outdated information 3. Use
- "Record: decided to use Zod for parameter validation"
- Storing sensitive information (passwords, keys, etc.)
- Storing temporary or irrelevant information
- Never cleaning up outdated memories
- Web projects: add frontend framework rules
- Node projects: add server-side rules
- Python projects: add Python conventions 2. Keep it concise
- 5–10 core rules
- Avoid lengthy descriptions 3. Update regularly
- Adjust as the project evolves
- Remove rules that no longer apply
- ❌ "Don't use
var, becausevarhas hoisting issues which may cause..." - ✅ "Use
const/let, nevervar" - Professional and rigorous
- Friendly and relaxed
- Concise and direct 2. Set boundaries
- What it can do
- What it cannot do
- How to handle edge cases 3. Include examples
- Examples of good responses
- Examples of responses to avoid
- Each skill solves one class of problems
- Avoid overly complex functionality 2. Clear naming
- Use descriptive names
- Avoid abbreviations 3. Complete documentation
- Detailed SKILL.md
- Include usage examples
- State prerequisites 4. Version management
- Use semantic versioning
- Keep a changelog
- 💬 Daily usage: provide clear context; proactively record important information; periodically clean up outdated memories
- 📝 DNA file optimization: AGENTS.md for customized project rules; SOUL.md for tone and boundaries; USER.md for personal preferences
- 🔧 Skill development: single responsibility principle; clear naming conventions; complete documentation
- ⚡ Performance optimization: set reasonable token budgets; periodically archive old logs; optimize skill caching
Practices to avoid:
18.1.2 Memory Management
Recommended practices:
1. Proactively record important information
miniclaw_note to record key decisions
Practices to avoid:
---
18.2 DNA File Optimization
18.2.1 AGENTS.md Optimization
Recommended practices:
1. Customize per project type
Example:
18.2.2 SOUL.md Optimization
Recommended practices:
1. Define a clear tone
---
18.3 Skill Development Recommendations
18.3.1 Skill Design Principles
1. Single responsibility
---
Chapter Summary
*This document is Chapter 18 of the MiniClaw In-Depth Guide series. The next chapter covers common problems and solutions.*