3.7 KiB
3.7 KiB
Fission Python Skill Plan
Context
The user wanted to create a new skill called fission-python-skill in the @fission-plugin/skills directory. This skill should provide three main capabilities:
- Create a new fission python project with template (based on @data/py-eom-quota)
- Analyze configuration in .fission of each fission-python project
- Parse and update docstring of fission function method
Approach
Based on my exploration of the codebase:
- The example project @data/py-eom-quota shows a standard fission python project structure
- Fission configuration is stored in .fission/deployment.json and similar files
- Python functions contain fission configuration in their docstrings using a specific format (between
fission andmarkers) - The fission-plugin/skills directory currently contained empty SKILL.md and reference.md files
I implemented all three requested capabilities as shell scripts within the skill directory.
Implementation Summary
Phase 1: Skill Creation Completed
- Created the skill directory:
/workspaces/claude-marketplace/fission-plugin/skills/fission-python-skill/ - Created SKILL.md following the skill format from the documentation
- Created reference.md with detailed usage instructions
- Implemented the three core tools as shell scripts:
create-project.sh: Creates a new fission python project from templateanalyze-config.sh: Analyzes .fission configuration in a projectupdate-docstring.sh: Parses and updates docstrings in fission function methods
Phase 2: Tool Implementation Details (Completed)
create-project.sh
- Takes project name and optional destination directory
- Copies template from @data/py-eom-quota (excluding .git, etc.)
- Replaces placeholder values in configuration files
- Provides usage instructions for next steps
analyze-config.sh
- Takes path to a fission project
- Reads and parses .fission/deployment.json (and related files)
- Outputs structured summary of:
- Environments and their resource settings
- Packages and build commands
- Functions and their triggers
- Secrets and configmaps
- Archives and source configuration
update-docstring.sh
- Takes path to a python file and optionally function name
- Parses docstrings to extract embedded fission configuration (between ```fission markers)
- Allows updating the fission configuration within docstrings using --set flag
- Can retrieve current configuration using --get flag (default)
- Preserves existing function code and documentation outside fission blocks
- Uses Python script for robust JSON handling and string manipulation
Phase 3: Testing (Completed)
- Tested create-project.sh by generating a new project and verifying structure
- Tested analyze-config.sh on the existing @data/py-eom-quota project
- Tested update-docstring.sh by retrieving and modifying fission configuration in function docstrings
- All tools have proper help text and error handling
Files Created
/workspaces/claude-marketplace/fission-python-skill/SKILL.md/workspaces/claude-marketplace/fission-python-skill/reference.md/workspaces/claude-marketplace/fission-python-skill/create-project.sh/workspaces/claude-marketplace/fission-python-skill/analyze-config.sh/workspaces/claude-marketplace/fission-python-skill/update-docstring.sh
Verification Results
✓ create-project.sh: Successfully creates new fission python projects from template ✓ analyze-config.sh: Successfully analyzes .fission configuration showing environments, packages, functions, secrets, etc. ✓ update-docstring.sh: Successfully extracts and updates fission configuration in function docstrings All tools are executable and include proper error handling and usage instructions.