Skip to content

Commit 580475e

Browse files
committed
Updated the readme
1 parent 036f5e1 commit 580475e

1 file changed

Lines changed: 15 additions & 38 deletions

File tree

claude-agent-github-wiki/README.md

Lines changed: 15 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# GitHub repository analyzer with Claude Agent SDK
1+
# GitHub repository analyzer agent using Claude and Trigger.dev
22

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.
44

5-
## Tech Stack
5+
## Tech stack
66

7-
- [**Next.js**](https://nextjs.org/)React framework with App Router
7+
- [**Next.js**](https://nextjs.org/)Frontend framework using the App Router
88
- [**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
99
- [**Trigger.dev**](https://trigger.dev/) – runs the agent in a long-running background task with real-time streaming to the frontend
1010

@@ -16,7 +16,7 @@ AI-powered repository analyzer that lets you ask questions about any public GitH
1616
- **Trigger.dev Realtime streaming** – Watch Claude's analysis stream in as it's generated
1717
- **Progress tracking using Trigger.dev Realtime** – See clone status, analysis progress, and repo size
1818

19-
## Setup & Running Locally
19+
## Setup & running locally
2020

2121
1. **Clone the repository**
2222

@@ -39,11 +39,11 @@ AI-powered repository analyzer that lets you ask questions about any public GitH
3939

4040
Fill in the required variables:
4141

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/)
4343
- `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/)
4545

46-
4. **Start development servers**
46+
4. **Start the development servers**
4747

4848
```bash
4949
# Terminal 1: Start Next.js dev server
@@ -55,49 +55,26 @@ AI-powered repository analyzer that lets you ask questions about any public GitH
5555

5656
Open [http://localhost:3000](http://localhost:3000)
5757

58-
## How It Works
58+
## How it works
5959

6060
Trigger.dev orchestrates the repository analysis through a single long-running task:
6161

6262
1. **`analyzeRepo`** – Main task that:
6363
- Clones the repository to a temp directory (shallow clone for speed)
6464
- 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
67+
68+
## Relevant code
9269

9370
- **Main analysis task** – Clones repo, runs Claude agent, streams response ([`trigger/analyze-repo.ts`](trigger/analyze-repo.ts))
9471
- **Stream definition** – Typed stream for real-time text responses ([`trigger/agent-stream.ts`](trigger/agent-stream.ts))
95-
- **API endpoint** – Triggers the task and returns access token ([`app/api/analyze-repo/route.ts`](app/api/analyze-repo/route.ts))
72+
- **API endpoint** – Triggers the task and returns a public access token ([`app/api/analyze-repo/route.ts`](app/api/analyze-repo/route.ts))
9673
- **Response page** – Real-time streaming display with progress ([`app/response/[runId]/page.tsx`](app/response/[runId]/page.tsx))
9774
- **Landing page** – Repository URL input with example repos ([`app/page.tsx`](app/page.tsx))
9875
- **Trigger.dev config** – Project settings with external SDK bundle ([`trigger.config.ts`](trigger.config.ts))
9976

100-
## Learn More
77+
## Learn more
10178

10279
- [**Trigger.dev Realtime Streams**](https://trigger.dev/docs/realtime/streams) – Stream data from tasks to your frontend
10380
- [**Trigger.dev React Hooks**](https://trigger.dev/docs/realtime/react-hooks/overview)`useRealtimeStream` for consuming streams

0 commit comments

Comments
 (0)