chore(skills): harden ClawHub bundles - #806
Merged
Merged
Conversation
|
I hit an error while handling your request (Model unavailable on AI Gateway free tier: Free tier users do not have access to this model. Upgrade to paid credits at https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%3Fmodal%3Dtop-up for unrestricted…). Please try again, rephrase, or reach out if it keeps failing. Error id: e06c9f23-cfe0-431f-96bb-49d89c2a89a8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
ClawHub publishes every regular file in a skill folder unless an ignore policy excludes it. The two Pascal skills had clean dry-run bundles but no scoped policy protecting future local secrets, build output, reports, screenshots, or generated lockfiles.
This adds
.clawhubignoreto both canonical skill folders and makesscripts/validate-skills.tsrequire the shared safety patterns. Validation rejects all active negation rules and the later-loaded legacy.clawdhubignore, preventing either mechanism from reopening protected paths. A focused test suite covers the canonical files, missing exclusions, broad and targeted re-inclusions, whitespace-prefixed negations, and the legacy-file override.The ignored files do not change either published payload fingerprint.
How to test
bun test scripts/clawhub-ignore-policy.test.ts.bun scripts/validate-skills.ts.bun check,bun run test, andclaude plugin validate . --strict.skill publish --dry-run --jsonfor both skill folders and confirm 8 files forpascal-3dand 11 files forfurniture-fit.skills inforeports them eligible and model-visible.An adversarial ClawHub fixture confirmed that appending
!dist/and!dist/reincluded.txtwould otherwise add the protected file and change the bundle fingerprint. The validator now rejects that policy. Normal dry-runs retain the prior fingerprints:pascal-3d:c2c2ca69b60af35ac2aabf5018762538b6e86d145817ef63574a6d2edd6dca02furniture-fit:61b723dacf51fd87b4e3592a06b7bc0e60aef6f4b48ac601dc16acafbab327d4Screenshots / screen recording
Not applicable; this is packaging metadata and validation only.
Checklist
bun dev(not applicable to packaging-only changes)bun checkpasses)mainbranchNote
Low Risk
Packaging-only metadata and validation gates; no runtime, auth, or data-path changes beyond preventing accidental publish of local artifacts.
Overview
Adds scoped
.clawhubignorefiles topascal-3dandfurniture-fitso ClawHub publishes exclude secrets, build output, test artifacts, screenshots, and lockfiles without changing the current dry-run bundle fingerprints.Introduces a shared
clawhub-ignore-policymodule and Bun tests that require the canonical pattern set, forbid negation/re-inclusion rules, and block coexistence with legacy.clawdhubignore.validate-skills.tsnow fails the gate when a skill violates that policy; CI runs the new test before the existing validator. Docs (skills/README.md,skills/VALIDATION.md) describe the check and local test command.Reviewed by Cursor Bugbot for commit 57cbaae. Bugbot is set up for automated code reviews on this repo. Configure here.