Skip to content

feat(install): support HTTPS ZIP skill sources - #885

Open
salmonumbrella wants to merge 11 commits into
runkids:mainfrom
salmonumbrella:feat/https-zip-sources
Open

salmonumbrella wants to merge 11 commits into
runkids:mainfrom
salmonumbrella:feat/https-zip-sources

Conversation

@salmonumbrella

@salmonumbrella salmonumbrella commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Type

  • Bug fix
  • Small improvement (docs, typo, minor refactor)
  • Feature proposal (proposals/ only — see CONTRIBUTING.md)
  • Approved feature or large change (the linked issue has the approved label)

This is a feature implementation. Issue #883 has no approved label; maintainer approval is still required under CONTRIBUTING.md.

Linked Issue

#883 — install: support skills published as zip archives over HTTPS

Checklist

  • I've read CONTRIBUTING.md, including its AI-assisted contributions section
  • I've reviewed every line of the diff and can explain it
  • Tests included and passing (make check) — for code changes
  • No unrelated changes in the diff
  • Scope is focused — one concern per PR

The two author attestations above await human author confirmation.

What changed

Skills published only as HTTPS ZIPs can now be installed directly and kept current with check and update, without a separate download script.

  • Reuses skill discovery, selection (-s), naming (--name), groups (--into) and audit in global and project mode, including dashboard installs. Supports root, wrapped and multi-skill archives. Default names are normalized for configuration reinstalls without changing member paths; ambiguities caused by normalization require an explicit member selector.
  • Records the original URL, query parameters, selected member (#skill=<escaped-relative-path>) and archive SHA256. Each selected skill retains its own source so configuration-based reinstalls and updates preserve its name, group and member.
  • check downloads each shared URL once and compares bytes. Unchanged updates preserve files, metadata and timestamps. Changed archives use audited staging; download, extraction, missing-member and audit failures preserve the installed copy. Local edits stay protected unless explicitly forced; update --force can restore even an unchanged archive.
  • Requires HTTPS through redirects, caps downloads at 100 MiB and extraction at 250 MiB / 10,000 entries, and rejects traversal, absolute paths, backslashes, symlinks, special files and case-insensitive .git entries at any depth, including trailing-dot/space aliases. Ordinary .gitignore files remain supported. Updates the schema, built-in reference and English/localized command docs.

Usage

skillshare install 'https://host/pack.zip?download=1' -s brief --into legal -g
skillshare check -g
skillshare update legal/brief -g

Checks

Verification for final HEAD f12c481ee9c5065f363d8414308e03c618082c26; earlier checks are identified below:

  • Final-head GitHub CI: 7 successful checks and 2 conditional skips, with no pending or failed checks, including macOS, Ubuntu and Windows jobs. Windows CI passed ZIP unit tests TestArchiveInstallUpdate and TestArchiveRejectsUnsafeZIP, including trailing-dot/space alias guards; its integration job selected TestProject_NativeLinksSmoke, not the full ZIP CLI lifecycle test TestArchiveCLIEndToEnd.
  • Focused repair tests with -race passed in the isolated devcontainer, covering normalized names/collisions, unsafe Git-admin entries and trailing-dot/space aliases, and the real CLI lifecycle in global and project mode with all six generated-configuration reinstalls. The full ZIP CLI lifecycle test was not run on native Windows.
  • Last full local make check: passed at 1f454d93, exit 0, including 138/138 Herdr tests; not rerun at the repair head.
  • Earlier affected Go packages, migration checks and source-write ratchet: passed at 00529ca.
  • ZIP mdproof runbook: passed at 1f454d93 (1/1, global and project assertions matched); not rerun at the repair head. The real CLI test builds current source with temporary fixture-only trust roots, retains ordinary TLS and hostname verification, and verifies wrong-host rejection. No production TLS setting was added. The full ZIP CLI lifecycle test was not run on native Windows; Windows CI selected the native-links smoke test for integration.
  • Targeted UI tests (InstallDialog, i18n and keys): 29/29 passed; UI build passed at 00529ca, with UI sources unchanged at final HEAD. The full UI test suite was not run.
  • Five-locale website build passed at final HEAD f12c481 (npm ci && npm run build, Node 22 Docker, exit 0).
  • Browser verification at 00529ca confirmed the local-change list and the HTTP 400 refusal of a ZIP-to-local source edit, with the editor draft retained; the relevant view sources are unchanged at final HEAD.
  • GitHub Codex review completed at 1f454d93; its two P2 findings are fixed. The repaired-head request at 79732642 failed on quota at 23:23 UTC. No completed final-head Codex review is available. The scheduled 00:53 UTC retry time has passed, with no evidence of a completed retry.

Limits

HTTPS .zip skills only: no tar archives, agent installs, Git tracking/refs, archive lock pins or discovery of newer versioned filenames. A new filename requires installing its new URL. Local-change inspection lists modified, added and deleted files; historical ZIP content diffs are unavailable. Original query parameters remain in configuration and metadata, so private URLs require private configuration.

Closes #883

feat-install-support-HTTPS-ZIP-skill-sources.mp4

Dashboard capture

Actual dark-mode dashboard at f12c481, using a synthetic HTTPS ZIP: install, check unchanged bytes, detect changed bytes at the same URL, and update to fixture version 2.

feat-install-support-HTTPS-ZIP-skill-sources-actual-dashboard.mp4
Before (4596c1e4) After (f12c481)
HTTPS ZIP install · dark · 1280×720 at 2× ZIP URL treated as a Git repository and refused Skill installed from the HTTPS ZIP

HTTPS ZIP URLs currently reach Git cloning and cannot be installed. Download
and safely extract bounded archives through existing discovery, selection and
audit, retaining the original URL and SHA256 for portable reinstalls.

Compare bytes for check/update, preserve unchanged state and staged failures,
and report no-op results through CLI and dashboard. Cover unsafe archives,
metadata round trips and both CLI modes with local HTTPS fixtures.

Refs runkids#883
Record archive roots explicitly so config restore and changed-byte updates
keep the selected member. Apply local-edit protection to bulk ZIP updates
and expose recorded-hash file changes without historical archive fetches.

Bound conventional and ZIP64 central-directory counts before the standard
reader allocates entries, including dishonest wrapped count metadata.
Reset incompatible remote provenance when the dashboard changes a ZIP
source while preserving installed file hashes and time. Recognize ZIPs
without a digest so checks, edit guards and file inspection still work.
Refuse ZIP sources for agents and Git checkouts before changing state.

Validate literal ZIP names before normalizing safe dot components, keeping
traversal and collision refusals. Retain bounded directory preflight and
remove its redundant post-reader count check.
Changing ZIP provenance to a local path disables the existing remote edit
guard before a replacement is installed. Refuse this PATCH transition
before mutation, for clean and edited copies, with save-and-reinstall
guidance so ordinary updates retain the installed edit baseline.
Advise copying the skill and edits to a folder separate from the installed
destination before reinstalling. Remove same-name/group and force advice
that could lead users to pass the installed directory as the local source.
Exclude skipped archive results from installed summaries across discovery,
batch selection and installed-name routes, reusing shared result rendering.

Remove unused digest propagation, consolidate audited test fixtures and
repair their ineffective assertions. Shorten source-editor recovery and
source URL guidance while preserving the existing refusal contract.
@salmonumbrella

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

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-13T23:23:07.925763Z
We couldn’t complete this review. Comment @codex review to try again.
7973264 Manual request
ℹ️ 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.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@salmonumbrella

Copy link
Copy Markdown
Contributor Author

@codex review

@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.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

macOS Go uses its platform trust store and ignores SSL_CERT_FILE, so the
local HTTPS fixture fails before ZIP installation can be exercised.

Build the existing real CLI test with a temporary fixture-only trust
overlay. Keep ordinary certificate and hostname verification, prove a
wrong hostname is rejected, and clarify the runbook's source build.
Merge upstream main into the ZIP source branch while retaining explicit
JSON overwrite consent, preview and lock behavior, and agent summaries.
Report unchanged ZIP installs in the shared skipped-name summary without
counting them as installed, and verify consent and no-op JSON translation.
Name the temporary CLI skillshare.exe so Windows os/exec resolves the
exact build output through its executable-extension lookup. Keep the
same fixture and certificate/hostname verification on every platform.
@salmonumbrella
salmonumbrella marked this pull request as ready for review November 13, 2026 14:22

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1f454d9306

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/install/archive.go Resolved
Comment thread internal/install/archive.go Resolved
Normalize archive-derived default names for generated config reinstalls
without changing member identity or generic Git/local naming. Refuse names
made ambiguous by normalization so callers can select the intended member.

Reject Git administrative entries during extraction before installed state
can change, preventing ZIP skills from becoming tracked checkouts. Preserve
ordinary .gitignore content and verify both global/project declaration restores.
@salmonumbrella

Copy link
Copy Markdown
Contributor Author

@codex review

@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.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

Compare archive path components without trailing ASCII dots or spaces so
Win32 aliases cannot bypass the Git administrative-entry guard. Keep the
original member paths and ordinary archive content unchanged.
@runkids runkids added feature New feature or request pending install Install and update flows labels Nov 15, 2026
@runkids

runkids commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

Thanks for all the work you've put into these. A lot of large PRs have arrived at once, more than I can take in right now, so I need to go through them slowly. I can't promise a date, but I'll get to them.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request install Install and update flows pending

Projects

None yet

Development

Successfully merging this pull request may close these issues.

install: support skills published as zip archives over HTTPS

2 participants