Add recruitment skill for onboarding new agents

This commit is contained in:
lyn
2026-04-12 14:21:13 +00:00
parent 4d98d83fbb
commit 1d8427422a
2 changed files with 175 additions and 0 deletions

53
recruitment/SKILL.md Normal file
View File

@@ -0,0 +1,53 @@
---
name: recruitment
description: Onboard new agents into OpenClaw. Use when creating a new agent, adding an agent to the system, or setting up a new agent workspace. Triggers on requests like "new agent", "add agent", "create agent", "recruit agent", "onboard agent".
---
# Recruitment Skill
Onboard new agents into OpenClaw with binding configuration.
## Usage
```bash
new-agent --type openclaw --agent-id <agent-id> [--model <primary-model>]
new-agent --type contractor --contractor-provider <claude|gemini> --agent-id <agent-id>
```
## Workflow
The `new-agent` script executes these steps:
1. **Register agent**:
- `openclaw`: runs `openclaw agents add {agent-id} --model {primary-model} --workspace ~/.openclaw/workspace/workspace-{agent-id} --non-interactive`
- `contractor`: requires `contractor-agent` plugin; runs `openclaw contractor-agents add --agent-id {agent-id} --workspace ~/.openclaw/workspace/workspace-{agent-id} --contractor {contractor-provider}`
2. **Wait for bindings**:
- Poll `openclaw config get bindings` every 10s until `interviewee` accountId is no longer present
- Check `~/.openclaw/states/bindings.lock` exists → wait every 10s until it disappears
3. **Set bindings**:
- Create `~/.openclaw/states/bindings.lock`
- Fetch current bindings, append entry:
```json
{
"agentId": "{agent-id}",
"match": {
"channel": "discord",
"accountId": "interviewee"
}
}
```
- Write back with `openclaw config set`
- Delete `bindings.lock`
4. **Configure interviewee account**:
```bash
openclaw config set channels.discord.accounts.interviewee {
"enabled": true,
"token": "<secret-mgr get-secret --key interviewee-discord-token>",
"groupPolicy": "open",
"streaming": { "mode": "off" }
}
```