7.3 KiB
Meta Skill Generator - Summary
What I've Built
A comprehensive Claude Code skill that generates other Claude Code skills with intelligent separation of deterministic operations into Go scripts.
Core Capabilities
1. Workflow Analysis
- Automatically identifies deterministic vs dynamic operations
- Classifies operations as Go scripts, Python scripts, or agent workflows
- Uses keyword analysis and heuristics
- Generates detailed recommendation reports
2. Go Script Generation
- Creates production-ready Go code from specifications
- Includes CLI parsing, error handling, progress reporting
- Infers necessary imports and helper functions
- Generates build scripts automatically
- Updates SKILL.md with usage documentation
3. End-to-End Skill Creation
- Interactive skill creation workflow
- Gathers concrete examples from users
- Analyzes operations and recommends implementations
- Generates complete skill structure
- Validates and packages the skill
Files Created
Core Skill Files
SKILL.md (283 lines)
- Comprehensive skill documentation
- 6-step workflow process
- Detailed implementation guidance
- Best practices for Go scripts
Scripts (4 files)
generate_go_script.py (363 lines)
- Main Go script generator
- Template-based code generation
- Intelligent import inference
- Automatic build script creation
- SKILL.md integration
analyze_workflow.py (236 lines)
- Workflow analysis engine
- Keyword-based classification
- Detailed recommendation reports
- Interactive and batch modes
init_skill_with_analysis.py (266 lines)
- End-to-end skill creation
- User interaction and guidance
- Integrates all components
- Progress tracking and validation
test_skill_scripts.py (183 lines)
- Script validation and testing
- Python syntax checking
- Go compilation testing
- Bash syntax validation
References (3 files)
go-patterns.md (426 lines)
- File processing patterns
- Concurrent processing
- Progress reporting
- Error handling strategies
- CLI design patterns
- Data processing (CSV, JSON)
- Testing patterns
- 10 best practices
workflow-analysis.md (346 lines)
- Decision framework
- Detailed analysis guide
- Real-world examples
- Common patterns
- Anti-patterns
- Optimization checklist
skill-examples.md (426 lines)
- 3 complete skill examples
- PDF Tools skill
- Data Processing skill
- Image Tools skill
- Key patterns across examples
- Anti-patterns to avoid
- Success metrics
Key Features
Intelligent Classification
The analyzer uses multiple signals:
Deterministic indicators:
- Keywords: convert, transform, parse, extract, validate
- Clear input/output contracts
- Repeatable operations
Dynamic indicators:
- Keywords: analyze, understand, interpret, decide
- Context-dependent logic
- Creative or reasoning tasks
Performance indicators:
- Keywords: batch, parallel, large file, concurrent
- High-volume operations
- Binary/low-level tasks
Library indicators:
- Keywords: pandas, numpy, plot, machine learning
- Specialized Python libraries needed
Go Script Template
Generated scripts include:
-
CLI Framework
--helpflag with usage--verbosefor debugging- Proper argument parsing
-
Error Handling
- Input validation
- Descriptive error messages
- Proper exit codes (0/1/2)
-
Best Practices
- Resource cleanup with defer
- Progress reporting for long operations
- Streaming for large files
- Parallel processing where appropriate
-
Code Quality
- Clean separation of concerns
- Helper functions for common patterns
- Comprehensive error wrapping
- Table-driven testing patterns
Progressive Disclosure
Follows skill-creator principles:
SKILL.md - Core workflows and common operations
References - Detailed guides and patterns
Scripts - Executable implementations
Keeps SKILL.md under 500 lines by moving details to references.
Usage Examples
Generate a Single Script
scripts/generate_go_script.py \
--name csv-to-json \
--description "Convert CSV files to JSON" \
--input "CSV file path" \
--output "JSON array to stdout" \
--logic "Parse CSV rows and convert to JSON array" \
--skill-path ./data-tools
Output:
csv-to-json.go- Complete Go sourcebuild_csv-to-json.sh- Build script- Updated SKILL.md with documentation
Create Complete Skill
scripts/init_skill_with_analysis.py my-skill --path ./skills
Interactive process:
- Gather example use cases
- Analyze operations (auto-classify)
- Confirm plan
- Specify Go script details
- Generate everything
- Ready to package
Analyze Requirements
scripts/analyze_workflow.py --examples requirements.txt
Output:
- Go scripts recommendations
- Python scripts recommendations
- Agent workflows recommendations
- Suggested script names
- Implementation guidance
Design Decisions
Why Go for Deterministic Operations?
- Performance - Compiled binaries are fast
- Reliability - Strong typing catches errors
- Deployment - Single binary, no dependencies
- Concurrency - Built-in goroutines for parallelism
- Standard library - Rich stdlib for common tasks
Why Keep Agent Workflows?
Not everything should be scripted:
- Content understanding requires LLM
- Context-dependent decisions
- Creative tasks
- Adaptive error handling
The skill intelligently separates these concerns.
Why Both Analysis and Generation?
Analysis helps identify what to extract
Generation creates the actual implementations
Together they provide end-to-end skill creation.
Testing
All scripts tested:
- ✅ Python syntax validation
- ✅ Executable permissions
- ✅ Help output working
- ✅ Go script generation tested
- ✅ Skill packaging successful
What This Enables
Users can now:
- Create skills faster - Automated script generation
- Better separation - Clear Go vs agent boundaries
- Higher quality - Best practice templates
- Performance - Compiled Go for speed
- Maintainability - Consistent structure
Inspiration
Based on the skill-creator skill and the taches skill mentioned, this meta skill:
- Follows skill-creator guidelines exactly
- Adds Go script generation capability
- Includes workflow analysis
- Provides comprehensive patterns and examples
- Creates production-ready skills
Next Steps for Users
After installing this skill:
-
Create your first skill:
scripts/init_skill_with_analysis.py my-skill --path . -
Study the references:
- go-patterns.md for implementation patterns
- workflow-analysis.md for design decisions
- skill-examples.md for complete examples
-
Generate scripts as needed:
- Use generate_go_script.py for new operations
- Follow the template patterns
- Test with test_skill_scripts.py
-
Package and share:
- Validate with package_skill.py
- Share .skill files
- Iterate based on usage
File Statistics
Total files: 8 (4 scripts, 3 references, 1 SKILL.md)
Total lines: ~2,800
Scripts tested: ✅ All passing
Package validation: ✅ Successful
Ready to use: ✅ Yes
Deliverables
- meta-skill-generator.skill - Complete packaged skill
- META-SKILL-GENERATOR-GUIDE.md - User guide
- This summary document
Everything follows skill-creator best practices and is ready for production use.