From ai-brain-starter
Pulls recent GitHub repository activity (merged PRs, issues, commits) into the vault as queryable markdown for knowledge graph integration.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ai-brain-starter:ingest-github <owner/repo> [--days N]<owner/repo> [--days N]The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Ingests recent GitHub repository activity into the vault as markdown the graphify pipeline can read and the rest of the AI Brain Starter substrate (decision log, session-close cascade, hooks) can act on.
Ingests recent GitHub repository activity into the vault as markdown the graphify pipeline can read and the rest of the AI Brain Starter substrate (decision log, session-close cascade, hooks) can act on.
This is the second connector in the ingest-* pattern. Adding the next external source means writing a new normalizer, not a new architecture.
/ingest-github <owner/repo> (with or without --days N)Do NOT use for:
gh CLI directly)gh pr view or the GitHub MCP)<owner>/<repo> argument, normalize to a slug (owner-repo)list_pull_requests tool (state=closed, filter to merged)list_issues (any state, since the date window)list_commitsExternal Inputs/GitHub/<owner-repo>/<YYYY-MM-DD>.mdThis skill calls a GitHub MCP for read access (list_pull_requests, list_issues, list_commits, get_pull_request). If no GitHub MCP is connected to your Claude Code install, the skill prints a clear error naming the missing MCP and instructions for connecting one (the canonical reference is the official @modelcontextprotocol/server-github package or the GitHub Copilot MCP). The skill does not silently fall back to the public REST API; it surfaces the gap so you can wire the MCP once and run the skill cleanly.
If the MCP is connected but the token lacks repo read scope, the call returns 403 and the skill reports the scope issue.
The skill is a thin orchestrator. The actual normalization runs in Python at ~/.claude/skills/ingest-github/ingest.py (or the public-repo path). The skill assembles the GitHub MCP tool calls, hands the raw payloads to ingest.py as JSON on stdin, and the script writes the file.
When invoked:
<owner>/<repo> (required), --days N (optional, default 7)list_pull_requests for the repo with state=closed, filter to PRs merged within the last N days.list_issues for the repo with since=now - N days. Filter out PRs (GitHub returns issues that are also PRs in this list; drop entries with pull_request set).list_commits for the repo with since=now - N days on the default branch.get_pull_request for full body + linked issues. Cheap to skip if you want a fast run.ingest.py as JSON on stdin.ingest.py writes the vault file and prints a summary.The vault file at External Inputs/GitHub/<owner-repo>/<YYYY-MM-DD>.md has frontmatter:
---
type: external-input
source: github
repo: <owner/repo>
date_range: <YYYY-MM-DD>..<YYYY-MM-DD>
item_count: <int>
ingested_at: <ISO 8601 timestamp>
entity_ids:
github_repo: <owner/repo>
github_pr: [<pr_number>, ...]
github_issue: [<issue_number>, ...]
---
Body is grouped by item type, each group chronologically sorted:
## Merged PRs then one ### #<number> <title> per PR with author, merged_at, body excerpt, linked issues## Issues then one ### #<number> <title> per issue with author, state, created_at, body excerpt## Commits then one ### <short_sha> <subject> per commit with author, committed_at, body excerptThe entity_ids block conforms to the cross-type frontmatter contract so downstream consumers (graph builders, fact aggregators, agents) can join GitHub items to their source records without re-parsing the body.
Re-running /ingest-github <owner/repo> --days N on the same calendar day overwrites the same vault file. The file path is keyed by date and repo slug, so the same source produces the same path across re-runs. Re-runs do not duplicate; they refresh.
A successful run produces:
External Inputs/GitHub/<owner-repo>/<date>.mdWrote N item(s) (P prs, I issues, C commits) to <path>.If the repo resolves but contains no activity in the date range, write the file anyway with item_count: 0 so re-runs are still idempotent and the absence is recorded.
npx claudepluginhub mycelium-hq/ai-brain-starter --plugin ai-brain-starterSyncs GitHub issues and PRs into a Distillery knowledge base as searchable, linkable entries. Useful for capturing traceable decisions alongside session notes.
Ingests recent Linear issues, comments, and status changes into markdown files for querying by a knowledge graph or AI Brain. Use via /ingest-linear or when the user asks to sync Linear data into the vault.