Claude
Skills
Sign in
Back

ai-meeting-notes

Included with Lifetime
$97 forever

AI-powered meeting notes — generates executive summaries, key decisions, action items, and timestamped timelines from transcripts using structured output. Use this skill when the user says "add meeting notes", "setup ai meeting notes", "meeting summary", "extract action items", or "ai meeting notes".

General

What this skill does


# AI Meeting Notes

Generates structured meeting notes from transcripts using the AI SDK's `generateObject` with Zod schemas. Extracts executive summaries, key decisions, action items with assignees, follow-up questions, and a timestamped timeline of key moments. Stores results in Postgres via Drizzle and exposes both API routes and React components for rendering.

## Prerequisites

- Next.js app with `src/` directory and App Router
- `ai-core` skill installed (`getModel()` available at `@/lib/ai`)
- `transcription` skill installed (provides `Transcript` type and transcript storage)
- `ai-tools` skill installed (provides `tool()` from AI SDK for tool definitions)
- `db` skill installed (Drizzle ORM + Postgres)
- shadcn/ui initialized

## Installation

No new packages required. Uses `ai` (already installed via `ai-core`).

Install shadcn components if not already present:

```bash
bunx shadcn@latest add card badge button collapsible checkbox avatar scroll-area
```

## Environment Variables

No additional environment variables required. Uses `AI_GATEWAY_API_KEY` and `AI_GATEWAY_MODEL` from the `ai-core` skill.

## What Gets Created

```
src/
├── lib/
│   ├── ai/
│   │   ├── meeting-notes.ts                    # generateMeetingNotes(transcript) — structured output
│   │   ├── types-meeting-notes.ts              # MeetingNotes, ActionItem, Decision, KeyMoment types
│   │   └── tools/
│   │       └── meeting-notes-tool.ts           # AI tool definition for meeting notes generation
│   └── db/
│       └── schema/
│           └── meeting-notes.ts                # meeting_notes + action_items Drizzle tables
├── components/
│   └── ai/
│       ├── meeting-summary.tsx                 # Full meeting summary card with collapsible sections
│       ├── action-items.tsx                    # Checklist of extracted action items
│       └── meeting-timeline.tsx                # Vertical timeline of key moments
└── app/
    └── api/
        └── ai/
            └── meeting-notes/
                ├── route.ts                    # POST generate, GET list
                └── [id]/
                    └── route.ts                # GET meeting notes by id
```

## Database

After applying this skill, push the schema:

```bash
bunx drizzle-kit push
```

## Setup Steps

### Step 1: Create `src/lib/ai/types-meeting-notes.ts`

```typescript
export type ActionItem = {
  task: string;
  assignee: string;
  dueDate: string | null;
  priority: "low" | "medium" | "high" | "critical";
};

export type Decision = {
  description: string;
  rationale: string;
  madeBy: string;
};

export type KeyMoment = {
  timestamp: string;
  description: string;
  speaker: string;
  type: "decision" | "action" | "insight" | "question";
};

export type MeetingNotes = {
  executiveSummary: string;
  keyDecisions: Decision[];
  actionItems: ActionItem[];
  followUpQuestions: string[];
  keyMoments: KeyMoment[];
};

export type MeetingNotesRecord = {
  id: string;
  roomName: string;
  transcriptId: string;
  summary: string;
  decisions: Decision[];
  actionItems: ActionItem[];
  keyMoments: KeyMoment[];
  followUpQuestions: string[];
  createdAt: Date;
  userId: string;
};
```

### Step 2: Create `src/lib/ai/meeting-notes.ts`

