AGENT SKILL

命令与技能调用实测研究

command-research

实证型命令与技能使用研究协议——在 Hermes、Claude Code 和 Codex 的会话存储中,精确测量真人调用与智能体调用的斜杠命令,排除子串噪声干扰。

License 许可
MIT
最近更新
2026-11-14
Stars
★ 6
Forks
0

01 前言 Front Matter

name
command-research
description
Empirical Command & Skill Usage Research Protocol — Measure true human vs agentic slash command invocations across Hermes, Claude Code, and Codex session stores without substring noise

02 资源文件 3

03 SKILL.md 正文

Command Research Protocol (/command-research)

Purpose

Measure and rank actual slash command and skill invocations across all primary agent runtime databases:

  1. Hermes SQLite (~/.hermes/state.db)
  2. Claude Code JSONL (~/.claude/projects/*/*.jsonl)
  3. Codex SQLite (~/.codex/state_5.sqlite)

Provides strict filtering to eliminate the system-reminder substring noise trap and categorizes invocations into Human-Typed vs. Agentic/Subagent.

Explicit Skill-Usage Measurement

Command-token counts are not skill-usage counts. To measure skills, pass --skills; this mode only accepts durable tool-call records that identify the Skill tool and its skill argument:

python3 .claude/skills/command-research/scripts/count_command_usage_unified.py --skills --days 30 --json

In --skills mode, --human-only and --agent-only select one report destination (the flags are mutually exclusive); JSON output also recomputes total for the selected destination and includes selected_destinations. Each store reports status=supported, supported-empty, unsupported, or error so an empty store, unavailable schema, and unreadable history are not ambiguous. Malformed records are counted in the store's malformed object and described by its diagnostic.

The supported record classes are:

Store Accepted record Provenance
Claude Code assistant message content block type=tool_use, name=Skill record-level isSidechain
Codex response_item/event_msg explicit Skill tool-call records threads.thread_source
Hermes messages.tool_name or messages.tool_calls explicit Skill records session source and parent session

Slash text, prompt prose, skill-file reads, and command catalogs are excluded. When a store has no explicit Skill records, the JSON report says so instead of turning slash-token mentions into inferred usage. Missing provenance is kept in the unknown bucket. Unsupported stores report supported=false with a diagnostic; malformed Hermes timestamps or JSON are counted and diagnosed while valid records continue to be measured when the lookback permits it.


? Anti-Noise Rules (Mandatory)

  1. Never Use Raw Substring Search:

    • content.count("cmd") produces 10,000–180,000 false positives because Claude Code repeats the entire skill/command catalog in system reminders after tool calls.
    • Always match exact prompt-start tokens (?:^|\s)/cmd or canonical Claude tags <command-name>/cmd</command-name>.
  2. Always Exclude Filesystem Paths & URLs:

    • Filter against PATH_PREFIXES (/Users, /tmp, /dev, /api, /src, /tests, /var, /home, etc.) and FILE_SUFFIXES (.py, .md, .ts, .sh, .json).
  3. Separate Human from Subagents:

    • Human-Typed: Role user, source slack/cli/telegram, non-bot user IDs, promptSource typed/interactive, no subagent parent UUIDs.
    • Agentic: Subagent sessions (isSidechain: true), Stop-hook loops, automated test runners, cron tasks.

?️ Unified Scanner Script

The bundled multi-store scanner is located at: scripts/count_command_usage_unified.py

Common Invocations:

# Run full historical audit across all stores
python3 .claude/skills/command-research/scripts/count_command_usage_unified.py

# Scan only the last 30 days
python3 .claude/skills/command-research/scripts/count_command_usage_unified.py --days 30

# Output top 15 human-typed commands
python3 .claude/skills/command-research/scripts/count_command_usage_unified.py --top 15 --human-only

# Output as structured JSON for reporting
python3 .claude/skills/command-research/scripts/count_command_usage_unified.py --json

Reference Lineage

  • Provenance: 2026-07-12 investigation showing that raw substring counts are not a valid usage signal.
  • Wire Verification: system prompts captured through a local LLM proxy.

04 同仓库更多 Skills

jleechanorg
jleechanorg/jleechan-skills

disk-reclaim-playbook

Use Disk Magician to diagnose disk growth or qualify cleanup on macOS or Linux.

★ 6
jleechanorg
jleechanorg/jleechan-skills

claudea-bench

Compare `claudea` and normal `claude` on a fair split of comparable work by default; use `--strict` for duplicate runs of the exact same task.

★ 6
jleechanorg
jleechanorg/jleechan-skills

pr

Alias for the canonical pr-lifecycle PR workflow skill (/pr-workflow, /prw).

★ 6
jleechanorg
jleechanorg/jleechan-skills

whisper

OpenAI's general-purpose speech recognition model. Supports 99 languages, transcription, translation to English, and language identification. Six model sizes from tiny (39M params) to large (1550M params). Use for speech-to-text, podcast transcription, or multilingual audio processing. Best for robust, multilingual ASR.

★ 6
jleechanorg
jleechanorg/jleechan-skills

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

★ 6
jleechanorg
jleechanorg/jleechan-skills

pr-report

This skill should be used when the user asks for a PR report, PR audit, PR delta analysis, /pr-report, or wants per-PR summary with delta files/lines. Generates a structured report for one or more open PRs covering purpose, files changed, +/− line counts, /code-standards + /thermo review findings, /ponytail simplification opportunities, file-overlap combination candidates, and /green status per pr-green-definition. Output: machine-readable JSONL + human-readable markdown. Read-only by default; can apply simplifications if user opts in.

★ 6