api-design
REST API design best practices. Use when designing APIs, choosing status codes, or creating endpoints.
Show active skills with per-skill token consumption, total budget usage, and pending suggestions
$ npx -y skills add Tibsfox/gsd-skill-creator --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
/statusContext preview
What this command does when you run it.
Show active skills with per-skill token consumption, total budget usage, and pending suggestions
name: sc:status description: Show active skills with per-skill token consumption, total budget usage, and pending suggestions allowed-tools: - Read - Bash - Glob
<objective> Display a comprehensive skill budget dashboard showing per-skill token consumption, total budget percentage with visual progress bar, and count of pending skill suggestions. This is the primary health-check command for the skill-creator integration layer. </objective>
<process>
Read `.planning/skill-creator.json` using the Read tool. If the file is missing, use these defaults:
{
"token_budget": {
"max_percent": 5,
"warn_at_percent": 4
},
"suggestions": {
"min_occurrences": 3
}
}No config toggle gates this command -- it is always available regardless of integration settings.
Run the following command via the Bash tool with a 10-second timeout:
npx skill-creator status --json
Parse the JSON output to extract:
**Fallback if CLI fails:** If the command errors or is unavailable, manually scan for skills:
1. Glob `.claude/commands/*.md` and `.claude/skills/*/SKILL.md` to find active skill files 2. Read each skill file and count its character length 3. Sum total characters as budget usage 4. Calculate budget ceiling: `(token_budget.max_percent / 100) * 200000` (assumed 200k char context window) 5. Derive `usagePercent = (totalChars / budget) * 100` 6. Derive `headroom = budget - totalChars`
Display a markdown table sorted by size (largest first):
## Skill Budget Status | Skill | Size | % of Budget | |-------|------|-------------| | beautiful-commits | 1,333 chars | 8.6% | | gsd-trace | 1,472 chars | 9.5% | | ... | ... | ... |
If no skills are found, display: "No active skills found."
Show total usage with a visual progress bar:
### Budget Overview Budget: [####________________] 2.3% (4,230 / 184,000 chars) Warning threshold: 4% | Maximum: 5% Remaining headroom: 179,770 chars
Construct the progress bar with 20 segments:
If `usagePercent >= warn_at_percent` from config, append a warning:
WARNING: Budget usage (4.2%) has reached the warning threshold (4%). Consider removing or consolidating skills to free headroom.
If `usagePercent >= max_percent`, append:
CRITICAL: Budget usage (5.3%) exceeds the maximum (5%). Skill loading may be throttled. Remove skills to restore headroom.
After the budget overview above is rendered, decide whether this invocation is a "responsive" or "ignored" outcome relative to a prior warn event, and record it via the bounded-learning CLI.
The decision rule is simple:
Run via Bash with a 2-second timeout (best-effort silent per Lesson #10427 — failures MUST NOT block the rest of /sc:status):
npx skill-creator bounded-learning --record-event --kind <responsive|ignored> --usage-percent <N> --warn-at-percent <N> --quiet 2>/dev/null
If the previous-invocation state is unknown (no prior `/sc:status` in this session), skip the `responsive` branch and only record `ignored` when emitted this turn.
Read `.planning/patterns/suggestions.json` using the Read tool. If the file doesn't exist or is empty, display:
### Pending Suggestions No pending suggestions. Patterns will be detected as you work and commit.
If the file exists, parse the JSON array and count entries where `state === "pending"`:
### Pending Suggestions Pending suggestions: 3 Run `/sc:suggest` to review and act on detected patterns.
Also show a brief breakdown if there are non-pending entries:
Total suggestions: 7 (3 pending, 2 accepted, 1 dismissed, 1 deferred)
Then surface the loop-closure metric — how well the observe → suggest → create loop is actually closing:
Loop: generated 7 | accepted 2 | skills created 2 (from discover: 5)
where `generated` = total suggestions, `accepted` = entries with `state === "accepted"`, `skills created` = accepted entries that also carry a `createdSkillName`, and the parenthetical breaks `generated` down by `provenance.source` (e.g. `discover`, `observation`) for entries that have provenance.
Run the following command via the Bash tool with a 5-second timeout (best-effort — failures here MUST NOT block the rest of /sc:status):
npx skill-creator bounded-learning --summary 2>/dev/null
Parse the JSON output. If the command errored, skip the rest of this step silently.
Expected shape:
{
"thresholds": [
{
"threshold": "suggestions.min_occurrences",
"currentValue": 3,
"observationSource": { "sourceId": "suggestions.json", "wired": true },
"lastTick": { "timestamp": "...", "direction": "hold", "proposedValue": null, "applied": "noop" } | null
},
...
],
"auditLog": {
"path": ".planning/patterns/bounded-learning-log.jsonl",
"totalEntrAn adaptive learning and coprocessor architecture for Claude Code, built as an extension to GSD (open-gsd)
Repo: Tibsfox/gsd-skill-creator
REST API design best practices. Use when designing APIs, choosing status codes, or creating endpoints.
Reviews code for bugs, style, and best practices. Use when reviewing PRs or checking code quality.
Creates context handoff documents for session continuity. Use when ending sessions, switching tasks, or handing off work.
Thinking frameworks for decisions and problem analysis. Use when evaluating options, root causes, or prioritizing.
Environment configuration and secrets management. Use when setting up .env files, managing secrets, or configuring environments.
Safe file operation patterns. Use when performing bulk file operations or writing deployment scripts.