agentleFS
PackmindHubPackmindHub/packmind/.claude/skills/playbook-cli-audit/SKILL.md

playbook-cli-audit

Skill321 starsChanged 54 days agoApache-2.0View on GitHub

Audit all packmind-* skills for CLI compatibility issues: deprecated commands, invalid options, wrong file formats, missing flags, and version mismatches against the locally installed Packmind CLI. Use when you want to check that skills referencing packmind-cli are up to date, after a CLI upgrade, before a release, or whenever you suspect skills may reference outdated CLI commands. Also triggers on phrases like "audit CLI usage", "check skills for CLI issues", "are my skills up to date with the CLI", or "CLI compatibility check".

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 3 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Do not hardcode this table — read the actual source in apps/cli/src/infra/commands/ to build it.

    line 51
  2. Very specific:

    All files in subdirectories (references/, steps/, scripts/, packmind-versions/, etc.)

    line 66
  3. Very specific:

    Example: If $CLI_VERSION is 0.25.0 and the skill has 0.21.0/ and 0.23.0/:

    line 77
  4. Very specific:

    Subcommand: if any (e.g., create)

    line 92
  5. Very specific:

    Write the report to playbook-cli-audit-report.md at the project root.

    line 129
  6. Distinctive:

    After writing the report:

    line 195
  7. Distinctive:

    If there are CRITICAL findings, highlight them explicitly — these are commands that will fail when users invoke the skill

    line 201
  8. Distinctive:

    Do not suggest fixes automatically.

    line 203

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Playbook CLI Audit

Detect incompatibilities between the packmind-* skills deployed in .claude/skills/ and the current Packmind CLI. Skills evolve independently from the CLI — when the CLI deprecates or removes commands, renames flags, or changes accepted file formats, skills can silently break. This audit catches those issues before users hit them at runtime.

This skill only detects issues — it does not fix them.

Phase 1: Establish CLI Surface

Build the authoritative map of what the CLI currently supports.

1.1 Get CLI version

node ./dist/apps/cli/main.cjs --version

Remember this as $CLI_VERSION (e.g., 0.26.0). If the command fails, try packmind-cli --version as a fallback. If both fail, stop and tell the user the CLI is not available.

1.2 Build the command map from CLI source code

The CLI command definitions live in apps/cli/src/infra/commands/. Read the command registration files to build a complete map of:

  • Available top-level commands and their subcommands
  • Accepted options/flags for each command (names, types, whether required)
  • Accepted argument types (file paths, strings, etc.) and any format constraints
  • Deprecated commands — look for [Deprecated] in descriptions and has been removed in handler code
  • Migration paths — what the deprecated command's error message suggests instead

Structure this internally as a reference table. Here is the expected shape — adapt if the source reveals more or fewer commands:

CommandStatusAccepted InputsKey FlagsMigration
standards createREMOVEDJSON file/stdin--space, --from-skillplaybook add <path>
commands createREMOVEDJSON file/stdin--space, --from-skillplaybook add <path>
skills addREMOVEDdirectory path--space, --from-skillplaybook add <path>
install --listREMOVED——packages list
install --showREMOVED——packages show <slug>
diffDEPRECATED—--submit, -mplaybook diff, playbook submit
diff addDEPRECATEDfile path-mplaybook add
lint --diffDEPRECATED——--changed-files / --changed-lines
playbook addACTIVE.md, .mdc files--space—
playbook submitACTIVE—-m (needed in non-TTY)—
packages addACTIVE—--to, --standard/--command/--skill (one type per call)—
...............

Do not hardcode this table — read the actual source in apps/cli/src/infra/commands/ to build it. The table above is a starting point to orient your search, not the source of truth.

1.3 Print summary

CLI version: $CLI_VERSION
Commands mapped: N active, M deprecated/removed

Phase 2: Discover and Scan Skills

2.1 Find all packmind-* skills

Glob .claude/skills/packmind-*/ to find all skill directories. For each, collect:

  • SKILL.md (the main instruction file)
  • All files in subdirectories (references/, steps/, scripts/, packmind-versions/, etc.)

2.2 Handle version-specific subdirectories

Some skills contain packmind-versions/<semver>/ directories with version-specific instructions. The version resolution logic works like this:

  1. List all version directories (e.g., 0.21.0/, 0.23.0/)
  2. Compare each against $CLI_VERSION
  3. A version directory is in scope if it is the highest version that is <= $CLI_VERSION
  4. Version directories that are not in scope (lower versions superseded by a higher one that is still <= $CLI_VERSION) should be flagged as INFO-level findings ("version 0.21.0 is superseded by 0.23.0 for CLI $CLI_VERSION") but their CLI invocations still need to be checked — they may still be reachable by users with older CLI versions

