feat: add development and hf-hangman-lab skills

development: absorbed openclaw-plugin-dev as a workflow, with
reference docs for plugin structure, hooks, tools, state, config.

hf-hangman-lab: hf-wakeup workflow — full agent wakeup lifecycle:
set busy → check due slots → select & defer → identify task →
plan work → create work channel → execute. All branches end with
status reset to idle.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
zhi
2026-04-19 13:31:27 +00:00
parent 5a8f490cc2
commit 238574ffd2
14 changed files with 270 additions and 133 deletions

View File

@@ -0,0 +1,61 @@
# Config Schema & Install Scripts
## openclaw.plugin.json
```json
{
"$schema": "https://openclaw.ai/schemas/plugin-config.json",
"configSchema": {
"type": "object",
"additionalProperties": false,
"properties": {
"myToken": { "type": "string" },
"myFlag": { "type": "boolean", "default": false }
}
}
}
```
### Rules
- `additionalProperties: false` is mandatory — OpenClaw validates config against schema
- Removing a config field requires removing it from schema too (or gateway fails to start)
- Sensitive fields (tokens, keys): no `default`, user must configure manually
## Install Script (scripts/install.mjs)
### Install does:
1. Build dist (compile TypeScript)
2. Clean and copy to `~/.openclaw/plugins/<id>/`
3. Update `openclaw.json`:
- Add to `plugins.allow`
- Add to `plugins.load.paths`
- Set `plugins.entries.<id>.enabled = true`
- Set default config via `setIfMissing` (never overwrite existing values)
4. Never set sensitive fields (tokens) — add comments for manual configuration
### Uninstall does:
1. Remove from `plugins.allow`
2. Delete `plugins.entries.<id>`
3. Remove from `plugins.load.paths`
4. Delete install directory
### setIfMissing pattern
```javascript
function setIfMissing(obj, key, value) {
if (obj[key] === undefined || obj[key] === null) {
obj[key] = value;
}
}
```
### Config field changes
When renaming or removing config fields:
1. Update `openclaw.plugin.json` schema first (source of truth)
2. Update `normalizeConfig()` in index.ts
3. Update install script `setIfMissing` calls
4. Document migration steps for users