--- name: stats description: Report usage counts of every jsc skill and every skill call chain, aggregated by tools/usage-stats.sh from $JSC_HOME/usage/*.jsonl recorded by jsc-hooks. Supports --cli filtering. Use when the user asks how often skills or chains are used; not for token or time stats (see worklog). --- # stats — skill and call-chain usage counts Data is recorded continuously by `jsc-hooks/hooks/skill-usage.sh` under `$JSC_HOME/usage/` (default `~/.jsc/usage/`). ## Operations | Count | Command | Output | | --- | --- | --- | | Uses per skill | `tools/usage-stats.sh skills` | `countskill`, descending | | Uses per call chain | `tools/usage-stats.sh chains` | `countfrom -> to`, descending | | Filter by CLI | Append `--cli claude` (or codex / copilot / antigravity / kiro) | Same as above | ## Reporting 1. Run the tool directly and branch on its exit code — never read the printed lines without it. | Exit | Do | | --- | --- | | 0 | Present every printed line as one table row. No line printed is still exit 0: the data file under `$JSC_HOME/usage/` does not exist yet, which is a count of zero, not a failure — say the counts are zero and that `jsc-hooks` has to be installed and wired via `jsc-hooks:hooks-install` before anything is recorded, and show no table | | 2 | The subcommand or the `--cli` argument was rejected — the subcommand is neither `skills` nor `chains`, or `--cli` came with no value. Fix the argument and rerun. Never rerun the same command unchanged, and never report the counts as zero: nothing was read | Done when the exit code was read and the branch it names was taken.