Skip to content

fix(repo-hygiene): name the files setup reads instead of searching the plugin - #13895

Merged
kyle-sexton merged 4 commits into
mainfrom
fix/13768-repo-hygiene-setup-named-files
Nov 7, 2026
Merged

kyle-sexton merged 4 commits into
mainfrom
fix/13768-repo-hygiene-setup-named-files

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Refs: #13768

Summary

Setup's Bash-only eval cases were INVALID twice on #13768 part (b). The with-arm searched its own plugin directory with Glob, Grep and compound cd; find; head commands, and the sandbox denied it.

SKILL.md now names each file it reads, as ${CLAUDE_PLUGIN_ROOT}/... paths read with the Read tool: skills/clean/SKILL.md, clean-common.sh, hooks/exec-bash.mjs, destructive-guard.sh and README.md. It forbids searching the plugin tree, and each probe runs as its own Bash call.

A second commit moved a read-this-file instruction out of the sentence that says the guard registers from the frontmatter hooks: block, which restored the frontmatter-hooks grader.

Precedents: #13808 and #13809.

Fix

  • plugins/repo-hygiene/skills/setup/SKILL.md edits (no cited line moved).
  • A patch changelog fragment.

Verification

Laptop lane, run from an rsync copy outside git, Claude Code 2.1.319, model claude-opus-5-5, judge opus, --runs 3 --allow-tools Bash. The cases' premise is "no ghq", so ghq was kept off PATH.

Head only, because the before side (main) cannot be VALID: it is denied on exactly the plugin-root Grep/Glob and the read of the user config directory that this fix removes (hub rule R382).

Head 65f1ba1c: VALID, 0 denied calls in 24 traces.

Case With Without
ghq-absent-info 1.00 0.62
git-absent-every-tier 0.67 0.28
guard-unarmed-expected 0.80 0.07
headless-toggle-configure 0.70 0.20

The "skill fired" warning is expected: every case starts with the /repo-hygiene:setup slash command and carries no Skill grader (setup-ghq-absent-info/prompt.md:2).

On guard-unarmed-expected, frontmatter-hooks passed 2 of 3 with-arm runs at this head against 0 of 3 at the previous head 21c1ad05.

The CLI's exit 1 is only the 0.8 threshold on two cases, not a run error.

Left out: the before side (main), which cannot produce a VALID run for the reason above.

Remaining on #13768

git-absent-every-tier (0.67) and headless-toggle-configure (0.70) are weak cases with a with-arm under 0.8, still well above without.

Related

🤖 Generated with Claude Code

kyle-sexton and others added 4 commits November 6, 2026 16:35
…e plugin

The setup check told the model to read the clean skill directory and probe
what it does, so the with-arm searched the plugin root with Glob and compound
cd/find/head Bash calls, which the eval sandbox denies. Name each file by its
${CLAUDE_PLUGIN_ROOT} path, read it with Read, forbid searching the plugin
directory, and run each probe as its own Bash call. Cited line numbers are
unchanged.

Refs: #13768

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Move the Read pointer for the clean skill and destructive-guard.sh after the
sentence, so "hooks: block in ... SKILL.md frontmatter" reads as one phrase
again. Line count is unchanged.

Refs: #13768

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…entence

Move the read-this-file instruction out of the sentence that says where
the destructive guard registers, so the report keeps "frontmatter hooks"
together.

Refs: #13768

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 7, 2026 02:02
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-07T02:02:30.990616Z
We couldn’t complete this review. Comment @codex review to try again.
9dc7ca7 Draft marked ready
ℹ️ 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 review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 9dc7ca7c1725c67b03634aa5245d56c48210516f: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #13895

No security issues found.

What I read: every hunk of both changed files, .changes/repo-hygiene/fix-13768-setup-named-files-5b8e2c4f.md (a new patch changelog fragment) and plugins/repo-hygiene/skills/setup/SKILL.md. Neither file matches a trusted-path glob. Neither is a plugin manifest, so there are no manifest lines.

Instruction-surface lens: the SKILL.md diff changes wording in the read-only check section, and every change adds a restriction:

  • It names exact ${CLAUDE_PLUGIN_ROOT}/... files to read with the Read tool.
  • It forbids Glob, Grep, find, ls, cd, head and cat in the plugin directory.
  • It requires each probe to run as its own Bash call with nothing chained to it.

No standing rule is removed or softened. "Do not modify anything", "Install nothing, and run no mutating tier", and the rule against echoing ${user_config.clean_destructive_guard_enabled} through Bash are all still in place. The guard-registration text still says the guard registers from the clean skill's frontmatter hooks: block. The diff only adds a pointer to read that SKILL.md and to stop looking for a hooks.json, so the destructive guard and its toggle are untouched. Because nothing was removed, no protected class from the instruction exception register applies. I did not open the register file.

Trust controls: none are touched. Nothing changes a trusted actor, token scope, kill switch, merge hold or Actions workflow.

Embedded text: the PR context contains no directive aimed at the review lane.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

claude-review reviewed 9dc7ca7c1725c67b03634aa5245d56c48210516f: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Code review: no findings

The PR has two files: plugins/repo-hygiene/skills/setup/SKILL.md and a patch changelog fragment, .changes/repo-hygiene/fix-13768-setup-named-files-5b8e2c4f.md. I read every hunk of both, and the head version of setup/SKILL.md in full.

What I checked myself:

  • The new paths exist. Every plugin-root path the skill now tells the agent to Read is in the repository: skills/clean/SKILL.md, skills/clean/scripts/lib/clean-common.sh, hooks/exec-bash.mjs, skills/clean/scripts/destructive-guard.sh and README.md.
  • The guard text is accurate. The new line says the guard "runs ${CLAUDE_PLUGIN_ROOT}/skills/clean/scripts/destructive-guard.sh". That matches the clean skill's frontmatter hooks: block, which runs node with args: ["${CLAUDE_PLUGIN_ROOT}/hooks/exec-bash.mjs", "${CLAUDE_PLUGIN_ROOT}/skills/clean/scripts/destructive-guard.sh"] (clean/SKILL.md#L53-L54).
  • No cited lines moved. Each hunk keeps its line count (-38,11 +38,11, -52,7 +52,7, -62,7 +62,7, -82,10 +82,10, -121,7 +121,7). This bears out the PR's claim that no cited line moved.
  • The new instructions agree with the rest of the skill. "Each remaining probe as its own Bash call" fits the existing note that a compound command naming git is refused in worktree-isolated sessions (setup/SKILL.md#L21-L22).
  • The changelog fragment fits. It uses the same bump: frontmatter format as the other fragment in .changes/. A patch bump suits a fix to skill instructions.
  • The path-scoped rule is met. .claude/rules/skill-bodies-state-current-rules.md applies to this skill. The changed lines restate no volatile upstream detail. The new "does not ship" wording describes this plugin's own layout.

Not verified: the eval scores and the "0 denied calls in 24 traces" result in the PR description come from the author and are unverified. I ran no evals.

Issue criteria: the PR says Refs: #13768 and closes no issue, so there were no acceptance criteria to check.

Prior findings: none. This lane had not reviewed an earlier head, so this was a full review, not a blocking-only one.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 7, 2026
Merged via the queue into main with commit cdc06b4 Nov 7, 2026
69 checks passed
@kyle-sexton
kyle-sexton deleted the fix/13768-repo-hygiene-setup-named-files branch November 7, 2026 02:16
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