Skip to content

Marketing skills for Claude Code and AI agents. CRO, copywriting, SEO, analytics, and growth engineering.

feat: package reviewed single-skill ZIP release assets

Rudy Celekli72b094914f77
diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json
index ea384a9..a6f60db 100644
--- a/.claude-plugin/marketplace.json
+++ b/.claude-plugin/marketplace.json
@@ -6,7 +6,7 @@
},
"metadata": {
"description": "Marketing skills for AI agents — conversion optimization, copywriting, SEO, paid ads, and growth",
- "version": "2.11.17",
+ "version": "2.11.18",
"repository": "https://github.com/coreyhaines31/marketingskills"
},
"plugins": [
diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json
index 83527da..d155ceb 100644
--- a/.claude-plugin/plugin.json
+++ b/.claude-plugin/plugin.json
@@ -1,7 +1,7 @@
{
"name": "marketing-skills",
"description": "Marketing skills for AI agents — conversion optimization, copywriting, SEO, paid ads, ad creative, and growth",
- "version": "2.11.17",
+ "version": "2.11.18",
"author": {
"name": "Corey Haines"
},
diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json
index 7f59e6e..5884655 100644
--- a/.codex-plugin/plugin.json
+++ b/.codex-plugin/plugin.json
@@ -1,7 +1,7 @@
{
"name": "marketing-skills",
"description": "Marketing skills for AI agents — conversion optimization, copywriting, SEO, paid ads, ad creative, and growth",
- "version": "2.11.17",
+ "version": "2.11.18",
"author": {
"name": "Corey Haines"
},
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 0beef62..a8f4d0c 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -2,8 +2,8 @@ name: Release on version bump
# Auto-creates a git tag + GitHub Release whenever the repo version in
# .claude-plugin/plugin.json changes on main. Release notes are pulled from
-# the matching `### x.y.z` block in VERSIONS.md. Idempotent: if the tag
-# already exists, it does nothing (safe to re-run / backfill manually).
+# the matching `### x.y.z` block in VERSIONS.md. Re-runs retain the existing
+# tag's commit and replace only the named ZIP/manifest release assets.
on:
push:
@@ -30,18 +30,19 @@ jobs:
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
if git rev-parse -q --verify "refs/tags/v$VERSION" >/dev/null; then
echo "exists=true" >> "$GITHUB_OUTPUT"
- echo "v$VERSION already tagged — nothing to do."
+ echo "package_ref=$(git rev-parse "refs/tags/v$VERSION^{commit}")" >> "$GITHUB_OUTPUT"
+ echo "v$VERSION already tagged — reuse that commit for assets."
else
echo "exists=false" >> "$GITHUB_OUTPUT"
+ echo "package_ref=${{ github.sha }}" >> "$GITHUB_OUTPUT"
fi
- name: Extract release notes + title from VERSIONS.md
- if: steps.ver.outputs.exists == 'false'
run: |
- python3 - "${{ steps.ver.outputs.version }}" <<'PY'
- import re, sys
+ python3 - "${{ steps.ver.outputs.version }}" "${{ steps.ver.outputs.package_ref }}" <<'PY'
+ import re, subprocess, sys
v = sys.argv[1]
- text = open("VERSIONS.md").read()
+ text = subprocess.check_output(["git", "show", f"{sys.argv[2]}:VERSIONS.md"], text=True)
parts = re.split(r"\n### (\d+\.\d+\.\d+) \([^)]*\)\n", text)
blocks = {}
for i in range(1, len(parts), 2):
@@ -58,14 +59,42 @@ jobs:
print("Title:", title)
PY
- - name: Create tag + release
- if: steps.ver.outputs.exists == 'false'
+ - name: Build complete source ZIPs and reviewed web ZIPs
+ run: |
+ python3 scripts/package_skills.py --ref "${{ steps.ver.outputs.package_ref }}" --target source --output dist/skill-zips
+ python3 scripts/package_skills.py --ref "${{ steps.ver.outputs.package_ref }}" --target claude-web --mapped-only --output dist/skill-zips
+ python3 - <<'PY'
+ import json, os
+ from pathlib import Path
+ root = Path("dist/skill-zips")
+ source = json.loads((root / "source-manifest.json").read_text())
+ web = json.loads((root / "claude-web-manifest.json").read_text())
+ lines = ["## Skill ZIP assets", "", f"Complete source catalog: {len(source['bundles'])} skills.",
+ f"Claude web target: {len(web['bundles'])} skills with reviewed short descriptions.", "",
+ "Choose `<name>-claude-web.zip` for the documented single-folder web upload format.",
+ "Source ZIPs retain original metadata; they are not substitutes for omitted web ZIPs.",
+ "Live client upload, account limits, and invocation behavior have not been verified.", "",
+ "Web omissions (also recorded in `claude-web-manifest.json`):"]
+ lines.extend(f"- {item['skill']}: {item['reason']}" for item in web["omitted"])
+ if not web["omitted"]:
+ lines.append("- None.")
+ report = "\n".join(lines) + "\n"
+ with open("release-notes.md", "a") as notes:
+ notes.write("\n" + report)
+ with open(os.environ["GITHUB_STEP_SUMMARY"], "a") as summary:
+ summary.write(report)
+ PY
+
+ - name: Create release if needed and upload ZIP assets
env:
GH_TOKEN: ${{ github.token }}
run: |
VERSION="${{ steps.ver.outputs.version }}"
- gh release create "v$VERSION" \
- --target "${{ github.sha }}" \
- --title "$(cat release-title.txt)" \
- --notes-file release-notes.md
- echo "Created release v$VERSION"
+ if ! gh release view "v$VERSION" >/dev/null 2>&1; then
+ gh release create "v$VERSION" \
+ --target "${{ steps.ver.outputs.package_ref }}" \
+ --title "$(cat release-title.txt)" \
+ --notes-file release-notes.md
+ fi
+ gh release upload "v$VERSION" dist/skill-zips/*.zip dist/skill-zips/*-manifest.json --clobber
+ echo "Uploaded skill ZIP assets for v$VERSION"
diff --git a/.github/workflows/skill-packaging.yml b/.github/workflows/skill-packaging.yml
new file mode 100644
index 0000000..55ac903
--- /dev/null
+++ b/.github/workflows/skill-packaging.yml
@@ -0,0 +1,31 @@
+name: Validate skill packaging
+
+on:
+ pull_request:
+ branches: [main]
+ paths:
+ - "scripts/package_skills.py"
+ - "scripts/claude-web-descriptions.json"
+ - "tests/test_skill_packaging.py"
+ - ".github/workflows/skill-packaging.yml"
+ - ".github/workflows/release.yml"
+ - "LICENSE"
+ - "skills/**"
+
+permissions:
+ contents: read
+
+jobs:
+ packaging:
+ runs-on: ubuntu-slim
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+ - name: Test actual ZIP structure and integrity
+ run: python3 -m unittest discover -s tests -p test_skill_packaging.py -v
+ - name: Build the checked-out library without uploading
+ run: |
+ python3 scripts/package_skills.py --target source --output "$RUNNER_TEMP/skill-zips"
+ python3 scripts/package_skills.py --target claude-web --mapped-only --output "$RUNNER_TEMP/skill-zips"
diff --git a/README.md b/README.md
index ec3497c..1a44d9f 100644
--- a/README.md
+++ b/README.md
@@ -219,6 +219,12 @@ npx skillkit install coreyhaines31/marketingskills --skill cro copywriting
npx skillkit install coreyhaines31/marketingskills --list
```
+### Option 8: Claude Web Skill ZIPs
+
+Download the desired `<name>-claude-web.zip` from [Releases](https://github.com/coreyhaines31/marketingskills/releases/latest), then use **Customize → Skills → + Create skill → Upload a skill** in Claude. Each archive contains one skill. Account permissions and code execution must allow skills.
+
+The web-target archive uses an explicitly reviewed shorter description; its instructions and resources are preserved. The attached web manifest lists any skills whose description still needs review; newly created release notes also summarize omissions. Installing a ZIP does not configure local CLIs, MCP servers, credentials, or related skills. See [release packaging and verification](docs/skill-release-packaging.md) for archive contents, source variants, and unverified client limitations.
+
## Upgrading from v1.x to v2.0
v2.0 renames 17 skills and consolidates `page-cro` + `form-cro` into a single `cro` skill. If you installed the v1.x skills, you'll have **stale old-name folders** in your install directory after upgrading — the new skills install alongside the old ones, so you'll see both `skills/page-cro/` and `skills/cro/`, etc. Clean them up:
diff --git a/VERSIONS.md b/VERSIONS.md
index 404f2de..d66cc69 100644
--- a/VERSIONS.md
+++ b/VERSIONS.md
@@ -57,6 +57,11 @@ Current versions of all skills. Agents can compare against local versions to che
## Recent Changes
+### 2.11.18 (2026-10-04)
+
+- Add deterministic per-skill source and Claude web-target ZIP release assets with explicit reviewed short descriptions, source integrity manifests, and visible web-catalog omissions.
+- Document the non-terminal Claude installation path and add native archive validation to CI.
+
### 2.11.17 (2026-10-02)
- **video** (2.2.0 → 2.2.1) and the **Hyperframes integration guide** (reported in #600 by @pjthegiant): the old example called a `render({ frames })` API that the `hyperframes` package doesn't export. Both now lead with the CLI (`npx hyperframes init`, `preview`, `render -o output.mp4`) and explain the composition format: a root with `data-composition-id`, `class="clip"` elements with timing attributes, and a paused GSAP timeline. Rendering from code goes through `@hyperframes/producer` (`createRenderJob` + `executeRenderJob`). Checked against v0.8.114.
diff --git a/docs/skill-release-packaging.md b/docs/skill-release-packaging.md
new file mode 100644
index 0000000..aba78db
--- /dev/null
+++ b/docs/skill-release-packaging.md
@@ -0,0 +1,42 @@
+# Single-skill release ZIPs
+
+Release assets provide a download path for people using Claude without a terminal-based agent. Each ZIP contains one named skill folder, its instructions, authored references/scripts/assets, and the repository's MIT license. Evals, caches, untracked files, and the rest of the repository are excluded.
+
+## Use a release asset in Claude
+
+1. Open the [latest release](https://github.com/coreyhaines31/marketingskills/releases/latest) and choose `<name>-claude-web.zip` for the task you need. `claude-web-manifest.json` lists any skills omitted because their short descriptions need review; a source ZIP for an omitted skill is not a replacement web upload.
+2. Review the skill's instructions and any scripts before enabling it.
+3. In Claude, open **Customize → Skills → + Create skill → Upload a skill** and select the ZIP. Your account or organization must permit skills and code execution.
+4. Enable the skill and try a task that matches its description. Check that Claude uses the intended skill and resources.
+
+The ZIP has the single-folder structure in [Claude's custom skill guide](https://support.claude.com/en/articles/12512198-how-to-create-custom-skills). It has not been verified by uploading to a live account. Available account permissions, upload limits, and invocation behavior still need checking in the target client. A `.skill` extension is not required or claimed compatible by this builder.
+
+Installing one archive does not install other skills, local CLI tools, MCP servers, credentials, or marketing context. Related-skill and tool instructions remain dependencies. Use the existing [terminal installation options](../README.md#installation) when you need the complete library and local tooling. API skills have a separate execution environment and cannot make live external API calls; do not assume these archives grant that capability.
+
+## Two explicit targets
+
+- **`source`**: `<name>-source.zip` preserves the original `SKILL.md` and resource bytes. Its long source description may exceed Claude web's documented metadata limit; this target is not presented as a web-ready upload.
+- **`claude-web`**: `<name>-claude-web.zip` changes only the YAML `description` line, using the reviewed entry in `scripts/claude-web-descriptions.json`. The markdown body, other metadata, and all packaged resources remain unchanged. The short description changes discovery wording; review it rather than assuming the original trigger list survives verbatim.
+
+The current web guide documents a 200-character description limit, while the [Agent Skills specification](https://agentskills.io/specification) and [API guide](https://platform.claude.com/docs/en/build-with-claude/skills-guide) allow 1024. Overrides are explicit, not automatic truncation. Each override records a hash of the original description; changed triggers require renewed review.
+
+## Build locally
+
+Python 3 and Git are the only build requirements. Builds read tracked resources from a frozen commit, never dirty or untracked working files:
+
+```bash
+python3 scripts/package_skills.py --target source --skill cro --output /tmp/marketing-skill-zips
+python3 scripts/package_skills.py --target claude-web --skill cro --output /tmp/marketing-skill-zips
+python3 scripts/package_skills.py --target source --ref v2.11.18 --output /tmp/marketing-release-zips
+python3 -m unittest discover -s tests -p test_skill_packaging.py -v
+```
+
+Omit `--skill` to select every skill, or repeat it for a subset. A strict web build rejects missing, oversized, or stale description overrides before writing artifacts. Use a fresh output directory for a release; old files from previous selections are not deleted automatically.
+
+The release workflow explicitly uses `--mapped-only` for the web target. New skills without an override and skills whose source triggers changed are omitted from that target, with reasons in the manifest, newly created release notes, and workflow summary. Source ZIPs still include every skill. Invalid reviewed overrides (for example, over 200 characters) fail the build. This keeps unrelated releases working while making an incomplete web catalog visible. A maintainer can add or revise an override only after reviewing the current trigger wording, then update its `source_description_sha256` from the decoded source description.
+
+On a re-run, the workflow packages the existing tag's frozen commit and replaces only the named ZIP/manifest assets. It preserves an existing release's notes rather than overwriting editorial changes; the attached manifest is the authoritative omission report for that case. No tag is moved and no upload or release operation is performed by the local builder.
+
+Manifests record the source commit, archive SHA-256, original and packaged file hashes, exact description changes, and uncompressed byte counts. The default 30,000,000-byte per-bundle bound is a local build safeguard, **not a verified Claude web upload limit**. The API's documented limit is separate. Use `--max-uncompressed-bytes` to change the local bound after checking your target's requirements.
+
+Archive ordering, timestamps, and file modes are fixed for repeatable builds in the same Python/zlib environment. Executable script modes are retained. Symlinks and unsafe resource paths are rejected rather than followed. Neither building nor testing uploads a skill or runs a marketing tool.
diff --git a/scripts/claude-web-descriptions.json b/scripts/claude-web-descriptions.json
new file mode 100644
index 0000000..babf6c8
--- /dev/null
+++ b/scripts/claude-web-descriptions.json
@@ -0,0 +1,202 @@
+{
+ "ab-testing": {
+ "source_description_sha256": "863dfe543c5dc0e3ba0feb6661131f8cd631efe34bbe48ec3fd074b027575000",
+ "description": "Plan A/B tests and growth experiments: hypotheses, variants, measurement, sample size, duration, and an experiment backlog."
+ },
+ "ad-creative": {
+ "source_description_sha256": "2c7bec0e5a8bc2a502c97fa65b59882221b56e3b1f27514ddffd87dc9df25404",
+ "description": "Create and iterate paid ad copy, hooks, headlines, and visual or video concepts; prepare creative tests and approval-ready variations."
+ },
+ "ads": {
+ "source_description_sha256": "86c17fc25d15c40557bfb6a5b5479c18e2c6641caad108d84e1212b9b5100b01",
+ "description": "Plan and optimize paid campaigns: audiences, budgets, bidding, PPC, retargeting, ROAS, CPA, and lead quality across ad platforms."
+ },
+ "ai-seo": {
+ "source_description_sha256": "fe0e0f43de0d37634ec768d9eb300e9bf25638df1c42bf7e06c56bf56be67406",
+ "description": "Improve AI search visibility, LLM citations, AEO/GEO, AI Overviews, and agent-readable site content; audit why AI answers overlook your brand."
+ },
+ "analytics": {
+ "source_description_sha256": "9e250e350c76e7b65b357cd879bb9f1f49523d890ff15bad21faae9942e9e5e7",
+ "description": "Set up or audit GA4, conversion events, UTMs, tag managers, and tracking plans; diagnose missing events and measure marketing results."
+ },
+ "aso": {
+ "source_description_sha256": "3e5d0a3c81b0b2b73d05dbef76c8bc33079b540ca9c5027c1328d7b0610cdf7c",
+ "description": "Audit and optimize App Store or Google Play listings, app keywords, visibility, rankings, and listing conversion."
+ },
+ "attribution": {
+ "source_description_sha256": "01fdc33a6297f1e4606a52eec48c00ece9cc43db22ef2519ff90eed0785e81bb",
+ "description": "Choose attribution models, reconcile revenue dashboards, and investigate channel impact using multi-touch, MMM, incrementality, and first-party attribution."
+ },
+ "churn-prevention": {
+ "source_description_sha256": "f3b841fef14a812bbf6181d7d3f42c08a9e7a264e9716a4bec0fdebd7b683673",
+ "description": "Reduce subscriber churn with cancellation flows, save offers, retention, failed-payment recovery, dunning, pauses, and win-back strategies."
+ },
+ "co-marketing": {
+ "source_description_sha256": "b97864599b16f5e5f25ba171eed4ec315a7b3c23f694c6c0282af77eddf9ef60",
+ "description": "Find co-marketing partners and plan joint campaigns, integration marketing, co-branded content, and cross-promotions."
+ },
+ "cold-email": {
+ "source_description_sha256": "6b7866f8f969e33fad95b10f31981c4b2dfe55cf18860e39533527d00cd00c81",
+ "description": "Write B2B cold outreach emails and follow-up sequences: subject lines, personalization, opening lines, sales copy, and clear CTAs."
+ },
+ "community-marketing": {
+ "source_description_sha256": "6d83f61c0f3a28fc31e483380d6abc6303847e65d44cf3185759f646e251fadb",
+ "description": "Plan or grow a user community, forum, Discord, or Slack group; develop engagement, advocates, ambassadors, and community-led growth."
+ },
+ "competitor-profiling": {
+ "source_description_sha256": "595b6fa65e9518e7af8b6ca4f436199e71341d40ad1fa49d9ba80152be1a8f8d",
+ "description": "Research competitors from URLs and create structured profiles, competitive intelligence, landscape analyses, and competitor dossiers."
+ },
+ "competitors": {
+ "source_description_sha256": "ca613cf0b9b7296079ff8832a34e22625f115d4748c46da6b88da3ce27c21b5e",
+ "description": "Create or audit buyer-facing competitor comparison, versus, and alternative pages; verify existing positioning claims and competitive assets."
+ },
+ "content-strategy": {
+ "source_description_sha256": "602ac5599f4e6e51643d9caa4ccd3cb5429751987750b15cc39e9cba002a85e6",
+ "description": "Plan content topics, pillars, clusters, editorial calendars, blog strategy, and content roadmaps before writing individual pieces."
+ },
+ "copy-editing": {
+ "source_description_sha256": "728676d47b83c05e644fe912d8ff281a31a9f60b10a068905d67abb2c434d3ba",
+ "description": "Review, polish, tighten, or refresh existing marketing copy; remove awkward wording, stale content, and AI writing patterns."
+ },
+ "copywriting": {
+ "source_description_sha256": "06ba577db7b71de51b580bea992d10c319c3e76e9f2014bb63ee9c7faacd28c3",
+ "description": "Write or rewrite website marketing copy: homepages, landing pages, product pages, headlines, CTAs, and value propositions."
+ },
+ "cro": {
+ "source_description_sha256": "3e28de53a48fe9dbacc1437567c19ce5185b5f175e7b0141eb2117c83f4366e2",
+ "description": "Audit marketing pages and lead-capture forms to improve conversions; diagnose landing-page friction, form abandonment, and weak conversion rates."
+ },
+ "customer-research": {
+ "source_description_sha256": "1fa6285752c5a17a5dfff90989e9c0ffef29fca5a5302b6aa88dae86d66626b4",
+ "description": "Plan or analyze customer interviews, surveys, support tickets, reviews, and online research; identify ICP, jobs to be done, and voice of customer."
+ },
+ "directory-submissions": {
+ "source_description_sha256": "ad3b6925d997e245898b2f58d1879c2350f610db78753d89844b3b55d8f54221",
+ "description": "Plan and track product submissions to startup, SaaS, AI, agent, MCP, and review directories for discovery and backlinks."
+ },
+ "emails": {
+ "source_description_sha256": "153a188955ee65f24fdd800478a82cbfcb186fe1bff0bd7827bc46dfbc0b1529",
+ "description": "Create or optimize lifecycle email programs: welcome, onboarding, nurture, drip, re-engagement, and automated multi-email sequences."
+ },
+ "events": {
+ "source_description_sha256": "9ef860366af94429d31d812359bf175bc45f4563764085bc28cfc7838caf4c90",
+ "description": "Plan webinars, conferences, trade shows, meetups, dinners, and speaking; evaluate sponsorships, event ROI, attendance, and follow-up."
+ },
+ "free-tools": {
+ "source_description_sha256": "3daf1be2d7f875e213cebbc3ac0f6b794ce5d62fbd5be9d061525b1a1fe9a861",
+ "description": "Plan, evaluate, or build free calculators, generators, graders, and interactive tools for lead generation, SEO, or brand awareness."
+ },
+ "image": {
+ "source_description_sha256": "e2db953d7acfe34818fa421ea69f3a3e70210be1b2e42fa9c4541fc4c274ac0b",
+ "description": "Create or optimize marketing images: blog heroes, product mockups, social graphics, banners, listing visuals, and brand assets."
+ },
+ "influencer-marketing": {
+ "source_description_sha256": "dd23e66e3271ae2ee37065ef4a684cfb75e56037e05122db97f97b638b2988d3",
+ "description": "Find and vet creators, influencers, and ambassadors; plan sponsorship deals, briefs, disclosure, UGC partnerships, and ROI measurement."
+ },
+ "launch": {
+ "source_description_sha256": "c1659a25d7b1f0b6ce063bc484287ea35fbc14b595997f166f0f68581517eabf",
+ "description": "Plan product launches, feature announcements, beta releases, waitlists, early access, Product Hunt campaigns, and go-to-market moments."
+ },
+ "lead-magnets": {
+ "source_description_sha256": "c4f0069d4b7269e84958dc7b3f710a82173e376c8b5f92a1ca0915ee40a45890",
+ "description": "Plan and distribute lead magnets for email capture: ebooks, checklists, downloadable templates, resource libraries, and gated content."
+ },
+ "marketing-council": {
+ "source_description_sha256": "103f655a5584cfab3521597f218b44e4bf20181ca2231bf68e67da7c9481f101",
+ "description": "Explore a marketing question through multiple documented expert frameworks; compare simulated advisor perspectives and synthesize their disagreements."
+ },
+ "marketing-ideas": {
+ "source_description_sha256": "577dbfad438174bed549ee3eaed53ce4b1ae1c71c7687b6b4ce734c4e44012dc",
+ "description": "Brainstorm marketing tactics, growth ideas, and channel strategies for a SaaS or software product when deciding what to try next."
+ },
+ "marketing-loops": {
+ "source_description_sha256": "744653132e42ba7ac274b9b76ec4c856e73bb586879f139b462d5b873fa5133e",
+ "description": "Design recurring marketing workflows: weekly reviews, ad-fatigue checks, content refreshes, churn monitoring, and scheduled agent loops."
+ },
+ "marketing-plan": {
+ "source_description_sha256": "412a11758429c9585f932bab6606346e74fa278da3e0f113cde5c5b9f59a258d",
+ "description": "Create a comprehensive AARRR marketing plan, current-state audit, market sizing, budget, operating stack, and growth roadmap."
+ },
+ "marketing-psychology": {
+ "source_description_sha256": "ca1d0c40229c0533bcb2b9746355b2b4bdc8582b5bfcdf9ba6203856609192b4",
+ "description": "Apply behavioral science, persuasion, mental models, cognitive biases, framing, social proof, and decision-making principles to marketing."
+ },
+ "offers": {
+ "source_description_sha256": "6b4901f895a5ee7ef1a1db9bfe9b6486a2ee9bc4afe107ba7a5e26496c54b18b",
+ "description": "Design service, agency, course, or high-ticket offers: value framing, bonuses, guarantees, naming, scarcity, and payment structure."
+ },
+ "onboarding": {
+ "source_description_sha256": "1470e74405509c4f4fc862bfe4e9a08691697040f44de2d0469459fa8812d3da",
+ "description": "Optimize post-signup activation, setup, first-run experience, empty states, aha moments, and time to value."
+ },
+ "paywalls": {
+ "source_description_sha256": "142a11cbc3835effdb8406e978efb631136365e57c8d9288adf2e7068f33631d",
+ "description": "Improve in-app paywalls, upgrade prompts, feature gates, trial-expiry screens, and freemium-to-paid conversion."
+ },
+ "popups": {
+ "source_description_sha256": "71756773110b7bccc866f3e802ce94862787bc06d66f8f3884a1b4ee2f210968",
+ "description": "Optimize lead-capture popups, exit-intent overlays, modals, announcement banners, sticky bars, and interrupt-style conversion elements."
+ },
+ "pricing": {
+ "source_description_sha256": "7d00b3aa8d32404fa1502699f79cf3374fd18f070b360dd2bb320a7236aac57d",
+ "description": "Choose pricing, tiers, value metrics, freemium, trials, and packaging; audit pricing pages for buyers and AI readability."
+ },
+ "product-marketing": {
+ "source_description_sha256": "f43b89c43d215c35cc750379b109b7a3ea6584b99890c2725b7e770fa1579f2c",
+ "description": "Create or update product marketing context, positioning, audience, ICP, and foundational information shared across marketing tasks."
+ },
+ "programmatic-seo": {
+ "source_description_sha256": "f007ff34fc7e7a276efcacbca4ee21da872a1b61c0e5119010fbc5297393edea",
+ "description": "Plan or build keyword-targeted SEO pages at scale: templates, directories, locations, comparisons, integrations, and data-driven landing pages."
+ },
+ "prospecting": {
+ "source_description_sha256": "1e4297893134834f80eff25de1da4a40033ffa6458626b6b88a750c40dc32bfb",
+ "description": "Build and qualify prospect or target-account lists for B2B, SaaS, or local businesses; find ICP-fit leads, early customers, and design partners."
+ },
+ "public-relations": {
+ "source_description_sha256": "f61b65fb0370119ece6b4a3a2405a2c78ad3b801a0914e65867926e0d9eb86cd",
+ "description": "Plan earned media, journalist pitches, press materials, podcast appearances, thought leadership, and crisis communications."
+ },
+ "referrals": {
+ "source_description_sha256": "b7faa6189feafa9f5ef2cada842aa949d77b98891704f14b3573d096fbf15830",
+ "description": "Design, improve, or analyze customer referral, affiliate, ambassador, partner, incentive, and word-of-mouth programs."
+ },
+ "revops": {
+ "source_description_sha256": "7b90eb35a3cab25f88973ac84f3076125df05fa778d6658713ab830096bb7919",
+ "description": "Improve lead scoring, qualification, routing, CRM hygiene, pipeline stages, deal processes, and marketing-to-sales handoffs."
+ },
+ "sales-enablement": {
+ "source_description_sha256": "9c8063d0fbfd56dcbc830cf05edea6e885fdaa95bb2944cb86f8baba653e594e",
+ "description": "Create sales decks, proposals, one-pagers, battle cards, demo scripts, objection handling, and deal-specific ROI or win-loss analysis."
+ },
+ "schema": {
+ "source_description_sha256": "237783da0df287fe700906fe90552c24940c6d2708efa8c885d6e11561f59b39",
+ "description": "Implement or fix schema.org JSON-LD and structured data for products, reviews, breadcrumbs, FAQs, and eligible search enhancements."
+ },
+ "seo-audit": {
+ "source_description_sha256": "0acc442c6357614786b078536826bdd2f0e24c93c18bb0d73bebc5d9ef9e5e0d",
+ "description": "Audit technical and on-page SEO, indexing, crawling, rankings, meta tags, traffic drops, page speed, and Core Web Vitals."
+ },
+ "signup": {
+ "source_description_sha256": "a0e5c4774241ad4b106493155ad30dc2a4300e88cfcefa68c8a5f7af3ef234f9",
+ "description": "Optimize registration, account creation, free-trial signup, signup forms, friction, abandonment, and completion rates."
+ },
+ "site-architecture": {
+ "source_description_sha256": "1a084e1885dae04cf203fec85070e100b383cdfce8a5176562198cb9bd802392",
+ "description": "Plan website hierarchy, navigation, URL structure, visual sitemaps, breadcrumbs, and internal linking."
+ },
+ "sms": {
+ "source_description_sha256": "c44427260cf2174a6625f20d05eefd9875f3ef96fa558bb0fc441dddc04278dd",
+ "description": "Plan SMS, MMS, and WhatsApp campaigns, lifecycle texts, transactional messages, opt-ins, templates, and messaging compliance."
+ },
+ "social": {
+ "source_description_sha256": "6bac38d2ff4a230a5816022615a0a0860f0a25a03fa1e5cb089367da2bb6fea2",
+ "description": "Create, repurpose, or schedule social posts, carousels, and short-video scripts; plan social strategy, listening, and engagement triage."
+ },
+ "video": {
+ "source_description_sha256": "659fa809bd3a18b34120b85bce6ea358883484a12c7fe700fe3e2f0295b97257",
+ "description": "Plan and produce AI or programmatic marketing videos, avatars, explainers, product demos, templates, and reference-style edits."
+ }
+}
diff --git a/scripts/package_skills.py b/scripts/package_skills.py
new file mode 100644
index 0000000..bd2f327
--- /dev/null
+++ b/scripts/package_skills.py
@@ -0,0 +1,198 @@
+#!/usr/bin/env python3
+"""Build deterministic, single-skill ZIPs from a frozen Git revision."""
+
+import argparse
+import hashlib
+import io
+import json
+import re
+import subprocess
+import sys
+import zipfile
+from pathlib import Path, PurePosixPath
+
+
+DESCRIPTION_MAP = "scripts/claude-web-descriptions.json"
+SKILL_NAME = re.compile(r"[a-z0-9]+(?:-[a-z0-9]+)*")
+EXCLUDED_PARTS = {"evals", "__pycache__", "node_modules", ".cache", ".DS_Store"}
+
+
+def git(repo, *args):
+ return subprocess.check_output(["git", "-C", str(repo), *args], stderr=subprocess.PIPE)
+
+
+def sha256(data):
+ return hashlib.sha256(data).hexdigest()
+
+
+def metadata(data):
+ text = data.decode("utf-8")
+ front = re.match(r"\A---\r?\n(.*?)\r?\n---(?:\r?\n|$)", text, re.S)
+ if not front:
+ raise ValueError("SKILL.md is missing YAML frontmatter")
+ fields = {}
+ for key in ("name", "description"):
+ matches = list(re.finditer(r"^" + key + r":[ \t]*(.*)$", front[1], re.M))
+ if len(matches) != 1:
+ raise ValueError(f"SKILL.md requires one single-line {key}")
+ value = matches[0][1].rstrip("\r").strip()
+ if value.startswith('"'):
+ value = json.loads(value)
+ elif value.startswith("'") and value.endswith("'"):
+ value = value[1:-1].replace("''", "'")
+ elif not value or value.startswith(("|", ">")):
+ raise ValueError(f"Unsupported {key} scalar; use a single-line value")
+ if not isinstance(value, str) or not value.strip():
+ raise ValueError(f"SKILL.md {key} must be nonempty text")
+ fields[key] = value
+ return fields
+
+
+def replace_description(data, description):
+ # Replace only the top-level metadata line; retain body and other bytes.
+ front_end = re.search(rb"\r?\n---(?:\r?\n|$)", data[3:])
+ if not front_end:
+ raise ValueError("SKILL.md is missing closing frontmatter")
+ boundary = front_end.end() + 3
+ replacement = ("description: " + json.dumps(description, ensure_ascii=False)).encode()
+ head, count = re.subn(rb"(?m)^description:[^\r\n]*", lambda _: replacement, data[:boundary])
+ if count != 1:
+ raise ValueError("SKILL.md requires one description")
+ return head + data[boundary:]
+
+
+def tree_files(repo, revision):
+ files = {}
+ for record in git(repo, "ls-tree", "-r", "-z", revision, "--", "skills", "LICENSE").split(b"\0"):
+ if not record:
+ continue
+ entry, raw_path = record.split(b"\t", 1)
+ mode, kind, object_id = entry.decode().split()
+ path = raw_path.decode("utf-8")
+ files[path] = (mode, kind, object_id)
+ return files
+
+
+def build(repo, output, target="source", skills=None, revision="HEAD", descriptions=None, max_bytes=30_000_000, mapped_only=False):
+ if max_bytes <= 0:
+ raise ValueError("The per-bundle size bound must be positive")
+ if mapped_only and target != "claude-web":
+ raise ValueError("Mapped-only selection is specific to the Claude web target")
+ commit = git(repo, "rev-parse", "--verify", "--end-of-options", revision + "^{commit}").decode().strip()
+ files = tree_files(repo, commit)
+ available = {p.split("/")[1] for p in files if p.count("/") == 2 and p.endswith("/SKILL.md")}
+ selected = sorted(set(skills) if skills else available)
+ if not selected:
+ raise ValueError("No skills selected")
+ for name in selected:
+ if not SKILL_NAME.fullmatch(name) or len(name) > 64 or name not in available:
+ raise ValueError(f"Unknown or invalid skill: {name}")
+ license_entry = files.get("LICENSE")
+ if not license_entry or license_entry[0] not in {"100644", "100755"}:
+ raise ValueError("A tracked regular LICENSE file is required")
+ license_data = git(repo, "cat-file", "blob", license_entry[2])
+
+ overrides = {}
+ map_hash = None
+ if target == "claude-web":
+ raw_map = Path(descriptions).read_bytes() if descriptions else git(repo, "show", f"{commit}:{DESCRIPTION_MAP}")
+ map_hash = sha256(raw_map)
+ overrides = json.loads(raw_map)
+ if not isinstance(overrides, dict):
+ raise ValueError("Web descriptions must be a skill-keyed object")
+ elif target != "source":
+ raise ValueError(f"Unknown target: {target}")
+
+ bundles = []
+ omitted = []
+ artifacts = {}
+ for name in selected:
+ prefix = f"skills/{name}/"
+ resources = {}
+ for path, (mode, kind, object_id) in files.items():
+ if not path.startswith(prefix):
+ continue
+ relative = path[len(prefix):]
+ parts = PurePosixPath(relative).parts
+ if any(part in EXCLUDED_PARTS for part in parts):
+ continue
+ if relative != "SKILL.md" and parts[0] not in {"references", "scripts", "assets"}:
+ continue
+ if "\\" in relative or ":" in relative or any(part in {".", ".."} for part in parts):
+ raise ValueError(f"Unsafe resource path: {path}")
+ if mode not in {"100644", "100755"} or kind != "blob":
+ raise ValueError(f"Resource must be a tracked regular file: {path}")
+ resources[relative] = (git(repo, "cat-file", "blob", object_id), mode, path)
+ original = resources["SKILL.md"][0]
+ fields = metadata(original)
+ if fields["name"] != name:
+ raise ValueError(f"Skill name does not match folder: {name}")
+ override = None
+ if target == "claude-web":
+ override = overrides.get(name)
+ if not isinstance(override, dict):
+ if mapped_only:
+ omitted.append({"skill": name, "reason": "Missing reviewed web description"})
+ continue
+ raise ValueError(f"Missing reviewed web description: {name}")
+ short = override.get("description")
+ if not isinstance(short, str) or not 1 <= len(short) <= 200 or not short.strip() or "\n" in short or "\r" in short:
+ raise ValueError(f"Web description must be 1–200 characters: {name}")
+ if override.get("source_description_sha256") != sha256(fields["description"].encode()):
+ if mapped_only:
+ omitted.append({"skill": name, "reason": "Source triggers changed; web description needs renewed review"})
+ continue
+ raise ValueError(f"Stale web description; review changed source triggers: {name}")
+ resources["SKILL.md"] = (replace_description(original, short), resources["SKILL.md"][1], prefix + "SKILL.md")
+ resources["LICENSE"] = (license_data, "100644", "LICENSE")
+ uncompressed_bytes = sum(len(item[0]) for item in resources.values())
+ if uncompressed_bytes > max_bytes:
+ raise ValueError(f"Bundle exceeds the configured uncompressed size bound: {name}")
+ stream = io.BytesIO()
+ inventory = []
+ with zipfile.ZipFile(stream, "w", compression=zipfile.ZIP_DEFLATED, compresslevel=9) as archive:
+ for relative, (data, mode, source_path) in sorted(resources.items()):
+ entry = zipfile.ZipInfo(f"{name}/{relative}", date_time=(1980, 1, 1, 0, 0, 0))
+ entry.create_system = 3
+ entry.external_attr = (0o100755 if mode == "100755" else 0o100644) << 16
+ entry.compress_type = zipfile.ZIP_DEFLATED
+ archive.writestr(entry, data, compresslevel=9)
+ source_data = original if relative == "SKILL.md" else data
+ inventory.append({"path": entry.filename, "source_path": source_path, "source_sha256": sha256(source_data), "packaged_sha256": sha256(data)})
+ filename = f"{name}-{target}.zip"
+ artifacts[filename] = stream.getvalue()
+ bundles.append({"skill": name, "archive": filename, "sha256": sha256(artifacts[filename]), "uncompressed_bytes": uncompressed_bytes, "description_override": {"original": fields["description"], "packaged": override["description"]} if override else None, "files": inventory})
+
+ manifest = {"format_version": 1, "source_commit": commit, "target": target, "web_description_map_sha256": map_hash, "mapped_only": mapped_only, "omitted": omitted, "bundles": bundles}
+ # Validate every selection before writing any artifact; incomplete web maps
+ # must not leave a plausible but partial release on disk.
+ output = Path(output)
+ output.mkdir(parents=True, exist_ok=True)
+ for filename, data in artifacts.items():
+ (output / filename).write_bytes(data)
+ (output / f"{target}-manifest.json").write_text(json.dumps(manifest, ensure_ascii=False, indent=2) + "\n", encoding="utf-8")
+ return manifest
+
+
+def main():
+ parser = argparse.ArgumentParser(description=__doc__)
+ parser.add_argument("--repo", type=Path, default=Path(__file__).resolve().parent.parent)
+ parser.add_argument("--output", type=Path, required=True)
+ parser.add_argument("--target", choices=("source", "claude-web"), default="source")
+ parser.add_argument("--skill", action="append", help="Select one skill; repeat for several. Default: all.")
+ parser.add_argument("--ref", default="HEAD", help="Frozen Git revision to package; default HEAD.")
+ parser.add_argument("--web-descriptions", type=Path, help="Explicit local override map instead of the selected revision's map.")
+ parser.add_argument("--mapped-only", action="store_true", help="Explicitly omit new/stale web mappings and list them in the manifest; source builds remain complete.")
+ parser.add_argument("--max-uncompressed-bytes", type=int, default=30_000_000, help="Local per-bundle size bound, including LICENSE; not a verified web upload limit.")
+ args = parser.parse_args()
+ try:
+ manifest = build(args.repo, args.output, args.target, args.skill, args.ref, args.web_descriptions, args.max_uncompressed_bytes, args.mapped_only)
+ except (ValueError, OSError, subprocess.CalledProcessError) as error:
+ parser.exit(1, f"Packaging failed: {error}\n")
+ print(f"Built {len(manifest['bundles'])} {args.target} ZIPs from {manifest['source_commit']}")
+ for item in manifest["omitted"]:
+ print(f"Omitted {item['skill']}: {item['reason']}")
+
+
+if __name__ == "__main__":
+ main()
diff --git a/tests/test_skill_packaging.py b/tests/test_skill_packaging.py
new file mode 100644
index 0000000..30a29b6
--- /dev/null
+++ b/tests/test_skill_packaging.py
@@ -0,0 +1,199 @@
+import hashlib
+import importlib.util
+import json
+import os
+import subprocess
+import tempfile
+import unittest
+import zipfile
+from pathlib import Path
+
+
+SPEC = importlib.util.spec_from_file_location("package_skills", Path(__file__).resolve().parents[1] / "scripts/package_skills.py")
+packager = importlib.util.module_from_spec(SPEC)
+SPEC.loader.exec_module(packager)
+
+
+class PackagingTests(unittest.TestCase):
+ def setUp(self):
+ self.temp = tempfile.TemporaryDirectory()
+ self.addCleanup(self.temp.cleanup)
+ self.repo = Path(self.temp.name) / "repo"
+ self.repo.mkdir()
+ self.output = Path(self.temp.name) / "output"
+ self.env = {**os.environ, "GIT_CONFIG_GLOBAL": os.devnull, "GIT_CONFIG_NOSYSTEM": "1"}
+ self.git("init", "-q")
+ self.git("config", "user.name", "Packaging fixture")
+ self.git("config", "user.email", "[email protected]")
+ self.description = "A source description with all original trigger words and quoted examples. " * 4
+ self.skill = ("---\nname: sample\ndescription: " + json.dumps(self.description) + "\nmetadata:\n version: 1.0.0\n---\n\n# Sample\n\nRead [guide](references/guide.md) and [template](assets/example.json).\n").encode()
+ self.write("skills/sample/SKILL.md", self.skill)
+ self.write("skills/sample/references/guide.md", b"# Guide\n\nOriginal quotes and evidence.\n")
+ self.write("skills/sample/assets/example.json", b'{"original": true}\n')
+ self.write("skills/sample/scripts/run.sh", b"#!/bin/sh\necho sample\n")
+ (self.repo / "skills/sample/scripts/run.sh").chmod(0o755)
+ self.git("add", ".")
+ self.git("update-index", "--chmod=+x", "skills/sample/scripts/run.sh")
+ self.write("skills/sample/evals/evals.json", b'{"not_for_install": true}\n')
+ self.write("skills/sample/references/__pycache__/fixture.pyc", b"generated")
+ self.write("LICENSE", b"MIT License\nCopyright fixture\n")
+ self.map = {"sample": {"source_description_sha256": self.hash(self.description.encode()), "description": "Use for the sample workflow and its original trigger examples."}}
+ self.write_map()
+ self.commit()
+
+ def git(self, *args):
+ return subprocess.check_output(["git", "-C", str(self.repo), *args], env=self.env, stderr=subprocess.PIPE)
+
+ def write(self, path, data):
+ target = self.repo / path
+ target.parent.mkdir(parents=True, exist_ok=True)
+ target.write_bytes(data)
+
+ def write_map(self):
+ self.write(packager.DESCRIPTION_MAP, json.dumps(self.map).encode())
+
+ def commit(self):
+ self.git("add", ".")
+ self.git("commit", "-qm", "fixture")
+
+ @staticmethod
+ def hash(data):
+ return hashlib.sha256(data).hexdigest()
+
+ def archive(self, target="source", **kwargs):
+ manifest = packager.build(self.repo, self.output, target=target, **kwargs)
+ bundle = manifest["bundles"][0]
+ return manifest, bundle, zipfile.ZipFile(self.output / bundle["archive"])
+
+ def test_source_archive_keeps_actual_routes_bytes_and_license(self):
+ manifest, bundle, archive = self.archive()
+ with archive:
+ self.assertEqual(archive.read("sample/SKILL.md"), self.skill)
+ for path in ("references/guide.md", "assets/example.json", "scripts/run.sh"):
+ self.assertEqual(archive.read("sample/" + path), (self.repo / "skills/sample" / path).read_bytes())
+ self.assertEqual(archive.read("sample/LICENSE"), (self.repo / "LICENSE").read_bytes())
+ self.assertEqual(archive.getinfo("sample/scripts/run.sh").external_attr >> 16, 0o100755)
+ self.assertTrue(all(path.startswith("sample/") for path in archive.namelist()))
+ self.assertFalse(any("evals/" in path or "__pycache__/" in path for path in archive.namelist()))
+ self.assertEqual(manifest["source_commit"], self.git("rev-parse", "HEAD").decode().strip())
+ self.assertIsNone(bundle["description_override"])
+ self.assertEqual(bundle["sha256"], self.hash((self.output / bundle["archive"]).read_bytes()))
+ self.assertTrue(all(item["source_sha256"] == item["packaged_sha256"] for item in bundle["files"]))
+
+ def test_web_archive_changes_only_description_and_records_exact_hashes(self):
+ _, bundle, archive = self.archive("claude-web")
+ with archive:
+ packaged = archive.read("sample/SKILL.md")
+ self.assertEqual(packager.metadata(packaged)["description"], self.map["sample"]["description"])
+ self.assertEqual(packaged.split(b"\n---\n", 1)[1], self.skill.split(b"\n---\n", 1)[1])
+ for item in bundle["files"]:
+ data = archive.read(item["path"])
+ self.assertEqual(item["packaged_sha256"], self.hash(data))
+ if not item["path"].endswith("/SKILL.md"):
+ self.assertEqual(item["source_sha256"], item["packaged_sha256"])
+ skill_item = next(item for item in bundle["files"] if item["path"].endswith("/SKILL.md"))
+ self.assertEqual(skill_item["source_sha256"], self.hash(self.skill))
+ self.assertEqual(bundle["description_override"], {"original": self.description, "packaged": self.map["sample"]["description"]})
+
+ def test_repeat_builds_are_byte_identical(self):
+ self.archive("claude-web")[2].close()
+ first = {path.name: path.read_bytes() for path in self.output.iterdir()}
+ packager.build(self.repo, self.output, target="claude-web")
+ self.assertEqual(first, {path.name: path.read_bytes() for path in self.output.iterdir()})
+
+ def test_frozen_revision_ignores_dirty_worktree_and_untracked_files(self):
+ self.write("skills/sample/SKILL.md", b"dirty body")
+ self.write("skills/sample/references/secret.md", b"untracked")
+ _, _, archive = self.archive()
+ with archive:
+ self.assertEqual(archive.read("sample/SKILL.md"), self.skill)
+ self.assertNotIn("sample/references/secret.md", archive.namelist())
+
+ def test_explicit_old_revision_uses_its_own_descriptions(self):
+ old = self.git("rev-parse", "HEAD").decode().strip()
+ self.map["sample"]["description"] = "Changed reviewed description."
+ self.write_map()
+ self.commit()
+ _, _, archive = self.archive("claude-web", revision=old)
+ with archive:
+ self.assertIn(b"original trigger examples", archive.read("sample/SKILL.md"))
+
+ def test_missing_override_fails_before_writing_any_selection(self):
+ self.write("skills/other/SKILL.md", b"---\nname: other\ndescription: Other workflow.\n---\n# Other\n")
+ self.commit()
+ with self.assertRaisesRegex(ValueError, "Missing reviewed"):
+ packager.build(self.repo, self.output, target="claude-web")
+ self.assertFalse(self.output.exists())
+
+ def test_invalid_overrides_are_rejected(self):
+ for description in ("", " ", "x" * 201, "first\nsecond", 42):
+ with self.subTest(description=description):
+ self.map["sample"]["description"] = description
+ self.write_map()
+ self.commit()
+ with self.assertRaisesRegex(ValueError, "1–200"):
+ packager.build(self.repo, self.output, target="claude-web")
+
+ def test_release_subset_lists_new_and_stale_skills_but_source_is_complete(self):
+ self.write("skills/other/SKILL.md", b"---\nname: other\ndescription: Other workflow.\n---\n# Other\n")
+ self.write("skills/sample/SKILL.md", self.skill.replace(b"trigger words", b"different triggers"))
+ self.commit()
+ source = packager.build(self.repo, self.output)
+ self.assertEqual([item["skill"] for item in source["bundles"]], ["other", "sample"])
+ self.assertEqual(source["omitted"], [])
+ web = packager.build(self.repo, self.output, target="claude-web", mapped_only=True)
+ self.assertEqual(web["bundles"], [])
+ self.assertEqual(web["omitted"], [
+ {"skill": "other", "reason": "Missing reviewed web description"},
+ {"skill": "sample", "reason": "Source triggers changed; web description needs renewed review"},
+ ])
+ self.assertTrue((self.output / "other-source.zip").is_file())
+ self.assertTrue((self.output / "sample-source.zip").is_file())
+ persisted = json.loads((self.output / "claude-web-manifest.json").read_text())
+ self.assertEqual(persisted["omitted"], web["omitted"])
+
+ def test_release_subset_keeps_current_reviewed_mappings(self):
+ self.write("skills/other/SKILL.md", b"---\nname: other\ndescription: Other workflow.\n---\n# Other\n")
+ self.commit()
+ web = packager.build(self.repo, self.output, target="claude-web", mapped_only=True)
+ self.assertEqual([item["skill"] for item in web["bundles"]], ["sample"])
+ self.assertEqual([item["skill"] for item in web["omitted"]], ["other"])
+
+ def test_changed_source_triggers_require_new_review(self):
+ self.write("skills/sample/SKILL.md", self.skill.replace(b"trigger words", b"different triggers"))
+ self.commit()
+ with self.assertRaisesRegex(ValueError, "Stale web description"):
+ packager.build(self.repo, self.output, target="claude-web")
+
+ def test_unknown_or_traversal_selection_is_rejected(self):
+ for name in ("missing", "../sample", "/sample"):
+ with self.subTest(name=name), self.assertRaisesRegex(ValueError, "Unknown or invalid"):
+ packager.build(self.repo, self.output, skills=[name])
+
+ def test_selected_subset_does_not_package_other_skill(self):
+ self.write("skills/other/SKILL.md", b"---\nname: other\ndescription: Other workflow.\n---\n# Other\n")
+ self.commit()
+ manifest = packager.build(self.repo, self.output, skills=["sample"])
+ self.assertEqual([bundle["skill"] for bundle in manifest["bundles"]], ["sample"])
+
+ def test_tracked_symlink_is_not_followed(self):
+ blob = subprocess.check_output(["git", "-C", str(self.repo), "hash-object", "-w", "--stdin"], input=b"../../../../outside", env=self.env).decode().strip()
+ self.git("update-index", "--add", "--cacheinfo", "120000," + blob + ",skills/sample/assets/link")
+ self.git("commit", "-qm", "symlink fixture")
+ with self.assertRaisesRegex(ValueError, "tracked regular file"):
+ packager.build(self.repo, self.output)
+
+ def test_configured_size_bound_fails_without_partial_outputs(self):
+ with self.assertRaisesRegex(ValueError, "size bound"):
+ packager.build(self.repo, self.output, max_bytes=10)
+ self.assertFalse(self.output.exists())
+
+ def test_crlf_body_and_quoted_description_are_preserved(self):
+ original = self.skill.replace(b"\n", b"\r\n")
+ updated = packager.replace_description(original, "Quote: \"hello\" and café.")
+ self.assertEqual(packager.metadata(updated)["description"], 'Quote: "hello" and café.')
+ self.assertEqual(updated.split(b"\r\n---\r\n", 1)[1], original.split(b"\r\n---\r\n", 1)[1])
+
+
+if __name__ == "__main__":
+ unittest.main()