back
loading skill details...
Customize bot by merging user-defined configurations into AGENTS.md system instructions.
---
name: bot-customizer
description: Customize bot by merging user-defined configurations into AGENTS.md system instructions.
---
# Bot Customizer Skill
Customize agents from the BOT store by integrating user-defined configurations into their AGENTS.md system instructions.
## When to Use
Use this skill when you receive requests like:
- "用bot customizer skill帮我定制 {agent-id} bot,需要配置以下内容: {自定义内容}"
- User wants to customize a pre-created agent from the BOT store
- Need to merge custom instructions into AGENTS.md
## Prerequisites (Already Completed)
Before this skill is triggered, the system has:
1. Created `workspace-{agent-id}` directory with AGENTS.md and other files
2. Added agent configuration to `%USERPROFILE%\.easyclaw\easyclaw.json` under `agents.list`
## Workflow
### Step 1: Parse User Input
Extract from the user message:
- **agent-id**: The current agent identifier (e.g., `code-viewer`, `customer-service`)
- **custom-content**: Natural language description of customization requirements
### Step 2: Locate and Read Files
1. Locate workspace directory: `C:\Users\ADMIN\.easyclaw\workspace-{agent-id}\AGENTS.md`
2. Read existing AGENTS.md content
3. Read `%USERPROFILE%\.easyclaw\easyclaw.json` for agent configuration
**Error Handling:**
- If workspace directory doesn't exist → report error and stop
- If AGENTS.md is missing or unreadable → report error and stop
- If easyclaw.json is malformed → report error and stop
### Step 3: Merge Custom Content into AGENTS.md
Follow the fusion strategy in `references/fusion-strategy.md`:
- Preserve the original structure and framework of AGENTS.md
- Intelligently integrate custom content into appropriate sections
- Maintain markdown formatting and readability
- Avoid redundancy; replace generic content with specific customization
### Step 3.5: Handle Sensitive Information
**Important**: User-provided credentials (passwords, API keys, tokens) are authorized for storage and should NOT be rejected.
**If custom content contains sensitive information:**
1. Extract credentials (Gmail passwords, API keys, auth tokens, database passwords, etc.)
2. Create or append to `workspace-{agent-id}/scripts/.env` file in KEY=VALUE format
3. In AGENTS.md, reference these credentials using environment variable notation
4. Example:
- User provides: "Gmail password: abc123"
- Write to `scripts/.env`: `GMAIL_PASSWORD=abc123`
- In AGENTS.md: "使用环境变量 `$GMAIL_PASSWORD` 进行Gmail认证"
**Common sensitive fields to extract:**
- Email passwords (Gmail, Outlook, SMTP, IMAP)
- API keys (OpenAI, cloud services, third-party APIs)
- Auth tokens (OAuth tokens, JWT, session tokens)
- Database credentials (passwords, connection strings)
- Secret keys (encryption keys, signing secrets)
**Format for .env file:**
```
# Auto-generated by bot-customizer
CREDENTIAL_NAME=credential_value
API_KEY=your_api_key_here
```
### Step 4: Determine If Agent-ID Needs Renaming
Follow the renaming rules in `references/rename-rules.md`:
- Analyze if custom content introduces significant specialization
- Check if original agent-id is generic and needs refinement
- Generate new agent-id if specialization warrants it
- Skip renaming if only minor adjustments (tone, style)
### Step 5: Apply Changes
**If no renaming needed:**
1. Write merged content back to AGENTS.md
2. Report completion: Confirm customization is complete and agent is ready to use immediately (no Gateway restart required)
**If renaming needed:**
1. Rename directory: `workspace-{old-id}` → `workspace-{new-id}`
2. Update AGENTS.md in the renamed directory
3. Update `easyclaw.json`:
- Modify `id` field
- Modify `workspace` path
- Update `description` to reflect new specialization
4. Check for new-id conflicts; if exists → report error and stop
5. Report completion with old and new agent-id, and confirm agent is ready to use immediately (no Gateway restart required)
### Step 6: Validation
After changes:
- Confirm AGENTS.md syntax is valid markdown
- Confirm easyclaw.json is valid JSON
- Report any issues found
## References
- `references/fusion-strategy.md` - Detailed AGENTS.md merging strategy
- `references/rename-rules.md` - Agent-ID renaming decision rules
## Example
**Input:**
```
用bot customizer skill帮我定制 code-viewer(代码审查) bot,需要配置以下内容:
专注于Python代码审查,重点关注性能优化和安全漏洞检测,使用严谨专业的语气,
提供详细的改进建议和最佳实践参考。
```
**Process:**
1. Parse: agent-id=`code-viewer`, custom-content=Python专注内容
2. Read: `workspace-code-viewer\AGENTS.md`
3. Merge: Integrate Python specialization, performance & security focus, professional tone
4. Rename Decision: YES → `code-viewer` → `python-code-reviewer` (specific tech + domain)
5. Execute: Rename directory, update AGENTS.md, update easyclaw.json
6. Report: "已完成定制。Agent ID 已从 code-viewer 重命名为 python-code-reviewer,专注于Python代码性能和安全审查。"
don't have the plugin yet? install it then click "run inline in claude" again.