You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: claude-agent-github-wiki/README.md
+15-38Lines changed: 15 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
-
# GitHub repository analyzer with Claude Agent SDK
1
+
# GitHub repository analyzer agent using Claude and Trigger.dev
2
2
3
-
AI-powered repository analyzer that lets you ask questions about any public GitHub repository. Uses Anthropic's Claude Agent SDK with agentic tools to explore codebases and provide detailed answers, with real-time streaming responses to the frontend via Trigger.dev.
3
+
This demo shows how to build a simple AI-powered repository analyzer that lets you ask questions about any public GitHub repository, using [Trigger.dev](https://trigger.dev/) for workflow orchestration, streaming, and showing progress on the frontend and [Anthropic's Claude Agent SDK](https://platform.claude.com/docs/en/agent-sdk/overview) for the agentic loop.
4
4
5
-
## Tech Stack
5
+
## Tech stack
6
6
7
-
-[**Next.js**](https://nextjs.org/) – React framework with App Router
7
+
-[**Next.js**](https://nextjs.org/) – Frontend framework using the App Router
8
8
-[**Claude Agent SDK**](https://platform.claude.com/docs/en/agent-sdk/overview) – Anthropic's SDK for building AI agents; provides an agentic loop with shell, file, and search tools
9
9
-[**Trigger.dev**](https://trigger.dev/) – runs the agent in a long-running background task with real-time streaming to the frontend
10
10
@@ -16,7 +16,7 @@ AI-powered repository analyzer that lets you ask questions about any public GitH
16
16
-**Trigger.dev Realtime streaming** – Watch Claude's analysis stream in as it's generated
17
17
-**Progress tracking using Trigger.dev Realtime** – See clone status, analysis progress, and repo size
18
18
19
-
## Setup & Running Locally
19
+
## Setup & running locally
20
20
21
21
1.**Clone the repository**
22
22
@@ -39,11 +39,11 @@ AI-powered repository analyzer that lets you ask questions about any public GitH
39
39
40
40
Fill in the required variables:
41
41
42
-
-`TRIGGER_SECRET_KEY` – Get from [Trigger.dev dashboard](https://cloud.trigger.dev/)
42
+
-`TRIGGER_SECRET_KEY` – Get this from the[Trigger.dev dashboard](https://cloud.trigger.dev/)
43
43
-`TRIGGER_PROJECT_REF` – Your Trigger.dev project ref (starts with `proj_`)
44
-
-`ANTHROPIC_API_KEY` – Get from [Anthropic Console](https://console.anthropic.com/)
44
+
-`ANTHROPIC_API_KEY` – Get this from the[Anthropic Console](https://console.anthropic.com/)
45
45
46
-
4.**Start development servers**
46
+
4.**Start the development servers**
47
47
48
48
```bash
49
49
# Terminal 1: Start Next.js dev server
@@ -55,49 +55,26 @@ AI-powered repository analyzer that lets you ask questions about any public GitH
55
55
56
56
Open [http://localhost:3000](http://localhost:3000)
57
57
58
-
## How It Works
58
+
## How it works
59
59
60
60
Trigger.dev orchestrates the repository analysis through a single long-running task:
61
61
62
62
1.**`analyzeRepo`** – Main task that:
63
63
- Clones the repository to a temp directory (shallow clone for speed)
64
64
- Spawns a Claude agent with file system tools
65
-
- Streams Claude's response in real-time via Trigger.dev Realtime Streams
66
-
- Cleans up temp directory on completion or error
67
-
68
-
**Process flow:**
69
-
70
-
```
71
-
User enters GitHub URL + question
72
-
↓
73
-
API triggers analyzeRepo task
74
-
↓
75
-
Clone repo to temp directory
76
-
↓
77
-
Claude Agent SDK explores codebase with tools
78
-
↓
79
-
Response streams via Trigger.dev Realtime → Frontend
80
-
↓
81
-
Cleanup temp directory
82
-
```
83
-
84
-
**Claude's available tools:**
85
-
86
-
-**Bash** – Run shell commands to explore the repo
87
-
-**Glob** – Find files by pattern (e.g., `**/*.ts`)
88
-
-**Grep** – Search file contents with regex
89
-
-**Read** – Read file contents
90
-
91
-
## Relevant Code
65
+
- Streams Claude's response to the frontend in real-time via Trigger.dev's Realtime Streams
66
+
- Cleans up the temp directory on completion or error
0 commit comments