docs(skill): sync README and AGENTS guidance
Some checks failed
Test Suite / test (3.11) (push) Failing after 1m23s
Test Suite / test (3.12) (push) Failing after 1m4s
Test Suite / test (3.13) (push) Failing after 1m4s

This commit is contained in:
Hua
2026-03-17 16:00:59 +08:00
parent 59b9b54cbc
commit 0126061d53
2 changed files with 11 additions and 1 deletions

View File

@@ -24,12 +24,16 @@ Recent history favors short Conventional Commit subjects such as `fix(memory): .
## Security & Configuration Tips ## Security & Configuration Tips
Do not commit real API keys, tokens, chat logs, or workspace data. Keep local secrets in `~/.nanobot/config.json` and use sanitized examples in docs and tests. If you change authentication, network access, or other safety-sensitive behavior, update `README.md` or `SECURITY.md` in the same PR. Do not commit real API keys, tokens, chat logs, or workspace data. Keep local secrets in `~/.nanobot/config.json` and use sanitized examples in docs and tests. If you change authentication, network access, or other safety-sensitive behavior, update `README.md` or `SECURITY.md` in the same PR.
- If a change affects user-visible behavior, commands, workflows, or contributor conventions, update both `README.md` and `AGENTS.md` in the same patch so runtime docs and repo rules stay aligned.
## Chat Commands & Skills ## Chat Commands & Skills
- Slash commands are handled in `nanobot/agent/loop.py`; keep parsing logic there instead of scattering command behavior across channels. - Slash commands are handled in `nanobot/agent/loop.py`; keep parsing logic there instead of scattering command behavior across channels.
- When a slash command changes user-visible wording, update both `nanobot/locales/en.json` and `nanobot/locales/zh.json`. - When a slash command changes user-visible wording, update both `nanobot/locales/en.json` and `nanobot/locales/zh.json`.
- If a slash command should appear in Telegram's native command menu, also update `nanobot/channels/telegram.py`. - If a slash command should appear in Telegram's native command menu, also update `nanobot/channels/telegram.py`.
- `/skill` currently supports `search`, `install`, `uninstall`, `list`, and `update`. Keep subcommand dispatch in `nanobot/agent/loop.py`.
- `/skill` shells out to `npx clawhub@latest`; it requires Node.js/`npx` at runtime. - `/skill` shells out to `npx clawhub@latest`; it requires Node.js/`npx` at runtime.
- `/skill uninstall` runs in a non-interactive context, so keep passing `--yes` when shelling out to ClawHub.
- Treat empty `/skill search` output as a user-visible "no results" case rather than a silent success. Surface npm/registry failures directly to the user.
- Never hardcode `~/.nanobot/workspace` for skill installation or lookup. Use the active runtime workspace from config or `--workspace`. - Never hardcode `~/.nanobot/workspace` for skill installation or lookup. Use the active runtime workspace from config or `--workspace`.
- Workspace skills in `<workspace>/skills/` take precedence over built-in skills with the same directory name. - Workspace skills in `<workspace>/skills/` take precedence over built-in skills with the same directory name.

View File

@@ -1347,6 +1347,7 @@ These commands are available inside chats handled by `nanobot agent` or `nanobot
| `/persona set <name>` | Switch persona and start a new session | | `/persona set <name>` | Switch persona and start a new session |
| `/skill search <query>` | Search public skills on ClawHub | | `/skill search <query>` | Search public skills on ClawHub |
| `/skill install <slug>` | Install a ClawHub skill into the active workspace | | `/skill install <slug>` | Install a ClawHub skill into the active workspace |
| `/skill uninstall <slug>` | Remove a ClawHub-managed skill from the active workspace |
| `/skill list` | List ClawHub-managed skills in the active workspace | | `/skill list` | List ClawHub-managed skills in the active workspace |
| `/skill update` | Update all ClawHub-managed skills in the active workspace | | `/skill update` | Update all ClawHub-managed skills in the active workspace |
| `/stop` | Stop the current task | | `/stop` | Stop the current task |
@@ -1354,9 +1355,14 @@ These commands are available inside chats handled by `nanobot agent` or `nanobot
| `/help` | Show command help | | `/help` | Show command help |
`/skill` uses the active workspace for the current process, not a hard-coded `/skill` uses the active workspace for the current process, not a hard-coded
`~/.nanobot/workspace` path. If you start nanobot with `--workspace`, skill install/list/update `~/.nanobot/workspace` path. If you start nanobot with `--workspace`, skill install/uninstall/list/update
operate on that workspace's `skills/` directory. operate on that workspace's `skills/` directory.
`/skill search` can legitimately return no matches. In that case nanobot now replies with a
clear "no skills found" message instead of leaving the channel on a transient searching state.
If `npx clawhub@latest` cannot reach the npm registry, nanobot also surfaces the registry/network
error directly so the failure is visible to the user.
<details> <details>
<summary><b>Heartbeat (Periodic Tasks)</b></summary> <summary><b>Heartbeat (Periodic Tasks)</b></summary>