refactor: convert plugin tools to skills/ directory structure

Replace "tools" shell script declarations with proper skills/ directory
so Claude Code injects them into system-reminder and Skill tool can invoke them.

Each tool now has its own skills/<name>/SKILL.md with usage prompt.
Remove "type" and "tools" fields from plugin manifests.
Bump version to 1.0.3.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Duc Nguyen
2026-03-19 00:11:38 +07:00
parent 81c85beaa7
commit e7e6da5134
5 changed files with 116 additions and 6 deletions

View File

@@ -7,10 +7,8 @@
"name" : "Fission-Python-Skill",
"description": "Skill for creating, analyzing, and managing Fission Python projects.",
"source" : "./",
"type" : "skill",
"path" : "fission-python",
"tools" : ["create-project", "analyze-config", "update-docstring"],
"version" : "1.0.2"
"version" : "1.0.3"
}
]
}

View File

@@ -2,7 +2,5 @@
"id" : "fission-python-skill",
"name" : "Fission-Python-Skill",
"description": "Skill for creating, analyzing, and managing Fission Python projects.",
"type" : "skill",
"tools" : ["create-project", "analyze-config", "update-docstring"],
"version" : "1.0.2"
"version" : "1.0.3"
}

View File

@@ -0,0 +1,34 @@
---
name: analyze-config
description: Analyze the .fission configuration of an existing Fission Python project
---
Analyze the Fission configuration of a project by running the analyze-config script.
## Usage
```bash
./fission-python/analyze-config.sh <project-path>
```
- `project-path`: Path to the Fission Python project directory
Requires `jq` to be installed for JSON parsing.
## What it does
Reads `.fission/deployment.json` (and override files) and outputs:
- Environments defined
- Packages and their build commands
- Functions and their configurations
- HTTP triggers and URLs
- Cron triggers
- Secrets and configmaps
## Example
User asks: "Analyze the Fission config of ./my-api"
```bash
./fission-python/analyze-config.sh ./my-api
```

View File

@@ -0,0 +1,32 @@
---
name: create-project
description: Create a new Fission Python project from the standard template
---
Create a new Fission Python project by running the create-project script.
## Usage
Run the following command from the repository root:
```bash
./fission-python/create-project.sh <project-name> [destination-directory]
```
- `project-name`: Name for the new project (letters, numbers, hyphens, underscores only)
- `destination-directory`: Where to create the project (default: current directory)
## What it does
1. Copies the template from `fission-python/template/`
2. Substitutes project name in `.fission/deployment.json`, override files, `src/helpers.py`, and `README.md`
3. Validates the created project structure (build.sh, requirements.txt, workflows, docstrings)
4. Creates a `.env` file with default environment variables
## Example
User asks: "Create a new Fission project called my-api in ./projects/"
```bash
./fission-python/create-project.sh my-api ./projects/
```

View File

@@ -0,0 +1,48 @@
---
name: update-docstring
description: View or update the Fission configuration embedded in a Python function's docstring
---
View or update Fission configuration in a Python function docstring using the update-docstring script.
## Usage
```bash
# View current config
./fission-python/update-docstring.sh <file.py> <function-name> --get
# Update config
./fission-python/update-docstring.sh <file.py> <function-name> --set '<json>'
```
## Docstring format
The script reads/writes Fission config between ` ```fission ` and ` ``` ` markers:
```python
def main():
"""
```fission
{
"name": "function-name",
"http_triggers": {
"trigger-name": {"url": "/endpoint", "methods": ["GET"]}
}
}
```
"""
```
## Examples
User asks: "Show the Fission config of function `main` in `./my-api/src/func.py`"
```bash
./fission-python/update-docstring.sh ./my-api/src/func.py main --get
```
User asks: "Update the HTTP trigger URL to `/v2/items`"
```bash
./fission-python/update-docstring.sh ./my-api/src/func.py main --set '{"http_triggers": {"api": {"url": "/v2/items", "methods": ["GET"]}}}'
```