Show vault statistics and knowledge graph metrics. Provides a shareable snapshot of vault health, growth, and progress. Triggers on "/stats", "vault stats", "show metrics", "how big is my vault".
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Une commande directe contourne le prompt de vérification. Examinez la source avant de l'exécuter.
Show vault statistics and knowledge graph metrics. Provides a shareable snapshot of vault health, growth, and progress. Triggers on "/stats", "vault stats", "show metrics", "how big is my vault".
version
1.0
generated_from
arscontexta-v1.6
user-invocable
true
context
fork
model
sonnet
allowed-tools
Read, Grep, Glob, Bash
argument-hint
[--share] — optional flag for compact shareable output
Runtime Configuration (Step 0 — before any processing)
Read these files to configure domain-specific behavior:
ops/derivation-manifest.md — vocabulary mapping
Use vocabulary.notes for the notes folder name
Use vocabulary.note / vocabulary.note_plural for note type references
Use vocabulary.topic_map / vocabulary.topic_map_plural for MOC references
Use vocabulary.inbox for the inbox folder name
Use vocabulary.notes_collection for semantic search collection name
If no derivation file exists, use universal terms (notes, MOCs, etc.).
EXECUTE NOW
Target: $ARGUMENTS
Parse immediately:
If target contains --share: output compact shareable format after full stats
If target is empty: output full stats display
If target names a specific category (e.g., "health", "growth", "pipeline"): show only that category
START NOW. Collect metrics and present them.
Philosophy
Make the invisible visible.
The knowledge graph grows silently. Without metrics, the user cannot tell whether their system is healthy, growing, stagnating, or fragmenting. /stats provides a snapshot that makes growth tangible — numbers that show progress, health indicators that catch problems, and trends that reveal trajectory.
The output should make the user feel informed, not overwhelmed. Metrics are evidence, not judgment. "12 orphans" is a fact. What to DO about it belongs to /graph or /{vocabulary.cmd_reflect}.
Step 1: Collect Metrics
Gather all metrics. Run these checks in parallel where possible to minimize latency.
"[N] open tensions — consider running /{vocabulary.rethink}"
DENSITY < 0.02
"Graph density is low — connections are thin. Run /{vocabulary.cmd_reflect} to strengthen the network"
PROCESSED_PCT < 50
"More content in inbox than in {vocabulary.notes}/ — consider processing backlog"
THIS_WEEK_NOTES == 0
"No new {vocabulary.note_plural} this week"
Only show interpretation notes when conditions are notable. A healthy vault gets just the stats, no warnings.
Step 3: Shareable Format (--share flag)
If invoked with --share, output a compact markdown block suitable for sharing on social media or in documentation:
## My Knowledge Graph-**[NOTE_COUNT]** {vocabulary.note_plural} with **[LINK_COUNT]** connections (avg [AVG_LINKS] per {vocabulary.note})
-**[MOC_COUNT]** {vocabulary.topic_map_plural} covering [COVERAGE]% of {vocabulary.note_plural}
- Schema compliance: [COMPLIANCE]%
- This week: +[THIS_WEEK_NOTES] {vocabulary.note_plural}, +[THIS_WEEK_LINKS] connections
- Graph density: [DENSITY]
*Built with [Ars Contexta](https://github.com/arscontexta) v1.6*
The shareable format:
Omits health warnings (positive framing for sharing)
Omits pipeline state (internal detail)
Omits system metrics (internal detail)
Includes only growth-positive metrics
Always includes the Ars Contexta attribution line
Step 4: Trend Analysis (when history exists)
If previous /stats runs are logged in ops/stats-history.yaml (or similar), compare current metrics against the last snapshot:
Trend (vs last check):
{vocabulary.note_plural}: [N] (+[delta] since [date])
Connections: [N] (+[delta])
Density: [N] ([up/down/stable])
Orphans: [N] ([improved/worsened/stable])
If no history exists, skip trend analysis. Do NOT create the history file — that is /health's responsibility.
Edge Cases
Empty Vault (0 notes)
Show zeros gracefully:
--=={ stats }==--
Your knowledge graph is new. Start capturing to see it grow.
Knowledge Graph
===============
{vocabulary.note_plural}: 0
Connections: 0
{vocabulary.topic_map_plural}: 0
Topics: 0
Generated by Ars Contexta v1.6
Do not show health, pipeline, growth, or system sections for an empty vault — they would all be zeros or N/A.
No Queue System
Skip the Pipeline section entirely. Do not show an error.
No Self Space
Show "disabled" for self space line. Do not show an error.
No ops/derivation-manifest.md
Use universal vocabulary (notes, MOCs, etc.). All metrics work identically.
Very Large Vault (500+ notes)
The orphan and MOC coverage checks may be slow for large vaults. If {vocabulary.notes}/ has >200 files:
Run orphan detection with a simpler heuristic (check only for presence in any MOC, not full backlink scan)
Note: "Metrics approximate for large vault. Run /graph health for precise analysis."
Platform-Specific Date Commands
macOS uses date -v-7d, Linux uses date -d '7 days ago'. The script tries both. If neither works, report "?" for growth metrics instead of failing.