Addresses PR #85's outstanding review items after grilling the open
questions against ADR-0013/CONTEXT.md/ADR-0010:
Blocking fixes:
- vale-wrap.sh: replace json.dumps() escaping (which silently defeated
Vale's frontmatter scope on any description containing a quote,
backslash, or non-ASCII char — ~58% of the corpus) with a single-quoted
YAML scalar, substituting a Unicode right single quote for embedded
apostrophes rather than '' doubling (Vale's frontmatter scanner isn't a
full YAML parser and silently truncates on '' too).
- vale-wrap.sh: fix a blank-line-inside-a-folded-description truncation
bug via indentation-based, blank-line-tolerant body capture; narrow
flattening to `>`-style scalars only (`|` already works unflattened).
- skill-audit/agent-audit Step 1: make the vale-wrap.sh invocation
cwd-independent via git rev-parse --show-toplevel, fixing a bug where
no single cwd satisfied all three Step 1 commands.
- styles/Kyberforge/VagueQualifier.yml: prune 17 tokens verified
false-positive-dominated on this repo's own voice via a real corpus
sweep (obvious, clearly, usually, several, simple, easy, completely,
simply, tiny, etc.), keep 13 with real or unattested noise. Revert the
28 prose "fixes" those tokens drove across 14 skill files back to their
original, correct wording, including a functional regression to
caveman/SKILL.md's own filler-word list (a mention, not a use) — now
guarded with vale-off comments against recurrence.
Gaps:
- --minAlertLevel=warning on the pre-commit hook and Step 1 invocation
so warning-level rules actually surface, without collapsing the
FAIL/SUGGESTION severity mapping skill-audit/agent-audit rely on.
- vale-wrap.sh: fix --config=<path> equals-form, absolute-path silent
no-op, and a zero-file-argument stdin hang.
- Route vale-run and lint-runner through a documented wrapper script
when a target repo has one, instead of unconditionally recommending
bare `vale`.
- Wire Kyberforge.VagueQualifier/SentenceOpenerThereIs into skill-audit/
agent-audit's dimension-mapping prose (Body discipline).
- Add plugins/lint/sources.md provenance for lint-runner (ADR-0010).
- Sync both marketplace.json lint-entry descriptions with plugin.json.
- Retune skill-size-check.sh's MAX_WORDS 5000->2900 (measured ~1.6-1.7
tokens/word on this repo's corpus, the old value gated at ~8,500
tokens against a stated 5,000 ceiling); fix the >/>= line-count
boundary and wc -l undercount on files with no trailing newline.
- Document the vale binary as a Setup prerequisite in AGENTS.md.
- Fix SentenceOpenerThereIs's dead regex alternative and add a real
sentence-start anchor/scope.
- Fix a stale docs/research/docs/vale/ index pointer in kyberforge's
docs README (moved to plugins/lint/ in e1a5403).
- Rewrite ADR-0013's Consequences section past-tense to describe what
actually landed, and record the styles-portability limitation
(repo-root placement stays intentional; deferred to a separate
session per this PR's review).
Test coverage: 9 new vale-wrap.sh fixtures (quotes, backslash/unicode,
blank-line paragraphs, --config= form, zero-arg/absolute-path handling,
literal-block no-regression) and boundary-pair tests for
skill-size-check.sh's line/word ceilings.
bash tests/run-tests.sh: 9 scripts + 125 bats assertions, all passing.
scripts/check-manifests.sh and claude plugin validate --strict: clean.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MCQ648fLSFXPHGZdQ8gn58
9.4 KiB
name, description, allowed-tools, metadata
| name | description | allowed-tools | metadata | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| marketplace-author | Use when the user wants to add a plugin to the marketplace ("register my plugin", "add to marketplace", "list plugin X"), remove an entry ("unlist plugin X", "remove from marketplace"), or update an existing entry ("bump the marketplace version", "update the description for Y"). Always updates both .claude-plugin/marketplace.json and .github/plugin/marketplace.json in the same pass. Out of scope: plugin scaffold and configuration — use /plugin-author for that. Does not run `claude plugin marketplace add` or equivalent CLI registration commands — only manages `marketplace.json` entries. | Bash Read Write Edit |
|
Gotchas
- Both marketplace files must be identical after every operation — never update one without the other in the same edit pass.
- Every catalog mutation (ADD, REMOVE, UPDATE) requires a catalog
versionbump in both files in the same edit pass. Clients cache the catalog and use the version to detect changes — skipping the bump means the new state is invisible until a forced refresh. Convention: ADD and REMOVE → minor bump (e.g.0.1.1→0.2.0); UPDATE → patch bump (e.g.0.2.0→0.2.1). Theversionfield may be at the top level or nested insidemetadata— bump whichever form is present. sourcefor local plugins is a relative path from the marketplace root, not the plugin directory name alone (e.g."./plugins/kyberforge", not"kyberforge").- The
{ "source": "github", ... }object form is only for GitHub. For GitLab, Gitea, or any other git host, use{ "source": "git", "url": "https://..." }with a full URL.
Route
Determine which operation applies before touching any file:
- Neither
.claude-plugin/marketplace.jsonnor.github/plugin/marketplace.jsonexist → follow CREATE - Only one file exists → stop and note the mirror is missing; ask the user whether to create the missing mirror from the existing file, or whether this is an error. Do not proceed until both files are present or the user has explicitly directed you to create the missing one.
- Both files exist + plugin name NOT in
plugins[]+ add/register/list intent → follow ADD - Both files exist + plugin name IS in
plugins[]+ remove/unlist/delete intent → follow REMOVE - Both files exist + plugin name IS in
plugins[]+ change/update/bump intent → follow UPDATE - User asks to validate without any add/remove/update intent → follow VALIDATE
- Ambiguous → ask: "Did you mean to add a new plugin entry, update an existing one, or remove one?"
CREATE
Run this flow only when no marketplace.json exists anywhere in the repo.
Prerequisites
Confirm you have:
- Marketplace name (kebab-case, e.g.
my-marketplace) - Owner name (and optionally email)
- Marketplace description (optional but recommended)
- At least one initial plugin entry (name, source, description)
If prerequisites are missing, ask before writing.
Step 1 — Write .claude-plugin/marketplace.json
Create the file with the following structure (fill in the values from prerequisites):
{
"name": "<marketplace-name>",
"owner": { "name": "<owner-name>", "email": "<owner-email>" },
"metadata": {
"description": "<marketplace-description>",
"version": "0.1.0"
},
"plugins": [
{
"name": "<plugin-name>",
"description": "<plugin-description>",
"source": "<source>"
}
]
}
Omit "email" if not provided. Omit "metadata.version" if the user does not want a pinned catalog version. The metadata object is the Copilot CLI canonical location for top-level description and version — Claude Code accepts both metadata-nested and top-level forms; use metadata for dual-tool repos.
Step 2 — Write .github/plugin/marketplace.json
Write identical content to .github/plugin/marketplace.json. These two files must always be identical.
Step 3 — Validate
Follow the VALIDATE flow.
ADD
Run this flow when a plugin name does not yet exist in plugins[] and the intent is to add it.
Prerequisites
Confirm you have:
- Plugin name (kebab-case; reserved prefixes
anthropic-*,claude-*,agent-skills,official-claude-pluginsare rejected by the validator) - Plugin description
- Source type and source value (see source type branching below)
- Version (optional; omit for git-sourced plugins)
If you need details on a specific source type shape or per-entry optional fields, read references/manifest-fields.md.
Source type branching
If the user has not specified a source type, assume local path (the most common case for in-repo plugins). Only ask if the user's intent is unclear: "I'll treat this as a local path plugin — is that right, or does it live on GitHub, a git URL, or npm?"
Source shapes per type:
Local path:
"source": "./plugins/<name>"
GitHub:
"source": { "source": "github", "repo": "owner/repo" }
Add "ref": "<branch-or-tag>" inside the object if the user specifies a branch or tag. Add "sha": "<commit-sha>" if pinning to an exact commit — sha takes precedence over ref when both are present.
Git URL:
"source": { "source": "git", "url": "https://..." }
Add "ref": "<branch-or-tag>" inside the object if specified.
npm:
"source": { "source": "npm", "package": "@scope/pkg", "version": "1.0.0" }
version is required for npm source.
Entry shape
The full entry added to plugins[]:
{
"name": "<name>",
"description": "<description>",
"source": <source per type above>
}
Include "version": "<version>" at the entry level only when the source is npm or when the user explicitly requests a pinned version in the catalog.
Include "strict": false when the plugin is a dual Claude Code / Copilot CLI plugin — this prevents Copilot from rejecting CC-specific fields in the plugin directory.
Step 1 — Read both files
Read .claude-plugin/marketplace.json and .github/plugin/marketplace.json. Verify they are identical. If they differ, stop and report the divergence — do not proceed until the user resolves it.
Step 2 — Add the entry
Append the new entry to the end of the plugins[] array in .claude-plugin/marketplace.json. Array order is not semantically significant, but always add at the end for consistency.
Step 3 — Mirror
Apply the identical addition to .github/plugin/marketplace.json in the same edit pass.
Step 4 — Bump catalog version
Apply a minor bump to the version field in both files in the same edit pass (e.g. 0.1.1 → 0.2.0). Find the field at the top level or inside metadata — bump whichever form is present.
Step 5 — Validate
Follow the VALIDATE flow.
REMOVE
Run this flow when an entry exists in plugins[] and the intent is to remove it.
Step 1 — Confirm the target
Read .claude-plugin/marketplace.json. Identify the entry to remove. State the full entry as it currently appears.
Step 2 — HITL gate
State clearly before proceeding:
"I will remove the
<name>entry from both.claude-plugin/marketplace.jsonand.github/plugin/marketplace.json. This does not delete the plugin files. Confirm?"
Do not proceed until the user confirms. If the user says "yes" or equivalent, continue to Step 3.
Step 3 — Remove from both files
Remove the entry from plugins[] in .claude-plugin/marketplace.json.
Apply the identical removal to .github/plugin/marketplace.json in the same edit pass.
Step 4 — Bump catalog version
Apply a minor bump to the version field in both files in the same edit pass (e.g. 0.1.1 → 0.2.0). Find the field at the top level or inside metadata — bump whichever form is present.
Step 5 — Validate
Follow the VALIDATE flow.
UPDATE
Run this flow when an entry exists in plugins[] and the intent is to change one or more fields.
If you need to verify a field name or source type shape, read references/manifest-fields.md.
Step 1 — Read the current entry
Read .claude-plugin/marketplace.json. Show the current state of the target entry so the user can confirm the fields to change.
Step 2 — Apply changes
State which fields will change and to what values, then edit .claude-plugin/marketplace.json.
Apply the identical change to .github/plugin/marketplace.json in the same edit pass.
Step 3 — Bump catalog version
Apply a patch bump to the version field in both files in the same edit pass (e.g. 0.2.0 → 0.2.1). Find the field at the top level or inside metadata — bump whichever form is present.
Step 4 — Validate
Follow the VALIDATE flow.
VALIDATE
Run from the repo root (not from the plugin directory or .claude-plugin/):
claude plugin validate .
Add --strict to promote warnings to errors — recommended in CI.
Report the output. If validation fails, describe the specific error and what needs to be fixed. Do not attempt to auto-fix validation errors unless the fix is unambiguous (e.g. a trailing comma that violates JSON syntax); otherwise, describe the fix and ask the user to confirm.