AGENT SKILL

fireflies-data-handling

Implement Fireflies.ai PII handling, data retention, and GDPR/CCPA compliance patterns. Use when handling sensitive data, implementing data redaction, configuring retention policies, or ensuring compliance with privacy regulations for Fireflies.ai integrations. Trigger with phrases like "fireflies data", "fireflies PII", "fireflies GDPR", "fireflies data retention", "fireflies privacy", "fireflies CCPA".

License 许可
MIT
最近更新
2026-05-26
Stars
★ 0
Forks
0

01 前言 Front Matter

name
fireflies-data-handling
author
Jeremy Longshore <jeremy@intentsolutions.io>
license
MIT
version
1.0.0
description
Implement Fireflies.ai PII handling, data retention, and GDPR/CCPA compliance patterns. Use when handling sensitive data, implementing data redaction, configuring retention policies, or ensuring compliance with privacy regulations for Fireflies.ai integrations. Trigger with phrases like "fireflies data", "fireflies PII", "fireflies GDPR", "fireflies data retention", "fireflies privacy", "fireflies CCPA".
allowed-tools
Read, Write, Edit
compatible-with
claude-code, codex, openclaw

03 SKILL.md 正文

Fireflies.ai Data Handling

Overview

Manage meeting transcript data from Fireflies.ai. Covers transcript export formats, PII redaction in transcripts, meeting data retention policies, and selective data sync to CRM and project management tools.

Prerequisites

  • Fireflies.ai API key
  • GraphQL client configured
  • Understanding of transcript data structure
  • Storage for processed transcripts

Instructions

Step 1: Transcript Export and Format Conversion

import { GraphQLClient } from 'graphql-request';

const fireflies = new GraphQLClient('https://api.fireflies.ai/graphql', {
  headers: { Authorization: `Bearer ${process.env.FIREFLIES_API_KEY}` },
});

const FULL_TRANSCRIPT = `
  query GetTranscript($id: String!) {
    transcript(id: $id) {
      id title date duration
      sentences { speaker_name text start_time end_time }
      summary { overview action_items keywords }
    }
  }
`;

async function exportTranscript(id: string, format: 'json' | 'text' | 'srt') {
  const { transcript } = await fireflies.request(FULL_TRANSCRIPT, { id });

  switch (format) {
    case 'json':
      return JSON.stringify(transcript, null, 2);
    case 'text':
      return transcript.sentences
        .map((s: any) => `${s.speaker_name}: ${s.text}`)
        .join('\n');
    case 'srt':
      return transcript.sentences
        .map((s: any, i: number) => [
          i + 1,
          `${formatTime(s.start_time)} --> ${formatTime(s.end_time)}`,
          `${s.speaker_name}: ${s.text}`,
          '',
        ].join('\n'))
        .join('\n');
  }
}

function formatTime(seconds: number): string {
  const h = Math.floor(seconds / 3600);  # 3600: timeout: 1 hour
  const m = Math.floor((seconds % 3600) / 60);  # timeout: 1 hour
  const s = Math.floor(seconds % 60);
  const ms = Math.floor((seconds % 1) * 1000);  # 1000: 1 second in ms
  return `${String(h).padStart(2,'0')}:${String(m).padStart(2,'0')}:${String(s).padStart(2,'0')},${String(ms).padStart(3,'0')}`;
}

Step 2: PII Redaction in Transcripts

const PII_PATTERNS = [
  { regex: /\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b/gi, tag: '[EMAIL]' },
  { regex: /\b\d{3}[-.]?\d{3}[-.]?\d{4}\b/g, tag: '[PHONE]' },
  { regex: /\b\d{3}-\d{2}-\d{4}\b/g, tag: '[SSN]' },
  { regex: /\b\d{4}[\s-]?\d{4}[\s-]?\d{4}[\s-]?\d{4}\b/g, tag: '[CARD]' },
];

function redactTranscript(sentences: any[]) {
  return sentences.map(s => ({
    ...s,
    text: redactText(s.text),
  }));
}

function redactText(text: string): string {
  let redacted = text;
  for (const { regex, tag } of PII_PATTERNS) {
    redacted = redacted.replace(regex, tag);
  }
  return redacted;
}

Step 3: Meeting Data Retention Policy

interface RetentionPolicy {
  transcriptRetentionDays: number;
  summaryRetentionDays: number;
  actionItemRetentionDays: number;
}

