Skip to content

Commit 53ea8c4

Browse files
committed
Updated readmes with consistent template
1 parent 540272a commit 53ea8c4

2 files changed

Lines changed: 49 additions & 111 deletions

File tree

changelog-generator/README.md

Lines changed: 21 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,19 @@
1-
# Changelog Generator using Claude Agent SDK and Trigger.dev
1+
# Changelog generator using theClaude Agent SDK and Trigger.dev
22

3-
Generate changelogs from GitHub commits using AI with a two-phase approach: scan commits first, then selectively fetch diffs for unclear changes.
4-
5-
## Demo video
6-
7-
<video src="https://content.trigger.dev/claude-changelog-generator.mp4" controls autoplay loop muted width="100%"></video>
3+
An AI agent that explores GitHub commits, investigates unclear changes by fetching diffs on demand, and generates developer-friendly changelogs. Built with the Claude Agent SDK and Trigger.dev.
84

95
## Tech Stack
106

117
- **[Next.js](https://nextjs.org)** – Frontend framework using App Router
128
- **[Claude Agent SDK](https://github.com/anthropics/claude-agent-sdk)** – Anthropic's agent SDK for building AI agents with custom tools
13-
- **[Trigger.dev](https://trigger.dev)** – Background task orchestration with real-time streaming to the frontend
14-
- **[Octokit](https://github.com/octokit/octokit.js)** – GitHub API client
9+
- **[Trigger.dev](https://trigger.dev)** – Background task orchestration with real-time streaming to the frontend, observability, and deployment.
10+
- **[Octokit](https://github.com/octokit/octokit.js)** – GitHub API client for fetching commits and diffs.
1511

16-
## Features
12+
## Demo
1713

18-
- **Two-phase intelligent analysis**:
19-
1. Claude first lists all commits in the date range
20-
2. For unclear commits ("fix bug", "update"), Claude requests the actual diff
21-
3. Generates grouped changelog with full context
22-
- **Custom MCP tools** – Claude can call `list_commits` and `get_commit_diff` on demand
23-
- **Private repo support** – Optional GitHub token for private repositories
24-
- **Real-time streaming** – Watch the changelog generate live
25-
26-
## How It Works
27-
28-
```
29-
User enters repo URL + date range
30-
31-
API triggers generate-changelog task
32-
33-
Claude Agent SDK with custom GitHub tools:
34-
- list_commits: fetches commit messages via GitHub API
35-
- get_commit_diff: fetches diff for specific commit SHA
36-
37-
Claude explores commits, requests diffs as needed
38-
39-
Generates grouped changelog
40-
41-
Streams to frontend via Trigger.dev Realtime
42-
```
43-
44-
## Setup
14+
<video src="https://content.trigger.dev/claude-changelog-generator.mp4" controls autoplay loop muted width="100%"></video>
15+
16+
## Running the project locally
4517

4618
1. **Install dependencies**
4719

@@ -55,8 +27,6 @@ Streams to frontend via Trigger.dev Realtime
5527
cp .env.example .env
5628
```
5729

58-
Fill in:
59-
6030
- `TRIGGER_SECRET_KEY` – From [Trigger.dev dashboard](https://cloud.trigger.dev/)
6131
- `TRIGGER_PROJECT_REF` – Your project ref (starts with `proj_`)
6232
- `ANTHROPIC_API_KEY` – From [Anthropic Console](https://console.anthropic.com/)
@@ -68,29 +38,24 @@ Streams to frontend via Trigger.dev Realtime
6838
# Terminal 1: Next.js
6939
npm run dev
7040

71-
# Terminal 2: Trigger.dev CLI
41+
# Terminal 2: Trigger.dev
7242
npx trigger.dev@latest dev
7343
```
7444

75-
4. Open [http://localhost:3000](http://localhost:3000)
45+
4. Open [http://localhost:3000](http://localhost:3000) in your browser to see the demo
46+
47+
## Features
48+
49+
- **Two-phase analysis** – Lists all commits first, then selectively fetches diffs only for ambiguous ones to minimize token usage
50+
- **Custom MCP tools**`list_commits` and `get_commit_diff` called autonomously by Claude
51+
- **Real-time streaming** – Changelog streams to the frontend as it's generated via Trigger.dev Realtime
52+
- **Live observability** – Agent phase, turn count, and tool calls broadcast via run metadata
53+
- **Markdown rendering** – Streamed output formatted with [Streamdown](https://github.com/vercel/streamdown) and Shiki syntax highlighting
54+
- **Private repo support** – Optional GitHub token for private repositories
7655

7756
## Relevant Files
7857

79-
- [trigger/generate-changelog.ts](trigger/generate-changelog.ts) – Main task with custom MCP tools for GitHub
80-
- [trigger/changelog-stream.ts](trigger/changelog-stream.ts) – Stream definition for real-time output
58+
- [trigger/generate-changelog.ts](trigger/generate-changelog.ts) – Main task with MCP tools
59+
- [trigger/changelog-stream.ts](trigger/changelog-stream.ts) – Stream definition
8160
- [app/api/generate-changelog/route.ts](app/api/generate-changelog/route.ts) – API endpoint
8261
- [app/response/[runId]/page.tsx](app/response/[runId]/page.tsx) – Streaming display page
83-
84-
## Custom Tools
85-
86-
The task defines two custom MCP tools that Claude can use:
87-
88-
```typescript
89-
// List commits with messages (lightweight)
90-
list_commits({ since: "2024-01-01", until: "2024-02-01" });
91-
92-
// Get full diff for a specific commit (on-demand)
93-
get_commit_diff({ sha: "abc1234" });
94-
```
95-
96-
This two-phase approach minimizes token usage while giving Claude full context when needed.

claude-agent-github-wiki/README.md

Lines changed: 28 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,59 @@
11
# GitHub repository analyzer agent using Claude and Trigger.dev
22

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-
5-
## Demo video
6-
7-
<video src="https://content.trigger.dev/Claude%20GitHub%20Wiki-example.mp4" controls autoplay loop muted width="100%"></video>
3+
Ask questions about any public GitHub repository and get AI-powered analysis using the Claude Agent SDK for agentic exploration and Trigger.dev for real-time streaming to the frontend.
84

95
## Tech stack
106

11-
- [**Next.js**](https://nextjs.org/)Frontend framework using the App Router
12-
- [**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
13-
- [**Trigger.dev**](https://trigger.dev/)runs the agent in a long-running background task with real-time streaming to the frontend
7+
- **[Next.js](https://nextjs.org/)**React framework with App Router for the frontend
8+
- **[Claude Agent SDK](https://platform.claude.com/docs/en/agent-sdk/overview)** – Anthropic's SDK for building AI agents with file system and search tools
9+
- **[Trigger.dev](https://trigger.dev/)**Background task orchestration with real-time streaming to the frontend, observability, and deployment
1410

15-
## Features
11+
## Demo
1612

17-
- **Ask anything about any public repo** – Architecture, security vulnerabilities, API endpoints, testing strategies, etc.
18-
- **Claude Agent SDK exploration** – Claude explores the codebase and provide detailed answers
19-
- **Cancel anytime** – Abort long-running Trigger.dev task with cleanup
20-
- **Trigger.dev Realtime streaming** – Watch Claude's analysis stream in as it's generated
21-
- **Progress tracking using Trigger.dev Realtime** – See clone status, analysis progress, and repo size
22-
23-
## Setup & running locally
24-
25-
1. **Clone the repository**
13+
<video src="https://content.trigger.dev/Claude%20GitHub%20Wiki-example.mp4" controls autoplay loop muted width="100%"></video>
2614

27-
```bash
28-
git clone <repository-url>
29-
cd claude-agent-github-wiki
30-
```
15+
## Running the project locally
3116

32-
2. **Install dependencies**
17+
1. **Install dependencies**
3318

3419
```bash
3520
npm install
3621
```
3722

38-
3. **Copy environment variables and configure**
23+
2. **Configure environment variables**
3924

4025
```bash
4126
cp .env.example .env
4227
```
4328

44-
Fill in the required environment variables:
45-
46-
- `TRIGGER_SECRET_KEY` – Get this from the [Trigger.dev dashboard](https://cloud.trigger.dev/)
47-
- `TRIGGER_PROJECT_REF` – Your Trigger.dev project ref (starts with `proj_`)
48-
- `ANTHROPIC_API_KEY` – Get this from the [Anthropic Console](https://console.anthropic.com/)
29+
- `TRIGGER_SECRET_KEY` – From [Trigger.dev dashboard](https://cloud.trigger.dev/)
30+
- `TRIGGER_PROJECT_REF` – Your project ref (starts with `proj_`)
31+
- `ANTHROPIC_API_KEY` – From [Anthropic Console](https://console.anthropic.com/)
4932

50-
4. **Start the development servers**
33+
3. **Start development servers**
5134

5235
```bash
53-
# Terminal 1: Start Next.js dev server
36+
# Terminal 1: Next.js
5437
npm run dev
5538

56-
# Terminal 2: Start Trigger.dev CLI
39+
# Terminal 2: Trigger.dev
5740
npx trigger.dev@latest dev
5841
```
5942

60-
Open [http://localhost:3000](http://localhost:3000)
61-
62-
## How it works
63-
64-
Trigger.dev orchestrates the repository analysis through a single long-running task:
43+
4. Open [http://localhost:3000](http://localhost:3000) in your browser
6544

66-
1. **`analyzeRepo`** – Main task that:
67-
- Clones the repository to a temp directory (shallow clone for speed)
68-
- Spawns a Claude agent with file system tools
69-
- Streams Claude's response to the frontend in real-time via Trigger.dev's Realtime Streams
70-
- Cleans up the temp directory on completion or error
71-
72-
## Relevant code
45+
## Features
7346

74-
- **Main analysis task** – Clones repo, runs Claude agent, streams response ([`trigger/analyze-repo.ts`](trigger/analyze-repo.ts))
75-
- **Stream definition** – Typed stream for real-time text responses ([`trigger/agent-stream.ts`](trigger/agent-stream.ts))
76-
- **API endpoint** – Triggers the task and returns a public access token ([`app/api/analyze-repo/route.ts`](app/api/analyze-repo/route.ts))
77-
- **Response page** – Real-time streaming display with progress ([`app/response/[runId]/page.tsx`](app/response/[runId]/page.tsx))
78-
- **Landing page** – Repository URL input with example repos ([`app/page.tsx`](app/page.tsx))
79-
- **Trigger.dev config** – Project settings with external SDK bundle ([`trigger.config.ts`](trigger.config.ts))
47+
- **Ask anything about any public repo** – Architecture, security vulnerabilities, API endpoints, testing strategies, etc.
48+
- **Claude Agent SDK exploration** – Claude explores the codebase using Grep and Read tools to provide detailed answers
49+
- **Cancel anytime** – Abort long-running tasks with proper cleanup
50+
- **Trigger.dev Realtime streaming** – Watch Claude's analysis stream in as it's generated
51+
- **Progress tracking** – See clone status, analysis progress, and repo size via Trigger.dev metadata
8052

81-
## Learn more
53+
## Relevant files
8254

83-
- [**Trigger.dev Realtime Streams**](https://trigger.dev/docs/realtime/streams) – Stream data from tasks to your frontend
84-
- [**Trigger.dev React Hooks**](https://trigger.dev/docs/realtime/react-hooks/overview)`useRealtimeStream` for consuming streams
85-
- [**Claude Agent SDK**](https://platform.claude.com/docs/en/agent-sdk/overview) – Run Claude with agentic tool usage
86-
- [**Trigger.dev schemaTask**](https://trigger.dev/docs/tasks/schemaTask) – Type-safe task payloads with Zod
55+
- [`trigger/analyze-repo.ts`](trigger/analyze-repo.ts) – Main task that clones repo, runs Claude agent, and streams response
56+
- [`trigger/agent-stream.ts`](trigger/agent-stream.ts) – Typed stream definition for real-time text responses
57+
- [`app/api/analyze-repo/route.ts`](app/api/analyze-repo/route.ts) – API endpoint that triggers the task and returns a public access token
58+
- [`app/response/[runId]/page.tsx`](app/response/[runId]/page.tsx) – Real-time streaming display with progress
59+
- [`trigger.config.ts`](trigger.config.ts) – Project config with external SDK bundle

0 commit comments

Comments
 (0)