Skip to content

fix(skill): skill-publishing — CLI multi-value flags take spaces, not commas - #33

Open
wiiiimm (wiiiimm) wants to merge 2 commits into
mainfrom
fix/skills-cli-flag-forms
Open

fix(skill): skill-publishing — CLI multi-value flags take spaces, not commas#33
wiiiimm (wiiiimm) wants to merge 2 commits into
mainfrom
fix/skills-cli-flag-forms

Conversation

@wiiiimm

Copy link
Copy Markdown
Member

A sibling session bootstrapping a private skills repo hit -a claude-code,codex being rejected and passed along four corrections. Per this repo's own rule — verify the reviewer's suggested mechanism, not just its concern — I re-ran every invocation against skills v1.5.23 instead of folding the report in as written. That changed two of the conclusions, including the one that matters most.

What the CLI actually does

Form Result
-s a b / -a claude-code codex works — both flags are variadic
-s a -s b / -a claude-code -a codex works
-a claude-code,codex ■ Invalid agents: claude-code,codexthen prints a valid-agent list containing both names
-s a,b ■ No matching skills found, installs nothing, exits 0

The -s comma form is the finding worth having, and it wasn't in the report — which guessed -s shared the -a trap "presumably". It doesn't; it has a worse one. -a at least fails loudly. -s is a fail-open: a scripted or CI install with a typo'd separator does nothing and reports success. That's the exact defect class AGENTS.md names ("silence is not success"; "an exit code is a hint"), so it belongs in the skill in those terms.

Also verified and now documented:

  • Agent names are claude-code (not claude) and codex. The confusing part is that the rejection message for the comma form lists both names as valid, so it reads like a tool bug rather than a parsing problem.
  • --all writes more than you'd think — shorthand for --skill '*' --agent '*' -y, so ~19 agent directories, plus a non-hidden top-level agent/ holding a second full copy of every skill next to .agents/ and .claude/. That's git add -A bait in a repo, and npx skills remove --all leaves the empty directory behind.
  • The two lock files differ: project scope writes skills-lock.json (version 1, computedHash) at the repo root; global writes ~/.agents/.skill-lock.json (version 3, skillFolderHash). Neither carries absolute paths, so the project lock is safe to commit — which is precisely what makes "gitignore the agent dirs, track the lock" a working pattern for a repo that wants installed skills usable but not vendored.
  • experimental_install / experimental_sync exist in --help; documented as unverified rather than claimed to work.

None of these failure modes are in --help — whose own -a, --agent <agents> wording is what invites the comma in the first place. The provenance note goes from the vague "v1.5.x (2026-07)" to the exact version and date, since this is the second time that section has drifted.

metadata.version 1.1.0 → 1.2.0.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NVBGrKyCoZtJStpVM1Li6L

…ma lists, one of them silently

Prompted by a sibling session bootstrapping a private skills repo, which hit
`-a claude-code,codex` being rejected. Re-ran every invocation here against
skills v1.5.23 rather than take the report as-is, which changed two of the
conclusions.

Verified:
- `-s/--skill` and `-a/--agent` are variadic — space-separated or repeated. The
  report guessed `-s` shared the `-a` comma trap "presumably"; it does not have
  the same trap, it has a WORSE one.
- `-a a,b` errors `Invalid agents: a,b` and then prints a valid-agent list
  containing both names you just passed — it reads like a tool bug, not a parse
  error, which is what makes it expensive.
- `-s a,b` prints "No matching skills found", installs nothing, and EXITS 0.
  That is a fail-open: a scripted install with a typo'd separator reports success
  having done nothing. This is the finding worth having, and it wasn't in the
  report.
- Agent names are `claude-code` (not `claude`) and `codex`.
- `--all` = `--skill '*' --agent '*' -y`: ~19 agent dirs plus a NON-HIDDEN
  top-level `agent/` holding a second full copy of every skill — `git add -A`
  bait — and `remove --all` leaves the empty dir behind.
- Project scope writes `skills-lock.json` (version 1, `computedHash`) at the repo
  root; global writes `~/.agents/.skill-lock.json` (version 3, `skillFolderHash`).
  Neither carries absolute paths, so the project lock is safe to commit — which
  is what makes gitignoring the agent dirs while tracking the lock work.
- `experimental_install` / `experimental_sync` exist in `--help`; documented as
  unverified rather than claimed to work.

None of these failure modes appear in `--help`, whose own `-a, --agent <agents>`
wording is what invites the comma in the first place. Provenance note updated
from "v1.5.x (2026-07)" to the exact version and date.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NVBGrKyCoZtJStpVM1Li6L
@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 44 minutes.

View limit details

Limit details: You’ve used the included review currently available. Your 93 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 8c21b6d7-6e1a-4498-8b28-dedb4b859899

📥 Commits

Reviewing files that changed from the base of the PR and between 8f9ff23 and 3f78de1.

📒 Files selected for processing (1)
  • skills/skill-publishing/SKILL.md

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 50b3638a97

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".

Comment on lines +169 to +170
Neither contains absolute paths, so the **project lock file is safe to commit** —
and committing it is how you keep the installed set reproducible while

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Qualify when the project lock is safe to publish

When a project installs a skill from a private repository, committing this lock file to a public repository can disclose the private source identifier: the preceding table confirms that each entry includes source (and the global form includes sourceUrl). The absence of absolute paths therefore does not make the file unconditionally safe to commit; advise inspecting it or excluding/redacting private source metadata before publishing.

AGENTS.md reference: AGENTS.md:L59-L61

Useful? React with 👍 / 👎.

@greptile-apps

greptile-apps Bot commented Aug 26, 2026

Copy link
Copy Markdown

Greptile Summary

