# Kf G Github Operations Bot Workflow

> Use this skill whenever working with GitHub issues, pull requests, comments, reviews, repository metadata, or agent-authored GitHub activity. Always use it before posting GitHub comments or reviews, writing or updating PR or issue descriptions, turning URLs into Markdown links in those texts, checking remote repository context, or deciding whether GitHub App bot credentials are available.

- Skill: `melumuccu/kf-g-github-operations-bot-workflow` (Agent Skill, multi-file: 27 files)
- Install (CLI): `npx skillmds@latest add melumuccu/kf-g-github-operations-bot-workflow`
- Raw SKILL.md: https://api.skillmd.com/api/skills/melumuccu/kf-g-github-operations-bot-workflow/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: melumuccu (https://skillmd.com/u/melumuccu)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/melumuccu/kf-g-github-operations-bot-workflow

---


# GitHub 操作と AI agent bot 投稿

この SKILL.md は入口として扱い、詳細は `references` 配下の該当ファイルを読む。
この skill は GitHub 操作全般の基本ルールを扱う。

## 使う場面

- GitHub issue / PR / comment / review を扱う。
- GitHub repository metadata や remote context を確認する。
- AI agent が GitHub App bot credential で投稿する。
- `~/.agents/credentials/github` の有無や setup 方法を判断する。
- commit / push 時の gitleaks 検知を扱う。

## 書き込み gate

AI agent による GitHub **書き込み**は、同一 session 内で最初の書き込み前の完全 bot preflight 成功後にのみ実行する。
呼出元は一意な `AI_AGENT_GITHUB_SESSION_ID` を設定する。有効な session marker がある後続書き込みも installation token は毎回再発行する。
session ID 未設定時は各書き込みで完全 preflight を実行する。preflight 失敗時は setup 手順を表示して停止し、人間 `gh` / `GH_TOKEN` への fallback は禁止。

詳細: [preflight-write-gate.md](references/preflight-write-gate.md)

## 読み進め方

1. まず [basic-policy.md](references/basic-policy.md) を読む。
1. GitHub 書き込み前に [preflight-write-gate.md](references/preflight-write-gate.md) を読む。
1. GitHub 操作先を確認するなら [repository-context.md](references/repository-context.md) を読む。
1. GitHub App credential の setup や有無を確認するなら [github-app-credentials.md](references/github-app-credentials.md) を読む。
1. Issue / PR comment または PR review を投稿するなら [bot-comment-review.md](references/bot-comment-review.md) を読む。
1. description、comment、reply に URL を書くなら [description-comment-links.md](references/description-comment-links.md) を読む。
1. gitleaks 検知を扱うなら [gitleaks.md](references/gitleaks.md) を読む。
1. 作業完了前に [checklist.md](references/checklist.md) を確認する。

## 参照ファイル

- [basic-policy.md](references/basic-policy.md): GitHub 操作と secret 取り扱いの基本方針
- [preflight-write-gate.md](references/preflight-write-gate.md): 書き込み前 bot preflight と write helper 一覧
- [repository-context.md](references/repository-context.md): 操作先 remote 確認
- [github-app-credentials.md](references/github-app-credentials.md): GitHub App credential の setup とユーザ残作業
- [bot-comment-review.md](references/bot-comment-review.md): bot comment / review script の使い方
- [description-comment-links.md](references/description-comment-links.md): description と comment の URL をリンク形式にする手順
- [rollout.md](references/rollout.md): ローカル / CI への段階導入手順
- [gitleaks.md](references/gitleaks.md): gitleaks 検知時の禁止事項と対応
- [checklist.md](references/checklist.md): 作業完了前の確認項目

