Install
$ agentstack add skill-erikole21-refacil-sdd-ai-stats ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
refacil:stats — Change Statistics
This skill is a read-only utility that surfaces observability data for a given change. It is optional — it does not block or affect any existing flow. Run it at any point to understand how a change is progressing or has progressed.
Prerequisites: sdd profile from refacil-prereqs/SKILL.md.
Flow
Step 1: Resolve change name
- If
$ARGUMENTSprovides a change name, use it directly. - If not, run
refacil-sdd-ai sdd list --jsonand use the single active change if there is only one.
2.5. If sdd list --json returns [] (no active changes), auto-select the most recent archived change:
- Run
refacil-sdd-ai sdd list --include-archived --json. - From the returned array, filter items where
archivedistrue. Sort descending byarchivedDate(tiebreak: name descending). Select the first item. - If an archived change is found: inform the user ("No active changes found — showing stats for most recently archived change: `
") and continue to Step 2 with thatchangeName`. - If no archived changes exist either: inform the user that there is no change history and stop.
- If there are multiple active changes and no argument, ask the user to specify the change name. Do not proceed with ambiguous scope.
If the change name is given but not found in the active changes, do not suggest /refacil:propose. Instead:
- Run
refacil-sdd-ai sdd list --include-archived --jsonto check for archived changes. - If archived changes exist, show the list and ask the user to confirm which name they want to query (they may have misspelled or the change was already archived).
- Only if there are no active and no archived changes should you inform the user that there is no work history for the given name.
Step 2: Run the stats CLI command
Execute:
refacil-sdd-ai sdd stats --json
If the command exits with code 1 (change not found or invalid name), show the CLI error message. The step 1 fallback (archived lookup) should have already been applied before reaching here, so a code 1 at this point means the name is genuinely absent in both active and archived locations — inform the user and stop.
Step 3: Parse the JSON output
Parse the JSON block returned by the CLI. Expected fields:
{
"changeName": "",
"isArchived": true | false,
"archivedDate": "",
"startDate": "",
"memory": {
"testCommand": "",
"lastStep": "",
"criteriaRun": ["CA-01", "CR-01", ...],
"currentState": "",
"stateInferred": true | false
},
"review": {
"passed": true | false,
"verdict": "",
"date": "",
"failCount":
},
"compact": {
"eventsInPeriod": ,
"rewrites": ,
"estimatedTokensSavedByRewrites": ,
"alreadyCompact": ,
"estimatedTokensSavedAlreadyCompact":
},
"codegraph": {
"eventsInPeriod": ,
"totalToolCalls": ,
"estimatedTokensSaved":
}
}
If any field is null or 0, treat it as "no data" — do not error.
Step 4: Show numbers (structured display)
Present the data in a readable format. If isArchived is true, add [archivado el ] to the header:
=== Stats: [archivado el ] === ← only when isArchived: true
=== Stats: === ← when isArchived: false
Phase progress
Started:
Current state:
Last step:
Criteria:
Review
Passed:
Verdict:
Date:
Fail count:
Token savings (change period)
Compact rewrites: events — ~ tokens saved
Already compact: events — ~ tokens (skill discipline)
CodeGraph tool calls: — ~ tokens saved
Step 5: Narrative interpretation (anomaly detection)
After the numbers, add a brief narrative. Apply these heuristics:
Anomalous passes: if review.passed is true but memory.criteriaRun is empty or memory.lastStep is apply (no test phase recorded) — flag this:
Note: the change was reviewed but no test phase is recorded in memory. Recommend running /refacil:test before archiving.
Token concentration: if compact.estimatedTokensSavedByRewrites is 0 and codegraph.estimatedTokensSaved is also 0 — flag this:
Note: no token savings recorded for this change. Compact and CodeGraph telemetry may not be active.
Comparison with previous changes (optional — only if data exists):
- Read all other change directories under
refacil-sdd/changes/that havememory.yaml. - If at least 2 other changes have
criteriaRundata, compute the average criteria count and compare:
`` This change ran criteria vs. an average of in previous changes. ``
- If no other changes have sufficient data, skip this comparison silently.
No anomalies: if none of the above apply, show:
No anomalies detected. The change looks healthy.
Step 6: Next step (optional)
Skip this step entirely if isArchived === true — archived changes have no actionable next steps.
If memory.lastStep is apply (no test yet):
Recommended next step: /refacil:test
If memory.lastStep is test and review.passed is false:
Recommended next step: /refacil:verify
If review.passed is true:
The change is reviewed. Next step: /refacil:archive (if all tasks are done).
Rules
- This skill is read-only — it does not modify any file, branch, or memory.
- Does not block any flow — absence of stats data is reported as zeros, not as an error.
- Non-existent change: exit with code 1 and a clear message (CA-12).
- Missing data fields: treat as zero or null — never throw; degrade gracefully.
- Comparison with previous changes is optional — only if data exists. Never block on its absence.
- This skill does not call any sub-agent — it is a direct CLI wrapper with narrative.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: Erikole21
- Source: Erikole21/refacil-sdd-ai
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.