Skip to content

chore(skills): harden ClawHub bundles - #806

Merged
Aymericr merged 2 commits into
mainfrom
fix/clawhub-skill-ignore-20260909
Sep 9, 2026
Merged

chore(skills): harden ClawHub bundles#806
Aymericr merged 2 commits into
mainfrom
fix/clawhub-skill-ignore-20260909

Conversation

@Aymericr

@Aymericr Aymericr commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

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 .clawhubignore to both canonical skill folders and makes scripts/validate-skills.ts require 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

  1. Run bun test scripts/clawhub-ignore-policy.test.ts.
  2. Run bun scripts/validate-skills.ts.
  3. Run bun check, bun run test, and claude plugin validate . --strict.
  4. Run ClawHub 0.23.3 skill publish --dry-run --json for both skill folders and confirm 8 files for pascal-3d and 11 files for furniture-fit.
  5. Install both local folders with OpenClaw 2026.9.3 and confirm skills info reports them eligible and model-visible.

An adversarial ClawHub fixture confirmed that appending !dist/ and !dist/reincluded.txt would 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: c2c2ca69b60af35ac2aabf5018762538b6e86d145817ef63574a6d2edd6dca02
  • furniture-fit: 61b723dacf51fd87b4e3592a06b7bc0e60aef6f4b48ac601dc16acafbab327d4

Screenshots / screen recording

Not applicable; this is packaging metadata and validation only.

Checklist

  • I've tested this locally with bun dev (not applicable to packaging-only changes)
  • My code follows the existing code style (bun check passes)
  • I've updated relevant documentation
  • This PR targets the main branch

Note

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 .clawhubignore files to pascal-3d and furniture-fit so ClawHub publishes exclude secrets, build output, test artifacts, screenshots, and lockfiles without changing the current dry-run bundle fingerprints.

Introduces a shared clawhub-ignore-policy module and Bun tests that require the canonical pattern set, forbid negation/re-inclusion rules, and block coexistence with legacy .clawdhubignore. validate-skills.ts now 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.

@pascal

pascal Bot commented Sep 9, 2026

Copy link
Copy Markdown

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

@Aymericr
Aymericr merged commit c4a7371 into main Sep 9, 2026
3 checks passed
@Aymericr
Aymericr deleted the fix/clawhub-skill-ignore-20260909 branch September 9, 2026 20:30
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