JSON schemas
Field-by-field reference for inspect reports and lint diagnostics.
Two commands emit JSON: inspect --json (an array of reports) and
lint --json (a flat array of diagnostics). Field names below are the exact
JSON keys.
inspect Report
Emitted by inspect --json: a JSON array with one object per skill.
| Field | Type | Meaning |
|---|---|---|
skill_name | string | The frontmatter name, or the directory base name when empty. |
skill_dir | string | Skill directory relative to the workspace root (. for a root skill). |
l1_tokens | int | Estimated tokens of name + " " + description (trimmed). |
l2_tokens | int | Estimated tokens of the SKILL.md body (everything after the frontmatter). |
l2_lines | int | Line count of the body; a trailing newline does not count. |
l3_total_tokens | int | Sum of token estimates over all scanned files (not only referenced ones). Binary files contribute nothing. |
latest_version | string | The newest <skill>/v* SemVer tag for this skill (e.g. v1.2.0), without the skill prefix. Omitted when no such tag exists; a root-level skill also falls back to plain v* tags. |
unreleased_commits | int | Commits since latest_version that touch the skill directory (git log <tag>..HEAD -- <skill rel path>). Omitted when zero or when there is no latest version. |
files | []FileStat | Every scanned file, plus one synthetic entry per broken reference. |
broken_refs | []string | Referenced relative paths that do not exist (sorted). |
orphan_files | []string | Files under references/ or scripts/ never reachable from SKILL.md (sorted). |
FileStat
One element of files. Files are sorted by rel_path.
| Field | Type | Meaning |
|---|---|---|
rel_path | string | Slash-separated path relative to the skill directory. |
category | string | "references", "scripts", "assets" when under that top-level directory, else "other". Broken references use the category derived from their path. |
tokens | int | Token estimate of the file content (0 for broken references and binary files). |
lines | int | Line count (0 for broken references and binary files). |
bytes | int64 | File size (0 for broken references). |
referenced | bool | Whether the path is reachable from SKILL.md, directly or through the references/*.md graph. |
exists | bool | false marks a broken reference (referenced but absent). |
executable | bool | True when any execute bit (mode & 0111) is set. |
has_shebang | bool | True when the content starts with #!. |
binary | bool | True when a NUL byte (0x00) appears within the first 512 bytes. Omitted when false. Tokens and lines are 0 and the file is excluded from l3_total_tokens. |
Notes on the scan: the same file funnel as inspect applies — dotfiles and
dot-directories at any depth, the workspace-root dist/ directory and
agore.yaml at the skill root are always skipped, then .gitignore rules
(read from the workspace root and the skill directory) and the
skill.exclude globs. Details: Release format — Exclude globs.
Only regular files are listed, and SKILL.md itself is not included in
files.
lint Diagnostic
Emitted by lint --json: a flat JSON array of diagnostics across all
linted skills (not grouped per skill).
| Field | Type | Meaning |
|---|---|---|
rule_id | string | One of the ten rule IDs (SPEC-001 … SEC-002). |
severity | string | "Error" or "Warning". |
skill | string | The frontmatter name of the offending skill; empty when unparseable. |
file | string | File the diagnostic applies to — usually SKILL.md, otherwise the offending relative path. Omitted when empty. |
message | string | The human-readable message, formatted from the rule's template. |
Examples and the full rule table: Lint rules reference.
Token estimate
Both levels use the same deterministic offline estimator
(EstimateTokens): ASCII bytes count as one quarter token each —
(asciiBytes + 3) / 4 — and each non-ASCII rune (CJK and friends) counts as
1.5 tokens. Non-empty text never estimates below 1. The estimate needs no
network, no model and no dictionary, so the same content always yields the
same number on every machine.