[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M780CFYXG7Y2ZHQ5EKJMQ83W":3,"skill-same:01M780CFYXG7Y2ZHQ5EKJMQ83W":60},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M780CFYXG7Y2ZHQ5EKJMQ83W","actions-cache-and-artifacts",null,"Use when caching a dependency directory in a GitHub Action, uploading or downloading a workflow artifact, installing a toolchain or an exact package-manager version into the runner's tool cache, or storing a keyed blob against the Actions cache or an S3-compatible bucket.","spencerbeggs\u002Feffected","spencerbeggs","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F109114?v=4","01M77ZTHB70K5Y2VVTRCFY50A5","C. Spencer Beggs","01M77ZTHCC41NXBT3X906K6QM1",8,"MIT","https:\u002F\u002Fgithub.com\u002Fspencerbeggs\u002Feffected\u002Fblob\u002Fmain\u002Fplugin\u002Fskills\u002Factions-cache-and-artifacts\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: actions-cache-and-artifacts\ndescription: Use when caching a dependency directory in a GitHub Action, uploading or downloading a workflow artifact, installing a toolchain or an exact package-manager version into the runner's tool cache, or storing a keyed blob against the Actions cache or an S3-compatible bucket.\nwhen_to_use: ACTIONS_RESULTS_URL, ACTIONS_RUNTIME_TOKEN, tool cache, blob store, ActionCache, Artifact, GitHubCacheBlobStore, BlobStore, S3Config, ToolInstaller, PackageManagerInstaller, CacheKey, hashFiles, restore keys, withNamespace, cache bust, stage-then-swap, Twirp retry, @azure\u002Fstorage-blob confinement\n---\n\n# Actions cache and artifacts\n\nThe storage tier of `@effected\u002Fgithub-actions`: caches, artifacts, blobs, and installed tools. `@actions\u002Fcache` and `@actions\u002Fartifact` are both re-implemented directly against their own HTTP protocols rather than taken as dependencies — either one alone drags a tree larger than this whole package.\n\nFor the general Effect v4 service\u002Flayer rules this package follows — `Context.Service`, `provideMerge` vs `mergeAll`, memoization by reference — see `effect-v4-services-layers`; this skill carries only the storage-specific instance of each.\n\n## What you have\n\n| Need | Service | Layer | `R` (besides itself) | Error |\n| --- | --- | --- | --- | --- |\n| Archive and restore a dependency directory across jobs | `ActionCache` | `ActionCache.layer` | `ActionEnvironment \\| HttpClient \\| FileSystem \\| Path \\| ChildProcessSpawner` | `ActionCacheError` |\n| Upload, list, get, download or delete a workflow artifact | `Artifact` | `Artifact.layer` | same five | `ArtifactError` |\n| A keyed blob with caller-owned metadata, in the Actions cache | `BlobStore` over `GitHubCacheBlobStore.layer` | `GitHubCacheBlobStore.layer` | `HttpClient \\| ActionEnvironment` | `BlobStoreError \\| BlobEnvelopeError` |\n| Same, in S3 \u002F R2 \u002F MinIO \u002F Spaces | `BlobStore` over `BlobStore.layerS3(config)` | `BlobStore.layerS3(config)` | `HttpClient \\| ActionOutputs \\| Digest.Digest \\| Mac.Mac` | same |\n| A cache key, its restore-key ladder, and `hashFiles` | `CacheKey` | none — a pure `Schema.Class` with `Effect.fn` statics | `FileSystem` (`hashFiles`), `+ Path` (`matchingFiles`) | `CacheKeyError` |\n| Download, extract and cache a toolchain | `ToolInstaller` | `ToolInstaller.layer` | `ActionEnvironment \\| FileSystem \\| Path \\| HttpClient \\| ChildProcessSpawner` | `ToolInstallerError` |\n| Pin and install an exact npm\u002Fpnpm\u002Fbun on the runner | `PackageManagerInstaller` | `PackageManagerInstaller.layer` | `ActionEnvironment \\| FileSystem \\| Path \\| ChildProcessSpawner \\| ToolInstaller` | `PackageManagerInstallerError` |\n\n`ActionRuntime.layer` provides none of the six services above by default — see `actions-runtime` for why, and for the one-line cost of taking one (`Action.run(program, { layer: ActionCache.layer })`).\n\n## Standards\n\n- **Take a storage service as an explicit one-line extra layer — never expect one from `ActionRuntime.layer`.** Their requirements are already satisfied by the runtime's own services; the runtime simply doesn't provide them by default.\n- **Only reach the Actions results backend from a `uses:` step.** `ActionCache`, `Artifact` and `GitHubCacheBlobStore` all need `ACTIONS_RESULTS_URL`\u002F`ACTIONS_RUNTIME_TOKEN`, which the runner injects only into action execution contexts, not `run:` shell steps. `BlobStore.layerS3` and `ToolInstaller` need neither and work identically from either.\n- **Pass `ActionCache`'s literal glob pattern list to both `save` and `restore`.** `save` resolves patterns before archiving, but the cache *version* on both sides hashes the literal pattern list, not the resolved paths — a mismatched literal list makes a saved entry invisible on restore.\n- **Never share a heavy-dependency adapter through an internal helper.** Each Azure-touching module carries its own small adapter rather than importing one from a shared module — a consumer that imports only a light service must be structurally unable to link the heavy dependency into its bundle.\n- **Stage into a temp directory under the cache root, then rename into place — never copy straight to a tool's final destination.** A copy left partial by a failure looks like a completed install to a directory-presence check, and every later run then uses a broken toolchain silently.\n- **Read both the camelCase and snake_case spelling of a field from an internal, reverse-engineered wire response**, and key retry on a structural `kind`, never a formatted message substring — a reworded error string must never become a silent policy change in what gets retried.\n- **Let everything that can go through a core contract do so.** `HttpClient` for downloads, `ChildProcessSpawner` for archive extraction, `FileSystem` for reading file contents — `node:` imports in this tier are licensed only for what core genuinely cannot do yet (HMAC, gzip framing), never as a blanket substitute.\n\n## Footguns\n\n- `PackageManagerInstaller.install` can answer an ambient package manager with **no `binDir`** — a consumer that always reads `binDir` breaks on that branch. See `references\u002Finstallers.md`.\n- A hex-fed hash accumulator in `CacheKey.hashFiles` produces a plausible-looking digest that never matches any cache entry written by `@actions\u002Fglob`'s `hashFiles` — the per-file digest must feed the accumulator as binary. See `references\u002Fcache-and-keys.md`.\n- Resolved cache paths reaching `tar` via argv instead of a manifest file blow past the OS argv limit on a large glob resolution. See `references\u002Fcache-and-keys.md`.\n- A legacy, unframed blob decodes as a typed clean miss against `BlobEnvelope`, on purpose — treat it as \"not cached yet,\" never as a corrupt read. See `references\u002Fblob-stores.md`.\n- The Actions-cache Twirp protocol hands back an Azure blob URL for the payload, so the Azure-touching module count is three, not the two a casual read of the cache\u002Fartifact split suggests. See `references\u002Fblob-stores.md`.\n\n## Additional resources\n\n- [references\u002Fcache-and-keys.md](references\u002Fcache-and-keys.md) — `ActionCache`'s glob-vs-literal path handling in full, the manifest-file tar invocation, and `CacheKey`'s restore-key ladder, `hashFiles` byte-compatibility and `matchingFiles` discovery. Load when: designing a cache step, a restore-key fallback policy, or a file-hash-derived key.\n- [references\u002Fblob-stores.md](references\u002Fblob-stores.md) — the results-backend confinement rule, `BlobEnvelope`'s wire format and error union in full, the Azure three-module confinement with its reachability test, the transport seam (`FileBlobTransfer`\u002F`DataBlobTransfer`), and the Twirp field-spelling and retry discipline. Load when: storing a keyed blob, reviewing why a cache\u002Fartifact call reports `misconfigured`, or auditing the Azure import boundary.\n- [references\u002Finstallers.md](references\u002Finstallers.md) — `ToolInstaller`'s stage-then-swap cache write, its layout contract with the runner, `PackageManagerInstaller`'s ambient-vs-cached branch, and the `node:`-import accounting for this tier. Load when: installing a toolchain or an exact package-manager version, or reviewing a `node:` import in this package.\n","# Actions cache and artifacts\n\nThe storage tier of `@effected\u002Fgithub-actions`: caches, artifacts, blobs, and installed tools. `@actions\u002Fcache` and `@actions\u002Fartifact` are both re-implemented directly against their own HTTP protocols rather than taken as dependencies — either one alone drags a tree larger than this whole package.\n\nFor the general Effect v4 service\u002Flayer rules this package follows — `Context.Service`, `provideMerge` vs `mergeAll`, memoization by reference — see `effect-v4-services-layers`; this skill carries only the storage-specific instance of each.\n\n## What you have\n\n| Need | Service | Layer | `R` (besides itself) | Error |\n| --- | --- | --- | --- | --- |\n| Archive and restore a dependency directory across jobs | `ActionCache` | `ActionCache.layer` | `ActionEnvironment \\| HttpClient \\| FileSystem \\| Path \\| ChildProcessSpawner` | `ActionCacheError` |\n| Upload, list, get, download or delete a workflow artifact | `Artifact` | `Artifact.layer` | same five | `ArtifactError` |\n| A keyed blob with caller-owned metadata, in the Actions cache | `BlobStore` over `GitHubCacheBlobStore.layer` | `GitHubCacheBlobStore.layer` | `HttpClient \\| ActionEnvironment` | `BlobStoreError \\| BlobEnvelopeError` |\n| Same, in S3 \u002F R2 \u002F MinIO \u002F Spaces | `BlobStore` over `BlobStore.layerS3(config)` | `BlobStore.layerS3(config)` | `HttpClient \\| ActionOutputs \\| Digest.Digest \\| Mac.Mac` | same |\n| A cache key, its restore-key ladder, and `hashFiles` | `CacheKey` | none — a pure `Schema.Class` with `Effect.fn` statics | `FileSystem` (`hashFiles`), `+ Path` (`matchingFiles`) | `CacheKeyError` |\n| Download, extract and cache a toolchain | `ToolInstaller` | `ToolInstaller.layer` | `ActionEnvironment \\| FileSystem \\| Path \\| HttpClient \\| ChildProcessSpawner` | `ToolInstallerError` |\n| Pin and install an exact npm\u002Fpnpm\u002Fbun on the runner | `PackageManagerInstaller` | `PackageManagerInstaller.layer` | `ActionEnvironment \\| FileSystem \\| Path \\| ChildProcessSpawner \\| ToolInstaller` | `PackageManagerInstallerError` |\n\n`ActionRuntime.layer` provides none of the six services above by default — see `actions-runtime` for why, and for the one-line cost of taking one (`Action.run(program, { layer: ActionCache.layer })`).\n\n## Standards\n\n- **Take a storage service as an explicit one-line extra layer — never expect one from `ActionRuntime.layer`.** Their requirements are already satisfied by the runtime's own services; the runtime simply doesn't provide them by default.\n- **Only reach the Actions results backend from a `uses:` step.** `ActionCache`, `Artifact` and `GitHubCacheBlobStore` all need `ACTIONS_RESULTS_URL`\u002F`ACTIONS_RUNTIME_TOKEN`, which the runner injects only into action execution contexts, not `run:` shell steps. `BlobStore.layerS3` and `ToolInstaller` need neither and work identically from either.\n- **Pass `ActionCache`'s literal glob pattern list to both `save` and `restore`.** `save` resolves patterns before archiving, but the cache *version* on both sides hashes the literal pattern list, not the resolved paths — a mismatched literal list makes a saved entry invisible on restore.\n- **Never share a heavy-dependency adapter through an internal helper.** Each Azure-touching module carries its own small adapter rather than importing one from a shared module — a consumer that imports only a light service must be structurally unable to link the heavy dependency into its bundle.\n- **Stage into a temp directory under the cache root, then rename into place — never copy straight to a tool's final destination.** A copy left partial by a failure looks like a completed install to a directory-presence check, and every later run then uses a broken toolchain silently.\n- **Read both the camelCase and snake_case spelling of a field from an internal, reverse-engineered wire response**, and key retry on a structural `kind`, never a formatted message substring — a reworded error string must never become a silent policy change in what gets retried.\n- **Let everything that can go through a core contract do so.** `HttpClient` for downloads, `ChildProcessSpawner` for archive extraction, `FileSystem` for reading file contents — `node:` imports in this tier are licensed only for what core genuinely cannot do yet (HMAC, gzip framing), never as a blanket substitute.\n\n## Footguns\n\n- `PackageManagerInstaller.install` can answer an ambient package manager with **no `binDir`** — a consumer that always reads `binDir` breaks on that branch. See `references\u002Finstallers.md`.\n- A hex-fed hash accumulator in `CacheKey.hashFiles` produces a plausible-looking digest that never matches any cache entry written by `@actions\u002Fglob`'s `hashFiles` — the per-file digest must feed the accumulator as binary. See `references\u002Fcache-and-keys.md`.\n- Resolved cache paths reaching `tar` via argv instead of a manifest file blow past the OS argv limit on a large glob resolution. See `references\u002Fcache-and-keys.md`.\n- A legacy, unframed blob decodes as a typed clean miss against `BlobEnvelope`, on purpose — treat it as \"not cached yet,\" never as a corrupt read. See `references\u002Fblob-stores.md`.\n- The Actions-cache Twirp protocol hands back an Azure blob URL for the payload, so the Azure-touching module count is three, not the two a casual read of the cache\u002Fartifact split suggests. See `references\u002Fblob-stores.md`.\n\n## Additional resources\n\n- [references\u002Fcache-and-keys.md](references\u002Fcache-and-keys.md) — `ActionCache`'s glob-vs-literal path handling in full, the manifest-file tar invocation, and `CacheKey`'s restore-key ladder, `hashFiles` byte-compatibility and `matchingFiles` discovery. Load when: designing a cache step, a restore-key fallback policy, or a file-hash-derived key.\n- [references\u002Fblob-stores.md](references\u002Fblob-stores.md) — the results-backend confinement rule, `BlobEnvelope`'s wire format and error union in full, the Azure three-module confinement with its reachability test, the transport seam (`FileBlobTransfer`\u002F`DataBlobTransfer`), and the Twirp field-spelling and retry discipline. Load when: storing a keyed blob, reviewing why a cache\u002Fartifact call reports `misconfigured`, or auditing the Azure import boundary.\n- [references\u002Finstallers.md](references\u002Finstallers.md) — `ToolInstaller`'s stage-then-swap cache write, its layout contract with the runner, `PackageManagerInstaller`'s ambient-vs-cached branch, and the `node:`-import accounting for this tier. Load when: installing a toolchain or an exact package-manager version, or reviewing a `node:` import in this package.\n",{"name":5,"description":7,"when_to_use":24},"ACTIONS_RESULTS_URL, ACTIONS_RUNTIME_TOKEN, tool cache, blob store, ActionCache, Artifact, GitHubCacheBlobStore, BlobStore, S3Config, ToolInstaller, PackageManagerInstaller, CacheKey, hashFiles, restore keys, withNamespace, cache bust, stage-then-swap, Twirp retry, @azure\u002Fstorage-blob confinement","main","0b59ef50d270bac16abbb7729cf4326d16de63f9","plugin\u002Fskills\u002Factions-cache-and-artifacts",2,"https:\u002F\u002Fgithub.com\u002Fspencerbeggs\u002Feffected","https:\u002F\u002Fgithub.com\u002Fspencerbeggs","2026-11-14 07:03:25",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add spencerbeggs\u002Feffected --skill actions-cache-and-artifacts",{"tool":38,"command":39},"bunx","bunx skills add spencerbeggs\u002Feffected --skill actions-cache-and-artifacts",{"tool":41,"command":42},"pnpm","pnpm dlx skills add spencerbeggs\u002Feffected --skill actions-cache-and-artifacts","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fspencerbeggs\u002Feffected\u002Fblob\u002Fmain\u002Fplugin\u002Fskills\u002Factions-cache-and-artifacts\u002FSKILL.md",true,[46,52,56],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"references\u002Fblob-stores.md","REFERENCE","参考文档",12430,"https:\u002F\u002Fgithub.com\u002Fspencerbeggs\u002Feffected\u002Fblob\u002Fmain\u002Fplugin\u002Fskills\u002Factions-cache-and-artifacts\u002Freferences\u002Fblob-stores.md",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"references\u002Fcache-and-keys.md",5750,"https:\u002F\u002Fgithub.com\u002Fspencerbeggs\u002Feffected\u002Fblob\u002Fmain\u002Fplugin\u002Fskills\u002Factions-cache-and-artifacts\u002Freferences\u002Fcache-and-keys.md",{"path":57,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":58,"sourceHtmlUrl":59},"references\u002Finstallers.md",7891,"https:\u002F\u002Fgithub.com\u002Fspencerbeggs\u002Feffected\u002Fblob\u002Fmain\u002Fplugin\u002Fskills\u002Factions-cache-and-artifacts\u002Freferences\u002Finstallers.md",[61,68,75,82,89,96],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M780NVTD800KMFV869YNZED6","testing-actions","Use when writing or reviewing tests for @effected\u002Fgithub-actions, @effected\u002Fgithub, @effected\u002Fsbom or @effected\u002Fcommands — stubbing the GitHub API, writing a service's layerTest or makeTest double, testing the pre\u002Fmain\u002Fpost lifecycle through Action.run, or debugging why a test hits the real network or hangs.","https:\u002F\u002Fgithub.com\u002Fspencerbeggs\u002Feffected\u002Fblob\u002Fmain\u002Fplugin\u002Fskills\u002Ftesting-actions\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M780NPDSGFC0FCP7696NW11J","supply-chain-attestation","Use when generating a CycloneDX SBOM, checking NTIA minimum elements, building an in-toto statement or a SLSA provenance predicate, signing into a Sigstore DSSE bundle, or uploading an attestation to GitHub.","https:\u002F\u002Fgithub.com\u002Fspencerbeggs\u002Feffected\u002Fblob\u002Fmain\u002Fplugin\u002Fskills\u002Fsupply-chain-attestation\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M780NGP4QNZDH8T8Q8WZ18SA","structuring-an-action","Use when laying out a new GitHub Action repository on the @effected suite, deciding where a piece of code belongs (an entry point, a step, a shared service, a shim), or reviewing an existing action's file structure against the canonical shape.","https:\u002F\u002Fgithub.com\u002Fspencerbeggs\u002Feffected\u002Fblob\u002Fmain\u002Fplugin\u002Fskills\u002Fstructuring-an-action\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M780NCD52H1Y03FS83WJ8BT5","running-commands-and-tools","Use when running a subprocess in Effect v4, spawning a command, capturing stdout\u002Fstderr\u002Fexit code, checking whether a CLI tool is installed or which copy to run, running a package-manager script through the project's launcher, detaching a background process, or redacting a secret from argv or captured output.","https:\u002F\u002Fgithub.com\u002Fspencerbeggs\u002Feffected\u002Fblob\u002Fmain\u002Fplugin\u002Fskills\u002Frunning-commands-and-tools\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M780N823DWNRMSY5X2NT5MSR","release-and-publish","Use when publishing a package to npm, reading the npm registry from Effect v4, checking whether a version is already published, cutting a release tag or GitHub release from an action, applying a release-age gate, or deriving tracking tags for GitHub Actions distribution.","https:\u002F\u002Fgithub.com\u002Fspencerbeggs\u002Feffected\u002Fblob\u002Fmain\u002Fplugin\u002Fskills\u002Frelease-and-publish\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":19},"01M780MXRF6H20KCESTSSFB3HQ","hardening-a-parser-port","Use when porting or writing a recursive-descent parser, lexer, or tree-walker over untrusted text in the @effected monorepo — the class of hardening the cloud reviewer scans for on every migration. Covers stack-overflow depth guards (on EVERY recursion surface, which a facade has N of — not two), numeric bound guards that must reject NaN and non-integers, code-point range checks scoped to formats with wide escapes, prototype-pollution, control-character rejection, and the invariant that malformed input must fail through the typed error channel, never as an unhandled defect.","https:\u002F\u002Fgithub.com\u002Fspencerbeggs\u002Feffected\u002Fblob\u002Fmain\u002Fplugin\u002Fskills\u002Fhardening-a-parser-port\u002FSKILL.md",[],[]]