Skip to content

fix(playbooks): resync skill-authoring vendor copy and strip upstream self-update - #8625

Merged
kyle-sexton merged 2 commits into
mainfrom
fix/playbooks-skill-authoring-drift
Oct 20, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
fix/playbooks-skill-authoring-drift

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Refs: #8559

Summary

Resyncs plugins/playbooks/skills/skill-authoring/vendor/ from upstream, clearing the scheduled drift check. Following GitHub Security & Cost's review, the sync now strips upstream's self-update ("UPDATE CHECK") block, which tells the reader to curl an install into ~/.claude/skills/, and leaves a marker in its place.

Fix

  • scripts/update.sh strips the UPDATE CHECK block (and its quoted continuation) on every sync, normalizes line endings to LF, and compares against upstream after the same strip, so the strip itself never reads as drift.
  • update.sh writes metadata.upstream-sha as the SHA-256 of vendor/upstream-skill.md after the strip. It is a content hash of what we vendor, not an attestation of an upstream commit or release.
  • scripts/update.test.sh adds stay-loud checks: the strip removes the block and keeps unrelated prose, and the committed vendor/upstream-skill.md carries no fetch-and-run or self-update instruction.
  • Patch changelog fragment under .changes/playbooks/.

Verification

  • scripts/check-changed-skills.sh origin/main (the CI gate): CHECK-SKILL skill-authoring: PASS — 0 errors, 5 warning(s). Check 8: vendor/ changed vs b51c71b2a5, paired with an upstream-sha bump matching the vendored content (5d9dfb50…a688e55) — legitimate sync. The five warnings predate this branch.
  • tr -d '\r' < vendor/upstream-skill.md | sha256sum matches the recorded upstream-sha.
  • update.test.sh: 31 of 31 pass.
  • scripts/check-affected.sh --tests: 13 passed, 1 skipped (no changed .py). Affected suites: 13 shell suites pass; resolve-config node suites 37 of 37; test_check_manifest_duplicate_keys.py 17 of 17.

Related

🤖 Generated with Claude Code

https://claude.ai/code/session_01WyWcv2NwzrPQ4dChfwFjM7

kyle-sexton and others added 2 commits October 20, 2026 06:34
…lf-update block

Upstream added an UPDATE CHECK block to the install-thariq file without
bumping its version (still 1.0.0), so the scheduled drift check saw a SHA
mismatch. That block tells an agent to curl a self-update into
~/.claude/skills/, a remote-code supply-chain hook, so it is not vendored.

update.sh now strips that blockquote on every --apply, replacing it with a
one-line marker, and --check compares upstream after the same strip.
--apply also records metadata.upstream-sha (SHA256 of the vendored file,
post-strip, LF) for skill-quality check 8. update.test.sh fails if vendor/
carries a fetch-and-run, .claude/-write, or self-update instruction.

Refs: #8559

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WyWcv2NwzrPQ4dChfwFjM7
@kyle-sexton
kyle-sexton marked this pull request as ready for review October 20, 2026 13:14
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T13:15:27.104543Z 4b11589 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.

@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 4b11589e039cede23df6f414c9741b6b5aab8efc: 0 finding(s), 0 as inline comments.

Security review: PR #8625, head 4b11589

No security findings.

The PR resyncs the vendored skill-authoring baseline and changes update.sh to strip upstream's "UPDATE CHECK" self-update block. That block told an agent to curl an install into ~/.claude/skills/. The change reduces risk.

What I checked:

  • update.sh: strip_upstream runs in both --check and --apply, so the comparison uses the same stripped content that gets written. Paths and values reach awk through -v or quoted arguments, not through shell interpolation or eval. The script adds no new network surface, and temp files live under the existing TMPDIR_RUN. set_metadata_field writes a SHA256 value that the script computed itself.
  • vendor/upstream-skill.md: a grep for curl, wget, pipe-to-shell, .claude/ install paths, self-update, UPDATE CHECK, api/install and prompt-injection phrases finds only the strip marker line and one benign prose mention of .claude/skills/. The file's SHA256 is 5d9dfb50…8856, which matches the new metadata.upstream-sha in SKILL.md.
  • update.test.sh: it adds a regression scan that fails if a fetch-and-run or self-update instruction reaches vendor/. This strengthens an existing control.
  • Instruction-surface lens: the PR deletes the self-update instruction from the vendored file, and that removal adds a control rather than dropping one. I did not read docs/conventions/instruction-exception-register/README.md, so I judged the deletion by consequence alone.

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed 4b11589e039cede23df6f414c9741b6b5aab8efc: 0 finding(s), 0 as inline comments.

No findings. I read the full diff (5 files) and the PR context, and read update.sh in full. The PR only refs #8559 and closes no issue, so there were no closing-issue criteria to check. No path-scoped rule in .claude/rules/ is violated.

The sandbox denied running update.test.sh and recomputing the vendor hash. The PR body's "31 of 31 pass" and hash-match results are author-claimed and unverified by me.

Checked by reading:

  • strip_upstream replaces the > **UPDATE CHECK blockquote paragraph with a marker, converts CRLF to LF, and keeps unrelated prose.
  • --check and --apply both hash the stripped output, so the strip is not reported as drift. The --apply no-op condition also requires the recorded upstream-sha to match.
  • set_metadata_field replaces an existing field or inserts upstream-sha after synced:.
  • The new test's expected 11: line number matches the 11-line fixture.

Two minor limits, not blocking:

  • The strip only fires on > **UPDATE CHECK. If upstream rewords the block, --apply would write it into vendor/, and the hazard-scan test then fails. That is the intended stay-loud behavior.
  • The strip_upstream header comment's wording about "the marker line" is ambiguous between the output marker and the upstream line (a nit).

@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 20, 2026
Merged via the queue into main with commit 419f77d Oct 20, 2026
57 checks passed
@kyle-sexton
kyle-sexton deleted the fix/playbooks-skill-authoring-drift branch October 20, 2026 13:32
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