[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78032XKFVA065WWPZX9AVYD":3,"skill-same:01M78032XKFVA065WWPZX9AVYD":56},{"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},"01M78032XKFVA065WWPZX9AVYD","github-app-tokens",null,"Use when a GitHub credential needs to come into existence, live somewhere, and die — constructing a client from a plain token or a GitHub App, or wiring GitHubToken's provision\u002Fread\u002FclientLayer\u002Fdispose lifecycle across an Action's pre\u002Fmain\u002Fpost phases.","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\u002Fbuilds\u002Fclaude\u002Fskills\u002Fgithub-app-tokens\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: github-app-tokens\ndescription: Use when a GitHub credential needs to come into existence, live somewhere, and die — constructing a client from a plain token or a GitHub App, or wiring GitHubToken's provision\u002Fread\u002FclientLayer\u002Fdispose lifecycle across an Action's pre\u002Fmain\u002Fpost phases.\nwhen_to_use: GitHubApp, installation token, App JWT, appClientLayer, cachedToken, cachedClientLayer, InstallationTokenStore, PKCS#1 private key, token bridge, GitHubTokenError, botIdentity, TokenPermissionError, revoke on release, acquireUseRelease token, GITHUB_STATE persisted token, plain GITHUB_TOKEN input\n---\n\n# GitHub App tokens: the credential lifecycle\n\nTwo packages, one lifecycle: how a GitHub credential comes into existence,\nwhere it lives, and when it dies. `@effected\u002Fgithub` mints and revokes;\n`@effected\u002Fgithub-actions` persists a mint across a process boundary and\nguarantees it dies exactly once. For the request surface itself\n(`client.request`, `GitHubError`, pagination) see `github-api`. For wiring\n`Action.run` and `ActionRunOptions.layer`, see `actions-runtime`. For the\n`Secret` seam and `ActionState`, see `actions-state-and-secrets`.\n\n## What you have\n\n| Construct | Import | Reach for it when |\n| --- | --- | --- |\n| `GitHubClient.layerFromToken` | `import { GitHubClient } from \"@effected\u002Fgithub\"` | You already hold a `Redacted\u003Cstring>` token |\n| `GitHubClient.layerFromConfig` | `@effected\u002Fgithub` | The workflow's own runner-issued token is enough |\n| `GitHubApp` (`.token`, `.scopedToken`, `.revoke`, `.identity`, `.botUser`, `.installations`, `.clientLayer`, `.appClientLayer`, `.cachedToken`, `.cachedClientLayer`) | `@effected\u002Fgithub` | Minting\u002Frevoking an installation token directly, outside an Action's process boundary; speaking as the app itself; reusing a token across request scopes through an `InstallationTokenStore` |\n| `TokenPermissions` | `@effected\u002Fgithub` | Comparing a token's granted scopes against what a program requires |\n| `BotIdentity` | `@effected\u002Fgithub` | Rendering a DCO trailer, or naming the bot identity behind a token |\n| `GitHubToken` (`.provision`, `.read`, `.botIdentity`, `.clientLayer`, `.dispose`) | `import { GitHubToken } from \"@effected\u002Fgithub-actions\"` | Bridging an App-minted token across an Action's `pre`\u002F`main`\u002F`post` process boundary |\n\n## Standards\n\n- **Pick the plain-token path first.** `GitHubClient.layerFromConfig()`\n  needs no `ActionState`, no `GitHubApp`, no revoke lifecycle — reach for\n  App auth only when the runner's own token can't provide a permission or a\n  distinct bot identity your program needs.\n- **`GitHubApp.clientLayer` lives on `GitHubApp`, not `GitHubClient`.** A\n  layer-family static belongs to the module that owns the dependency it\n  needs; putting it on `GitHubClient` would drag the JWT signer into every\n  token-only consumer's bundle. See\n  [`references\u002Fclient-construction.md`](references\u002Fclient-construction.md).\n- **Use `GitHubToken`, never `GitHubApp.scopedToken`\u002F`.clientLayer`, inside\n  an Action.** Both revoke on their `Scope`'s close, and in an Action the\n  scope closes at the end of `pre` — before `main` runs a single request.\n  `GitHubToken` persists the mint through `GITHUB_STATE` instead.\n- **Build a `layerTest` from the member-usage table, not from a stack\n  trace.** Each `GitHubToken` member touches an exact, documented set of\n  `ActionState`\u002F`ActionOutputs`\u002F`GitHubApp` members — stub exactly those.\n  See [`references\u002Ftoken-lifecycle.md`](references\u002Ftoken-lifecycle.md).\n- **Verify required scope at `pre`, not by waiting for a 403 in `main`.**\n  Set `GitHubToken.provision`'s `required` option every time — leaving it\n  unset skips verification silently.\n- **Revoke the mint on any provisioning failure.** `provision` is an\n  acquire-use-release: a scope-verification or persistence failure revokes\n  the just-minted token rather than leaving an hour of unreferenced access\n  live for a retried `pre`.\n- **`post` disposes unconditionally, wrapped double-netted.** `dispose()`\n  is already a no-op with nothing to revoke, but still wrap the call in\n  `catch` + `catchDefect` — a `post` phase must never turn a green run red\n  over a token it was only trying to clean up.\n- **Never reintroduce `@octokit\u002Frest` or `@octokit\u002Fauth-app`.** A small,\n  zero-dependency JWT signer plus one typed route call covers what minting\n  an installation token actually needs; both larger dependencies were\n  deliberately dropped.\n\n## Footguns\n\n- An installation token lives about an hour and **nothing can re-mint one\n  after `pre`** — the only credential that could is the App's private key,\n  and persisting that through `GITHUB_STATE` (plaintext by GitHub's own\n  protocol) would trade an hour-long token for a permanent one. A phase\n  expecting to outlive the hour calls `provision` itself.\n- The scope-verification field is named `required`, **not** `permissions` —\n  `permissions` is the field on the *minted* token. A double or migration\n  script that writes `permissions` on `ProvisionOptions` compiles clean and\n  silently skips verification. See\n  [`references\u002Ftoken-lifecycle.md`](references\u002Ftoken-lifecycle.md).\n- Masking must happen **before** persistence — the ordering is structural in\n  `provision`, not a convention a caller has to remember; get it backwards\n  in a hand-rolled variant and a plaintext token reaches `GITHUB_STATE`\n  unmasked.\n- `dispose` reads with `getOptional`, never `get` — a `post` phase after a\n  `pre` that failed before minting anything must be a no-op, not a typed\n  failure.\n\n## Additional resources\n\n- [references\u002Ftoken-lifecycle.md](references\u002Ftoken-lifecycle.md) — the\n  `GitHubToken` bridge in full: the member-usage table, the one-hour\n  contract, `provision`\u002F`clientLayer`\u002F`dispose` mechanics, and the complete\n  five-element App-auth recipe including how to add or remove it from an\n  action. Load when: wiring App auth into an action's `pre`\u002F`main`\u002F`post`\n  phases.\n- [references\u002Fclient-construction.md](references\u002Fclient-construction.md) —\n  the five `GitHubClient` constructors (token, config, installation, app JWT,\n  cached token) in detail, why the package skips\n  `@octokit\u002Frest`\u002F`@octokit\u002Fauth-app`, the `GitHubApp` service shape and its\n  rotation\u002Frevocation mechanics, and the pure `TokenPermissions`\u002F`BotIdentity`\n  classes. Load when: constructing a client directly, or working with\n  `GitHubApp` outside the `GitHubToken` bridge.\n\n## Pointers\n\n- The request surface (`client.request`, `GitHubError`'s `kind` taxonomy,\n  pagination, GraphQL) — `github-api`.\n- Wiring `Action.run`, `ActionRuntime.layer`, and the `ActionRunOptions.layer`\n  type-level constraint `clientLayer()`'s fallible construction runs into —\n  `actions-runtime`.\n- The `Secret` declassification seam and `ActionState` persistence —\n  `actions-state-and-secrets`.\n- Testing doubles for any of the above (`layerTest`, the member-usage-table\n  pattern, `TestClock` for expiry) — `testing-actions`.\n","# GitHub App tokens: the credential lifecycle\n\nTwo packages, one lifecycle: how a GitHub credential comes into existence,\nwhere it lives, and when it dies. `@effected\u002Fgithub` mints and revokes;\n`@effected\u002Fgithub-actions` persists a mint across a process boundary and\nguarantees it dies exactly once. For the request surface itself\n(`client.request`, `GitHubError`, pagination) see `github-api`. For wiring\n`Action.run` and `ActionRunOptions.layer`, see `actions-runtime`. For the\n`Secret` seam and `ActionState`, see `actions-state-and-secrets`.\n\n## What you have\n\n| Construct | Import | Reach for it when |\n| --- | --- | --- |\n| `GitHubClient.layerFromToken` | `import { GitHubClient } from \"@effected\u002Fgithub\"` | You already hold a `Redacted\u003Cstring>` token |\n| `GitHubClient.layerFromConfig` | `@effected\u002Fgithub` | The workflow's own runner-issued token is enough |\n| `GitHubApp` (`.token`, `.scopedToken`, `.revoke`, `.identity`, `.botUser`, `.installations`, `.clientLayer`, `.appClientLayer`, `.cachedToken`, `.cachedClientLayer`) | `@effected\u002Fgithub` | Minting\u002Frevoking an installation token directly, outside an Action's process boundary; speaking as the app itself; reusing a token across request scopes through an `InstallationTokenStore` |\n| `TokenPermissions` | `@effected\u002Fgithub` | Comparing a token's granted scopes against what a program requires |\n| `BotIdentity` | `@effected\u002Fgithub` | Rendering a DCO trailer, or naming the bot identity behind a token |\n| `GitHubToken` (`.provision`, `.read`, `.botIdentity`, `.clientLayer`, `.dispose`) | `import { GitHubToken } from \"@effected\u002Fgithub-actions\"` | Bridging an App-minted token across an Action's `pre`\u002F`main`\u002F`post` process boundary |\n\n## Standards\n\n- **Pick the plain-token path first.** `GitHubClient.layerFromConfig()`\n  needs no `ActionState`, no `GitHubApp`, no revoke lifecycle — reach for\n  App auth only when the runner's own token can't provide a permission or a\n  distinct bot identity your program needs.\n- **`GitHubApp.clientLayer` lives on `GitHubApp`, not `GitHubClient`.** A\n  layer-family static belongs to the module that owns the dependency it\n  needs; putting it on `GitHubClient` would drag the JWT signer into every\n  token-only consumer's bundle. See\n  [`references\u002Fclient-construction.md`](references\u002Fclient-construction.md).\n- **Use `GitHubToken`, never `GitHubApp.scopedToken`\u002F`.clientLayer`, inside\n  an Action.** Both revoke on their `Scope`'s close, and in an Action the\n  scope closes at the end of `pre` — before `main` runs a single request.\n  `GitHubToken` persists the mint through `GITHUB_STATE` instead.\n- **Build a `layerTest` from the member-usage table, not from a stack\n  trace.** Each `GitHubToken` member touches an exact, documented set of\n  `ActionState`\u002F`ActionOutputs`\u002F`GitHubApp` members — stub exactly those.\n  See [`references\u002Ftoken-lifecycle.md`](references\u002Ftoken-lifecycle.md).\n- **Verify required scope at `pre`, not by waiting for a 403 in `main`.**\n  Set `GitHubToken.provision`'s `required` option every time — leaving it\n  unset skips verification silently.\n- **Revoke the mint on any provisioning failure.** `provision` is an\n  acquire-use-release: a scope-verification or persistence failure revokes\n  the just-minted token rather than leaving an hour of unreferenced access\n  live for a retried `pre`.\n- **`post` disposes unconditionally, wrapped double-netted.** `dispose()`\n  is already a no-op with nothing to revoke, but still wrap the call in\n  `catch` + `catchDefect` — a `post` phase must never turn a green run red\n  over a token it was only trying to clean up.\n- **Never reintroduce `@octokit\u002Frest` or `@octokit\u002Fauth-app`.** A small,\n  zero-dependency JWT signer plus one typed route call covers what minting\n  an installation token actually needs; both larger dependencies were\n  deliberately dropped.\n\n## Footguns\n\n- An installation token lives about an hour and **nothing can re-mint one\n  after `pre`** — the only credential that could is the App's private key,\n  and persisting that through `GITHUB_STATE` (plaintext by GitHub's own\n  protocol) would trade an hour-long token for a permanent one. A phase\n  expecting to outlive the hour calls `provision` itself.\n- The scope-verification field is named `required`, **not** `permissions` —\n  `permissions` is the field on the *minted* token. A double or migration\n  script that writes `permissions` on `ProvisionOptions` compiles clean and\n  silently skips verification. See\n  [`references\u002Ftoken-lifecycle.md`](references\u002Ftoken-lifecycle.md).\n- Masking must happen **before** persistence — the ordering is structural in\n  `provision`, not a convention a caller has to remember; get it backwards\n  in a hand-rolled variant and a plaintext token reaches `GITHUB_STATE`\n  unmasked.\n- `dispose` reads with `getOptional`, never `get` — a `post` phase after a\n  `pre` that failed before minting anything must be a no-op, not a typed\n  failure.\n\n## Additional resources\n\n- [references\u002Ftoken-lifecycle.md](references\u002Ftoken-lifecycle.md) — the\n  `GitHubToken` bridge in full: the member-usage table, the one-hour\n  contract, `provision`\u002F`clientLayer`\u002F`dispose` mechanics, and the complete\n  five-element App-auth recipe including how to add or remove it from an\n  action. Load when: wiring App auth into an action's `pre`\u002F`main`\u002F`post`\n  phases.\n- [references\u002Fclient-construction.md](references\u002Fclient-construction.md) —\n  the five `GitHubClient` constructors (token, config, installation, app JWT,\n  cached token) in detail, why the package skips\n  `@octokit\u002Frest`\u002F`@octokit\u002Fauth-app`, the `GitHubApp` service shape and its\n  rotation\u002Frevocation mechanics, and the pure `TokenPermissions`\u002F`BotIdentity`\n  classes. Load when: constructing a client directly, or working with\n  `GitHubApp` outside the `GitHubToken` bridge.\n\n## Pointers\n\n- The request surface (`client.request`, `GitHubError`'s `kind` taxonomy,\n  pagination, GraphQL) — `github-api`.\n- Wiring `Action.run`, `ActionRuntime.layer`, and the `ActionRunOptions.layer`\n  type-level constraint `clientLayer()`'s fallible construction runs into —\n  `actions-runtime`.\n- The `Secret` declassification seam and `ActionState` persistence —\n  `actions-state-and-secrets`.\n- Testing doubles for any of the above (`layerTest`, the member-usage-table\n  pattern, `TestClock` for expiry) — `testing-actions`.\n",{"name":5,"description":7,"when_to_use":24},"GitHubApp, installation token, App JWT, appClientLayer, cachedToken, cachedClientLayer, InstallationTokenStore, PKCS#1 private key, token bridge, GitHubTokenError, botIdentity, TokenPermissionError, revoke on release, acquireUseRelease token, GITHUB_STATE persisted token, plain GITHUB_TOKEN input","main","11d6b3ae59538b0e16ad67c315ecb0c25fcb0125","plugin\u002Fbuilds\u002Fclaude\u002Fskills\u002Fgithub-app-tokens",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 github-app-tokens",{"tool":38,"command":39},"bunx","bunx skills add spencerbeggs\u002Feffected --skill github-app-tokens",{"tool":41,"command":42},"pnpm","pnpm dlx skills add spencerbeggs\u002Feffected --skill github-app-tokens","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fspencerbeggs\u002Feffected\u002Fblob\u002Fmain\u002Fplugin\u002Fbuilds\u002Fclaude\u002Fskills\u002Fgithub-app-tokens\u002FSKILL.md",true,[46,52],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"references\u002Fclient-construction.md","REFERENCE","参考文档",8360,"https:\u002F\u002Fgithub.com\u002Fspencerbeggs\u002Feffected\u002Fblob\u002Fmain\u002Fplugin\u002Fbuilds\u002Fclaude\u002Fskills\u002Fgithub-app-tokens\u002Freferences\u002Fclient-construction.md",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"references\u002Ftoken-lifecycle.md",11965,"https:\u002F\u002Fgithub.com\u002Fspencerbeggs\u002Feffected\u002Fblob\u002Fmain\u002Fplugin\u002Fbuilds\u002Fclaude\u002Fskills\u002Fgithub-app-tokens\u002Freferences\u002Ftoken-lifecycle.md",[57,64,71,78,85,92],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"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":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"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":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"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":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"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":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"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":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"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",[],[]]