[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6ADEF9Z14DAT3R3HJS80MBA":3,"skill-same:01M6ADEF9Z14DAT3R3HJS80MBA":63},{"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":23,"publishedAt":32,"linkOnly":33,"markdownContent":34,"markdownBody":35,"frontMatter":36,"refName":40,"commitSha":41,"skillDirectory":42,"forksCount":43,"repositoryHtmlUrl":44,"repositoryHomepageUrl":6,"ownerHtmlUrl":45,"ownerBlogUrl":46,"ownerDescription":47,"updatedAt":48,"install":49,"resources":62},"01M6ADEF9Z14DAT3R3HJS80MBA","gh-actions-lock",null,"Locks and verifies GitHub Actions workflow dependencies with gh-actions-lock. Use when onboarding a repository to .github\u002Fworkflows\u002Factions.lock, fixing or relocking the lockfile, verifying it in CI, reading its findings, or whenever a user mentions actions.lock, gh actions-lock, or pinning workflow dependencies.","github\u002Fgh-actions-lock","github","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F9919?v=4","01M6AC83DS133TPXFSP1DHNCC6","GitHub","01M6ADEDT55P7ZANMPS89E99S7",313,"MIT","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-actions-lock\u002Fblob\u002Fmain\u002Fskills\u002Fgh-actions-lock\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000038","人力资源","PROFESSION","适用职业",[24,25,9,26,27,28,29,30,31],"actions","gh actions lock","workflow","workflows","onboarding","repository","ci","github actions","2026-11-10 10:12:30",false,"---\nname: gh-actions-lock\ndescription: >\n  Locks and verifies GitHub Actions workflow dependencies with gh-actions-lock.\n  Use when onboarding a repository to .github\u002Fworkflows\u002Factions.lock, fixing or\n  relocking the lockfile, verifying it in CI, reading its findings, or whenever a\n  user mentions actions.lock, gh actions-lock, or pinning workflow dependencies.\nlicense: MIT\nmetadata:\n  author: github\n  version: \"0.1.0\"\n---\n\n# gh-actions-lock\n\n`gh actions-lock` is a [GitHub CLI](https:\u002F\u002Fcli.github.com\u002F) extension that pins every direct and\ntransitive action a repository's workflows use to a verified commit, recorded in\n`.github\u002Fworkflows\u002Factions.lock`. It is pre-1.0: flags and behavior can change between releases.\n\n## Setup\n\nRequires an authenticated GitHub CLI. github.com and GitHub Enterprise Cloud with data residency\n(`*.ghe.com`) are supported; GitHub Enterprise Server is not.\n\n```bash\ngh extension install github\u002Fgh-actions-lock\n```\n\nRun every command from the repository checkout. The host comes from `--hostname`, then `GH_HOST`,\nthen the repository remote, then github.com.\n\n## Modes\n\n| Command | Writes | Network | Use for |\n|---|---|---|---|\n| `gh actions-lock` | yes | yes | onboarding and fixing the lockfile |\n| `gh actions-lock --relock` | yes | yes | advancing moved refs to current upstream commits |\n| `gh actions-lock --verify` | no | yes | CI: same checks as a fix run, fails on anything blocking |\n| `gh actions-lock --verify-local` | no | no | pre-commit: every `uses:` has a lockfile entry |\n| `gh actions-lock --no-fix` | no | yes | read-only report |\n\n`--verify-local` only checks coverage, not that entries are trustworthy. Use `--verify` in CI.\n`--verify` and `--verify-local` are mutually exclusive, and `--verify-local` cannot be combined\nwith `--relock` or `--accept-moved`.\n\nPass workflow paths to scope a run: `gh actions-lock .github\u002Fworkflows\u002Fci.yml`. Only a\nfull-directory run prunes entries for deleted workflows.\n\n## Onboarding and fixing\n\n```bash\ngh actions-lock                 # pin every resolvable action and write actions.lock\ngh actions-lock --verify        # confirm\ngit add .github\u002Fworkflows\u002F\n```\n\n- Rerun after adding a workflow or changing any `uses:`. Locked pins are sticky: a plain run only\n  resolves refs the lockfile doesn't record yet.\n- Partial versions (`v4`) are narrowed to the highest matching full tag (`v4.2.1`) when first\n  pinned. `--no-narrow` keeps them as written.\n- Writes are all or nothing. If any error remains that the run can't fix, it changes nothing,\n  not even for workflows that are otherwise fine.\n- Commit `actions.lock` together with any workflow edits the run made.\n\n**Local `.\u002F…` actions.** The CLI never follows, locks or rewrites a workspace path. When a local\naction in the checkout uses remote actions, every mode reports a blocking `local-action` error.\nFix it with one of:\n\n```bash\ngh actions-lock --migrate-local-actions   # rewrite same-repo .\u002F… to $\u002F… so they get locked\ngh actions-lock --ignore-local-actions    # keep .\u002F… and downgrade it to a warning\n```\n\n`$\u002F…` refers to the same repository at the running commit and needs no lockfile entry. A `.\u002F…`\ninside a remote composite can't be rewritten, so only `--ignore-local-actions` applies there.\n\n## Relocking and moved refs\n\n```bash\ngh actions-lock --relock        # re-resolve every ref to its current upstream commit\n```\n\n`--relock` advances floating refs (`main`, `v4`), fixes `tag-commit-mismatch`, and rebuilds each\ncomposite's dependencies from its manifest. It leaves `unreachable-pin` as an error: the locked\ncommit is no longer in the ref's history, which is either an upstream force-push or an edited\nlockfile, and the CLI can't tell which.\n\n`--accept-moved` accepts those pins at their current commit. **It is a human decision.** Only\nrun it after the user has checked why the commit moved, and never in CI, scheduled jobs, or other\nautomation, where it would silently accept a tampered pin.\n\n## Exit codes and JSON\n\n| Code | Meaning |\n|---|---|\n| 0 | Nothing to fix, or every finding was fixed |\n| 1 | Blocking findings remain; the report is well-formed |\n| 2 | The tool itself failed (bad flag, IO, auth, malformed lockfile); read stderr |\n\n```bash\ngh actions-lock --verify --json 2>\u002Fdev\u002Fnull\n```\n\nJSON goes to stdout and progress to stderr; parse only stdout. `--json` alone selects\n`valid,findings,workflows`. Pass a list to choose from `valid`, `findings`, `workflows`,\n`dependencies`, and `pins`. Each finding has:\n\n```\nworkflow, category, severity (\"error\" | \"warning\" | \"info\"), confidence,\ndependency, required_by, detail, remediation, doc_url, retryable\n```\n\nA run is invalid exactly when some finding has severity `error`; warnings and info never block.\n`retryable: true` means GitHub was unreachable or rate-limited: rerun later rather than editing\nanything.\n\n## Reading findings\n\nAct on each finding's `remediation`, and open its `doc_url` before deciding. Don't guess from the\ncategory name alone.\n\n| Category | Usual next step |\n|---|---|\n| `not-pinned`, `stale`, `ref-changed`, `repo-renamed` | `gh actions-lock` |\n| `ref-moved`, `tag-commit-mismatch`, `incomplete-lockfile` | `gh actions-lock --relock` |\n| `unreachable-pin` | stop and ask the user; see `--accept-moved` above |\n| `misleading-sha`, `repo-replaced` | stop and ask the user; don't relock or accept |\n| `ref-missing`, `invalid-workflow`, `invalid-self-repository-ref` | fix the workflow source |\n| `repo-unavailable` | deleted, or the token can't read it; check access |\n| `ancestry-unknown`, `reachability-unknown` | retryable; rerun later |\n| `local-action` | see local actions above |\n| `container-image`, `version-ref`, `fresh-tag` | non-blocking; mention to the user |\n\n## CI\n\nCopy [`.github\u002Fworkflows\u002Fverify-lockfile.yml`](https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-actions-lock\u002Fblob\u002Fmain\u002F.github\u002Fworkflows\u002Fverify-lockfile.yml)\ninto the repository, then run `gh actions-lock` once so the new workflow is locked too. It runs\n`gh actions-lock --verify` on pull requests, pushes to `main`, and a weekly schedule that catches\nre-pointed tags. The job's `GITHUB_TOKEN` reads public actions and the repository itself; actions\nfrom other private or internal repositories need a token that can read them.\n\n## Limits\n\n- Reusable workflows called at `jobs.\u003Cid>.uses` from another repository are not locked.\n- Local `.\u002F…` actions and their dependencies are outside lockfile coverage.\n- Container images are not pinned; anything without an `@sha256:` digest is a warning.\n- A floating ref locked to an older commit in its history isn't detected. Review lockfile diffs or\n  pin exact tags.\n\n## Learn more\n\n`gh actions-lock --help` is authoritative for flags. Failed runs print the path of a saved run\nlog; attach it to bug reports. Start from these, plus each finding's `doc_url`:\n\n- [Workflow dependency lockfiles](https:\u002F\u002Fdocs.github.com\u002Fen\u002Factions\u002Fconcepts\u002Fsecurity\u002Fworkflow-dependency-lockfiles)\n- [Lock workflow dependencies](https:\u002F\u002Fdocs.github.com\u002Fen\u002Factions\u002Fhow-tos\u002Fsecure-your-work\u002Flock-workflow-dependencies)\n- [Enforce workflow lockfiles](https:\u002F\u002Fdocs.github.com\u002Fen\u002Factions\u002Fhow-tos\u002Fadminister\u002Fenforce-workflow-lockfiles)\n- [Control workflow execution](https:\u002F\u002Fdocs.github.com\u002Fen\u002Factions\u002Fhow-tos\u002Fadminister\u002Fcontrol-workflow-execution)\n- [Troubleshooting](https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-actions-lock\u002Fblob\u002Fmain\u002Fdocs\u002Ftroubleshooting.md)\n  and the [README](https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-actions-lock#readme)\n","# gh-actions-lock\n\n`gh actions-lock` is a [GitHub CLI](https:\u002F\u002Fcli.github.com\u002F) extension that pins every direct and\ntransitive action a repository's workflows use to a verified commit, recorded in\n`.github\u002Fworkflows\u002Factions.lock`. It is pre-1.0: flags and behavior can change between releases.\n\n## Setup\n\nRequires an authenticated GitHub CLI. github.com and GitHub Enterprise Cloud with data residency\n(`*.ghe.com`) are supported; GitHub Enterprise Server is not.\n\n```bash\ngh extension install github\u002Fgh-actions-lock\n```\n\nRun every command from the repository checkout. The host comes from `--hostname`, then `GH_HOST`,\nthen the repository remote, then github.com.\n\n## Modes\n\n| Command | Writes | Network | Use for |\n|---|---|---|---|\n| `gh actions-lock` | yes | yes | onboarding and fixing the lockfile |\n| `gh actions-lock --relock` | yes | yes | advancing moved refs to current upstream commits |\n| `gh actions-lock --verify` | no | yes | CI: same checks as a fix run, fails on anything blocking |\n| `gh actions-lock --verify-local` | no | no | pre-commit: every `uses:` has a lockfile entry |\n| `gh actions-lock --no-fix` | no | yes | read-only report |\n\n`--verify-local` only checks coverage, not that entries are trustworthy. Use `--verify` in CI.\n`--verify` and `--verify-local` are mutually exclusive, and `--verify-local` cannot be combined\nwith `--relock` or `--accept-moved`.\n\nPass workflow paths to scope a run: `gh actions-lock .github\u002Fworkflows\u002Fci.yml`. Only a\nfull-directory run prunes entries for deleted workflows.\n\n## Onboarding and fixing\n\n```bash\ngh actions-lock                 # pin every resolvable action and write actions.lock\ngh actions-lock --verify        # confirm\ngit add .github\u002Fworkflows\u002F\n```\n\n- Rerun after adding a workflow or changing any `uses:`. Locked pins are sticky: a plain run only\n  resolves refs the lockfile doesn't record yet.\n- Partial versions (`v4`) are narrowed to the highest matching full tag (`v4.2.1`) when first\n  pinned. `--no-narrow` keeps them as written.\n- Writes are all or nothing. If any error remains that the run can't fix, it changes nothing,\n  not even for workflows that are otherwise fine.\n- Commit `actions.lock` together with any workflow edits the run made.\n\n**Local `.\u002F…` actions.** The CLI never follows, locks or rewrites a workspace path. When a local\naction in the checkout uses remote actions, every mode reports a blocking `local-action` error.\nFix it with one of:\n\n```bash\ngh actions-lock --migrate-local-actions   # rewrite same-repo .\u002F… to $\u002F… so they get locked\ngh actions-lock --ignore-local-actions    # keep .\u002F… and downgrade it to a warning\n```\n\n`$\u002F…` refers to the same repository at the running commit and needs no lockfile entry. A `.\u002F…`\ninside a remote composite can't be rewritten, so only `--ignore-local-actions` applies there.\n\n## Relocking and moved refs\n\n```bash\ngh actions-lock --relock        # re-resolve every ref to its current upstream commit\n```\n\n`--relock` advances floating refs (`main`, `v4`), fixes `tag-commit-mismatch`, and rebuilds each\ncomposite's dependencies from its manifest. It leaves `unreachable-pin` as an error: the locked\ncommit is no longer in the ref's history, which is either an upstream force-push or an edited\nlockfile, and the CLI can't tell which.\n\n`--accept-moved` accepts those pins at their current commit. **It is a human decision.** Only\nrun it after the user has checked why the commit moved, and never in CI, scheduled jobs, or other\nautomation, where it would silently accept a tampered pin.\n\n## Exit codes and JSON\n\n| Code | Meaning |\n|---|---|\n| 0 | Nothing to fix, or every finding was fixed |\n| 1 | Blocking findings remain; the report is well-formed |\n| 2 | The tool itself failed (bad flag, IO, auth, malformed lockfile); read stderr |\n\n```bash\ngh actions-lock --verify --json 2>\u002Fdev\u002Fnull\n```\n\nJSON goes to stdout and progress to stderr; parse only stdout. `--json` alone selects\n`valid,findings,workflows`. Pass a list to choose from `valid`, `findings`, `workflows`,\n`dependencies`, and `pins`. Each finding has:\n\n```\nworkflow, category, severity (\"error\" | \"warning\" | \"info\"), confidence,\ndependency, required_by, detail, remediation, doc_url, retryable\n```\n\nA run is invalid exactly when some finding has severity `error`; warnings and info never block.\n`retryable: true` means GitHub was unreachable or rate-limited: rerun later rather than editing\nanything.\n\n## Reading findings\n\nAct on each finding's `remediation`, and open its `doc_url` before deciding. Don't guess from the\ncategory name alone.\n\n| Category | Usual next step |\n|---|---|\n| `not-pinned`, `stale`, `ref-changed`, `repo-renamed` | `gh actions-lock` |\n| `ref-moved`, `tag-commit-mismatch`, `incomplete-lockfile` | `gh actions-lock --relock` |\n| `unreachable-pin` | stop and ask the user; see `--accept-moved` above |\n| `misleading-sha`, `repo-replaced` | stop and ask the user; don't relock or accept |\n| `ref-missing`, `invalid-workflow`, `invalid-self-repository-ref` | fix the workflow source |\n| `repo-unavailable` | deleted, or the token can't read it; check access |\n| `ancestry-unknown`, `reachability-unknown` | retryable; rerun later |\n| `local-action` | see local actions above |\n| `container-image`, `version-ref`, `fresh-tag` | non-blocking; mention to the user |\n\n## CI\n\nCopy [`.github\u002Fworkflows\u002Fverify-lockfile.yml`](https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-actions-lock\u002Fblob\u002Fmain\u002F.github\u002Fworkflows\u002Fverify-lockfile.yml)\ninto the repository, then run `gh actions-lock` once so the new workflow is locked too. It runs\n`gh actions-lock --verify` on pull requests, pushes to `main`, and a weekly schedule that catches\nre-pointed tags. The job's `GITHUB_TOKEN` reads public actions and the repository itself; actions\nfrom other private or internal repositories need a token that can read them.\n\n## Limits\n\n- Reusable workflows called at `jobs.\u003Cid>.uses` from another repository are not locked.\n- Local `.\u002F…` actions and their dependencies are outside lockfile coverage.\n- Container images are not pinned; anything without an `@sha256:` digest is a warning.\n- A floating ref locked to an older commit in its history isn't detected. Review lockfile diffs or\n  pin exact tags.\n\n## Learn more\n\n`gh actions-lock --help` is authoritative for flags. Failed runs print the path of a saved run\nlog; attach it to bug reports. Start from these, plus each finding's `doc_url`:\n\n- [Workflow dependency lockfiles](https:\u002F\u002Fdocs.github.com\u002Fen\u002Factions\u002Fconcepts\u002Fsecurity\u002Fworkflow-dependency-lockfiles)\n- [Lock workflow dependencies](https:\u002F\u002Fdocs.github.com\u002Fen\u002Factions\u002Fhow-tos\u002Fsecure-your-work\u002Flock-workflow-dependencies)\n- [Enforce workflow lockfiles](https:\u002F\u002Fdocs.github.com\u002Fen\u002Factions\u002Fhow-tos\u002Fadminister\u002Fenforce-workflow-lockfiles)\n- [Control workflow execution](https:\u002F\u002Fdocs.github.com\u002Fen\u002Factions\u002Fhow-tos\u002Fadminister\u002Fcontrol-workflow-execution)\n- [Troubleshooting](https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-actions-lock\u002Fblob\u002Fmain\u002Fdocs\u002Ftroubleshooting.md)\n  and the [README](https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-actions-lock#readme)\n",{"name":5,"license":15,"metadata":37,"description":39},{"author":9,"version":38},"0.1.0","Locks and verifies GitHub Actions workflow dependencies with gh-actions-lock. Use when onboarding a repository to .github\u002Fworkflows\u002Factions.lock, fixing or relocking the lockfile, verifying it in CI, reading its findings, or whenever a user mentions actions.lock, gh actions-lock, or pinning workflow dependencies.\n","main","113f91d77e0af03838b6ae3bef0e038cbab4c696","skills\u002Fgh-actions-lock",24,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-actions-lock","https:\u002F\u002Fgithub.com\u002Fgithub","https:\u002F\u002Fgithub.com\u002Fabout","How people build software.","2026-11-11 09:34:35",{"source":8,"skillName":5,"commands":50,"prompt":60,"zipAvailable":61},[51,54,57],{"tool":52,"command":53},"npx","npx skills add github\u002Fgh-actions-lock --skill gh-actions-lock",{"tool":55,"command":56},"bunx","bunx skills add github\u002Fgh-actions-lock --skill gh-actions-lock",{"tool":58,"command":59},"pnpm","pnpm dlx skills add github\u002Fgh-actions-lock --skill gh-actions-lock","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-actions-lock\u002Fblob\u002Fmain\u002Fskills\u002Fgh-actions-lock\u002FSKILL.md",true,[],[]]