Skip to content

fix(plugin): valid Claude agents field + gate manifest in make check (0.20.2)#57

Merged
cofin merged 4 commits intomainfrom
fix/plugin-agents-manifest-schema
Apr 27, 2026
Merged

fix(plugin): valid Claude agents field + gate manifest in make check (0.20.2)#57
cofin merged 4 commits intomainfrom
fix/plugin-agents-manifest-schema

Conversation

@cofin
Copy link
Copy Markdown
Owner

@cofin cofin commented Apr 27, 2026

Summary

  • Drop the invalid "agents": ["./agents/"] from .claude-plugin/plugin.json introduced by feat: improve agent config #56 — Claude Code's schema rejects an array containing a directory path, breaking /doctor for installed users. Auto-discovery from agents/*.md is the canonical shape and was always active.
  • Add missing YAML frontmatter to commands/flow-cleanup.md surfaced by the same validator run.
  • Wire claude plugin validate into make check via a new validate-claude-manifest target, so the next schema regression fails CI instead of shipping.
  • Bump to 0.20.2.

Why a CLI-wrapping validator

claude plugin validate is the same loader Claude Code runs at install time. Wrapping it via tools/validate-claude-manifest.py means our local check tracks any future schema evolution Anthropic makes, with zero hand-rolled JSON Schema to drift. Each host's validator is the only authority on its own format — flow already does the same for Codex (validate-codex-manifest.py); this fills the Claude gap.

Test plan

  • make check passes end-to-end (lint, skills, codex, claude, version sync)
  • claude plugin validate .claude-plugin/plugin.json → ✔ Validation passed
  • claude plugin validate .claude-plugin/marketplace.json → ✔ Validation passed
  • All 8 manifests in sync at 0.20.2
  • CI quality-check matrix green

cofin and others added 4 commits April 27, 2026 00:29
…check

Claude Code's plugin schema rejects an `agents` field whose value is an array
containing a directory path; auto-discovery from `agents/*.md` is the
canonical shape. Removing the redundant entry resolves the `/doctor`
validation failure introduced in #56. Also adds the missing YAML frontmatter
on flow-cleanup.md surfaced by the same validator.

Wires `claude plugin validate` into `make check` via a new
`validate-claude-manifest` target so future schema regressions fail CI
before publish, using Claude Code's own validator as source of truth.

Bumps to 0.20.2.
PR #57's validate-claude-manifest target needed `claude` on PATH but
GitHub runners don't ship it, so CI failed with the very error message
the script promised would offer an escape hatch — except the script
never actually honored the env var.

Two-part fix:
- tools/validate-claude-manifest.py: honor SKIP_CLAUDE_VALIDATE=1 by
  exiting 0 with a notice. Reserved for local devs without Claude Code
  installed; CI installs it explicitly.
- .github/workflows/check.yml: install @anthropic-ai/claude-code via
  npm before `make check` so the validator actually runs against
  Claude Code's official schema in CI, matching the PR's intent
  (catch schema regressions before publish, not just locally).
Windows runners failed with FileNotFoundError after `npm install -g
@anthropic-ai/claude-code` succeeded: `shutil.which("claude")` resolves
the .cmd shim via PATHEXT and returned non-None (passing the existence
check), but `subprocess.run(["claude", ...])` does not honor PATHEXT,
so the bare name lookup failed even with the CLI installed.

Fix: capture the full resolved path from `shutil.which` and pass that
to `subprocess.run`. Works identically on Linux/macOS and resolves the
Windows shim correctly. Comment in-place so the next person doesn't
repeat the mistake.
@cofin cofin merged commit 484e544 into main Apr 27, 2026
4 checks passed
@cofin cofin deleted the fix/plugin-agents-manifest-schema branch April 27, 2026 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant