You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add hermes to the audit client set. Capture via HERMES_HOME-isolated
temp config pointing at the OpenAI loopback; one-shot with
`hermes chat -q "hi"`. Patch openai-loopback to return non-streaming
JSON when the request omits stream:true (hermes default).
Replace per-client categorize.mjs tables with a single unified table
(one column per agent, canonical row labels) plus a top-5 discrepancies
section. Implemented in lib/breakdown-unified.mjs.
Copy file name to clipboardExpand all lines: skills/agent-audit/SKILL.md
+13-5Lines changed: 13 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
name: agent-audit
3
-
description: Capture each installed coding-agent client's fresh-chat prompt overhead (Claude Code, OpenCode, Codex, pi, Cursor) and report system-only plus first-turn request sizes in characters and approximate tokens. Use when asked to audit, measure, or compare agent prompt overhead.
3
+
description: Capture each installed coding-agent client's fresh-chat prompt overhead (Claude Code, OpenCode, Codex, pi, Hermes Agent, Cursor) and report system-only plus first-turn request sizes in characters and approximate tokens. Use when asked to audit, measure, or compare agent prompt overhead.
4
4
---
5
5
6
6
## Purpose
@@ -15,7 +15,7 @@ From the skill directory, or wherever the dir is mounted:
15
15
./audit.sh # All detected clients, summary table to stdout
16
16
./audit.sh --raw # Also write captured prompts under $AGENT_AUDIT_OUT_DIR
17
17
./audit.sh --breakdown # Also print per-category composition tables (base/tools/MCP/skills/memory)
18
-
./audit.sh claude codex # Only the named clients (claude, opencode, codex, pi, cursor)
18
+
./audit.sh claude codex # Only the named clients (claude, opencode, codex, pi, hermes, cursor)
19
19
```
20
20
21
21
Defaults:
@@ -26,14 +26,20 @@ Defaults:
26
26
27
27
## Per-category breakdown (`--breakdown`)
28
28
29
-
The summary table reports both system-only size (`SYS_*`) and fuller first-turn request overhead (`FIRST_*`; see "What the size figures cover"). `--breakdown` adds a second view: how each prompt divides into named categories — the same "where do the bytes go" decomposition Cursor and Claude Desktop surface in their UIs (base prompt vs tool defs vs MCP vs skills vs memory). Implemented in `lib/categorize.mjs`, which re-reads the raw capture audit.sh already wrote into the out dir.
29
+
The summary table reports both system-only size (`SYS_*`) and fuller first-turn request overhead (`FIRST_*`; see "What the size figures cover"). `--breakdown` adds two further views rendered by `lib/breakdown-unified.mjs`:
30
30
31
-
| Client | Source read | Categories surfaced |
31
+
1.**Unified table** — one column per agent, mapping per-client raw category labels to a shared canonical set so rows align across agents.
32
+
2.**Top-5 discrepancies** — the five canonical categories (or the overall total) with the largest absolute spread across agents, with per-agent values and a plain-English note.
33
+
34
+
Per-client raw categories and source files:
35
+
36
+
| Client | Source read | Raw categories surfaced |
| pi |`pi-system.txt` + `pi-request.json`| base prompt, tools list, guidelines & pi docs, environment, provider tool schemas |
42
+
| Hermes |`hermes-request.json`| base prompt (preamble), skills (`<available_skills>`), memory (project context injected from cwd), provider tool schemas |
37
43
38
44
The `FIRST_*` columns now use captured or locally-rendered first-turn request material consistently: prompt text plus provider tool/function schemas. `SYS_*` preserves the narrower local system/developer text for debugging client prompt changes. Categorization is marker-driven (XML tags, section headers); if a client reorders or renames a section, the affected category falls back into "base prompt" rather than erroring — watch for an implausibly large base bucket after a CLI upgrade.
39
45
@@ -47,9 +53,10 @@ Each client requires a different trick because none expose "dump my system promp
47
53
| OpenCode | Throwaway TS plugin for system text + OpenAI-compatible loopback provider for the actual build-agent request |`lib/opencode-plugin.ts`, `lib/openai-loopback.mjs`|
48
54
| Codex | Built-in `codex debug prompt-input` for system text + temporary `CODEX_HOME` custom provider pointed at loopback |`lib/openai-loopback.mjs`|
49
55
| pi | Node ESM importing `buildSystemPrompt` and tool definitions from pi's `dist/core/`|`lib/pi-dump.mjs`, `lib/pi-request-dump.mjs`|
56
+
| Hermes | Temporary `HERMES_HOME` dir with `config.yaml` pointing at loopback; one-shot via `hermes chat -q "hi"`; OpenAI chat/completions format (non-streaming) |`lib/openai-loopback.mjs`|
50
57
| Cursor | Detect install only; no CLI ships on macOS today | none |
51
58
52
-
The `--breakdown` view is a post-processing pass over those captures, not a separate capture: `lib/categorize.mjs` re-reads each client's raw JSON/text from the out dir.
59
+
The `--breakdown` view is a post-processing pass over those captures, not a separate capture: `lib/breakdown-unified.mjs` re-reads each client's raw JSON from the out dir.
53
60
54
61
## What the size figures cover
55
62
@@ -60,6 +67,7 @@ The `--breakdown` view is a post-processing pass over those captures, not a sepa
60
67
- Codex's `FIRST_*` comes from a temporary custom provider in `CODEX_HOME` pointed at the loopback server. Its `SYS_*` still uses `codex debug prompt-input` for the local developer payload.
61
68
- pi has no provider loopback in the audit yet; `FIRST_*` is rendered locally from pi's system prompt plus the active tool definitions, so it is comparable for prompt/tool overhead but not a wire capture.
62
69
- pi walks ancestor directories for `AGENTS.md`/`CLAUDE.md` so its size scales with cwd. The throwaway cwd gives the baseline; rerun from a real project root to compare.
70
+
- Hermes: uses `HERMES_HOME` env var to isolate to a temp dir so the real `~/.hermes/config.yaml` is never touched. Hermes injects AGENTS.md/CLAUDE.md from the cwd as "Project Context" — the throwaway cwd gives the baseline (no project context). The version is read from Python package metadata (`importlib.metadata`). Hermes sends non-streaming OpenAI chat/completions requests; the loopback detects `stream: undefined` and returns a plain JSON response (not SSE).
0 commit comments