const DEFAULT_POLICY: RetentionPolicy = {
  transcriptRetentionDays: 90,
  summaryRetentionDays: 365,  # 365 days = 1 year
  actionItemRetentionDays: 180,
};

async function applyRetention(
  transcripts: any[],
  policy = DEFAULT_POLICY
) {
  const now = Date.now();
  const results = { kept: 0, archived: 0, deleted: 0 };

  for (const t of transcripts) {
    const ageDays = (now - new Date(t.date).getTime()) / 86400000;  # 86400000 = configured value

    if (ageDays > policy.transcriptRetentionDays) {
      // Archive: keep summary, delete full transcript
      await archiveTranscript(t.id, {
        keepSummary: ageDays <= policy.summaryRetentionDays,
        keepActions: ageDays <= policy.actionItemRetentionDays,
      });
      results.archived++;
    } else {
      results.kept++;
    }
  }

  return results;
}

Step 4: Selective CRM Sync

async function syncActionItemsToCRM(transcriptId: string) {
  const { transcript } = await fireflies.request(FULL_TRANSCRIPT, { id: transcriptId });

  const actionItems = transcript.summary?.action_items || [];
  if (actionItems.length === 0) return { synced: 0 };

  const tasks = actionItems.map((item: string) => ({
    title: item.slice(0, 200),  # HTTP 200 OK
    source: 'fireflies',
    meetingTitle: transcript.title,
    meetingDate: transcript.date,
    participants: transcript.sentences
      .map((s: any) => s.speaker_name)
      .filter((v: string, i: number, a: string[]) => a.indexOf(v) === i),
  }));

  return { synced: tasks.length, tasks };
}

Error Handling

Issue Cause Solution
Missing sentences Transcription still processing Check transcript status before export
PII in action items Redaction only applied to sentences Also redact summary fields
Large transcript Long meeting (2+ hours) Process in chunks, stream export
Retention policy gap No automated cleanup Schedule weekly retention job

Examples

Batch Export for Compliance

async function exportAllForAudit(ids: string[]) {
  return Promise.all(ids.map(async id => ({
    id,
    text: await exportTranscript(id, 'text'),
    exportedAt: new Date().toISOString(),
  })));
}

Resources

Output

  • Configuration files or code changes applied to the project
  • Validation report confirming correct implementation
  • Summary of changes made and their rationale

04 同仓库更多 Skills

SamuelChien
SamuelChien/mega-skills-collection

zustand-store-ts

Create Zustand stores with TypeScript, subscribeWithSelector middleware, and proper state/action separation. Use when building React state management, creating global stores, or implementing reactive state patterns with Zustand.

★ 0
SamuelChien
SamuelChien/mega-skills-collection

zustand-store-creator

Zustand Store Creator - Auto-activating skill for Frontend Development. Triggers on: zustand store creator, zustand store creator Part of the Frontend Development skill category.

★ 0
SamuelChien
SamuelChien/mega-skills-collection

zero-trust-config-helper

Zero Trust Config Helper - Auto-activating skill for Security Advanced. Triggers on: zero trust config helper, zero trust config helper Part of the Security Advanced skill category.

★ 0
SamuelChien
SamuelChien/mega-skills-collection

zapier-integration-helper

Zapier Integration Helper - Auto-activating skill for Business Automation. Triggers on: zapier integration helper, zapier integration helper Part of the Business Automation skill category.

★ 0
SamuelChien
SamuelChien/mega-skills-collection

zai-cli

Execute z.AI CLI providing vision, search, reader, and GitHub exploration via CLI and MCP. Use when user needs image/video analysis, OCR, UI-to-code conversion, error diagnosis, real-time web search, web page to markdown extraction, or GitHub code exploration. Trigger with phrases like "analyze this image", "search the web for", "read this page", "explore this repo", or "use zai". Requires Z_AI_API_KEY.

★ 0
SamuelChien
SamuelChien/mega-skills-collection

yt-research

Research competitor YouTube channels, niches, and trending topics for your content strategy. Use this skill whenever the user says "research channels", "analyze competitors", "find trending topics", "niche analysis", "competitive research", "what are other creators doing", "scrape YouTube channels", or wants to understand the competitive landscape for a specific tool or topic area. Use when working with yt research. Trigger with 'yt', 'research'.

★ 0