Treat this SKILL.md as an entry point; for details, read the relevant file under references .
This skill covers the basic rules for GitHub operations in general.
When to use
- Handle GitHub issues / PRs / comments / reviews.
- Check GitHub repository metadata and remote context.
- An AI agent posts using GitHub App bot credentials.
~/.agents/credentials/githubto determine whether it exists and how to set it up.- Handle gitleaks detection on commit / push.
Write gate
GitHub by AI agent Writesare performed only after a full bot preflight succeeds before the first write within the same session.
The caller sets a unique AI_AGENT_GITHUB_SESSION_ID . For subsequent writes with a valid session marker, the installation token is also reissued each time.
If the session ID is not set, run a full preflight for each write. If preflight fails, show the setup steps and stop; falling back to human gh / GH_TOKEN is prohibited.
Details: preflight-write-gate.md
How to read further
- First basic-policy.md .
- Before writing to GitHub, read preflight-write-gate.md .
- If you want to check the GitHub operation target, read repository-context.md .
- If you want to set up or check for GitHub App credentials, read github-app-credentials.md .
- If you want to post an Issue / PR comment or PR review, read bot-comment-review.md .
- If you want to write a URL in a description, comment, or reply, read description-comment-links.md .
- If you want to handle gitleaks detection, read gitleaks.md .
- Before completing work, check checklist.md .
Reference files
- basic-policy.md: Basic policy for GitHub operations and secret handling
- preflight-write-gate.md: List of bot preflight and write helpers before writing
- repository-context.md: Check remote for operation target
- github-app-credentials.md: GitHub App credential setup and user remaining tasks
- bot-comment-review.md: How to use the bot comment / review script
- description-comment-links.md: Steps to make URLs in descriptions and comments link-formatted
- rollout.md: Steps for phased introduction into local / CI
- gitleaks.md: Prohibitions and response when gitleaks detects something
- checklist.md: Checklist before completing work