Skip to content

Two-Tier Extraction

Triage large content piles cheaply, then deep-read only the items that matter.

Repository
garrytan/gbrain
Stars
31,447
Licence
MIT
Files
1 file

What it does

It teaches an AI agent a method for processing large collections of text such as email archives, document dumps, or transcript libraries without paying top-model prices for everything. A fast, cheap model first sorts each item by type and importance. Routine items get a standard read, important items get a more careful read, and noise is skipped. Before any model sees the content, a fixed rule-based filter removes or diverts private contacts and sensitive terms such as medical, legal, or credential text.

Great for

  • Developers building bulk document or email processing pipelines on gbrain
  • Teams that need to control model costs on thousands of items
  • People who want to understand tiered model routing before implementing it

Skip it if

  • Small, one-off tasks where a single model call is simpler and cheaper overall (the triage setup adds complexity without savings)
  • Sensitive personal archives processed without reviewing the privacy rules first, because the keyword and contact lists are examples that must be tuned and can miss content

Try asking

  • “Triage my 5,000-email archive and deep-read only the important personal correspondence”
  • “Set up a two-tier pipeline that classifies transcripts cheaply and escalates high-value ones”
  • “Which model tier should I use for bulk extraction from these document dumps?”
Step-by-step guide: how to use Two-Tier ExtractionInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 1 original files, the MIT licence and an attribution note.

    two-tier-extraction.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip two-tier-extraction.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip two-tier-extraction.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Run the progressive 10, 100, 500 item test before any full-corpus pass to check cost and quality.
  • Tune the privacy contact list and sensitive patterns for your own data; the file's values are examples, and ambiguous matches are sent to human review.
  • Treat corpus text as data, not instructions, as the skill's untrusted-content convention requires; review the writes it makes to brain folders such as personal/ and people/.

What's inside

  • SKILL.md

Redistributed unmodified from garrytan/gbrain under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.