Skip to Content
agore-skill
Reference

inspect

Reference for agore-skill inspect — flags, report rendering, and JSON output.

Usage

Usage
agore-skill inspect [target...] [--flags]

Flags

FlagDefaultDescription
--changedoffOnly inspect skills changed since workspace.base, including uncommitted working-tree changes
--jsonoffPrint a JSON array of inspect reports
--configagore.yamlGlobal flag: path to the config file
--verboseoffGlobal flag: verbose diagnostics

Behavior

inspect analyzes the context footprint of skills and prints one panel per skill. Targets are resolved from the arguments (skill names, paths, or SKILL.md file paths); with no arguments, every skill discovered through skill.paths is inspected.

Zero-config: without an agore.yaml, the built-in defaults apply and the command still runs.

With --changed, the target set is filtered by git diff --name-only <workspace.base>...HEAD plus the working-tree state from git status --porcelain (staged, unstaged and untracked files; renames use the destination path), merged and deduped — so uncommitted local edits are picked up immediately. A skill survives when any changed file lies under its directory (the root skill survives any change). If nothing changed, it prints No changed skills. and exits 0.

With no skills discovered and no --changed flag, it prints No skills found. and exits 0.

File funnel. The file set is filtered by the same funnel release uses, so what you inspect is what you publish. Always skipped: dotfiles and dot-directories at any depth (.git, .github, .DS_Store, .env, …), the workspace-root dist/ directory, and agore.yaml at the skill root. Then .gitignore rules — read from the workspace root and, when it differs, the skill directory — apply, and finally the skill.exclude globs. The full semantics are specified in Release format — Exclude globs.

Panel rendering

Each report renders as a bordered panel with:

  • a title line: the skill name, its path relative to the workspace root, and a version badge — muted [unreleased] when no release tag covers the skill, success-colored [vX.Y.Z] when the latest <skill>/v* tag has no unreleased commits, and warning-colored [vX.Y.Z · +N unreleased] when N commits since that tag touch the skill: demo-skill skills/demo-skill [v0.1.0 · +1 unreleased];
  • L1 Metadata: <tokens> / <max> tokens with a progress bar, where <max> is description_max_tokens (default 120);
  • L2 Body: <tokens> / <max> tokens (<lines> / <max_lines> lines) with a progress bar against body_max_tokens (2500);
  • L3 Progressive Disclosure <total tokens> followed by a tree of the skill's references/, scripts/ and assets/ files. Leaves show (N tokens), (N B, binary) for binary files, [ORPHAN] for files never reachable from SKILL.md, [MISSING] for reachable-but-absent files, and [exec] for files with executable permission.

Reachability is transitive: starting from the references SKILL.md mentions, the report follows references through references/*.md files breadth first (cycle-safe), resolving relative links inside the skill. A multi-hop file (SKILL.md → references/a.md → references/b.md) is therefore neither an orphan nor silently ignored, and a reachable-but-missing file shows up as a [MISSING] leaf and in broken_refs.

When a skill has no files in those three directories, the tree reads No attached references, scripts, or assets.

JSON output

--json prints a JSON array ([]inspect.Report), indented two spaces. A single-skill example:

[
  {
    "skill_name": "demo-skill",
    "skill_dir": "skills/demo-skill",
    "l1_tokens": 18,
    "l2_tokens": 20,
    "l2_lines": 4,
    "l3_total_tokens": 29,
    "latest_version": "v0.1.0",
    "unreleased_commits": 1,
    "files": [
      {
        "rel_path": "assets/logo.png",
        "category": "assets",
        "tokens": 0,
        "lines": 0,
        "bytes": 17,
        "referenced": false,
        "exists": true,
        "executable": false,
        "has_shebang": false,
        "binary": true
      },
      {
        "rel_path": "references/deep.md",
        "category": "references",
        "tokens": 13,
        "lines": 4,
        "bytes": 49,
        "referenced": true,
        "exists": true,
        "executable": false,
        "has_shebang": false
      },
      {
        "rel_path": "references/guide.md",
        "category": "references",
        "tokens": 16,
        "lines": 4,
        "bytes": 64,
        "referenced": true,
        "exists": true,
        "executable": false,
        "has_shebang": false
      }
    ],
    "broken_refs": [],
    "orphan_files": []
  }
]

In this sample the skill is reachable from one demo-skill/v0.1.0 tag with one later commit touching the skill, hence latest_version and unreleased_commits; assets/logo.png is binary, so its tokens and lines are 0 and it is excluded from l3_total_tokens.

Field definitions: JSON schemas.

Error cases

ConditionMessageExit
Target matches nothingSkill target "<t>" not found (use a skill name or a directory containing SKILL.md).1
--changed cannot resolve basecannot compute changed skills from <base>...HEAD: ...1
Malformed agore.yamlparse config <path>: ...1
Directory missing SKILL.mdload skill <name>: read <path>: ...1

On this page