docs/guides/example-projects/claude-github-wiki.mdx
This demo shows how to build an AI agent using the Claude Agent SDK that clones any public GitHub repo and uses Claude to answer questions about its codebase. The agent explores the code using Grep and Read tools to provide detailed, accurate answers.
<video controls className="w-full aspect-video" src="https://github.com/user-attachments/assets/ff89ae41-0488-4d1c-aa7d-4dad15cefc12"
</video>
<Card title="View the Claude GitHub wiki agent repo" icon="GitHub" href="https://github.com/triggerdotdev/examples/tree/main/claude-agent-github-wiki"
Click here to view the full code for this project in our examples repository on GitHub. You can fork it and use it as a starting point for your own project. </Card>
The agent workflow:
Grep – Search for patterns across filesRead – Read file contentsGrep and Read tools| File | Description |
|---|---|
trigger/analyze-repo.ts | Main task that clones repo, runs Claude agent, and streams response |
trigger/agent-stream.ts | Typed stream definition for real-time text responses |
app/api/analyze-repo/route.ts | API endpoint that triggers the task |
app/response/[runId]/page.tsx | Real-time streaming display with progress |
You need to mark the Claude Agent SDK as external in your trigger.config.ts file.
import { defineConfig } from "@trigger.dev/sdk";
export default defineConfig({
project: process.env.TRIGGER_PROJECT_REF!,
runtime: "node",
logLevel: "log",
maxDuration: 3600, // 60 minutes for large repos
build: {
external: ["@anthropic-ai/claude-agent-sdk"],
},
machine: "medium-2x",
});