vercel-labs/github-tools-agents
Add GitHub API tools to AI agents using @github-tools/sdk — AI SDK, eve, Vercel Workflow, and Chat SDK. Covers tools, presets, approval control, token scoping, and durable agents.
npx skills add https://github.com/vercel-labs/github-tools --skill github-tools-agents
Use this skill when the user wants GitHub API access from an LLM via the @github-tools/sdk package: generateText / streamText, createGithubAgent, or durable createDurableGithubAgent with the Vercel Workflow SDK.
Official docs: https://github-tools.com — paths such as /getting-started/installation, /getting-started/quick-start, /frameworks/ai-sdk, /frameworks/eve, /frameworks/vercel-workflow, /frameworks/chat-sdk, /guide/approval-control, /guide/tokens-and-auth, /api/reference. Copy-prompts for assistants are embedded on those pages.
createGithubAgent with a preset" / custom system instructions."use workflow" / crash-safe tool steps.defineDynamic / @github-tools/sdk/eve.code-review, issue-triage, repo-explorer, ci-ops, maintainer) or cherry-picked tool factories.pnpm add @github-tools/sdk ai zod
Set GITHUB_TOKEN (fine-grained PAT recommended). The SDK reads process.env.GITHUB_TOKEN when token is omitted.
import { createGithubTools } from '@github-tools/sdk'
import { generateText } from 'ai'
await generateText({
model,
tools: createGithubTools({ preset: 'code-review' }),
prompt: '…',
})
ToolLoopAgent)import { createGithubAgent } from '@github-tools/sdk'
const agent = createGithubAgent({
model: 'anthropic/claude-sonnet-4.6',
preset: 'issue-triage',
system: '…',
})
await agent.generate({ prompt: '…' })
Requires optional peers: workflow, @ai-sdk/workflow. Import from @github-tools/sdk/workflow.
import { createDurableGithubAgent } from '@github-tools/sdk/workflow'
import { getWritable } from 'workflow'
export async function run(messages: ModelMessage[], token: string) {
'use workflow'
const agent = createDurableGithubAgent({ model, token, preset: 'maintainer' })
const writable = getWritable<UIMessageChunk>()
await agent.stream({ messages, writable })
}
Limitation: Durable agents require @ai-sdk/workflow and WorkflowChatTransport on the client for resumable streams. For predicate/once approval policies, use eve agents.
Requires optional peers: eve, **ai v7. Import from @github-tools/sdk/eve`.
// agent/tools/github.ts
import { createGithubTools } from '@github-tools/sdk/eve'
export default createGithubTools({ preset: 'code-review' })
See ./references/eve-agents.md and /frameworks/eve.
| Preset | Purpose |
|--------|---------|
| code-review | PRs, commits, files, review comments |
| issue-triage | Issues, comments, create/close |
| repo-explorer | Read-only + search + gists/workflows reads |
| ci-ops | Actions workflows, runs, trigger/cancel/rerun |
| maintainer | All tools |
Array presets merge: preset: ['code-review', 'issue-triage'].
requireApproval: false or per-tool overrides.Each packaged tool uses a named module-level "use step" function so individual GitHub calls register as workflow steps when running under the Workflow SDK. See ./references/durable-workflows.md.
Each reference file includes YAML frontmatter with name, description, and tags for searchability. Use the search script available in scripts/search_references.py to quickly find relevant references by tag or keyword.
# List all references with metadata
python scripts/search_references.py --list
# Search by tag (exact match)
python scripts/search_references.py --tag <tag>
# Search by keyword (across name, description, tags, and content)
python scripts/search_references.py --search <query>
scripts/search_references.py: Search reference files by tag, keyword, or list all with metadataTake vercel-labs/github-tools-agents from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference pnpm.
Without those the skill loads but fails at the first command.