About shunk031-github-cgd-identity
shunk031-github-cgd-identity is a skill for performing Git and GitHub writes in creative-graphic-design organization repositories as the designated bot account. It defines identity, credential, permission, and scope checks before changes.
Key features
- 01Bot identity for organization writes
- 02Repository and permission verification
- 03Per-command token use
- 04Bot attribution for commits
- 05Scope and approval boundaries
Use cases
- 01Create a pull request in an organization repository
- 02Push changes using the bot credential
- 03Post issue or pull request updates
- 04Stop writes when identity checks fail
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ shunk031/ skills --skill shunk031-github-cgd-identityAfter installing, type/shunk031-github-cgd-identityin Claude Code to confirm it loaded.
Details
From the project READMENote
After reading this
SKILL.md, say:🎨 I read shunk031-github-cgd-identity.
CGD Dev Identity
Overview
Perform git and gh write operations for creative-graphic-design organization repositories as the creative-graphic-design-dev machine user (user ID 176740601), not a personal account. A bot-authored PR lets a human account formally review and approve it. Because GitHub does not permit users to approve their own PRs, creating a PR with a personal account would prevent the review flow from working.
Setup
Before starting write operations, perform the following checks in the working shell and worktree. Run them as a starting procedure rather than investigating only after a failure.
-
For repository writes, confirm that
git remote get-url originpoints togithub.com/creative-graphic-design.If it does not, this skill does not apply; use normal git identity and authentication. New-machine
setup-gh-cgdbootstrap is exempt. -
Ensure that GitHub CLI has the bot account in its system credential store. On a new machine, run the interactive setup command once and authenticate in the browser as
creative-graphic-design-dev:setup-gh-cgdDo not use
gh auth switchduring agent work. It changes the active account for the whole host and can race with concurrent sessions. -
Retrieve the stored bot token by account name and pass it only to each write command that uses gh or git credentials:
GH_TOKEN="$(gh auth token --hostname github.com --user creative-graphic-design-dev)" gh pr create ... GH_TOKEN="$(gh auth token --hostname github.com --user creative-graphic-design-dev)" git pushDo not export the token into a persistent shell and do not print it. The per-command prefix keeps account selection explicit and avoids changing GitHub CLI's global active account.
-
Verify the GitHub identity and push permission for the organization repository.
gh api useronly confirms the logged-in account and cannot verify access to organization resources:GH_TOKEN="$(gh auth token --hostname github.com --user creative-graphic-design-dev)" gh api user --jq .login GH_TOKEN="$(gh auth token --hostname github.com --user creative-graphic-design-dev)" gh api repos/creative-graphic-design/<repo> --jq .permissions.pushDo not start write operations unless the first command returns
creative-graphic-design-devand the second returnstrue. -
Set the commit author to the bot for each commit command:
git -c user.name=creative-graphic-design-dev \ -c user.email=176740601+creative-graphic-design-dev@users.noreply.github.com \ commit ...Do not use
git config user.name/emailin a linked worktree: it writes to the shared.git/configand changes the author for the main checkout and concurrent worktrees as well. -
Push over HTTPS because SSH does not use the proxy in this environment. Set an explicit push URL:
git remote set-url --push origin https://github.com/creative-graphic-design/<repo>
GH_TOKEN applies to both gh and the git credential helper in the same command environment. The credential helper returns the token with the username x-access-token.
Scope
- This skill applies only to creative-graphic-design organization repositories on github.com. Do not use the stored bot credential or the bot commit identity for other hosts, organizations, or personal repositories; use normal authentication and the normal git identity there.
- Attribute every coding-agent write to a creative-graphic-design organization repository to the bot. This includes commits, pushes, PR creation and updates, PR replies, issue comments, labels, milestones, and user-requested merges.
- If any Setup verification fails, abandon the bot identity entirely: do not apply it partially, such as setting the bot commit author while the credential check failed or pushing through another account. Stop and report instead.
- The human (
shunk031) retains only PR approval in the GitHub UI and the decision to merge. Do not approve PRs as the bot.
Troubleshooting
- If
gh auth token --user creative-graphic-design-devfails or the stored credential is rejected, remove that account withgh auth logout --hostname github.com --user creative-graphic-design-dev, then rerunsetup-gh-cgd. This changes local authentication state and must be done interactively by the user. - If the identity check succeeds but repository permission is
false, grantcreative-graphic-design-devaccess to the target repository before retrying. Reauthentication is unnecessary when only repository membership changes.