Welcome to the Skill Flywheel development team! This guide covers contributing to a unified MCP server with 531+ skills.
The Skill Flywheel uses a unified server — a single FastAPI application (src/flywheel/server/unified_server.py) that consolidates:
- Skill Discovery (SQLite-backed search and listing)
- Skill Execution (dynamic Python module loading)
- ML Optimization (predictive loading, resource adaptive scaling)
| Component | Location | Description |
|---|---|---|
| EnhancedSkillManager | src/flywheel/core/skills.py |
Dynamic lazy loading, module caching |
| AdvancedCache | src/flywheel/core/cache.py |
LRU cache, per-module config |
| TelemetryManager | src/flywheel/core/telemetry.py |
Prometheus metrics |
| MLModelManager | src/flywheel/core/ml_models.py |
ML predictions for skill loading |
| ResourceOptimizer | src/flywheel/core/resource_optimizer.py |
Resource adaptive scaling |
| ContainerManager | src/flywheel/core/containers.py |
Docker orchestration |
- Python 3.11+
- pip or uv
- SQLite (built-in to Python)
git clone <repository-url>
cd skill-flywheel
pip install -r requirements.txtpython -m src.flywheel.server.unified_servercurl http://localhost:8000/healthEvery skill must follow this format:
#!/usr/bin/env python3
"""Skill description"""
import logging
from datetime import datetime
from typing import Any, Dict
logger = logging.getLogger(__name__)
async def invoke(payload: Dict[str, Any]) -> Dict[str, Any]:
"""MCP skill invocation."""
action = payload.get("action", "default")
try:
# Business logic here
result = {"status": "success", "data": "..."}
return {
"result": result,
"metadata": {
"action": action,
"timestamp": datetime.now().isoformat(),
},
}
except Exception as e:
logger.error(f"Error in skill_name: {e}")
return {
"result": {"error": str(e)},
"metadata": {"action": action, "timestamp": datetime.now().isoformat()},
}
def register_skill() -> Dict[str, str]:
"""Return skill metadata."""
return {
"name": "skill-name",
"description": "What this skill does",
"version": "1.0.0",
"domain": "DOMAIN_NAME",
}-
async def invoke(payload: Dict[str, Any]) -> Dict[str, Any] -
from datetime import datetimeimport - Return format:
{"result": ..., "metadata": {"action": ..., "timestamp": ...}} -
try/excepterror handling withlogger.error() -
register_skill()function returning metadata
python scripts/scaffold_skill.py my_skill DOMAIN --description "What it does" --actions "process:Process data" "analyze:Analyze data"python scripts/scaffold_skill.py --from-spec domains/ML_AI/SKILL.tutorial-name/SKILL.mdpython scripts/validate_skill.py src/flywheel/skills --recursive# All tests
python -m pytest tests/ -v
# Specific test file
python -m pytest tests/test_claw_code_skills.py -v
# With coverage
python -m pytest tests/ --cov=src -vruff check .
python -m mypy src/ --ignore-missing-imports| Endpoint | Method | Description |
|---|---|---|
/ |
GET | Server health |
/health |
GET | Detailed health with telemetry |
/skills |
GET | List skills (filter by domain, paginate) |
/skills/search |
GET | Search by name/description/keywords |
/domains |
GET | List domains and counts |
/skills/execute |
POST | Execute a skill by name |
/metrics |
GET | Performance metrics |
/skills/optimize |
POST | Run optimization |
sqlite3 data/skill_registry.db
# List skills
SELECT name, domain, status FROM skills ORDER BY domain LIMIT 10;
# Search skills
SELECT name, domain FROM skills WHERE name LIKE '%search%';- Spec (
domains/) — SKILL.md defines requirements - Scaffold (
scripts/scaffold_skill.py) — Generates Python module - Validate (
scripts/validate_skill.py) — Checks format compliance - Implement — Developer fills in business logic
- Test — pytest tests verify behavior
- Register — Skill added to
data/skill_registry.db
- Never commit secrets to version control
- Use
.envfor local development (already in.gitignore) - Run safety checks before deploying:
pip install safety bandit safety check bandit -r src/
- Windows junction failures: Some skills may fail to load on Windows due to symlink/junction issues. This is Windows-specific and resolves on Linux CI.
- OpenClaw/NemoClaw: 5 platform-specific modules without
invoke()— by design, excluded from fix runs. - Format compliance: 94% of skills pass validation (501/531). The remaining 30 have minor issues.
- Create a feature branch:
git checkout -b feature/my-feature - Make changes and add tests
- Run linting:
ruff check . - Run tests:
python -m pytest tests/ -v - Validate skills:
python scripts/validate_skill.py src/flywheel/skills --recursive - Commit with conventional commits
- Push and create PR