内容
# skill2app
Transform repetitive AI workflows into deterministic, reusable Python apps — then run them from Claude Code or a web dashboard.
## How it works
1. **You describe a workflow** to Claude Code (e.g., "convert images to webp")
2. **skill2app creates a Python app** with a `config.json` describing inputs/outputs
3. **The app is instantly available** via MCP tools in Claude Code or the web dashboard
4. **If the app fails**, a self-healing engine fixes it automatically (up to 20 retries via Claude CLI)
## Quick start
### Install
```bash
git clone https://github.com/Oxyz-Studio/skill2app.git
cd skill2app
pip install -e .
```
### Use with Claude Code (MCP)
Add to your Claude Code settings (`.claude/settings.json`):
```json
{
"mcpServers": {
"skill2app": {
"command": "python",
"args": ["-m", "server.mcp"],
"cwd": "/path/to/skill2app"
}
}
}
```
Then in Claude Code, the agent can:
- `list_apps` — see all available apps
- `get_app("image-converter")` — get full config
- `run_app("image-converter", {"format": "webp", "quality": 80})` — execute
### Use with the web dashboard
```bash
./run.sh
# Backend: http://localhost:8420
# Frontend: http://localhost:3420
```
## Creating an app
Each app lives in `apps/<app-id>/` with:
- `main.py` — Python function decorated with `@app`
- `config.json` — auto-generated or manually written metadata
Example (`apps/image-converter/main.py`):
```python
from sdk import app, input, output
from sdk.runner import run
@app(name="Image Converter", description="Convert images between formats", icon="image")
def convert_images(
images: input(type="file", accept="image/*", multiple=True),
quality: input(type="slider", min=1, max=100, default=80),
format: input(type="select", options=["webp", "png", "jpg"], default="webp"),
) -> output(type="file", multiple=True):
# your logic here
return results
if __name__ == "__main__":
run(convert_images)
```
## Architecture
```
skill2app/
├── apps/ # Your apps live here
├── sdk/ # Python SDK (@app, input, output decorators)
├── server/
│ ├── main.py # REST API (FastAPI)
│ ├── mcp.py # MCP server for Claude Code
│ ├── app_registry.py
│ ├── executor.py # Subprocess runner
│ └── fallback.py # Self-healing engine
├── frontend/ # Next.js web dashboard
└── tests/
```
## License
MIT