Open-source Paperclip plugin that brings GitHub repository management, PR/issue sync, AI-powered code reviews, and knowledge graphs into your Paperclip instance.
- 3-layer sync: webhooks (real-time) + cron every 5 min (safety net) + manual full sync
- PR ↔ Card linking: automatic detection via branch name or title patterns (CARD-123, #456)
- AI code review: 7 agent tools for reviewing PRs (diff, inline comments, verdicts)
- Repo structure cache: agents get a pre-built codebase map in one call, saving 60-90% of tokens
- Managed skill:
github-codebase-accessskill teaches agents how to navigate repos via tools - Knowledge graphs: visual repo structure, exportable as Obsidian Canvas (
.canvas) - Local DB: zero GitHub API calls when rendering UI — all data read from synced database
- Open your Paperclip instance
- Go to Settings > Plugins
- Click Install Plugin
- Enter the npm package name:
@gaud_erp/paperclip-github-manager - Wait for installation — status will change to Ready
paperclipai plugin install @gaud_erp/paperclip-github-manager- Go to Settings > Plugins > GitHub Manager > Configuration
- Enter your GitHub Personal Access Token (PAT)
- Optionally set the Default Organization to auto-discover repos on first sync
- Click Save
- Navigate to GitHub > Repositories and click Sync
repo— full access to private repositoriesread:org— list organization repositories
Configure a GitHub webhook to automatically create code review issues when PRs are opened:
- Go to your GitHub org/repo Settings → Webhooks → Add webhook
- Payload URL:
https://<your-paperclip-host>/api/plugins/cus.github-manager/webhooks/github-events - Content type:
application/json - Secret: generate one (
openssl rand -hex 32), paste in GitHub and in the plugin's Webhook Secret field - Events: select "Let me select individual events" → check Pull requests and Issues
- Click Add webhook
The webhook URL is also shown in Settings → Plugins → GitHub Manager → Webhook URL.
The plugin registers 7 tools available to Paperclip agents:
| Tool | Description |
|---|---|
github_get_repo_structure |
Get cached directory/file structure (call this FIRST) |
github_get_pull_request_diff |
Get unified diff of a PR |
github_read_file_content |
Read a file from a repository |
github_create_review_comment |
Post an inline review comment on a PR |
github_submit_pr_review |
Submit a review verdict (approve/request_changes/comment) |
github_list_repositories |
List all tracked repositories |
github_search_issues |
Search issues and PRs using GitHub search syntax |
The plugin ships a managed skill github-codebase-access that appears in your Paperclip skill library. Enable it on any agent (CEO, FoundingEngineer, etc.) to give it access to GitHub repositories without needing local filesystem access.
| Page | Description |
|---|---|
| Repositories | List synced repos, trigger sync, generate knowledge graphs |
| Pull Requests | Browse PRs with filters by repo, state, author |
| Knowledge Graphs | Generate and export repo structure graphs (Obsidian Canvas) |
| Settings | Configure GitHub PAT, default org, sync interval |
The plugin also adds a dashboard widget (GitHub Status), a detail tab on issue cards (linked PRs), and a sidebar link for quick navigation.
src/
manifest.ts — capabilities, tools, agents, skills, UI slots
worker.ts — jobs, data/action handlers, webhook registration
types.ts — shared types
db/
migrations/ — PostgreSQL schema (plugin-namespaced)
queries.ts — typed query layer
sync/
webhook-handler.ts — real-time GitHub event processing
incremental-sync.ts — cron job: fetch updates since last sync
full-sync.ts — full sync with auto-discovery
link-detector.ts — regex matching for PR ↔ card linking
github/
api-client.ts — authenticated fetch with rate-limit awareness
config.ts — token resolution (config → state → env)
review/
review-tools.ts — 7 agent tools registration
quick-check.ts — automated PR checklist
graphify/
graph-generator.ts — high-level and code-level graph generation
ui/
index.tsx — component re-exports
components/ — Settings, Repos, PRs, Graphs, Dashboard, DetailTab, Sidebar
npm install
npm run dev # watch mode
npm run build # production build
npm run typecheck # type checking
npm test # tests (vitest)Releases are published automatically to npm via GitHub Actions when a new release is created on GitHub.
npm version patch # or minor/major
git push && git push --tags
# Then create a GitHub release from the tagMIT