Improve Skills with AI¶
Use AI to enhance, optimize, and fix existing skills.
Overview¶
Moltler can analyze your skills and suggest improvements:
Output:
Analyzing skill: my_skill v1.0.0
Suggestions:
1. Add error handling for external API calls
2. Implement retry logic for transient failures
3. Add logging for debugging
4. Cache results to reduce API calls
Apply suggestions? [Y/n]
Automatic Improvements¶
Apply All Suggestions¶
Apply Specific Suggestions¶
Preview Changes¶
Shows diff:
BEGIN
+ TRY
DECLARE result = HTTP_GET(url);
+ AGENT_LOG('API call succeeded', data => result);
- RETURN result;
+ RETURN result;
+ CATCH
+ AGENT_LOG('API call failed', level => 'error', error => ERROR_MESSAGE());
+ RAISE;
+ END TRY;
END SKILL;
Improvement Types¶
Error Handling¶
Adds try/catch blocks, graceful degradation, meaningful error messages.
Performance¶
Adds caching, pagination, query optimization, parallel execution.
Logging¶
Adds structured logging for debugging and observability.
Tests¶
Generates comprehensive test cases.
Documentation¶
Adds inline comments, parameter descriptions, usage examples.
Security¶
Adds input validation, secret handling, rate limiting.
Skill Analysis¶
Analyze Without Changing¶
Output:
Skill Analysis: my_skill v1.0.0
Code Quality:
✓ Syntax valid
✓ No unused variables
⚠ Missing error handling (3 locations)
⚠ No logging statements
Performance:
✓ Query is efficient
⚠ Could benefit from caching
⚠ Consider pagination for large results
Security:
✓ No hardcoded secrets
⚠ Input not validated
⚠ Error messages may leak info
Test Coverage:
✗ No tests defined
Recommended: 5 test cases
Documentation:
✓ Description provided
⚠ Parameters not documented
Compare Versions¶
Fix Issues¶
Auto-Fix¶
Automatically fixes:
- Syntax errors
- Type mismatches
- Undefined variables
- Missing returns
Fix Specific Issue¶
Fix Based on Errors¶
AI suggests:
-- Add timeout handling
DECLARE result = HTTP_GET(url, timeout => 60);
-- Or add retry logic
DECLARE attempts = 0;
WHILE attempts < 3 LOOP
TRY
RETURN HTTP_GET(url);
CATCH timeout_error THEN
SET attempts = attempts + 1;
WAIT INTERVAL '2s';
END TRY;
END LOOP;
Refactoring¶
Extract Common Logic¶
Split Skill¶
Merge Skills¶
Learning from Feedback¶
Improve Based on Usage¶
Analyzes:
- Common parameter values
- Frequent errors
- Performance patterns
- User feedback
Improve Based on Outcomes¶
Batch Improvements¶
Improve All Skills¶
Improve Skill Pack¶
What's Next?¶
-
Recommendations
Get proactive suggestions.