How to inspect context budgets and JSON
Read the context footprint of skills — token levels, orphans, dead references, and machine-readable output.
You want to know how much context a skill costs, which attached files are unused or missing, and how to get that data in machine-readable form for tooling.
See the footprint
From the repository root:
agore-skill inspectEach skill is rendered as one panel:
╭─────────────────────────────────────────────╮
│ demo-skill skills/demo-skill [unreleased] │
│ L1 Metadata: 21 / 120 tokens │
│ ████░░░░░░░░░░░░░░░░░░░░ │
│ L2 Body: 128 / 2500 tokens (20 / 300 lines) │
│ █░░░░░░░░░░░░░░░░░░░░░░░ │
│ │
│ L3 Progressive Disclosure 108 tokens │
│ SKILL.md │
│ ╰──references/ │
│ ╰──guide.md (108 tokens) │
│ ╰──scripts/ │
│ ╰──run.sh (17 tokens) [exec] │
╰─────────────────────────────────────────────╯
How to read it:
- L1 Metadata — the tokens of
name+descriptionin the frontmatter. Compared againstdescription_max_tokens(default 120) with a progress bar. - L2 Body — the tokens and line count of the Markdown body of
SKILL.md, againstbody_max_tokens(2500) andbody_max_lines(300). - L3 Progressive Disclosure — the total tokens of every attached text
file, shown as a tree grouped by
references/,scripts/andassets/. Binary files are set apart: a file whose first 512 bytes contain a NUL byte renders aslogo.png (15 B, binary), contributes no tokens to the L3 total, and is skipped by the secret-scan rule. - Leaf markers:
(N tokens)per text file,[ORPHAN]on files unreachable fromSKILL.md(directly or transitively through other referencedreferences/*.mdfiles),[MISSING]on referenced files that do not exist, and[exec]on files with executable permission.
The title line carries a version badge read from git: muted [unreleased]
while the skill has no tag, success-colored [v1.2.0] on the newest
<skill>/v* tag with nothing unreleased, and warning-colored
[v1.2.0 · +N unreleased] when commits exist since that tag.
Budget numbers come from skill.lint.budgets in agore.yaml; with no config
file, the built-in defaults above apply.
Target specific skills
Without arguments, every discovered skill is inspected. To look at one:
agore-skill inspect demo-skillTargets accept a skill name, a directory relative to the root
(skills/demo-skill), or even a path to a SKILL.md file. A target that does
not exist fails with:
Skill target "nope" not found (use a skill name or a directory containing SKILL.md).
Machine-readable output
For scripts and dashboards, use --json:
agore-skill inspect --jsonIt prints a JSON array of one report per skill:
[
{
"skill_name": "demo-skill",
"skill_dir": "skills/demo-skill",
"l1_tokens": 21,
"l2_tokens": 128,
"l2_lines": 20,
"l3_total_tokens": 108,
"files": [
{
"rel_path": "references/guide.md",
"category": "references",
"tokens": 108,
"lines": 15,
"bytes": 431,
"referenced": true,
"exists": true,
"executable": false,
"has_shebang": false
}
],
"broken_refs": [],
"orphan_files": []
}
]Field meanings are documented in
JSON schemas. Two lists to watch in
automation: broken_refs (dead links) and orphan_files (files under
references/ or scripts/ that SKILL.md never mentions, directly or
through other references/*.md files). In a git repository with tags, each
report also carries latest_version (e.g. v1.2.0) and unreleased_commits;
both fields are omitted when there is no tag.
Only changed skills
In a git repository, --changed narrows the run to skills with changes
against workspace.base:
agore-skill inspect --changedIt combines two sources — git diff --name-only <base>...HEAD and
git status --porcelain — and keeps the skills containing at least one
changed file. The porcelain part brings in uncommitted work: staged, unstaged
and untracked files all count (renames at their destination), so a local
SKILL.md edit is picked up before you commit it. When nothing changed:
No changed skills.
Related
- Why the three levels exist and how the token estimate works: Progressive disclosure L1/L2/L3
- Exact field-by-field JSON shapes: JSON schemas