一键导入
pin-github-actions
Run when adding or updating GitHub Actions workflow steps. Pin every action to a commit SHA with the resolved version tag as a trailing comment.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Run when adding or updating GitHub Actions workflow steps. Pin every action to a commit SHA with the resolved version tag as a trailing comment.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Run when CLI commands or arguments change. Analyze commands and arguments for consistent patterns.
Run before marking any request complete if docs, comments, or text content changed. Use when checking or fixing spelling errors.
Run automatically whenever any markdown file is modified. Use when linting or fixing markdown formatting.
| name | pin-github-actions |
| description | Run when adding or updating GitHub Actions workflow steps. Pin every action to a commit SHA with the resolved version tag as a trailing comment. |
Every uses: step in a workflow must reference an exact commit SHA, not a tag or branch.
Append the resolved version tag as a trailing comment so the intent is clear.
Format:
uses: owner/action@<commit-sha> # vX.Y.Z
Example:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Given a tag like v4:
# Resolve the tag to a commit SHA (dereference annotated tags with ^{})
git ls-remote https://github.com/<owner>/<action>.git "refs/tags/v4" "refs/tags/v4^{}"
# Use the ^{} SHA if present (annotated tag), otherwise use the direct SHA.
# Find the exact semver tag that points to the same commit
git ls-remote https://github.com/<owner>/<action>.git "refs/tags/v4.*"
# Dereference each candidate with ^{} and match against the commit SHA above.
# Use the highest matching semver tag as the comment (e.g., # v4.1.0).
@v4, @main).uses: ./.github/workflows/...) are exempt.