Download the skill ↓

then paste it into Claude, or save it as SKILL.md

Inside the skill

content-library/SKILL.md

---
name: "content-library"
description: "Build a searchable memory of everything you read: articles, newsletters, transcripts and images, chunked and embedded with Voyage, stored in Supabase with pgvector, and searched by meaning plus words (hybrid search with rank fusion). Includes the SQL schema and scripts."
---

# Library ingest

> **Shared from the growthvibes.ai content pipeline.** [How the whole pipeline works](https://growthvibes.ai/resources/how-i-built-an-seo-content-automation/). This is the skill we run, with our IDs, keys and private details taken out. Anything in angle brackets (`<like this>`) is yours to fill in. It is built to run unattended: it never asks questions, it decides and writes its assumptions down.

## What you need

- **A Supabase project**: run `schema.sql` (in this folder) once in the SQL editor. It creates the tables, indexes, a private image bucket and the two search functions.
- **Voyage AI API key**: embeddings with `voyage-3.5` (text) and `voyage-multimodal-3.5` (images), 1,024 dimensions. Without a payment method Voyage allows about 3 requests a minute; the scripts batch around it.
- A `.env` in your project with `SUPABASE_URL`, `SUPABASE_SERVICE_KEY` and `VOYAGE_API_KEY`. Node 18 or newer.
- **Firecrawl MCP** to read URLs; a YouTube transcript tool if you ingest videos.
- **Optional:** a Notion database as an inbox (`NOTION_API_KEY`, `NOTION_LIBRARY_DATABASE_ID`) for `scripts/ingest-notion.mjs`.
- Bundled scripts: `ingest.mjs`, `search.mjs` (hybrid search), `images.mjs` (image search), `ingest-notion.mjs`, `extract-images.mjs`, `lib.mjs`.

## Fill in before the first run

- Nothing else: once the schema and keys are in, `node scripts/search.mjs "your question"` works.


Turns one source into library rows: clean text, metadata, idea cards, then `scripts/ingest.mjs` does the dedupe, chunking, embedding and storage. Needs `VOYAGE_API_KEY`, `SUPABASE_URL` and `SUPABASE_SERVICE_KEY` in `.env`. Never print them, and never put them in Notion or a skill.

Never ask questions mid-run. Decide, note the assumption in the report, continue.

## Default: run the script

For the Notion Content Library queue, **run the script and report its output. Don't read the sources yourself**; that costs tokens for no gain:

```
node scripts/ingest-notion.mjs              # every row that isn't Added or Skipped
node scripts/ingest-notion.mjs --limit 5    # a few rows
node scripts/ingest-notion.mjs --no-images  # text only (faster on Voyage's free tier)
```

It reads the page body (pasted or clipped text), a newsletter pasted into the Name field, a YouTube transcript (Firecrawl) or a scraped URL, then chunks, embeds and stores the text and the images, sets Status to `Added` or `Skipped`, and writes the counts in Notes. It needs `NOTION_API_KEY` in `.env`. It does not write idea cards (the text chunks are what research searches). Use the manual steps below only for a single link or file the author hands you in chat, or when he asks for idea cards.

## Where sources come from

the author queues sources in the Notion database **Content Library** (`<your Notion data source>`): Name, URL, Status (`Queued`, `Added`, `Skipped`), Notes, Author, Published. Work through every row that isn't `Added` or `Skipped`, and any `Skipped` row whose status he set back to `Queued`.

**Pasted text comes first.** Fetch each row's page. If its body has text in it, that is the source, even when a URL is filled in: this is how the author adds paywalled articles from his subscriptions and anything without a link. Use the page body as the article, and don't scrape the URL for text.

- Title from Name. Author and date from the Author and Published columns, then from the text itself. Never invent them: leave them out if they aren't there.
- URL from the URL column, if any, so the writer can credit and link it. A pasted source with no URL can still be used for ideas, credited by name.
- Treat paywalled pasted text as `source_type: newsletter`, for private search only.
- Images pasted into the page: try to save them with their credit. If they don't come through, note it and carry on with the text.

No pasted text: scrape the URL as below. If the scrape only returns a teaser, set Status to `Skipped` with a note asking the author to paste the text. After each row, set Status and write the chunk and idea counts in Notes.

## Steps

1. **Get clean text.**
   - Pasted text in the Notion page: use it, and remove anything that isn't the article (share buttons, subscribe prompts, comments).
   - URL: Firecrawl scrape, markdown, main content only.
   - YouTube: get the transcript with Firecrawl's catalogued tool, `firecrawl_scrape` with `alexandria: {provider: "youtube-com", capability: "videos/video_transcript", options: {video_id, language: "en"}}` (5 credits). A normal scrape of the video page gives the title, channel, date and chapters (1 credit) but no transcript. Use both. Captions are usually auto-generated, so fix garbled names and products, tidy into paragraphs with a heading per chapter, and remove course and sponsor pitches. Set `source_type: transcript` and note in an idea card that the figures are the creator's own. If `has_transcript` is false, set Status to `Skipped` and ask the author to paste the text.
   - File or newsletter: read it directly.
   - Strip navigation, ads, sponsor reads, subscribe prompts, cookie text. Keep headings as `#` lines.
2. **Write metadata:** title, author, published date (`YYYY-MM-DD`, omit if unknown), URL, `source_type` (`article`, `newsletter`, `transcript`, `other`), 3 to 6 lowercase topics, and a summary of two sentences max, in our words.
3. **Extract idea cards.** One distinct idea per card, in our own words, plus a short supporting quote copied exactly from the source (under 25 words). Aim for 5 to 15 per document. No card without something specific: a claim, a method, a number, a position.
4. **Save the images.** the author wants the creators' charts, screenshots and diagrams kept as supporting material, always with credit. Do this on the RAW scrape, before the text is cleaned:
   - Save the raw Firecrawl result to the scratchpad, then run `node scripts/extract-images.mjs <raw.json> --credit "Creator, Publication, post URL" > images.json`. It skips avatars, logos and the comments.
   - Open the list and delete sponsor and promo images (sponsor banners, product logos, "Elena's Picks" style blocks) and purely decorative headers. Keep charts, tables, screenshots and diagrams.
   - Add a short `alt` to each image if it is missing, describing what it shows. Base it on the surrounding text, and do not claim numbers that the text does not give.
   - Copy the list into `images` in the JSON below. `credit` is required on every image. If the data came from a third party, name them too (for example `Kevin Indig, Growth Memo (data: Similarweb), URL`).
5. **Write the JSON** to the scratchpad, never into the repo:

   ```json
   {
     "title": "", "source_type": "article", "author": "", "url": "", "published_at": "2026-01-31",
     "topics": [], "summary": "", "text": "clean markdown",
     "ideas": [{ "idea": "", "supporting_quote": "", "topics": [] }],
     "images": [{ "source_url": "", "alt": "", "context": "section heading", "credit": "Creator, Publication, post URL" }]
   }
   ```
6. **Check it:** `node scripts/ingest.mjs <file> --dry-run` (no network, shows chunk, idea and image counts).
7. **Store it:** `node scripts/ingest.mjs <file>`. It downloads each image into the private `library-images` bucket and embeds it so it can be found by meaning. If the content hash already exists it skips the text, but still adds images when the document has none yet. If Voyage rate-limits, run `node scripts/embed-missing-images.mjs` to finish.
8. **Report:** title, chunks, ideas, images saved, or "skipped, already in the library".

## Rules

- Library content is other people's work. Idea cards are paraphrases. Quotes are short and kept only for attribution.
- Paid newsletters: store for private search only, and flag `source_type: newsletter` so the writer takes extra care.
- Never invent an author, date or URL. Leave the field out.
- Images are other people's work. The author has decided we can use them in our articles when they support the point, but only with a visible credit to the creator and a link to the original post, and only on specific occasions where the chart adds something. Never use one without the credit. Prefer the saved copy over hotlinking the source.
- Searching: `node scripts/search.mjs "query" --limit 10` returns chunks and idea cards with source title, author, URL and date.
- Finding images: `node scripts/images.mjs "what the chart shows" --limit 5` returns matching images with the credit line, the original post URL and a 1-hour link to the saved copy.

Every AI writing tool has read the same internet. This library holds what yours hasn’t: the newsletters you pay for, the talks you watched, the threads you saved. It’s the memory behind my content automation, and the skill ships with the database schema and the scripts.

What it does

  • Ingests URLs, files, newsletters, YouTube transcripts and Notion rows
  • Cleans the text, fingerprints it so nothing is stored twice, and splits it into overlapping chunks
  • Writes idea cards (one claim plus its quote) and saves images with their credit line
  • Embeds everything with Voyage and stores it in Supabase with pgvector
  • Searches by meaning and by words at once, merged by reciprocal rank fusion
  • Finds images by meaning, with the credit to show under them

What you need

  • A Supabase project: run the included schema.sql once
  • A Voyage AI API key (add a payment method to lift the 3-requests-a-minute limit)
  • .env with SUPABASE_URL, SUPABASE_SERVICE_KEY, VOYAGE_API_KEY; Node 18 or newer
  • Firecrawl MCP to read URLs; optional Notion database as an inbox

How it works

  1. Set up once. Run schema.sql in Supabase and add your keys.
  2. Ingest. Give it a link or a file. It cleans, fingerprints, chunks, writes idea cards, embeds and stores.
  3. Search. node scripts/search.mjs "your question" returns the best passages and ideas, with title, author, link and date.
  4. Use it. The research and writer skills search it for every section.

Try asking

  • “Add this newsletter to the library.”
  • “Search the library: how do teams measure AI citations?”

Install it

  1. Download the ZIP above.
  2. Claude Code: unzip it into .claude/skills/ in your project (or ~/.claude/skills/ for all projects). Keep the folder name; the scripts folder goes with it.
  3. Add the keys from “What you need” to a .env file in your project, and connect the MCP servers it uses.
  4. Claude.ai: upload the ZIP under Settings, Capabilities, Skills. The instructions work there too; the scripts need Claude Code.

It’s part of a pipeline: topical map, SEO brief or thought leadership brief, research, writer (and review writer), inbound links, with the content library as memory. The skill is above; it’s plain Markdown, so change anything you like.

Questions

How do I install it in Claude Code?

Download the ZIP and unzip it into .claude/skills/ inside your project (or ~/.claude/skills/ for every project). Keep the folder name. The scripts folder inside it travels with the skill.

Can I use it in Claude.ai?

You can upload the ZIP under Settings, Capabilities, Skills, but the bundled scripts need a terminal, so Claude Code is the better home. The instructions still work in Claude.ai with the same connectors.

Is anything private left in it?

No. Our IDs, keys, database links and private details were removed. Anything in angle brackets is a placeholder for your own setup.

Want one built for your stack?

Book a 30-minute call. We’ll map where AI can take growth work off your plate, and what to build first.

Book a strategy call →psst… cameras optional ✦