winter-super-cli 2026.6.26 → 2026.6.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -5
- package/README.md +66 -0
- package/package.json +5 -1
- package/resources/local/gsap-skills/.claude-plugin/marketplace.json +20 -0
- package/resources/local/gsap-skills/.claude-plugin/plugin.json +6 -0
- package/resources/local/gsap-skills/.cursor-plugin/marketplace.json +13 -0
- package/resources/local/gsap-skills/.cursor-plugin/plugin.json +22 -0
- package/resources/local/gsap-skills/.github/copilot-instructions.md +17 -0
- package/resources/local/gsap-skills/.github/instructions/react.instructions.md +15 -0
- package/resources/local/gsap-skills/.github/instructions/scrolltrigger.instructions.md +18 -0
- package/resources/local/gsap-skills/AGENTS.md +27 -0
- package/resources/local/gsap-skills/CLAUDE.md +1 -0
- package/resources/local/gsap-skills/GEMINI.md +1 -0
- package/resources/local/gsap-skills/LICENSE +21 -0
- package/resources/local/gsap-skills/README.md +163 -0
- package/resources/local/gsap-skills/assets/gsap-green.svg +7 -0
- package/resources/local/gsap-skills/assets/gsap-icon-inverted.svg +15 -0
- package/resources/local/gsap-skills/assets/gsap-icon-square.svg +1 -0
- package/resources/local/gsap-skills/assets/gsap-white.svg +7 -0
- package/resources/local/gsap-skills/examples/README.md +29 -0
- package/resources/local/gsap-skills/examples/nuxt/app/app.vue +3 -0
- package/resources/local/gsap-skills/examples/nuxt/app/composables/useGSAP.ts +91 -0
- package/resources/local/gsap-skills/examples/nuxt/app/pages/index.vue +55 -0
- package/resources/local/gsap-skills/examples/nuxt/nuxt.config.ts +4 -0
- package/resources/local/gsap-skills/examples/nuxt/package.json +18 -0
- package/resources/local/gsap-skills/examples/react/App.jsx +46 -0
- package/resources/local/gsap-skills/examples/react/index.html +12 -0
- package/resources/local/gsap-skills/examples/react/main.jsx +9 -0
- package/resources/local/gsap-skills/examples/react/package.json +21 -0
- package/resources/local/gsap-skills/examples/react/vite.config.js +7 -0
- package/resources/local/gsap-skills/examples/vanilla/index.html +33 -0
- package/resources/local/gsap-skills/examples/vanilla/main.js +36 -0
- package/resources/local/gsap-skills/examples/vue/app.vue +47 -0
- package/resources/local/gsap-skills/examples/vue/index.html +15 -0
- package/resources/local/gsap-skills/examples/vue/main.js +9 -0
- package/resources/local/gsap-skills/examples/vue/package.json +19 -0
- package/resources/local/gsap-skills/examples/vue/vite.config.js +7 -0
- package/resources/local/gsap-skills/skills/gsap-core/SKILL.md +254 -0
- package/resources/local/gsap-skills/skills/gsap-frameworks/SKILL.md +266 -0
- package/resources/local/gsap-skills/skills/gsap-performance/SKILL.md +79 -0
- package/resources/local/gsap-skills/skills/gsap-plugins/SKILL.md +433 -0
- package/resources/local/gsap-skills/skills/gsap-react/SKILL.md +136 -0
- package/resources/local/gsap-skills/skills/gsap-scrolltrigger/SKILL.md +296 -0
- package/resources/local/gsap-skills/skills/gsap-timeline/SKILL.md +107 -0
- package/resources/local/gsap-skills/skills/gsap-utils/SKILL.md +284 -0
- package/resources/local/gsap-skills/skills/llms.txt +39 -0
- package/resources/local/hermes-agent-core/AGENTS.md +1132 -0
- package/resources/local/hermes-agent-core/LICENSE +21 -0
- package/resources/local/hermes-agent-core/README.md +215 -0
- package/resources/local/hermes-agent-core/docs/2026-05-07-s6-overlay-dynamic-subagent-gateways.md +434 -0
- package/resources/local/hermes-agent-core/hermes-already-has-routines.md +160 -0
- package/resources/local/hermes-agent-core/skills/autonomous-ai-agents/DESCRIPTION.md +3 -0
- package/resources/local/hermes-agent-core/skills/autonomous-ai-agents/claude-code/SKILL.md +745 -0
- package/resources/local/hermes-agent-core/skills/autonomous-ai-agents/codex/SKILL.md +130 -0
- package/resources/local/hermes-agent-core/skills/autonomous-ai-agents/hermes-agent/SKILL.md +1021 -0
- package/resources/local/hermes-agent-core/skills/autonomous-ai-agents/kanban-codex-lane/SKILL.md +277 -0
- package/resources/local/hermes-agent-core/skills/autonomous-ai-agents/kanban-codex-lane/templates/pmb-codex-lane-prompt.md +57 -0
- package/resources/local/hermes-agent-core/skills/autonomous-ai-agents/opencode/SKILL.md +219 -0
- package/resources/local/hermes-agent-core/skills/github/DESCRIPTION.md +3 -0
- package/resources/local/hermes-agent-core/skills/github/codebase-inspection/SKILL.md +116 -0
- package/resources/local/hermes-agent-core/skills/github/github-auth/SKILL.md +247 -0
- package/resources/local/hermes-agent-core/skills/github/github-auth/scripts/gh-env.sh +66 -0
- package/resources/local/hermes-agent-core/skills/github/github-code-review/SKILL.md +481 -0
- package/resources/local/hermes-agent-core/skills/github/github-code-review/references/review-output-template.md +74 -0
- package/resources/local/hermes-agent-core/skills/github/github-issues/SKILL.md +370 -0
- package/resources/local/hermes-agent-core/skills/github/github-issues/templates/bug-report.md +35 -0
- package/resources/local/hermes-agent-core/skills/github/github-issues/templates/feature-request.md +31 -0
- package/resources/local/hermes-agent-core/skills/github/github-pr-workflow/SKILL.md +367 -0
- package/resources/local/hermes-agent-core/skills/github/github-pr-workflow/references/ci-troubleshooting.md +183 -0
- package/resources/local/hermes-agent-core/skills/github/github-pr-workflow/references/conventional-commits.md +71 -0
- package/resources/local/hermes-agent-core/skills/github/github-pr-workflow/templates/pr-body-bugfix.md +35 -0
- package/resources/local/hermes-agent-core/skills/github/github-pr-workflow/templates/pr-body-feature.md +33 -0
- package/resources/local/hermes-agent-core/skills/github/github-repo-management/SKILL.md +516 -0
- package/resources/local/hermes-agent-core/skills/github/github-repo-management/references/github-api-cheatsheet.md +161 -0
- package/resources/local/hermes-agent-core/skills/mcp/DESCRIPTION.md +3 -0
- package/resources/local/hermes-agent-core/skills/mcp/native-mcp/SKILL.md +357 -0
- package/resources/local/hermes-agent-core/skills/software-development/debugging-hermes-tui-commands/SKILL.md +152 -0
- package/resources/local/hermes-agent-core/skills/software-development/hermes-agent-skill-authoring/SKILL.md +165 -0
- package/resources/local/hermes-agent-core/skills/software-development/hermes-s6-container-supervision/SKILL.md +176 -0
- package/resources/local/hermes-agent-core/skills/software-development/node-inspect-debugger/SKILL.md +319 -0
- package/resources/local/hermes-agent-core/skills/software-development/plan/SKILL.md +58 -0
- package/resources/local/hermes-agent-core/skills/software-development/python-debugpy/SKILL.md +375 -0
- package/resources/local/hermes-agent-core/skills/software-development/requesting-code-review/SKILL.md +280 -0
- package/resources/local/hermes-agent-core/skills/software-development/spike/SKILL.md +197 -0
- package/resources/local/hermes-agent-core/skills/software-development/subagent-driven-development/SKILL.md +352 -0
- package/resources/local/hermes-agent-core/skills/software-development/subagent-driven-development/references/context-budget-discipline.md +53 -0
- package/resources/local/hermes-agent-core/skills/software-development/subagent-driven-development/references/gates-taxonomy.md +93 -0
- package/resources/local/hermes-agent-core/skills/software-development/systematic-debugging/SKILL.md +367 -0
- package/resources/local/hermes-agent-core/skills/software-development/test-driven-development/SKILL.md +343 -0
- package/resources/local/hermes-agent-core/skills/software-development/writing-plans/SKILL.md +297 -0
- package/resources/local/manifest.json +12 -0
- package/rule.md +2 -0
- package/scripts/audit-pack.js +5 -0
- package/scripts/smoke-browser.js +53 -0
- package/scripts/smoke-package.js +38 -4
- package/skill.md +36 -4
- package/skills/gsap.md +26 -0
- package/skills/hermes-agent.md +17 -0
- package/src/agent/agent-definitions.js +4 -4
- package/src/agent/runtime.js +206 -5
- package/src/agent/subagent-child.js +44 -0
- package/src/ai/capability-scorecard.js +193 -14
- package/src/ai/hermes-core.js +77 -0
- package/src/ai/model-capabilities.js +42 -2
- package/src/ai/prompts/system-prompt.js +16 -2
- package/src/ai/small-model-amplifier.js +35 -7
- package/src/ai/workflow-selector.js +22 -1
- package/src/cli/commands.js +21 -1
- package/src/cli/config.js +42 -4
- package/src/cli/context-loader.js +253 -9
- package/src/cli/conversation-format.js +5 -0
- package/src/cli/input-controller.js +79 -10
- package/src/cli/prompt-builder.js +45 -8
- package/src/cli/repl-commands.js +123 -2
- package/src/cli/repl.js +183 -87
- package/src/cli/slash-commands.js +3 -1
- package/src/cli/tui.js +133 -37
- package/src/mcp/client.js +46 -5
- package/src/tools/agent.js +316 -25
- package/src/tools/executor.js +314 -11
- package/src/tools/permission.js +20 -17
- package/winter.d.ts +112 -10
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: native-mcp
|
|
3
|
+
description: "MCP client: connect servers, register tools (stdio/HTTP)."
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
author: Hermes Agent
|
|
6
|
+
license: MIT
|
|
7
|
+
platforms: [linux, macos, windows]
|
|
8
|
+
metadata:
|
|
9
|
+
hermes:
|
|
10
|
+
tags: [MCP, Tools, Integrations]
|
|
11
|
+
related_skills: [mcporter]
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Native MCP Client
|
|
15
|
+
|
|
16
|
+
Hermes Agent has a built-in MCP client that connects to MCP servers at startup, discovers their tools, and makes them available as first-class tools the agent can call directly. No bridge CLI needed -- tools from MCP servers appear alongside built-in tools like `terminal`, `read_file`, etc.
|
|
17
|
+
|
|
18
|
+
## When to Use
|
|
19
|
+
|
|
20
|
+
Use this whenever you want to:
|
|
21
|
+
- Connect to MCP servers and use their tools from within Hermes Agent
|
|
22
|
+
- Add external capabilities (filesystem access, GitHub, databases, APIs) via MCP
|
|
23
|
+
- Run local stdio-based MCP servers (npx, uvx, or any command)
|
|
24
|
+
- Connect to remote HTTP/StreamableHTTP MCP servers
|
|
25
|
+
- Have MCP tools auto-discovered and available in every conversation
|
|
26
|
+
|
|
27
|
+
For ad-hoc, one-off MCP tool calls from the terminal without configuring anything, see the `mcporter` skill instead.
|
|
28
|
+
|
|
29
|
+
## Prerequisites
|
|
30
|
+
|
|
31
|
+
- **mcp Python package** -- optional dependency; install with `pip install mcp`. If not installed, MCP support is silently disabled.
|
|
32
|
+
- **Node.js** -- required for `npx`-based MCP servers (most community servers)
|
|
33
|
+
- **uv** -- required for `uvx`-based MCP servers (Python-based servers)
|
|
34
|
+
|
|
35
|
+
Install the MCP SDK:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
pip install mcp
|
|
39
|
+
# or, if using uv:
|
|
40
|
+
uv pip install mcp
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Quick Start
|
|
44
|
+
|
|
45
|
+
Add MCP servers to `~/.hermes/config.yaml` under the `mcp_servers` key:
|
|
46
|
+
|
|
47
|
+
```yaml
|
|
48
|
+
mcp_servers:
|
|
49
|
+
time:
|
|
50
|
+
command: "uvx"
|
|
51
|
+
args: ["mcp-server-time"]
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Restart Hermes Agent. On startup it will:
|
|
55
|
+
1. Connect to the server
|
|
56
|
+
2. Discover available tools
|
|
57
|
+
3. Register them with the prefix `mcp_time_*`
|
|
58
|
+
4. Inject them into all platform toolsets
|
|
59
|
+
|
|
60
|
+
You can then use the tools naturally -- just ask the agent to get the current time.
|
|
61
|
+
|
|
62
|
+
## Configuration Reference
|
|
63
|
+
|
|
64
|
+
Each entry under `mcp_servers` is a server name mapped to its config. There are two transport types: **stdio** (command-based) and **HTTP** (url-based).
|
|
65
|
+
|
|
66
|
+
### Stdio Transport (command + args)
|
|
67
|
+
|
|
68
|
+
```yaml
|
|
69
|
+
mcp_servers:
|
|
70
|
+
server_name:
|
|
71
|
+
command: "npx" # (required) executable to run
|
|
72
|
+
args: ["-y", "pkg-name"] # (optional) command arguments, default: []
|
|
73
|
+
env: # (optional) environment variables for the subprocess
|
|
74
|
+
SOME_API_KEY: "value"
|
|
75
|
+
timeout: 120 # (optional) per-tool-call timeout in seconds, default: 120
|
|
76
|
+
connect_timeout: 60 # (optional) initial connection timeout in seconds, default: 60
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### HTTP Transport (url)
|
|
80
|
+
|
|
81
|
+
```yaml
|
|
82
|
+
mcp_servers:
|
|
83
|
+
server_name:
|
|
84
|
+
url: "https://my-server.example.com/mcp" # (required) server URL
|
|
85
|
+
headers: # (optional) HTTP headers
|
|
86
|
+
Authorization: "Bearer sk-..."
|
|
87
|
+
timeout: 180 # (optional) per-tool-call timeout in seconds, default: 120
|
|
88
|
+
connect_timeout: 60 # (optional) initial connection timeout in seconds, default: 60
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### All Config Options
|
|
92
|
+
|
|
93
|
+
| Option | Type | Default | Description |
|
|
94
|
+
|-------------------|--------|---------|---------------------------------------------------|
|
|
95
|
+
| `command` | string | -- | Executable to run (stdio transport, required) |
|
|
96
|
+
| `args` | list | `[]` | Arguments passed to the command |
|
|
97
|
+
| `env` | dict | `{}` | Extra environment variables for the subprocess |
|
|
98
|
+
| `url` | string | -- | Server URL (HTTP transport, required) |
|
|
99
|
+
| `headers` | dict | `{}` | HTTP headers sent with every request |
|
|
100
|
+
| `timeout` | int | `120` | Per-tool-call timeout in seconds |
|
|
101
|
+
| `connect_timeout` | int | `60` | Timeout for initial connection and discovery |
|
|
102
|
+
|
|
103
|
+
Note: A server config must have either `command` (stdio) or `url` (HTTP), not both.
|
|
104
|
+
|
|
105
|
+
## How It Works
|
|
106
|
+
|
|
107
|
+
### Startup Discovery
|
|
108
|
+
|
|
109
|
+
When Hermes Agent starts, `discover_mcp_tools()` is called during tool initialization:
|
|
110
|
+
|
|
111
|
+
1. Reads `mcp_servers` from `~/.hermes/config.yaml`
|
|
112
|
+
2. For each server, spawns a connection in a dedicated background event loop
|
|
113
|
+
3. Initializes the MCP session and calls `list_tools()` to discover available tools
|
|
114
|
+
4. Registers each tool in the Hermes tool registry
|
|
115
|
+
|
|
116
|
+
### Tool Naming Convention
|
|
117
|
+
|
|
118
|
+
MCP tools are registered with the naming pattern:
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
mcp_{server_name}_{tool_name}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Hyphens and dots in names are replaced with underscores for LLM API compatibility.
|
|
125
|
+
|
|
126
|
+
Examples:
|
|
127
|
+
- Server `filesystem`, tool `read_file` → `mcp_filesystem_read_file`
|
|
128
|
+
- Server `github`, tool `list-issues` → `mcp_github_list_issues`
|
|
129
|
+
- Server `my-api`, tool `fetch.data` → `mcp_my_api_fetch_data`
|
|
130
|
+
|
|
131
|
+
### Auto-Injection
|
|
132
|
+
|
|
133
|
+
After discovery, MCP tools are automatically injected into all `hermes-*` platform toolsets (CLI, Discord, Telegram, etc.). This means MCP tools are available in every conversation without any additional configuration.
|
|
134
|
+
|
|
135
|
+
### Connection Lifecycle
|
|
136
|
+
|
|
137
|
+
- Each server runs as a long-lived asyncio Task in a background daemon thread
|
|
138
|
+
- Connections persist for the lifetime of the agent process
|
|
139
|
+
- If a connection drops, automatic reconnection with exponential backoff kicks in (up to 5 retries, max 60s backoff)
|
|
140
|
+
- On agent shutdown, all connections are gracefully closed
|
|
141
|
+
|
|
142
|
+
### Idempotency
|
|
143
|
+
|
|
144
|
+
`discover_mcp_tools()` is idempotent -- calling it multiple times only connects to servers that aren't already connected. Failed servers are retried on subsequent calls.
|
|
145
|
+
|
|
146
|
+
## Transport Types
|
|
147
|
+
|
|
148
|
+
### Stdio Transport
|
|
149
|
+
|
|
150
|
+
The most common transport. Hermes launches the MCP server as a subprocess and communicates over stdin/stdout.
|
|
151
|
+
|
|
152
|
+
```yaml
|
|
153
|
+
mcp_servers:
|
|
154
|
+
filesystem:
|
|
155
|
+
command: "npx"
|
|
156
|
+
args: ["-y", "@modelcontextprotocol/server-filesystem", "/home/user/projects"]
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
The subprocess inherits a **filtered** environment (see Security section below) plus any variables you specify in `env`.
|
|
160
|
+
|
|
161
|
+
### HTTP / StreamableHTTP Transport
|
|
162
|
+
|
|
163
|
+
For remote or shared MCP servers. Requires the `mcp` package to include HTTP client support (`mcp.client.streamable_http`).
|
|
164
|
+
|
|
165
|
+
```yaml
|
|
166
|
+
mcp_servers:
|
|
167
|
+
remote_api:
|
|
168
|
+
url: "https://mcp.example.com/mcp"
|
|
169
|
+
headers:
|
|
170
|
+
Authorization: "Bearer sk-..."
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
If HTTP support is not available in your installed `mcp` version, the server will fail with an ImportError and other servers will continue normally.
|
|
174
|
+
|
|
175
|
+
## Security
|
|
176
|
+
|
|
177
|
+
### Environment Variable Filtering
|
|
178
|
+
|
|
179
|
+
For stdio servers, Hermes does NOT pass your full shell environment to MCP subprocesses. Only safe baseline variables are inherited:
|
|
180
|
+
|
|
181
|
+
- `PATH`, `HOME`, `USER`, `LANG`, `LC_ALL`, `TERM`, `SHELL`, `TMPDIR`
|
|
182
|
+
- Any `XDG_*` variables
|
|
183
|
+
|
|
184
|
+
All other environment variables (API keys, tokens, secrets) are excluded unless you explicitly add them via the `env` config key. This prevents accidental credential leakage to untrusted MCP servers.
|
|
185
|
+
|
|
186
|
+
```yaml
|
|
187
|
+
mcp_servers:
|
|
188
|
+
github:
|
|
189
|
+
command: "npx"
|
|
190
|
+
args: ["-y", "@modelcontextprotocol/server-github"]
|
|
191
|
+
env:
|
|
192
|
+
# Only this token is passed to the subprocess
|
|
193
|
+
GITHUB_PERSONAL_ACCESS_TOKEN: "ghp_..."
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### Credential Stripping in Error Messages
|
|
197
|
+
|
|
198
|
+
If an MCP tool call fails, any credential-like patterns in the error message are automatically redacted before being shown to the LLM. This covers:
|
|
199
|
+
|
|
200
|
+
- GitHub PATs (`ghp_...`)
|
|
201
|
+
- OpenAI-style keys (`sk-...`)
|
|
202
|
+
- Bearer tokens
|
|
203
|
+
- Generic `token=`, `key=`, `API_KEY=`, `password=`, `secret=` patterns
|
|
204
|
+
|
|
205
|
+
## Troubleshooting
|
|
206
|
+
|
|
207
|
+
### "MCP SDK not available -- skipping MCP tool discovery"
|
|
208
|
+
|
|
209
|
+
The `mcp` Python package is not installed. Install it:
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
pip install mcp
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### "No MCP servers configured"
|
|
216
|
+
|
|
217
|
+
No `mcp_servers` key in `~/.hermes/config.yaml`, or it's empty. Add at least one server.
|
|
218
|
+
|
|
219
|
+
### "Failed to connect to MCP server 'X'"
|
|
220
|
+
|
|
221
|
+
Common causes:
|
|
222
|
+
- **Command not found**: The `command` binary isn't on PATH. Ensure `npx`, `uvx`, or the relevant command is installed.
|
|
223
|
+
- **Package not found**: For npx servers, the npm package may not exist or may need `-y` in args to auto-install.
|
|
224
|
+
- **Timeout**: The server took too long to start. Increase `connect_timeout`.
|
|
225
|
+
- **Port conflict**: For HTTP servers, the URL may be unreachable.
|
|
226
|
+
|
|
227
|
+
### "MCP server 'X' requires HTTP transport but mcp.client.streamable_http is not available"
|
|
228
|
+
|
|
229
|
+
Your `mcp` package version doesn't include HTTP client support. Upgrade:
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
pip install --upgrade mcp
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### Tools not appearing
|
|
236
|
+
|
|
237
|
+
- Check that the server is listed under `mcp_servers` (not `mcp` or `servers`)
|
|
238
|
+
- Ensure the YAML indentation is correct
|
|
239
|
+
- Look at Hermes Agent startup logs for connection messages
|
|
240
|
+
- Tool names are prefixed with `mcp_{server}_{tool}` -- look for that pattern
|
|
241
|
+
|
|
242
|
+
### Connection keeps dropping
|
|
243
|
+
|
|
244
|
+
The client retries up to 5 times with exponential backoff (1s, 2s, 4s, 8s, 16s, capped at 60s). If the server is fundamentally unreachable, it gives up after 5 attempts. Check the server process and network connectivity.
|
|
245
|
+
|
|
246
|
+
## Examples
|
|
247
|
+
|
|
248
|
+
### Time Server (uvx)
|
|
249
|
+
|
|
250
|
+
```yaml
|
|
251
|
+
mcp_servers:
|
|
252
|
+
time:
|
|
253
|
+
command: "uvx"
|
|
254
|
+
args: ["mcp-server-time"]
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
Registers tools like `mcp_time_get_current_time`.
|
|
258
|
+
|
|
259
|
+
### Filesystem Server (npx)
|
|
260
|
+
|
|
261
|
+
```yaml
|
|
262
|
+
mcp_servers:
|
|
263
|
+
filesystem:
|
|
264
|
+
command: "npx"
|
|
265
|
+
args: ["-y", "@modelcontextprotocol/server-filesystem", "/home/user/documents"]
|
|
266
|
+
timeout: 30
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
Registers tools like `mcp_filesystem_read_file`, `mcp_filesystem_write_file`, `mcp_filesystem_list_directory`.
|
|
270
|
+
|
|
271
|
+
### GitHub Server with Authentication
|
|
272
|
+
|
|
273
|
+
```yaml
|
|
274
|
+
mcp_servers:
|
|
275
|
+
github:
|
|
276
|
+
command: "npx"
|
|
277
|
+
args: ["-y", "@modelcontextprotocol/server-github"]
|
|
278
|
+
env:
|
|
279
|
+
GITHUB_PERSONAL_ACCESS_TOKEN: "ghp_xxxxxxxxxxxxxxxxxxxx"
|
|
280
|
+
timeout: 60
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
Registers tools like `mcp_github_list_issues`, `mcp_github_create_pull_request`, etc.
|
|
284
|
+
|
|
285
|
+
### Remote HTTP Server
|
|
286
|
+
|
|
287
|
+
```yaml
|
|
288
|
+
mcp_servers:
|
|
289
|
+
company_api:
|
|
290
|
+
url: "https://mcp.mycompany.com/v1/mcp"
|
|
291
|
+
headers:
|
|
292
|
+
Authorization: "Bearer sk-xxxxxxxxxxxxxxxxxxxx"
|
|
293
|
+
X-Team-Id: "engineering"
|
|
294
|
+
timeout: 180
|
|
295
|
+
connect_timeout: 30
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
### Multiple Servers
|
|
299
|
+
|
|
300
|
+
```yaml
|
|
301
|
+
mcp_servers:
|
|
302
|
+
time:
|
|
303
|
+
command: "uvx"
|
|
304
|
+
args: ["mcp-server-time"]
|
|
305
|
+
|
|
306
|
+
filesystem:
|
|
307
|
+
command: "npx"
|
|
308
|
+
args: ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
|
|
309
|
+
|
|
310
|
+
github:
|
|
311
|
+
command: "npx"
|
|
312
|
+
args: ["-y", "@modelcontextprotocol/server-github"]
|
|
313
|
+
env:
|
|
314
|
+
GITHUB_PERSONAL_ACCESS_TOKEN: "ghp_xxxxxxxxxxxxxxxxxxxx"
|
|
315
|
+
|
|
316
|
+
company_api:
|
|
317
|
+
url: "https://mcp.internal.company.com/mcp"
|
|
318
|
+
headers:
|
|
319
|
+
Authorization: "Bearer sk-xxxxxxxxxxxxxxxxxxxx"
|
|
320
|
+
timeout: 300
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
All tools from all servers are registered and available simultaneously. Each server's tools are prefixed with its name to avoid collisions.
|
|
324
|
+
|
|
325
|
+
## Sampling (Server-Initiated LLM Requests)
|
|
326
|
+
|
|
327
|
+
Hermes supports MCP's `sampling/createMessage` capability — MCP servers can request LLM completions through the agent during tool execution. This enables agent-in-the-loop workflows (data analysis, content generation, decision-making).
|
|
328
|
+
|
|
329
|
+
Sampling is **enabled by default**. Configure per server:
|
|
330
|
+
|
|
331
|
+
```yaml
|
|
332
|
+
mcp_servers:
|
|
333
|
+
my_server:
|
|
334
|
+
command: "npx"
|
|
335
|
+
args: ["-y", "my-mcp-server"]
|
|
336
|
+
sampling:
|
|
337
|
+
enabled: true # default: true
|
|
338
|
+
model: "gemini-3-flash" # model override (optional)
|
|
339
|
+
max_tokens_cap: 4096 # max tokens per request
|
|
340
|
+
timeout: 30 # LLM call timeout (seconds)
|
|
341
|
+
max_rpm: 10 # max requests per minute
|
|
342
|
+
allowed_models: [] # model whitelist (empty = all)
|
|
343
|
+
max_tool_rounds: 5 # tool loop limit (0 = disable)
|
|
344
|
+
log_level: "info" # audit verbosity
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
Servers can also include `tools` in sampling requests for multi-turn tool-augmented workflows. The `max_tool_rounds` config prevents infinite tool loops. Per-server audit metrics (requests, errors, tokens, tool use count) are tracked via `get_mcp_status()`.
|
|
348
|
+
|
|
349
|
+
Disable sampling for untrusted servers with `sampling: { enabled: false }`.
|
|
350
|
+
|
|
351
|
+
## Notes
|
|
352
|
+
|
|
353
|
+
- MCP tools are called synchronously from the agent's perspective but run asynchronously on a dedicated background event loop
|
|
354
|
+
- Tool results are returned as JSON with either `{"result": "..."}` or `{"error": "..."}`
|
|
355
|
+
- The native MCP client is independent of `mcporter` -- you can use both simultaneously
|
|
356
|
+
- Server connections are persistent and shared across all conversations in the same agent process
|
|
357
|
+
- Adding or removing servers requires restarting the agent (no hot-reload currently)
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: debugging-hermes-tui-commands
|
|
3
|
+
description: "Debug Hermes TUI slash commands: Python, gateway, Ink UI."
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
author: Hermes Agent
|
|
6
|
+
license: MIT
|
|
7
|
+
platforms: [linux, macos, windows]
|
|
8
|
+
metadata:
|
|
9
|
+
hermes:
|
|
10
|
+
tags: [debugging, hermes-agent, tui, slash-commands, typescript, python]
|
|
11
|
+
related_skills: [python-debugpy, node-inspect-debugger, systematic-debugging]
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Debugging Hermes TUI Slash Commands
|
|
15
|
+
|
|
16
|
+
## Overview
|
|
17
|
+
|
|
18
|
+
Hermes slash commands span three layers — Python command registry, tui_gateway JSON-RPC bridge, and the Ink/TypeScript frontend. When a command misbehaves (missing from autocomplete, works in CLI but not TUI, config persists but UI doesn't update), the bug is almost always one layer being out of sync with another.
|
|
19
|
+
|
|
20
|
+
Use this skill when you encounter issues with slash commands in the Hermes TUI, particularly when commands aren't showing in autocomplete, aren't working properly in the TUI, or need to be added/updated.
|
|
21
|
+
|
|
22
|
+
## When to Use
|
|
23
|
+
|
|
24
|
+
- A slash command exists in one part of the codebase but doesn't work fully
|
|
25
|
+
- A command needs to be added to both backend and frontend
|
|
26
|
+
- Command autocomplete isn't working for specific commands
|
|
27
|
+
- Command behavior is inconsistent between CLI and TUI
|
|
28
|
+
- A command persists config but doesn't apply live in the TUI
|
|
29
|
+
|
|
30
|
+
## Architecture Overview
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
Python backend (hermes_cli/commands.py) <- canonical COMMAND_REGISTRY
|
|
34
|
+
│
|
|
35
|
+
▼
|
|
36
|
+
TUI gateway (tui_gateway/server.py) <- slash.exec / command.dispatch
|
|
37
|
+
│
|
|
38
|
+
▼
|
|
39
|
+
TUI frontend (ui-tui/src/app/slash/) <- local handlers + fallthrough
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Command definitions must be registered consistently across Python and TypeScript to work properly. The Python `COMMAND_REGISTRY` is the source of truth for: CLI dispatch, gateway help, Telegram BotCommand menu, Slack subcommand map, and autocomplete data shipped to Ink.
|
|
43
|
+
|
|
44
|
+
## Investigation Steps
|
|
45
|
+
|
|
46
|
+
1. **Check if the command exists in the TUI frontend:**
|
|
47
|
+
```bash
|
|
48
|
+
search_files --pattern "/commandname" --file_glob "*.ts" --path ui-tui/
|
|
49
|
+
search_files --pattern "/commandname" --file_glob "*.tsx" --path ui-tui/
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
2. **Examine the TUI command definition:**
|
|
53
|
+
```bash
|
|
54
|
+
read_file ui-tui/src/app/slash/commands/core.ts
|
|
55
|
+
# If not there:
|
|
56
|
+
search_files --pattern "commandname" --path ui-tui/src/app/slash/commands --target files
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
3. **Check if the command exists in the Python backend:**
|
|
60
|
+
```bash
|
|
61
|
+
search_files --pattern "CommandDef" --file_glob "*.py" --path hermes_cli/
|
|
62
|
+
search_files --pattern "commandname" --path hermes_cli/commands.py --context 3
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
4. **Examine the gateway implementation:**
|
|
66
|
+
```bash
|
|
67
|
+
search_files --pattern "complete.slash|slash.exec" --path tui_gateway/
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Fix: Missing Command Autocomplete
|
|
71
|
+
|
|
72
|
+
If a command exists in the TUI but doesn't show in autocomplete:
|
|
73
|
+
|
|
74
|
+
1. Add a `CommandDef` entry to `COMMAND_REGISTRY` in `hermes_cli/commands.py`:
|
|
75
|
+
```python
|
|
76
|
+
CommandDef("commandname", "Description of the command", "Session",
|
|
77
|
+
cli_only=True, aliases=("alias",),
|
|
78
|
+
args_hint="[arg1|arg2|arg3]",
|
|
79
|
+
subcommands=("arg1", "arg2", "arg3")),
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
2. Pick `cli_only` vs gateway availability carefully:
|
|
83
|
+
- `cli_only=True` — only in the interactive CLI/TUI
|
|
84
|
+
- `gateway_only=True` — only in messaging platforms
|
|
85
|
+
- neither — available everywhere
|
|
86
|
+
- `gateway_config_gate="display.foo"` — config-gated availability in the gateway
|
|
87
|
+
|
|
88
|
+
3. Ensure `subcommands` matches the expected tab-completion options shown by the TUI.
|
|
89
|
+
|
|
90
|
+
4. If the command runs server-side, add a handler in `HermesCLI.process_command()` in `cli.py`:
|
|
91
|
+
```python
|
|
92
|
+
elif canonical == "commandname":
|
|
93
|
+
self._handle_commandname(cmd_original)
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
5. For gateway-available commands, add a handler in `gateway/run.py`:
|
|
97
|
+
```python
|
|
98
|
+
if canonical == "commandname":
|
|
99
|
+
return await self._handle_commandname(event)
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Common Issues
|
|
103
|
+
|
|
104
|
+
1. **Command shows in TUI but not in autocomplete.** The command is defined in the TUI codebase but missing from `COMMAND_REGISTRY` in `hermes_cli/commands.py`. Autocomplete data ships from Python.
|
|
105
|
+
|
|
106
|
+
2. **Command shows in autocomplete but doesn't work.** Check the command handler in `tui_gateway/server.py` and the frontend handler in `ui-tui/src/app/createSlashHandler.ts`. If the command is local-only in Ink, it must be handled in `app.tsx` built-in branch; otherwise it falls through to `slash.exec` and must have a Python handler.
|
|
107
|
+
|
|
108
|
+
3. **Command behavior differs between CLI and TUI.** The command might have different implementations. Check both `cli.py::process_command` and the TUI's local handler. Local TUI handlers take precedence over gateway dispatch.
|
|
109
|
+
|
|
110
|
+
4. **Command persists config but doesn't apply live.** For TUI-local commands, updating `config.set` is not enough. Also patch the relevant nanostore state immediately (usually `patchUiState(...)`) and pass any new state through rendering components. Example: `/details collapsed` must update live detail visibility, not just save `details_mode`; in-session global `/details <mode>` may need a separate command-override flag so live commands can override built-in section defaults while startup/config sync preserves default-expanded thinking/tools behavior.
|
|
111
|
+
|
|
112
|
+
5. **Gateway dispatch silently ignores the command.** The gateway only dispatches commands it knows about. Check `GATEWAY_KNOWN_COMMANDS` (derived from `COMMAND_REGISTRY` automatically) includes the canonical name. If the command is `cli_only` with a `gateway_config_gate`, verify the gated config value is truthy.
|
|
113
|
+
|
|
114
|
+
## Debugging Tactics
|
|
115
|
+
|
|
116
|
+
When surface-level inspection doesn't reveal the bug:
|
|
117
|
+
|
|
118
|
+
- **Python side hangs or misbehaves:** use the `python-debugpy` skill to break inside `_SlashWorker.exec` or the command handler. `remote-pdb` set at the handler entry is the fastest path.
|
|
119
|
+
- **Ink side not reacting:** use the `node-inspect-debugger` skill to break in `app.tsx`'s slash dispatch or the local command branch. `sb('dist/app.js', <line>)` after `npm run build`.
|
|
120
|
+
- **Registry mismatch / unclear which side is wrong:** compare the canonical `COMMAND_REGISTRY` entry against the TUI's local command list side-by-side.
|
|
121
|
+
|
|
122
|
+
## Pitfalls
|
|
123
|
+
|
|
124
|
+
- Don't forget to set the appropriate category for the command in `CommandDef` (e.g., "Session", "Configuration", "Tools & Skills", "Info", "Exit")
|
|
125
|
+
- Make sure any aliases are properly registered in the `aliases` tuple — no other file changes are needed, everything downstream (Telegram menu, Slack mapping, autocomplete, help) derives from it
|
|
126
|
+
- For commands with subcommands, ensure the `subcommands` tuple in `CommandDef` matches what's in the TUI code
|
|
127
|
+
- `cli_only=True` commands won't work in gateway/messaging platforms — unless you add a `gateway_config_gate` and the gate is truthy
|
|
128
|
+
- After adding live UI state, search every consumer of the old prop/helper and thread the new state through all render paths, not just the active streaming path. TUI detail rendering has at least two important paths: live `StreamingAssistant`/`ToolTrail` and transcript/pending `MessageLine` rows. A `/clean` pass should explicitly check both.
|
|
129
|
+
- Rebuild the TUI (`npm --prefix ui-tui run build`) before testing — tsx watch mode may lag on first launch
|
|
130
|
+
|
|
131
|
+
## Verification
|
|
132
|
+
|
|
133
|
+
After fixing:
|
|
134
|
+
|
|
135
|
+
1. Rebuild the TUI:
|
|
136
|
+
```bash
|
|
137
|
+
cd /home/bb/hermes-agent && npm --prefix ui-tui run build
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
2. Run the TUI and test the command:
|
|
141
|
+
```bash
|
|
142
|
+
hermes --tui
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
3. Type `/` and verify the command appears in autocomplete suggestions with the expected description and args hint.
|
|
146
|
+
|
|
147
|
+
4. Execute the command and confirm:
|
|
148
|
+
- Expected behavior fires
|
|
149
|
+
- Any persisted config updates correctly (`read_file ~/.hermes/config.yaml`)
|
|
150
|
+
- Live UI state reflects the change immediately (not just after restart)
|
|
151
|
+
|
|
152
|
+
5. If the command is also gateway-available, test it from at least one messaging platform (or run the gateway tests: `scripts/run_tests.sh tests/gateway/`).
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hermes-agent-skill-authoring
|
|
3
|
+
description: "Author in-repo SKILL.md: frontmatter, validator, structure."
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
author: Hermes Agent
|
|
6
|
+
license: MIT
|
|
7
|
+
platforms: [linux, macos, windows]
|
|
8
|
+
metadata:
|
|
9
|
+
hermes:
|
|
10
|
+
tags: [skills, authoring, hermes-agent, conventions, skill-md]
|
|
11
|
+
related_skills: [writing-plans, requesting-code-review]
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Authoring Hermes-Agent Skills (in-repo)
|
|
15
|
+
|
|
16
|
+
## Overview
|
|
17
|
+
|
|
18
|
+
There are two places a SKILL.md can live:
|
|
19
|
+
|
|
20
|
+
1. **User-local:** `~/.hermes/skills/<maybe-category>/<name>/SKILL.md` — personal, not shared. Created via `skill_manage(action='create')`.
|
|
21
|
+
2. **In-repo (this skill is about this case):** `/home/bb/hermes-agent/skills/<category>/<name>/SKILL.md` — committed, shipped with the package. Use `write_file` + `git add`. `skill_manage(action='create')` does NOT target this tree.
|
|
22
|
+
|
|
23
|
+
## When to Use
|
|
24
|
+
|
|
25
|
+
- User asks you to add a skill "in this branch / repo / commit"
|
|
26
|
+
- You're committing a reusable workflow that should ship with hermes-agent
|
|
27
|
+
- You're editing an existing skill under `/home/bb/hermes-agent/skills/` (use `patch` for small edits, `write_file` for rewrites; `skill_manage` still works for patch on in-repo skills, but not for `create`)
|
|
28
|
+
|
|
29
|
+
## Required Frontmatter
|
|
30
|
+
|
|
31
|
+
Source of truth: `tools/skill_manager_tool.py::_validate_frontmatter`. Hard requirements:
|
|
32
|
+
|
|
33
|
+
- Starts with `---` as the first bytes (no leading blank line).
|
|
34
|
+
- Closes with `\n---\n` before the body.
|
|
35
|
+
- Parses as a YAML mapping.
|
|
36
|
+
- `name` field present.
|
|
37
|
+
- `description` field present, ≤ **1024 chars** (`MAX_DESCRIPTION_LENGTH`).
|
|
38
|
+
- Non-empty body after the closing `---`.
|
|
39
|
+
|
|
40
|
+
Peer-matched shape used by every skill under `skills/software-development/`:
|
|
41
|
+
|
|
42
|
+
```yaml
|
|
43
|
+
---
|
|
44
|
+
name: my-skill-name # lowercase, hyphens, ≤64 chars (MAX_NAME_LENGTH)
|
|
45
|
+
description: Use when <trigger>. <one-line behavior>.
|
|
46
|
+
version: 1.0.0
|
|
47
|
+
author: Hermes Agent
|
|
48
|
+
license: MIT
|
|
49
|
+
metadata:
|
|
50
|
+
hermes:
|
|
51
|
+
tags: [short, descriptive, tags]
|
|
52
|
+
related_skills: [other-skill, another-skill]
|
|
53
|
+
---
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
`version` / `author` / `license` / `metadata` are NOT enforced by the validator, but every peer has them — omit and your skill sticks out.
|
|
57
|
+
|
|
58
|
+
## Size Limits
|
|
59
|
+
|
|
60
|
+
- Description: ≤ 1024 chars (enforced).
|
|
61
|
+
- Full SKILL.md: ≤ 100,000 chars (enforced as `MAX_SKILL_CONTENT_CHARS`, ~36k tokens).
|
|
62
|
+
- Peer skills in `software-development/` sit at **8-14k chars**. Aim for that range. If you're pushing past 20k, split into `references/*.md` and reference them from SKILL.md.
|
|
63
|
+
|
|
64
|
+
## Peer-Matched Structure
|
|
65
|
+
|
|
66
|
+
Every in-repo skill follows roughly:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
# <Title>
|
|
70
|
+
|
|
71
|
+
## Overview
|
|
72
|
+
One or two paragraphs: what and why.
|
|
73
|
+
|
|
74
|
+
## When to Use
|
|
75
|
+
- Bulleted triggers
|
|
76
|
+
- "Don't use for:" counter-triggers
|
|
77
|
+
|
|
78
|
+
## <Topic sections specific to the skill>
|
|
79
|
+
- Quick-reference tables are common
|
|
80
|
+
- Code blocks with exact commands
|
|
81
|
+
- Hermes-specific recipes (tests via scripts/run_tests.sh, ui-tui paths, etc.)
|
|
82
|
+
|
|
83
|
+
## Common Pitfalls
|
|
84
|
+
Numbered list of mistakes and their fixes.
|
|
85
|
+
|
|
86
|
+
## Verification Checklist
|
|
87
|
+
- [ ] Checkbox list of post-action verifications
|
|
88
|
+
|
|
89
|
+
## One-Shot Recipes (optional)
|
|
90
|
+
Named scenarios → concrete command sequences.
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Not every section is mandatory, but `Overview` + `When to Use` + actionable body + pitfalls are the minimum for the skill to feel like a peer.
|
|
94
|
+
|
|
95
|
+
## Directory Placement
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
skills/<category>/<skill-name>/SKILL.md
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Categories currently in repo (confirm with `ls skills/`): `autonomous-ai-agents`, `creative`, `data-science`, `devops`, `dogfood`, `email`, `gaming`, `github`, `leisure`, `mcp`, `media`, `mlops/*`, `note-taking`, `productivity`, `red-teaming`, `research`, `smart-home`, `social-media`, `software-development`.
|
|
102
|
+
|
|
103
|
+
Pick the closest existing category. Don't invent new top-level categories casually.
|
|
104
|
+
|
|
105
|
+
## Workflow
|
|
106
|
+
|
|
107
|
+
1. **Survey peers** in the target category:
|
|
108
|
+
```
|
|
109
|
+
ls skills/<category>/
|
|
110
|
+
```
|
|
111
|
+
Read 2-3 peer SKILL.md files to match tone and structure.
|
|
112
|
+
2. **Check validator constraints** in `tools/skill_manager_tool.py` if unsure.
|
|
113
|
+
3. **Draft** with `write_file` to `skills/<category>/<name>/SKILL.md`.
|
|
114
|
+
4. **Validate locally**:
|
|
115
|
+
```python
|
|
116
|
+
import yaml, re, pathlib
|
|
117
|
+
content = pathlib.Path("skills/<category>/<name>/SKILL.md").read_text()
|
|
118
|
+
assert content.startswith("---")
|
|
119
|
+
m = re.search(r'\n---\s*\n', content[3:])
|
|
120
|
+
fm = yaml.safe_load(content[3:m.start()+3])
|
|
121
|
+
assert "name" in fm and "description" in fm
|
|
122
|
+
assert len(fm["description"]) <= 1024
|
|
123
|
+
assert len(content) <= 100_000
|
|
124
|
+
```
|
|
125
|
+
5. **Git add + commit** on the active branch.
|
|
126
|
+
6. **Note:** the CURRENT session's skill loader is cached — `skill_view` / `skills_list` will not see the new skill until a new session. This is expected, not a bug.
|
|
127
|
+
|
|
128
|
+
## Cross-Referencing Other Skills
|
|
129
|
+
|
|
130
|
+
`metadata.hermes.related_skills` unions both trees (`skills/` in-repo and `~/.hermes/skills/`) at load time. You CAN reference a user-local skill from an in-repo skill, but it won't resolve for other users who clone the repo fresh. Prefer referencing only in-repo skills from in-repo skills. If a frequently-referenced skill lives only in `~/.hermes/skills/`, consider promoting it to the repo.
|
|
131
|
+
|
|
132
|
+
## Editing Existing In-Repo Skills
|
|
133
|
+
|
|
134
|
+
- **Small fix (typo, added pitfall, tightened trigger):** `skill_manage(action='patch', name=..., old_string=..., new_string=...)` works fine on in-repo skills.
|
|
135
|
+
- **Major rewrite:** `write_file` the whole SKILL.md. `skill_manage(action='edit')` also works but requires supplying the full new content.
|
|
136
|
+
- **Adding supporting files:** `write_file` to `skills/<category>/<name>/references/<file>.md`, `templates/<file>`, or `scripts/<file>`. `skill_manage(action='write_file')` also works and enforces the references/templates/scripts/assets subdir allowlist.
|
|
137
|
+
- **Always commit** the edit — in-repo skills are source, not runtime state.
|
|
138
|
+
|
|
139
|
+
## Common Pitfalls
|
|
140
|
+
|
|
141
|
+
1. **Using `skill_manage(action='create')` for an in-repo skill.** It writes to `~/.hermes/skills/`, not the repo tree. Use `write_file` for in-repo creation.
|
|
142
|
+
|
|
143
|
+
2. **Leading whitespace before `---`.** The validator checks `content.startswith("---")`; any leading blank line or BOM fails validation.
|
|
144
|
+
|
|
145
|
+
3. **Description too generic.** Peer descriptions start with "Use when ..." and describe the *trigger class*, not the one task. "Use when debugging X" > "Debug X".
|
|
146
|
+
|
|
147
|
+
4. **Forgetting the author/license/metadata block.** Not validator-enforced, but every peer has it; omitting makes the skill look half-finished.
|
|
148
|
+
|
|
149
|
+
5. **Writing a skill that duplicates a peer.** Before creating, `ls skills/<category>/` and open 2-3 peers. Prefer extending an existing skill to creating a narrow sibling.
|
|
150
|
+
|
|
151
|
+
6. **Expecting the current session to see the new skill.** It won't. The skill loader is initialized at session start. Verify in a fresh session or via `skill_view` using the exact path.
|
|
152
|
+
|
|
153
|
+
7. **Linking to skills that don't exist in-repo.** `related_skills: [some-user-local-skill]` works for you but breaks for other clones. Prefer only in-repo links.
|
|
154
|
+
|
|
155
|
+
## Verification Checklist
|
|
156
|
+
|
|
157
|
+
- [ ] File is at `skills/<category>/<name>/SKILL.md` (not in `~/.hermes/skills/`)
|
|
158
|
+
- [ ] Frontmatter starts at byte 0 with `---`, closes with `\n---\n`
|
|
159
|
+
- [ ] `name`, `description`, `version`, `author`, `license`, `metadata.hermes.{tags, related_skills}` all present
|
|
160
|
+
- [ ] Name ≤ 64 chars, lowercase + hyphens
|
|
161
|
+
- [ ] Description ≤ 1024 chars and starts with "Use when ..."
|
|
162
|
+
- [ ] Total file ≤ 100,000 chars (aim for 8-15k)
|
|
163
|
+
- [ ] Structure: `# Title` → `## Overview` → `## When to Use` → body → `## Common Pitfalls` → `## Verification Checklist`
|
|
164
|
+
- [ ] `related_skills` references resolve in-repo (or are explicitly OK to be user-local)
|
|
165
|
+
- [ ] `git add skills/<category>/<name>/ && git commit` completed on the intended branch
|