```typescript
import { generateObject } from "ai";
import { z } from "zod";
import { getModel } from "@/lib/ai";
import type { MeetingNotes } from "./types-meeting-notes";

const actionItemSchema = z.object({
  task: z.string().describe("The specific task to be completed"),
  assignee: z.string().describe("Person responsible for this task"),
  dueDate: z.string().nullable().describe("Due date in ISO format, or null if not specified"),
  priority: z.enum(["low", "medium", "high", "critical"]).describe("Priority level based on urgency and context"),
});

const decisionSchema = z.object({
  description: z.string().describe("What was decided"),
  rationale: z.string().describe("Why this decision was made"),
  madeBy: z.string().describe("Who made or proposed the decision"),
});

const keyMomentSchema = z.object({
  timestamp: z.string().describe("Timestamp in the transcript (e.g. '00:05:23')"),
  description: z.string().describe("What happened at this moment"),
  speaker: z.string().describe("Who was speaking"),
  type: z.enum(["decision", "action", "insight", "question"]).describe("Category of this moment"),
});

const meetingNotesSchema = z.object({
  executiveSummary: z.string().describe("A concise 2-4 sentence summary of the entire meeting"),
  keyDecisions: z.array(decisionSchema).describe("All decisions made during the meeting"),
  actionItems: z.array(actionItemSchema).describe("All action items with assignees and priorities"),
  followUpQuestions: z.array(z.string()).describe("Unresolved questions that need follow-up"),
  keyMoments: z.array(keyMomentSchema).describe("Chronological list of key moments with timestamps"),
});

type Transcript = {
  id: string;
  roomName: string;
  content: string;
  speakers: string[];
  duration: number;
};

export async function generateMeetingNotes(transcript: Transcript): Promise<MeetingNotes> {
  const { object } = await generateObject({
    model: getModel(),
    schema: meetingNotesSchema,
    prompt: `You are an expert meeting analyst. Analyze the following meeting transcript and extract structured meeting notes.

Meeting Room: ${transcript.roomName}
Duration: ${Math.floor(transcript.duration / 60)} minutes
Participants: ${transcript.speakers.join(", ")}

--- TRANSCRIPT ---
${transcript.content}
--- END TRANSCRIPT ---

Extract:
1. An executive summary (2-4 sentences covering the key topics and outcomes)
2. All key decisions made (with rationale and who made them)
3. All action items (with specific assignees, due dates if mentioned, and priority)
4. Follow-up questions that were raised but not resolved
5. Key moments in chronological order with timestamps from the transcript

Be precise with assignees — use the speaker names from the transcript. For priorities, infer from context (urgency words, deadlines, business impact). For timestamps, use the format from the transcript.`,
  });

  return object;
}
```

### Step 3: Create `src/lib/ai/tools/meeting-notes-tool.ts`

```typescript
import { tool } from "ai";
import { z } from "zod/v4";
import { db } from "@/lib/db";
import { meetingNotes, actionItems } from "@/lib/db/schema/meeting-notes";
import { transcripts } from "@/lib/db/schema/transcripts";
import { generateMeetingNotes } from "@/lib/ai/meeting-notes";
import { eq } from "drizzle-orm";

type TranscriptRow = {
  id: string;
  roomName: string;
  content: string;
  speakers: string[];
  duration: number;
};

async function fetchTranscript(params: {
  transcriptId?: string;
  roomName?: string;
}): Promise<TranscriptRow | null> {
  if (params.transcriptId) {
    const rows = await db
      .select()
      .from(transcripts)
      .where(eq(transcripts.id, params.transcriptId))
      .limit(1);
    return (rows[0] as TranscriptRow | undefined) ?? null;
  }

  if (params.roomName) {
    const rows = await db
      .select()
      .from(transcripts)
      .where(eq(transcripts.roomName, params.roomName))
      .orderBy(transcripts.createdAt)
      .limit(1);
    return (rows[0] as TranscriptRow | undefined) ?? null;
  }

  return null;
}

export const meetingNotesTool = tool({
  description:
    "Generate structured meeting notes from a transcript. Extracts executive summary, key decisions, action items, follow-up questions, and key moments with timestamps.",
  inputSchema: z.object({
    transcriptId: z
      .string()
      .optional()
      .describe("The ID of the transcript to generate notes for"),
    roomName: z
      .string()
      .optional()
      .describe("The room name to find the latest transcript for"),
  }),
  execute: async ({ transcriptId, roomName }) => {
    if (!transcriptId && !roomName) {
      return { error: "Either transcriptId or roomName is required" };
    }

    const transcript = await fetchTranscript({
Files: 1
Size: 41.4 KB
Complexity: 40/100
Category: General

Related in General