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

40
development/docs/tools.md Normal file
View File

@@ -0,0 +1,40 @@
# Tool Registration
## Interface
```typescript
// Without agent context
api.registerTool({
name: "my-tool",
description: "Does something",
inputSchema: {
type: "object",
properties: {
param: { type: "string", description: "..." },
},
required: ["param"],
},
execute: async (toolCallId, params) => {
const { param } = params as { param: string };
return { result: "ok" };
},
});
// With agent context (factory function)
api.registerTool((ctx) => ({
name: "my-contextual-tool",
description: "...",
inputSchema: { /* ... */ },
execute: async (toolCallId, params) => {
const agentId = ctx.agentId;
return { result: agentId };
},
}));
```
## Key Points
- Interface is `execute: async (toolCallId, params)`, NOT `handler:`
- Use `inputSchema` (JSON Schema), NOT `parameters`
- Return `{ result: "..." }` object
- Factory form `(ctx) => ({...})` gives access to agent context (agentId, sessionKey, etc.)