基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/abcxyz/github-token-minter --skill mint-github-token命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
Generates a Minty configuration file to allow automation accounts (Service Accounts or GitHub Actions) to access the repository.
Validates Minty configuration files using the `tools validate-cfg` command.
Imports a GitHub private key into Google Cloud KMS.
| name | mint-github-token |
| description | Exchange an OIDC token for a GitHub token using Minty. |
This skill provides instructions for exchanging an OIDC token (from Google or GitHub) for a GitHub App installation token using the Minty CLI.
gcloud CLI (for Google ID tokens) or gh CLI (for GitHub ID tokens, if applicable).To mint a token, run:
go run github.com/abcxyz/github-token-minter/cmd/minty@main tools mint \
--mintyURL <minty_server_url> \
--token <oidc_token> \
--request <request_json>
--mintyURL: The URL of the Minty server (e.g., https://minty.example.com).--token: The OIDC token to exchange.--request: A JSON string containing the token request details (e.g., repositories and permissions).[!NOTE] If these arguments are not provided or known from context (e.g., the Minty URL), ask the user for them.
To use a Google Service Account (impersonation):
# Get the ID token
export OIDC_TOKEN=$(gcloud auth print-identity-token --impersonate-service-account <sa-email> --audiences <minty-audience>)
# Run minter
go run github.com/abcxyz/github-token-minter/cmd/minty@main tools mint \
--mintyURL <url> \
--token $OIDC_TOKEN \
--request '{"repositories": ["my-repo"], "permissions": {"contents": "read"}}'
To use your GitHub identity, you must obtain an OIDC token (JWT), not a standard opaque personal access token.
gh can generate OIDC tokens in these environments.gh auth token typically returns an opaque token (e.g., ghp_...), which will not work if Minty requires OIDC.
gh returns a JWT requires specific configuration (e.g., enterprise managed users or specific auth flows).# 1. Get Token
export TOKEN=$(gcloud auth print-identity-token \
--impersonate-service-account minty-client@my-project.iam.gserviceaccount.com \
--audiences "https://minty.abcxyz.dev")
# 2. Request GitHub Token
go run github.com/abcxyz/github-token-minter/cmd/minty@main tools mint \
--mintyURL "https://minty-service-url" \
--token "$TOKEN" \
--request '{"repositories": ["github-token-minter"], "permissions": {"issues": "write"}}'