Example: If $CLI_VERSION is 0.25.0 and the skill has 0.21.0/ and 0.23.0/:

  • 0.23.0/ is the active version (highest <= 0.25.0)
  • 0.21.0/ is superseded but still scanned

2.3 Extract CLI invocations

For every file in scope, extract all lines that invoke the CLI. Look for these patterns:

  • packmind-cli <anything> — the primary pattern
  • node ./dist/apps/cli/main.cjs <anything> — local dev invocation
  • Code blocks containing CLI commands (inside ``` fences)
  • Inline code references (inside ` backticks)
  • Plain-text references in prose (e.g., "Run packmind-cli standards create")

For each invocation, parse:

  • Command: the top-level command (e.g., standards)
  • Subcommand: if any (e.g., create)
  • Arguments: positional args (e.g., file paths)
  • Flags/options: named options (e.g., --space, -m)
  • Source location: file path and line number

Phase 3: Cross-Reference and Detect Issues

For each extracted CLI invocation, check it against the command map from Phase 1. Detect these categories of issues:

CRITICAL — Will fail at runtime

CheckDescriptionExample
Removed commandInvocation uses a command the CLI has removedstandards create → removed, use playbook add
Non-existent commandCommand or subcommand does not exist in the CLIpackmind-cli list standards (correct: standards list)
Invalid file formatFile type passed to a command that doesn't accept it.json file to playbook add (accepts only .md/.mdc)
Mixed artifact typespackages add called with multiple artifact type flags--standard X --command Y in one call

WARNING — May fail or produce unexpected behavior

CheckDescriptionExample
Deprecated commandCommand works but shows deprecation warningdiff add → use playbook add
Missing required flag in agent contextCommand lacks a flag needed in non-interactive/CI contextsplaybook submit without -m opens an editor
Deprecated flagA specific flag is deprecatedlint --diff → use --changed-files
Incorrect install syntaxinstall --list or install --show used instead of packages list/packages showpackmind-cli install --list

INFO — Worth noting

CheckDescriptionExample
Superseded version directoryA version-specific directory is no longer the active one0.21.0/ when 0.23.0/ exists and CLI is >= 0.23.0
CLI version metadata mismatchSkill frontmatter declares packmind-cli-version that conflicts with installed versionpackmind-cli-version: "< 0.25.0" when CLI is 0.26.0
Undocumented flag usageA flag is used that doesn't appear in the command definitionMay indicate a removed or renamed flag

Phase 4: Generate Report

Write the report to playbook-cli-audit-report.md at the project root.

Report Structure

# Playbook CLI Audit Report

**Generated**: {date}
**CLI version**: {$CLI_VERSION}
**Skills scanned**: {count}
**Files analyzed**: {count}

## Summary

| Severity | Count |
|---|---|
| CRITICAL | {n} |
| WARNING | {n} |
| INFO | {n} |

## Findings

### CRITICAL

#### {n}. [{skill-name}] {short description}

- **File**: `{path}:{line}`
- **Invocation**: `{the CLI command as written in the skill}`
- **Issue**: {what's wrong}
- **Fix**: {what the command should be replaced with}

### WARNING

...same structure...

### INFO

...same structure...

## Skills Scanned

| Skill | Files | Invocations | Issues |
|---|---|---|---|
| packmind-onboard | 19 | 12 | 5 CRITICAL, 1 WARNING |
| packmind-update-playbook | 8 | 15 | 0 |
| ... | ... | ... | ... |

## CLI Command Surface Reference

List of all active commands with their accepted inputs, for quick cross-reference.

If no issues are found

# Playbook CLI Audit Report

**Generated**: {date}
**CLI version**: {$CLI_VERSION}
**Skills scanned**: {count}

All packmind-* skills are compatible with the installed CLI version. No issues found.

Phase 5: Present to User

After writing the report:

  1. Print a summary to the conversation:
    • Total CRITICAL / WARNING / INFO counts
    • Top 3 most affected skills
    • The report file path
  2. If there are CRITICAL findings, highlight them explicitly — these are commands that will fail when users invoke the skill

Do not suggest fixes automatically. The user decides how to address each finding.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.