一键导入
update-docs
Update Sowel documentation site (MkDocs Material). Use when implementing features, fixing bugs, or when user asks to update/add documentation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Update Sowel documentation site (MkDocs Material). Use when implementing features, fixing bugs, or when user asks to update/add documentation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Create a new plugin integration for Sowel — covers plugin code, new equipment types, UI bindings, zone cards, dashboard widgets, and all required touchpoints. Use when creating a new plugin, adding a new device source, or adding new equipment types.
Creates features for Sowel — a home automation engine. Use when: - User asks to "create a feature", "implement X", "add VX.Y" for Sowel - Working on a roadmap version (V0.1, V0.2, etc.) - User says "créer une feature", "ajouter une fonctionnalité", "implémenter" Specific to Sowel project: MQTT, devices, equipments, zones, scenarios, recipes, AI assistant.
Identifies and fixes bugs in Sowel — a home automation engine. Use when: - User reports a bug, error, or unexpected behavior - User says "ça ne marche pas", "bug", "erreur", "problème", "crash", "debug" - User asks to investigate logs, diagnose an issue, or troubleshoot - User shares an error message, stack trace, or screenshot of broken behavior Leverages structured log analysis (ring buffer API, fetch-logs.py), event bus tracing, and reactive pipeline inspection.
Creates a new Sowel release. Use when: - User asks to "release", "tag", "publish", "deploy a new version" - User says "créer une release", "publier", "tagger" Bumps version, runs checks, tags, and pushes to trigger CI/CD.
| name | update-docs |
| description | Update Sowel documentation site (MkDocs Material). Use when implementing features, fixing bugs, or when user asks to update/add documentation. |
| user-invocable | true |
| argument-hint | [page-or-topic] |
Topic to document: $ARGUMENTS
| Change type | Pages to update |
|---|---|
| New API endpoint | docs/technical/api-reference.md |
| New equipment type | docs/user/equipments.md + docs/technical/data-model.md |
| New plugin | docs/technical/plugin-development.md (if patterns changed) |
| New UI feature | Relevant docs/user/*.md page |
| Architecture change | docs/technical/architecture.md |
| New recipe | docs/technical/recipe-development.md |
| New integration | docs/user/getting-started.md + docs/technical/architecture.md |
| Schema change | docs/technical/data-model.md |
ALWAYS read the target page before editing it. Understand the existing structure, style, and level of detail before making changes.
Rules:
!!! tip, !!! warning, !!! note, code blocks with language, tablesdocs/user/): non-technical, task-oriented ("You can...", "To create a zone, click...")docs/technical/): detailed with code examples and type signaturesIf you added a new page, update mkdocs.yml nav section.
Screenshots live under docs/screenshots/ and are referenced from .md files via .
<topic>-<context>-<lang>.png — e.g., energy-live-en.png, zone-view-fr.png. Always provide both -en.png and -fr.png and reference each from the matching locale file.
fullPage: true. Existing reference screenshots (energy, getting-started) are 1920×1080. Smaller crops get scaled up by the docs theme and look pixelated. Tight element crops (section:has(...)) are forbidden for that reason.fullPage: true. The page is allowed to be tall (a scrollshot is fine).● live (not ○ offline).sowelox / 192.168.0.230:3000) and never use ./scripts/run-swap.sh local for screenshots:
run-swap.sh local does ssh sowelox 'docker stop sowel' over SSH, which crashes the user's real home automation.The demo instance lives on domopi.local:3001 (Raspberry Pi). Two stages:
1. Build anonymized fixtures from a fresh prod backup
# (a) Download a prod backup
python3 -c "
import urllib.request, json
req = urllib.request.Request('http://192.168.0.230:3000/api/v1/auth/login',
data=json.dumps({'username':'admin','password':'<see reference_sowel_access memory>'}).encode(),
headers={'Content-Type':'application/json'}, method='POST')
tok = json.loads(urllib.request.urlopen(req).read())['accessToken']
req = urllib.request.Request('http://192.168.0.230:3000/api/v1/backup',
headers={'Authorization':'Bearer '+tok})
open('/tmp/prod-backup.zip','wb').write(urllib.request.urlopen(req).read())
"
# (b) Run the anonymization pipeline
python3 scripts/doc/build-fixtures.py /tmp/prod-backup.zip
# Outputs /tmp/showroom-fr.zip and /tmp/showroom-en.zip with rename + translate maps applied
The script uses ZONE_RENAME_FR, EQUIPMENT_RENAME_FR, and the FR→EN ZONE_TRANSLATE / EQUIPMENT_TRANSLATE maps in scripts/doc/build-fixtures.py. If a new name appears that needs anonymization or translation, add it to the maps in the script first.
2. Deploy fixture to demo + shoot (per language)
# Full reset of demo
ssh mchacher@domopi.local 'cd /home/mchacher/sowel-demo && docker compose down -v && docker compose pull && docker compose up -d'
# Wait for /api/v1/auth/status to respond
# Setup first admin via POST /api/v1/auth/setup
# Restore showroom-fr.zip via POST /api/v1/backup (multipart) — for FR shoot
# Take FR screenshots on http://domopi.local:3001 (set localStorage sowel_language=fr, reload)
# Restore showroom-en.zip via POST /api/v1/backup — for EN shoot
# Take EN screenshots
Demo compose file: /home/mchacher/sowel-demo/docker-compose.yml. Keep image: ghcr.io/mchacher/sowel:<version> aligned with the prod release. Demo port 3001 maps to container 3000.
// Desktop — fullPage at 1920×1080
mcp__playwright__browser_resize({ width: 1920, height: 1080 });
mcp__playwright__browser_navigate({ url: "http://localhost:5173/<page>" });
mcp__playwright__browser_wait_for({ time: 3 });
mcp__playwright__browser_take_screenshot({
type: "png",
filename: "<topic>-en.png",
fullPage: true,
// No `target` — we want the full page
});
For the language swap between -en and -fr files, switch via localStorage.setItem("sowel_language", "en"|"fr") then location.reload() and re-shoot.
If you absolutely need a close-up of a control (e.g., to highlight a toggle button), do it on top of the wider page screenshot in a second image and label the cropped one clearly (-detail- infix). Never replace the wide context shot with the crop.
mkdocs build --strict
Documentation auto-deploys to GitHub Pages when pushed to main.
git add docs/ mkdocs.yml
git commit -m "docs: <description>"
docs/
├── index.md # Home page
├── technical/ # Technical Guide
│ ├── architecture.md # System design, pipeline
│ ├── api-reference.md # REST API, WebSocket
│ ├── plugin-development.md # Plugin creation guide
│ ├── recipe-development.md # Recipe template guide
│ ├── data-model.md # SQLite schema, types
│ └── contributing.md # Dev setup, conventions
└── user/ # User Guide
├── getting-started.md # Installation, first login
├── equipments.md # Equipment types, bindings
├── dashboard.md # Widgets, customization
├── zones.md # Zones, aggregation
├── modes.md # Modes, calendar
├── energy.md # Energy monitoring
└── remote-access.md # HTTPS, tunnel