Tool Design
Single Responsibility
Each tool should do one thing well.Clear Names
Use descriptive, action-oriented names.Input Validation
Always use Zod schemas with descriptions.Error Handling
Provide helpful error messages.Skill Configuration
Write Comprehensive Context
The context field guides AI decision-making.Version Appropriately
Use semantic versioning.Code Organization
File Structure
Organize by functionality.Reuse Code
Extract common logic into services.Security
Never Hardcode Secrets
Always use environment variables.Validate User Input
Don’t trust user input blindly.Don’t Expose Sensitive Data
Be careful what you return.Performance
Cache When Appropriate
Avoid repeated API calls.Pagination
Handle large datasets efficiently.Testing
Test Edge Cases
Don’t just test happy paths.Use Dev Mode
Test conversationally before deploying.Deployment
Pre-Deployment Checklist
- ✅ All tools tested with
lua chat(sandbox mode) - ✅ Individual tools tested with
lua testif needed - ✅ Version number updated
- ✅ Tool descriptions updated
- ✅ Error messages are helpful
- ✅ No hardcoded secrets
- ✅ Environment variables documented in
.env.example - ✅ Environment configured with
lua env - ✅ README updated
Gradual Rollout
Test in sandbox before production.Monitoring
Log Important Events
Track Errors
Documentation
Comment Complex Logic
Update README
Keep project README current with:- What the skill does
- How to set it up
- Required environment variables
- How to test
- How to deploy

