[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M780E68MJPJMHB61T6Y07JEV":3,"skill-same:01M780E68MJPJMHB61T6Y07JEV":46},{"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},"01M780E68MJPJMHB61T6Y07JEV","building-a-github-action",null,"Use FIRST when building, extending or reviewing a GitHub Action, a release\u002Fpublish pipeline, or any Effect v4 program that talks to the GitHub API, to decide which @effected package owns a capability and which skill teaches it. Answers which service handles a capability, whether the kit already ships it, and what the modern @effected equivalent of a legacy Actions toolkit call is.","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\u002Fbuilding-a-github-action\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: building-a-github-action\ndescription: Use FIRST when building, extending or reviewing a GitHub Action, a release\u002Fpublish pipeline, or any Effect v4 program that talks to the GitHub API, to decide which @effected package owns a capability and which skill teaches it. Answers which service handles a capability, whether the kit already ships it, and what the modern @effected equivalent of a legacy Actions toolkit call is.\nwhen_to_use: build a GitHub Action, new action, action.yml, GITHUB_TOKEN, GitHub App token, workflow command, job summary, check run, cache in an action, upload an artifact, publish to npm from CI, SBOM, attestation\n---\n\n# Building a GitHub Action\n\nThe routing map for the five `@effected` packages an action-shaped program uses: `@effected\u002Fgithub-actions` (the runner), `@effected\u002Fgithub` (the GitHub API), `@effected\u002Fcommands` (subprocesses and tool discovery), `@effected\u002Fnpm` (registry reads and publishing), and `@effected\u002Fsbom` (SBOM, in-toto, SLSA, Sigstore). Rows route to a skill; they do not teach the pattern themselves.\n\n**The design boundary that matters most**: `@effected\u002Fgithub` talks to the GitHub API; `@effected\u002Fgithub-actions` talks to the runner it executes inside. Nothing in `github-actions` reads `process.env.GITHUB_REPOSITORY` on `github`'s behalf, and nothing in `github` imports a workflow command. The two meet at exactly two seams, both living in `github-actions`: the token bridge (`GitHubToken`) and the `Logger` that maps `Effect.log*` onto workflow commands (`ActionLogger.logger`).\n\nA sixth package and its command sit beside them: `@effected\u002Fschemastore` (a runtime `dependency` — the action reads its output contract's `HostedSchema` identity from it to write `$schema`) and `@effected\u002Fplugin` (a `devDependency`; its `effected schema build` \u002F `check` publish and drift-test the JSON Schema, and ajv lives behind it so the bundle never carries an engine). For a capability outside these six — globs, semver, lockfiles, JSONC\u002FYAML\u002FTOML, XDG paths, git introspection, managed file sections — consult `effected-packages` before hand-writing it.\n\n## Designing or structuring a new action? Start elsewhere first\n\nThis table routes a capability to the package and skill that own it; it does not sequence a build or lay out a repository. For a new action, a wholesale rebuild, or a port where more than one pipeline step changes, load `designing-an-action` first: recon → frozen parity contract → API dossier → contracts-first walking skeleton → TDD fill. For where a piece of code belongs — an entry point, a step, a shared service, a shim — load `structuring-an-action`: `designing-an-action` owns the order you build in, `structuring-an-action` owns the shape you build into. Return to this table during either sequence to look up which package and skill owns each piece as you build it.\n\n## I need to… → reach for…\n\n| I need to… | Reach for | Skill |\n| --- | --- | --- |\n| scaffold a new action's build files in a package | `effected action init` (or the `action_init` MCP tool): `effected.toml`'s `[action]` tables, `action.yml`, `src\u002Fmain.ts`, `src\u002Fprogram.ts` and a `tsconfig.json` on the kit's preset, ready for `effected action build` | `structuring-an-action` |\n| turn a fresh copy of the template into my action | the interview: identity, phases, access, inputs, outputs, capabilities, reporting, self-dogfood → a plan file | `bootstrapping-an-action` |\n| decide where a piece of code belongs in the repo | the canonical tree: entries, `program.ts`, `steps\u002F`, `services\u002F`, `shims\u002F`, `schema\u002F`, `state.ts`, `format.ts` | `structuring-an-action` |\n| write `main.ts` \u002F `pre.ts` \u002F `post.ts`, wire layers | `Action.run`, `ActionRuntime.layer`, `ActionServices` | `actions-runtime` |\n| read an input, validate it, apply a default | `ActionInput` + Effect `Config` | `actions-inputs-outputs` |\n| set an output, export a variable, add to PATH | `ActionOutputs` | `actions-inputs-outputs` |\n| emit a machine-readable output contract | `ActionOutputs.setJson` + the same `Schema` codec | `actions-inputs-outputs` |\n| publish and drift-test that contract's JSON Schema | `HostedSchema` beside the schema, `defineSchemastore` in `lib\u002Fscripts\u002Fschemastore.config.ts`, `effected schema build` \u002F `check` | `actions-inputs-outputs` |\n| make the run log readable | `ActionLogger` (`group`, nesting-aware; `withBuffer`, `notice`, `annotated`) | `actions-reporting` |\n| write the job summary | `ActionOutputs.summary` | `actions-reporting` |\n| read a published package's contents before installing it | `PackageTarball.extract` (scoped) + `resolveEntryPoint` | `release-and-publish` |\n| create a check run or annotate a PR | `CheckRun`, `CheckRun.withCheckRun` | `actions-reporting` |\n| post or update a sticky PR comment | `PullRequestComment.upsert` + `CommentMarker` | `actions-reporting` |\n| write GitHub-flavored markdown \u002F a findings table | `GitHubMarkdown`, `GitHubMarkdown.tableFor` | `actions-reporting` |\n| maintain a sticky-comment or PR-description document | `ManagedDocument` (marker-delimited regions) | `actions-reporting` |\n| reconcile check state onto a living document | `CheckDocument` + `CheckState` \u002F `projectCheckState` | `actions-reporting` |\n| read the webhook event payload | `ActionEnvironment.payload` | `actions-runtime` |\n| pass a value from `pre` to `main` to `post` | `ActionState` | `actions-state-and-secrets` |\n| handle a secret without leaking it | `Secret`, `Redacted`, `Redaction` | `actions-state-and-secrets` |\n| decide whether a failure should fail the run | `Action.run`'s contract, `DryRun` | `actions-state-and-secrets` |\n| kill a background process started in `main` | `DetachedProcess.reap` | `actions-state-and-secrets` |\n| safely prepend a directory to a spawned child's PATH | `ChildEnv.prependPath` | `actions-state-and-secrets` |\n| call any GitHub REST or GraphQL endpoint | `GitHubClient.request` \u002F `.graphql` \u002F `.paginate` | `github-api` |\n| create a branch, tag, release, commit, PR | the resource services (`GitBranch`, `GitTag`, …) | `github-api` |\n| write an Actions \u002F Dependabot \u002F Codespaces \u002F environment **secret** | `RepositorySecret` — encrypts client-side with a sealed box; the value is `Redacted` and GitHub never returns it | `github-api` |\n| read or write an Actions or environment **variable** | `RepositoryVariable` | `github-api` |\n| create or update a repository **ruleset** | `Ruleset.upsert` — matches on name **and** `source_type`, so a repository-scoped write cannot overwrite an inherited organization ruleset | `github-api` |\n| manage deployment **environments** | `DeploymentEnvironment` | `github-api` |\n| toggle vulnerability alerts, automated fixes, private reporting | `RepositorySecurity` — each has its own endpoint | `github-api` |\n| configure CodeQL default setup, or read repository languages | `CodeScanning` | `github-api` |\n| change repository settings | `GitHubRepository.updateSettings` (the typed PATCH) or `applySettings` (an open map routed across REST **and** the GraphQL mutation, returning the fields it actually sent) | `github-api` |\n| ask whether a repository owner is a user or an org | `GitHubRepository.ownerType` | `github-api` |\n| ask whether a repository has **workflows** | `WorkflowDispatch.list` — repository *languages* come from linguist and can never report `actions`, which GitHub validates against workflow files | `github-api` |\n| render a DCO sign-off trailer on a bot commit | `BotIdentity.signoff` | `github-api` |\n| authenticate as a GitHub App | `GitHubApp`, `GitHubApp.clientLayer` | `github-app-tokens` |\n| mint a token in `pre` and revoke it in `post` | `GitHubToken` provision → read → dispose | `github-app-tokens` |\n| cache a directory between runs | `ActionCache` | `actions-cache-and-artifacts` |\n| upload or download a workflow artifact | `Artifact` | `actions-cache-and-artifacts` |\n| store a blob (Actions cache or S3-compatible) | `BlobStore`, `GitHubCacheBlobStore`, `BlobEnvelope` | `actions-cache-and-artifacts` |\n| install a toolchain on the runner | `ToolInstaller` | `actions-cache-and-artifacts` |\n| pin and install an exact npm\u002Fpnpm\u002Fbun | `PackageManagerInstaller` | `actions-cache-and-artifacts` |\n| compute a cache key from file contents | `CacheKey` | `actions-cache-and-artifacts` |\n| run a subprocess and get a typed result | `Run.collect` \u002F `text` \u002F `lines` \u002F `json` | `running-commands-and-tools` |\n| ask whether a CLI tool is installed | `ToolDiscovery` | `running-commands-and-tools` |\n| run a local binary in a workspace or a bare repo | `LocalExec` | `running-commands-and-tools` |\n| read a registry: latest version, dist-tags, times | `NpmRegistry` | `release-and-publish` |\n| pack and publish a package | `PackagePublish`, `NpmExecutor` | `release-and-publish` |\n| derive a release tag or a tracking tag | `ReleaseTag`, `VersioningStrategy` | `release-and-publish` |\n| hold a release back by age | `ReleaseAgeGate` | `release-and-publish` |\n| emit an SBOM | `Sbom.generate` \u002F `toJson` \u002F `write` | `supply-chain-attestation` |\n| sign an artifact and attest a build | `SigstoreSigner`, `SlsaProvenance`, `Attestation.upload` | `supply-chain-attestation` |\n| get an OIDC token from the runner | `OidcTokenIssuer` | `supply-chain-attestation` |\n| publish with a workload credential minted from the runner's identity | `ActionsRegistryCredential.workload` → `PackagePublish.setupAuth` | `release-and-publish` |\n| capture SLSA provenance from the runner's claims | `ActionsProvenance.capture` | `supply-chain-attestation` |\n| serve `oidc`'s identity contract (what `sbom`'s signer needs) from the runner | `ActionsIdentityToken.layer` | `supply-chain-attestation` |\n| test any of the above | `makeTest` \u002F `layerTest` on every service | `testing-actions` |\n\n## Call sequences — when the capability is a chain, not one service\n\n| I need to… | Call sequence | Packages |\n| --- | --- | --- |\n| sign and store an attestation | `SlsaProvenance.forGitHubWorkflow` → `InTotoStatement.forSubject` → `SigstoreSigner.sign` → `Attestation.upload` | `sbom` + `github` |\n| publish a package, integrity-checked | `NpmRegistry.version` (already-published probe) → `PackagePublish.setupAuth` → `PackagePublish.pack` → `PackagePublish.publishTarball` | `npm` |\n| read a config dependency before install runs | `NpmRegistry.version` → `PackageTarball.extract` (scoped) → `resolveEntryPoint` | `npm` + `package-json` |\n| hold a token across the three phases | `GitHubToken.provision` (pre) → `GitHubToken.read` (main) → `GitHubToken.dispose` (post) | `github-actions` |\n| emit an SBOM and attest it | `Sbom.generate` → `Sbom.toJson` → `InTotoStatement.forSubject` → `SigstoreSigner.sign` → `Attestation.upload` | `sbom` + `github` |\n\n## Standards\n\n- **Resolve an API claim in order**: the package's own `CLAUDE.md`, then its source — the source wins on disagreement. For Effect core itself, load `effect-v4-source-lookup`: the vendored source settles existence and signature, a probe settles semantics.\n- **The route is the key.** `client.request(\"GET \u002Frepos\u002F{owner}\u002F{repo}\", …)` types the parameters and response from the literal alone; a cast in GitHub API code is a defect, not a shortcut.\n- **Every service ships `makeTest`\u002F`layerTest`**, and an unstubbed member dies loudly, naming itself. A handful of recorded exceptions each carry a stated reason.\n- **Errors are `Schema.TaggedError`, in one of two shapes — check which before writing a handler.** Most carry a discriminant field and are matched on it: `kind` (`GitHubError`, `PublishError`, `RegistryReadError`, `CommandFailedError`, `CheckDocumentError`, `ManagedDocumentError`, `TokenPermissionError`, `GitHubAppError`) or `reason` (`ActionEnvironmentError`, `GitHubTokenError`, `BlobTransferError`). Four in `@effected\u002Fgithub-actions` are instead **per-reason tagged unions**: `ActionOutputError`, `BlobEnvelopeError`, `CacheKeyError` and `DetachedProcessError` are `type` aliases over one exported class per failure, matched on `error._tag`, with `Effect.catchTag` recovering from one arm rather than all of them. Every name still appears in the same signatures, so a union is invisible until you reach for `.reason` — which no longer type-checks on those four. Every error reason has a test that fires it; when porting a channel, demonstrate its failure path or delete it from the signature.\n- **Read an input through `ActionInput`, never a bare `Config.*` read spelled by hand.** `ActionInput` carries the parsing and the typed `ConfigError`s a bare read cannot, and a test suite that injects its own `ConfigProvider` around a bare read can silently diverge from the runner's own key derivation.\n- **A consumer program never mentions the platform.** `ActionRuntime.layer` composes the platform and HTTP client internally with no requirements of its own, and an extra layer handed to `Action.run` may require anything the runtime already provides.\n- **`@effected\u002Fgithub-actions` is the one package in the kit with a required Node platform peer, and the only one where a raw `node:` import is sanctioned** — for digests and HMAC, reaping a bare pid, a file-descriptor-level detached spawn, and the cache\u002Fartifact codecs. Sanctioned is not unlimited: everything that can go through a core contract does.\n- **Heavy engines stay confined, and it is measured, not promised.** Azure to a handful of modules, Sigstore to one, octokit to `@effected\u002Fgithub`, each with a reachability test carrying a control. Never gather a heavy engine into a namespace object, never route it through a shared internal helper, and never fold it into a default runtime.\n- **`effected action init` starts an action; `effected action build` bundles it.** This suite teaches the code an action is made of. The bundle comes from `effected action build` (the `effected` CLI from `@effected\u002Fplugin`, or the `action_build` MCP tool), configured by the `[action]` tables of `effected.toml`: `entries`, `build`, `validation` and `persistLocal`. It writes one self-contained ESM file per entry to `dist\u002F\u003Centry>.js` and then imports each bundle in an isolated directory with no `PATH` to prove it loads (`[action.build] importCheck = false` turns that off; `importCheck = false` in a worker's own `[action.entries.workers.\u003Cname>]` table exempts that worker alone). Validation errors or a failed entry exit 1. The CLI also copies the build to `.github\u002Factions\u002Flocal` when `persistLocal` is enabled (`--no-persist` skips it); the MCP tool writes only `dist` unless called with `persist: true`, which also writes `.actrc` and `.github\u002Fworkflows\u002Fact-test.yml`. `effected action init` (or `action_init`) writes the files a new action needs into a directory holding a `package.json`: the `[action]` tables, an `action.yml` with branding, the guarded `main` entry and its program, and a `tsconfig.json` extending `@effected\u002Fplugin\u002Ftsconfig\u002Faction.json`. It refuses to overwrite an existing file unless given `--force` (`force: true`). It never follows or replaces a symbolic link at a file or directory it writes, even with `--force`, so it never writes outside the directory it runs in. It edits no `package.json`: it names the packages to add (`@effected\u002Fgithub-actions`, `effect`, `@effect\u002Fplatform-node`; and as devDependencies `@effected\u002Fplugin`, without which the build cannot read the tsconfig, plus its peers `typescript` and `@types\u002Fnode`) and whether `\"type\": \"module\"` is set. The rest of the repository — tests, workflows, `schema\u002F`, `state.ts` — is grown from `structuring-an-action`.\n\n## What the kit deliberately does not ship\n\n- No `@actions\u002Fcore`, `@actions\u002Fcache`, `@actions\u002Fartifact`, or any `@actions\u002F*` package — the protocols are implemented directly against their own APIs.\n- No `MainLive`\u002F`PreLive`\u002F`PostLive` exports — those are an action's own naming convention for its per-entry layers, built from `ActionRuntime.layer` plus each service's `static readonly layer`; the kit ships no such consts.\n- No standalone inputs service or a distinct input-error type — inputs are `Config`-based, and input failures are `ConfigError`.\n- No rate-limiter subsystem or proactive throttling — one `RetryPolicy` lives inside the client, and `client.rateLimit` exposes the headers for a caller that wants to pace itself.\n- No per-resource error classes — one `GitHubError` carries a `kind` discriminant.\n- No separate GraphQL client construct — GraphQL is a member of the client.\n- No report-shaping construct — but **`GitHubMarkdown` does ship the GFM writer** (`table`, `tableFor(schema)`, `heading`, `link`, `code`, `codeBlock`, `list`, `details`, `raw`), from `@effected\u002Fgithub-actions`, and `ManagedDocument` \u002F `CheckDocument` ship the document surfaces. \"Shaping\" means the arrangement of a report — which facts, in which order — not the primitives. Never hand-roll a markdown writer: compose `GitHubMarkdown` pieces, or reach for `@effected\u002Fmarkdown` for a document you build as a tree. See `actions-reporting`.\n- No fan-out-and-accumulate construct — `Effect.partition(items, f)` returns `[successes, failures]` and never fails; `Effect.all(effects, { mode: \"result\" })` is the per-effect form.\n- No ANSI\u002Fcolour API — GitHub's log viewer colours the workflow commands itself; do not invent one.\n- No shared `*Test` module family or a `.\u002Ftesting` subpath — every service ships its own `makeTest`\u002F`layerTest`. Grep the installed packages for `makeTest` to see the current set; it is large, not a handful.\n- No named log-level resolver — `Action.run` already lowers `References.MinimumLogLevel` to `Debug` under `RUNNER_DEBUG=1` (opt out with `{ stepDebugLogLevel: false }`). For the raw flag, obtain the service and read its member — `const env = yield* ActionEnvironment; const stepDebug = yield* env.isDebug` — never `ActionEnvironment.isDebug`, which is not a static. See `actions-runtime`.\n\n## Present, and easy to miss\n\nThese exist, and each one has been mistaken for a gap at least once. A capability filed under the absence list above when it actually ships is the expensive misreading — one build planned a hand-rolled markdown writer off exactly that mistake.\n\n- **`GitHubMarkdown` (capital H)** — the GFM writer: `table`, `tableFor(schema)`, `heading`, `link`, `code`, `codeBlock`, `list`, `details`, `raw`.\n- **`ActionInput.string(\"x\")`** — the accessor owns the `INPUT_` derivation; you never spell it yourself.\n- **`Service.makeTest` \u002F `Service.layerTest`** — on the service itself, not on a `\u002Ftesting` subpath.\n- **`ActionRuntime.layer`** — the composed runtime; never hand-compose a `MainLive`.\n\n## The suite\n\n| Skill | Owns |\n| --- | --- |\n| `actions-runtime` | entry points, `Action.run`, layer wiring, failure rendering |\n| `actions-inputs-outputs` | `ActionInput`, `ActionOutputs`, output contracts |\n| `actions-reporting` | logs, annotations, summaries, check runs, PR comments |\n| `actions-state-and-secrets` | `ActionState`, `Secret`, `DryRun`, `DetachedProcess`, `ChildEnv` |\n| `actions-cache-and-artifacts` | `ActionCache`, `Artifact`, `BlobStore`, `ToolInstaller`, `PackageManagerInstaller`, `CacheKey` |\n| `github-api` | the client, routes, pagination, resilience, the error taxonomy, resources |\n| `github-app-tokens` | `GitHubApp`, the client constructors, the `GitHubToken` bridge |\n| `running-commands-and-tools` | `Run`, `ToolDiscovery`, `LocalExec`, `Redaction`, `Retry` |\n| `release-and-publish` | `NpmRegistry`, `PackagePublish`, tags, versioning, release gates |\n| `supply-chain-attestation` | SBOM, NTIA, in-toto\u002FSLSA, OIDC, Sigstore, `Attestation` |\n| `testing-actions` | the doubles convention, the octokit harness, the domain's mutants |\n| `designing-an-action` | the build sequence: recon, frozen parity contract, API dossier, walking skeleton, TDD fill |\n| `bootstrapping-an-action` | the user-invoked interview that turns the template into a planned action and hands off to `designing-an-action` |\n| `structuring-an-action` | the canonical repo tree, structural standards, where a piece of code belongs |\n\nFor the general Effect v4 rules these all sit on — schema design, service and layer form, core idioms, observability, testing — load `effect-v4-schema`, `effect-v4-services-layers`, `effect-v4-idioms`, `effect-v4-observability` and `effect-v4-testing`. This suite carries only the GitHub-specific instances.\n","# Building a GitHub Action\n\nThe routing map for the five `@effected` packages an action-shaped program uses: `@effected\u002Fgithub-actions` (the runner), `@effected\u002Fgithub` (the GitHub API), `@effected\u002Fcommands` (subprocesses and tool discovery), `@effected\u002Fnpm` (registry reads and publishing), and `@effected\u002Fsbom` (SBOM, in-toto, SLSA, Sigstore). Rows route to a skill; they do not teach the pattern themselves.\n\n**The design boundary that matters most**: `@effected\u002Fgithub` talks to the GitHub API; `@effected\u002Fgithub-actions` talks to the runner it executes inside. Nothing in `github-actions` reads `process.env.GITHUB_REPOSITORY` on `github`'s behalf, and nothing in `github` imports a workflow command. The two meet at exactly two seams, both living in `github-actions`: the token bridge (`GitHubToken`) and the `Logger` that maps `Effect.log*` onto workflow commands (`ActionLogger.logger`).\n\nA sixth package and its command sit beside them: `@effected\u002Fschemastore` (a runtime `dependency` — the action reads its output contract's `HostedSchema` identity from it to write `$schema`) and `@effected\u002Fplugin` (a `devDependency`; its `effected schema build` \u002F `check` publish and drift-test the JSON Schema, and ajv lives behind it so the bundle never carries an engine). For a capability outside these six — globs, semver, lockfiles, JSONC\u002FYAML\u002FTOML, XDG paths, git introspection, managed file sections — consult `effected-packages` before hand-writing it.\n\n## Designing or structuring a new action? Start elsewhere first\n\nThis table routes a capability to the package and skill that own it; it does not sequence a build or lay out a repository. For a new action, a wholesale rebuild, or a port where more than one pipeline step changes, load `designing-an-action` first: recon → frozen parity contract → API dossier → contracts-first walking skeleton → TDD fill. For where a piece of code belongs — an entry point, a step, a shared service, a shim — load `structuring-an-action`: `designing-an-action` owns the order you build in, `structuring-an-action` owns the shape you build into. Return to this table during either sequence to look up which package and skill owns each piece as you build it.\n\n## I need to… → reach for…\n\n| I need to… | Reach for | Skill |\n| --- | --- | --- |\n| scaffold a new action's build files in a package | `effected action init` (or the `action_init` MCP tool): `effected.toml`'s `[action]` tables, `action.yml`, `src\u002Fmain.ts`, `src\u002Fprogram.ts` and a `tsconfig.json` on the kit's preset, ready for `effected action build` | `structuring-an-action` |\n| turn a fresh copy of the template into my action | the interview: identity, phases, access, inputs, outputs, capabilities, reporting, self-dogfood → a plan file | `bootstrapping-an-action` |\n| decide where a piece of code belongs in the repo | the canonical tree: entries, `program.ts`, `steps\u002F`, `services\u002F`, `shims\u002F`, `schema\u002F`, `state.ts`, `format.ts` | `structuring-an-action` |\n| write `main.ts` \u002F `pre.ts` \u002F `post.ts`, wire layers | `Action.run`, `ActionRuntime.layer`, `ActionServices` | `actions-runtime` |\n| read an input, validate it, apply a default | `ActionInput` + Effect `Config` | `actions-inputs-outputs` |\n| set an output, export a variable, add to PATH | `ActionOutputs` | `actions-inputs-outputs` |\n| emit a machine-readable output contract | `ActionOutputs.setJson` + the same `Schema` codec | `actions-inputs-outputs` |\n| publish and drift-test that contract's JSON Schema | `HostedSchema` beside the schema, `defineSchemastore` in `lib\u002Fscripts\u002Fschemastore.config.ts`, `effected schema build` \u002F `check` | `actions-inputs-outputs` |\n| make the run log readable | `ActionLogger` (`group`, nesting-aware; `withBuffer`, `notice`, `annotated`) | `actions-reporting` |\n| write the job summary | `ActionOutputs.summary` | `actions-reporting` |\n| read a published package's contents before installing it | `PackageTarball.extract` (scoped) + `resolveEntryPoint` | `release-and-publish` |\n| create a check run or annotate a PR | `CheckRun`, `CheckRun.withCheckRun` | `actions-reporting` |\n| post or update a sticky PR comment | `PullRequestComment.upsert` + `CommentMarker` | `actions-reporting` |\n| write GitHub-flavored markdown \u002F a findings table | `GitHubMarkdown`, `GitHubMarkdown.tableFor` | `actions-reporting` |\n| maintain a sticky-comment or PR-description document | `ManagedDocument` (marker-delimited regions) | `actions-reporting` |\n| reconcile check state onto a living document | `CheckDocument` + `CheckState` \u002F `projectCheckState` | `actions-reporting` |\n| read the webhook event payload | `ActionEnvironment.payload` | `actions-runtime` |\n| pass a value from `pre` to `main` to `post` | `ActionState` | `actions-state-and-secrets` |\n| handle a secret without leaking it | `Secret`, `Redacted`, `Redaction` | `actions-state-and-secrets` |\n| decide whether a failure should fail the run | `Action.run`'s contract, `DryRun` | `actions-state-and-secrets` |\n| kill a background process started in `main` | `DetachedProcess.reap` | `actions-state-and-secrets` |\n| safely prepend a directory to a spawned child's PATH | `ChildEnv.prependPath` | `actions-state-and-secrets` |\n| call any GitHub REST or GraphQL endpoint | `GitHubClient.request` \u002F `.graphql` \u002F `.paginate` | `github-api` |\n| create a branch, tag, release, commit, PR | the resource services (`GitBranch`, `GitTag`, …) | `github-api` |\n| write an Actions \u002F Dependabot \u002F Codespaces \u002F environment **secret** | `RepositorySecret` — encrypts client-side with a sealed box; the value is `Redacted` and GitHub never returns it | `github-api` |\n| read or write an Actions or environment **variable** | `RepositoryVariable` | `github-api` |\n| create or update a repository **ruleset** | `Ruleset.upsert` — matches on name **and** `source_type`, so a repository-scoped write cannot overwrite an inherited organization ruleset | `github-api` |\n| manage deployment **environments** | `DeploymentEnvironment` | `github-api` |\n| toggle vulnerability alerts, automated fixes, private reporting | `RepositorySecurity` — each has its own endpoint | `github-api` |\n| configure CodeQL default setup, or read repository languages | `CodeScanning` | `github-api` |\n| change repository settings | `GitHubRepository.updateSettings` (the typed PATCH) or `applySettings` (an open map routed across REST **and** the GraphQL mutation, returning the fields it actually sent) | `github-api` |\n| ask whether a repository owner is a user or an org | `GitHubRepository.ownerType` | `github-api` |\n| ask whether a repository has **workflows** | `WorkflowDispatch.list` — repository *languages* come from linguist and can never report `actions`, which GitHub validates against workflow files | `github-api` |\n| render a DCO sign-off trailer on a bot commit | `BotIdentity.signoff` | `github-api` |\n| authenticate as a GitHub App | `GitHubApp`, `GitHubApp.clientLayer` | `github-app-tokens` |\n| mint a token in `pre` and revoke it in `post` | `GitHubToken` provision → read → dispose | `github-app-tokens` |\n| cache a directory between runs | `ActionCache` | `actions-cache-and-artifacts` |\n| upload or download a workflow artifact | `Artifact` | `actions-cache-and-artifacts` |\n| store a blob (Actions cache or S3-compatible) | `BlobStore`, `GitHubCacheBlobStore`, `BlobEnvelope` | `actions-cache-and-artifacts` |\n| install a toolchain on the runner | `ToolInstaller` | `actions-cache-and-artifacts` |\n| pin and install an exact npm\u002Fpnpm\u002Fbun | `PackageManagerInstaller` | `actions-cache-and-artifacts` |\n| compute a cache key from file contents | `CacheKey` | `actions-cache-and-artifacts` |\n| run a subprocess and get a typed result | `Run.collect` \u002F `text` \u002F `lines` \u002F `json` | `running-commands-and-tools` |\n| ask whether a CLI tool is installed | `ToolDiscovery` | `running-commands-and-tools` |\n| run a local binary in a workspace or a bare repo | `LocalExec` | `running-commands-and-tools` |\n| read a registry: latest version, dist-tags, times | `NpmRegistry` | `release-and-publish` |\n| pack and publish a package | `PackagePublish`, `NpmExecutor` | `release-and-publish` |\n| derive a release tag or a tracking tag | `ReleaseTag`, `VersioningStrategy` | `release-and-publish` |\n| hold a release back by age | `ReleaseAgeGate` | `release-and-publish` |\n| emit an SBOM | `Sbom.generate` \u002F `toJson` \u002F `write` | `supply-chain-attestation` |\n| sign an artifact and attest a build | `SigstoreSigner`, `SlsaProvenance`, `Attestation.upload` | `supply-chain-attestation` |\n| get an OIDC token from the runner | `OidcTokenIssuer` | `supply-chain-attestation` |\n| publish with a workload credential minted from the runner's identity | `ActionsRegistryCredential.workload` → `PackagePublish.setupAuth` | `release-and-publish` |\n| capture SLSA provenance from the runner's claims | `ActionsProvenance.capture` | `supply-chain-attestation` |\n| serve `oidc`'s identity contract (what `sbom`'s signer needs) from the runner | `ActionsIdentityToken.layer` | `supply-chain-attestation` |\n| test any of the above | `makeTest` \u002F `layerTest` on every service | `testing-actions` |\n\n## Call sequences — when the capability is a chain, not one service\n\n| I need to… | Call sequence | Packages |\n| --- | --- | --- |\n| sign and store an attestation | `SlsaProvenance.forGitHubWorkflow` → `InTotoStatement.forSubject` → `SigstoreSigner.sign` → `Attestation.upload` | `sbom` + `github` |\n| publish a package, integrity-checked | `NpmRegistry.version` (already-published probe) → `PackagePublish.setupAuth` → `PackagePublish.pack` → `PackagePublish.publishTarball` | `npm` |\n| read a config dependency before install runs | `NpmRegistry.version` → `PackageTarball.extract` (scoped) → `resolveEntryPoint` | `npm` + `package-json` |\n| hold a token across the three phases | `GitHubToken.provision` (pre) → `GitHubToken.read` (main) → `GitHubToken.dispose` (post) | `github-actions` |\n| emit an SBOM and attest it | `Sbom.generate` → `Sbom.toJson` → `InTotoStatement.forSubject` → `SigstoreSigner.sign` → `Attestation.upload` | `sbom` + `github` |\n\n## Standards\n\n- **Resolve an API claim in order**: the package's own `CLAUDE.md`, then its source — the source wins on disagreement. For Effect core itself, load `effect-v4-source-lookup`: the vendored source settles existence and signature, a probe settles semantics.\n- **The route is the key.** `client.request(\"GET \u002Frepos\u002F{owner}\u002F{repo}\", …)` types the parameters and response from the literal alone; a cast in GitHub API code is a defect, not a shortcut.\n- **Every service ships `makeTest`\u002F`layerTest`**, and an unstubbed member dies loudly, naming itself. A handful of recorded exceptions each carry a stated reason.\n- **Errors are `Schema.TaggedError`, in one of two shapes — check which before writing a handler.** Most carry a discriminant field and are matched on it: `kind` (`GitHubError`, `PublishError`, `RegistryReadError`, `CommandFailedError`, `CheckDocumentError`, `ManagedDocumentError`, `TokenPermissionError`, `GitHubAppError`) or `reason` (`ActionEnvironmentError`, `GitHubTokenError`, `BlobTransferError`). Four in `@effected\u002Fgithub-actions` are instead **per-reason tagged unions**: `ActionOutputError`, `BlobEnvelopeError`, `CacheKeyError` and `DetachedProcessError` are `type` aliases over one exported class per failure, matched on `error._tag`, with `Effect.catchTag` recovering from one arm rather than all of them. Every name still appears in the same signatures, so a union is invisible until you reach for `.reason` — which no longer type-checks on those four. Every error reason has a test that fires it; when porting a channel, demonstrate its failure path or delete it from the signature.\n- **Read an input through `ActionInput`, never a bare `Config.*` read spelled by hand.** `ActionInput` carries the parsing and the typed `ConfigError`s a bare read cannot, and a test suite that injects its own `ConfigProvider` around a bare read can silently diverge from the runner's own key derivation.\n- **A consumer program never mentions the platform.** `ActionRuntime.layer` composes the platform and HTTP client internally with no requirements of its own, and an extra layer handed to `Action.run` may require anything the runtime already provides.\n- **`@effected\u002Fgithub-actions` is the one package in the kit with a required Node platform peer, and the only one where a raw `node:` import is sanctioned** — for digests and HMAC, reaping a bare pid, a file-descriptor-level detached spawn, and the cache\u002Fartifact codecs. Sanctioned is not unlimited: everything that can go through a core contract does.\n- **Heavy engines stay confined, and it is measured, not promised.** Azure to a handful of modules, Sigstore to one, octokit to `@effected\u002Fgithub`, each with a reachability test carrying a control. Never gather a heavy engine into a namespace object, never route it through a shared internal helper, and never fold it into a default runtime.\n- **`effected action init` starts an action; `effected action build` bundles it.** This suite teaches the code an action is made of. The bundle comes from `effected action build` (the `effected` CLI from `@effected\u002Fplugin`, or the `action_build` MCP tool), configured by the `[action]` tables of `effected.toml`: `entries`, `build`, `validation` and `persistLocal`. It writes one self-contained ESM file per entry to `dist\u002F\u003Centry>.js` and then imports each bundle in an isolated directory with no `PATH` to prove it loads (`[action.build] importCheck = false` turns that off; `importCheck = false` in a worker's own `[action.entries.workers.\u003Cname>]` table exempts that worker alone). Validation errors or a failed entry exit 1. The CLI also copies the build to `.github\u002Factions\u002Flocal` when `persistLocal` is enabled (`--no-persist` skips it); the MCP tool writes only `dist` unless called with `persist: true`, which also writes `.actrc` and `.github\u002Fworkflows\u002Fact-test.yml`. `effected action init` (or `action_init`) writes the files a new action needs into a directory holding a `package.json`: the `[action]` tables, an `action.yml` with branding, the guarded `main` entry and its program, and a `tsconfig.json` extending `@effected\u002Fplugin\u002Ftsconfig\u002Faction.json`. It refuses to overwrite an existing file unless given `--force` (`force: true`). It never follows or replaces a symbolic link at a file or directory it writes, even with `--force`, so it never writes outside the directory it runs in. It edits no `package.json`: it names the packages to add (`@effected\u002Fgithub-actions`, `effect`, `@effect\u002Fplatform-node`; and as devDependencies `@effected\u002Fplugin`, without which the build cannot read the tsconfig, plus its peers `typescript` and `@types\u002Fnode`) and whether `\"type\": \"module\"` is set. The rest of the repository — tests, workflows, `schema\u002F`, `state.ts` — is grown from `structuring-an-action`.\n\n## What the kit deliberately does not ship\n\n- No `@actions\u002Fcore`, `@actions\u002Fcache`, `@actions\u002Fartifact`, or any `@actions\u002F*` package — the protocols are implemented directly against their own APIs.\n- No `MainLive`\u002F`PreLive`\u002F`PostLive` exports — those are an action's own naming convention for its per-entry layers, built from `ActionRuntime.layer` plus each service's `static readonly layer`; the kit ships no such consts.\n- No standalone inputs service or a distinct input-error type — inputs are `Config`-based, and input failures are `ConfigError`.\n- No rate-limiter subsystem or proactive throttling — one `RetryPolicy` lives inside the client, and `client.rateLimit` exposes the headers for a caller that wants to pace itself.\n- No per-resource error classes — one `GitHubError` carries a `kind` discriminant.\n- No separate GraphQL client construct — GraphQL is a member of the client.\n- No report-shaping construct — but **`GitHubMarkdown` does ship the GFM writer** (`table`, `tableFor(schema)`, `heading`, `link`, `code`, `codeBlock`, `list`, `details`, `raw`), from `@effected\u002Fgithub-actions`, and `ManagedDocument` \u002F `CheckDocument` ship the document surfaces. \"Shaping\" means the arrangement of a report — which facts, in which order — not the primitives. Never hand-roll a markdown writer: compose `GitHubMarkdown` pieces, or reach for `@effected\u002Fmarkdown` for a document you build as a tree. See `actions-reporting`.\n- No fan-out-and-accumulate construct — `Effect.partition(items, f)` returns `[successes, failures]` and never fails; `Effect.all(effects, { mode: \"result\" })` is the per-effect form.\n- No ANSI\u002Fcolour API — GitHub's log viewer colours the workflow commands itself; do not invent one.\n- No shared `*Test` module family or a `.\u002Ftesting` subpath — every service ships its own `makeTest`\u002F`layerTest`. Grep the installed packages for `makeTest` to see the current set; it is large, not a handful.\n- No named log-level resolver — `Action.run` already lowers `References.MinimumLogLevel` to `Debug` under `RUNNER_DEBUG=1` (opt out with `{ stepDebugLogLevel: false }`). For the raw flag, obtain the service and read its member — `const env = yield* ActionEnvironment; const stepDebug = yield* env.isDebug` — never `ActionEnvironment.isDebug`, which is not a static. See `actions-runtime`.\n\n## Present, and easy to miss\n\nThese exist, and each one has been mistaken for a gap at least once. A capability filed under the absence list above when it actually ships is the expensive misreading — one build planned a hand-rolled markdown writer off exactly that mistake.\n\n- **`GitHubMarkdown` (capital H)** — the GFM writer: `table`, `tableFor(schema)`, `heading`, `link`, `code`, `codeBlock`, `list`, `details`, `raw`.\n- **`ActionInput.string(\"x\")`** — the accessor owns the `INPUT_` derivation; you never spell it yourself.\n- **`Service.makeTest` \u002F `Service.layerTest`** — on the service itself, not on a `\u002Ftesting` subpath.\n- **`ActionRuntime.layer`** — the composed runtime; never hand-compose a `MainLive`.\n\n## The suite\n\n| Skill | Owns |\n| --- | --- |\n| `actions-runtime` | entry points, `Action.run`, layer wiring, failure rendering |\n| `actions-inputs-outputs` | `ActionInput`, `ActionOutputs`, output contracts |\n| `actions-reporting` | logs, annotations, summaries, check runs, PR comments |\n| `actions-state-and-secrets` | `ActionState`, `Secret`, `DryRun`, `DetachedProcess`, `ChildEnv` |\n| `actions-cache-and-artifacts` | `ActionCache`, `Artifact`, `BlobStore`, `ToolInstaller`, `PackageManagerInstaller`, `CacheKey` |\n| `github-api` | the client, routes, pagination, resilience, the error taxonomy, resources |\n| `github-app-tokens` | `GitHubApp`, the client constructors, the `GitHubToken` bridge |\n| `running-commands-and-tools` | `Run`, `ToolDiscovery`, `LocalExec`, `Redaction`, `Retry` |\n| `release-and-publish` | `NpmRegistry`, `PackagePublish`, tags, versioning, release gates |\n| `supply-chain-attestation` | SBOM, NTIA, in-toto\u002FSLSA, OIDC, Sigstore, `Attestation` |\n| `testing-actions` | the doubles convention, the octokit harness, the domain's mutants |\n| `designing-an-action` | the build sequence: recon, frozen parity contract, API dossier, walking skeleton, TDD fill |\n| `bootstrapping-an-action` | the user-invoked interview that turns the template into a planned action and hands off to `designing-an-action` |\n| `structuring-an-action` | the canonical repo tree, structural standards, where a piece of code belongs |\n\nFor the general Effect v4 rules these all sit on — schema design, service and layer form, core idioms, observability, testing — load `effect-v4-schema`, `effect-v4-services-layers`, `effect-v4-idioms`, `effect-v4-observability` and `effect-v4-testing`. This suite carries only the GitHub-specific instances.\n",{"name":5,"description":7,"when_to_use":24},"build a GitHub Action, new action, action.yml, GITHUB_TOKEN, GitHub App token, workflow command, job summary, check run, cache in an action, upload an artifact, publish to npm from CI, SBOM, attestation","main","0b59ef50d270bac16abbb7729cf4326d16de63f9","plugin\u002Fskills\u002Fbuilding-a-github-action",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 building-a-github-action",{"tool":38,"command":39},"bunx","bunx skills add spencerbeggs\u002Feffected --skill building-a-github-action",{"tool":41,"command":42},"pnpm","pnpm dlx skills add spencerbeggs\u002Feffected --skill building-a-github-action","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fspencerbeggs\u002Feffected\u002Fblob\u002Fmain\u002Fplugin\u002Fskills\u002Fbuilding-a-github-action\u002FSKILL.md",true,[],[47,54,61,68,75,82],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"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":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"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":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},"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":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},"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":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},"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":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},"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",[],[]]