The PR expands the skill-publishing documentation with verified multi-value flag behavior, --all installation effects, project/global lock-file distinctions, and exact CLI provenance.

  • Documents space-separated and repeated --skill/--agent values and the differing comma-list failures.
  • Adds warnings about the broad filesystem effects of --all.
  • Describes project and global lock formats and experimental restore commands.
  • Bumps the skill metadata version to 1.2.0.

Confidence Score: 4/5

The PR appears safe to merge, with a non-blocking documentation inconsistency around the unverified lock-file restoration workflow.

The changed skill provides concrete CLI guidance, but its claim that a committed lock keeps installations reproducible is not supported by a verified restoration command.

Files Needing Attention: skills/skill-publishing/SKILL.md

Important Files Changed

Filename Overview
skills/skill-publishing/SKILL.md The CLI guidance is substantially clarified, but the lock-file section promises reproducibility through restore commands whose behavior it simultaneously marks unverified.

Fix all with Greploop Fix All in Claude Code Fix All in Cursor Fix All in Codex Fix All in Cursor Cloud Agents Fix All in Conductor

Reviews (1): Last reviewed commit: "fix(skill): skill-publishing — the CLI's..." | Re-trigger Greptile

Comment on lines +169 to +173
Neither contains absolute paths, so the **project lock file is safe to commit** —
and committing it is how you keep the installed set reproducible while
`.gitignore`-ing the agent directories themselves, so vendored copies never enter
git. `experimental_install` ("Restore skills from `skills-lock.json`") and
`experimental_sync` exist for that flow; both are listed in `--help` but their

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Unverified reproducibility claim

The text recommends committing skills-lock.json to keep installations reproducible, then states that the experimental commands needed to restore that installation are unverified. This leaves readers without a validated way to reconstruct the recorded skill contents after ignoring the installed agent directories.

Fix in Claude Code Fix in Cursor Fix in Codex Fix in Cursor Cloud Agents Fix in Conductor

…open was in my measurement

The previous commit claimed `-s a,b` exits 0 — a silent fail-open. It does not.
Measured directly, both comma forms exit 1 and fail cleanly: nothing installed,
no lock file written.

The 0 came from reading `$?` after a pipeline. `npx skills add … | grep …`
returns grep's status, not npx's: measured npx=1, grep=0, pipeline $?=0, and
`set -o pipefail` correctly yields 1. So I fell into the exact defect AGENTS.md
documents — "a pipeline takes the last command's status unless pipefail is set" —
while documenting a different tool's traps, and then shipped it as a finding
about that tool.

Caught by the sibling session that raised the original report, which measured it
with a redirect instead of a pipe. Verified here before changing anything.

The corrected fact generalises better than the wrong one did: the lesson is not
"beware this CLI's exit code", it's "don't read any CLI's status through an
unguarded pipe — verify what landed on disk". That now appears as a callout in
the section, including how the bad claim got made, since the failure mode is
more instructive than the flag syntax it was attached to.

Everything else in the previous commit stands: variadic flags, `claude-code` vs
`claude`, the `--all` top-level `agent/` copy, and the two lock-file shapes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NVBGrKyCoZtJStpVM1Li6L
@wiiiimm wiiiimm (wiiiimm) changed the title fix(skill): skill-publishing — CLI multi-value flags reject comma lists, one silently fix(skill): skill-publishing — CLI multi-value flags take spaces, not commas Aug 26, 2026
@wiiiimm

Copy link
Copy Markdown
Member Author

Correction to this PR's headline claim, pushed in 3f78de1.

I wrote that -s a,b exits 0 — a silent fail-open — and made that the centrepiece. It's wrong. Measured with a direct call and the status read on its own line, both comma forms exit 1 and fail cleanly: nothing installed, no lock file written.

The 0 came from reading $? after a pipeline. npx skills add … | grep … returns grep's status, not npx's:

npx status  = 1
grep status = 0
pipeline $? = 0        <-- what I measured and reported
with pipefail: $? = 1  <-- correct

So I hit the exact defect this repo's AGENTS.md documents — "a pipeline takes the last command's status unless pipefail is set" — while writing up a different tool's traps, and shipped it as a finding about that tool. The trap was in my measurement, not the CLI. Caught by the sibling session that raised the original report, which measured with a redirect rather than a pipe; I verified it here before changing anything.

The corrected fact is the more useful one anyway, so it's now a callout in the section rather than a buried line: don't read any CLI's status through an unguarded pipe — check PIPESTATUS/pipefail, or better, verify what landed on disk. I left in how the wrong claim got made, because the failure mode is more instructive than the flag syntax it was attached to, and this section has now drifted twice.

Title updated ("one silently" → "take spaces, not commas"). Everything else stands and was re-verified: variadic -s a b / -a claude-code codex, claude-code not claude, --all leaving a non-hidden top-level agent/ with a full second copy, and the two lock-file shapes.

Worth noting for the reviewer: this is the second time in this PR's short life that a confident claim about tooling came from a misread exit status rather than the tool. That's an argument for the "verify what landed on disk" rule being the durable takeaway.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3f78de15bf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".

Comment on lines +175 to +176
Neither contains absolute paths, so the **project lock file is safe to commit** —
and committing it is how you keep the installed set reproducible while

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Verify the restore path before promising reproducibility

In a clean checkout where the agent directories are ignored, merely committing skills-lock.json does not establish that the installed set can be reproduced; the only restore mechanisms named here are experimental_install and experimental_sync, whose behavior the next sentence explicitly says is unverified. An agent following this guidance could omit the installed copies assuming the lock can rebuild them, only to have no tested recovery path. Run the exact restore invocation before asserting reproducibility, or describe the lock as recording the installed set instead.

AGENTS.md reference: AGENTS.md:L131-L133

Useful? React with 👍 / 👎.

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