Metadata-Version: 2.5
Name: catch-the-gist
Version: 0.0.5
Summary: Turn sources into Agent Skills.
Project-URL: Homepage, https://github.com/Brainferno/catch-the-gist
Project-URL: Source, https://github.com/Brainferno/catch-the-gist
License-Expression: Apache-2.0
License-File: LICENSE
License-File: NOTICE
Requires-Python: >=3.11
Requires-Dist: defusedxml>=0.7
Requires-Dist: httpx>=0.27
Requires-Dist: mcp<3,>=2.3
Requires-Dist: openpyxl>=3.1
Requires-Dist: pillow>=10
Requires-Dist: pydantic>=2.8
Requires-Dist: pypdfium2>=5
Requires-Dist: python-docx>=1.1
Requires-Dist: python-pptx>=1.0
Requires-Dist: pyyaml>=6
Requires-Dist: trafilatura>=2.0
Requires-Dist: typer>=0.12
Description-Content-Type: text/markdown

# catch-the-gist

catch-the-gist turns documents, transcripts and notes into Agent Skills for Claude Code and Codex. Your coding agent reads the source in chunks through a small set of deterministic MCP tools, drafts the skill with you, and catch-the-gist writes, validates and installs it. Every instruction in the generated skill carries a provenance anchor that points back to the source passage it came from.

## What works now

- Sources: PDF, Word (`.docx`), PowerPoint (`.pptx`), Excel (`.xlsx`), CSV, saved HTML (`.html`, `.htm`), EPUB (`.epub`), images (`.png`, `.jpg`, `.jpeg`, `.webp`, `.gif`), web pages, `llms.txt` sites, pasted text, and Markdown, text and subtitle files (`.md`, `.markdown`, `.txt`, `.srt`, `.vtt`). Video links arrive in a later version.
- Text first: when a page, slide or image holds text, a table, a chart or a diagram, the skill gets Markdown, a Markdown table, a data table or Mermaid instead of the picture. Chunks mark each visual, and the agent reads its extracted text first. Only when that is not enough does it call `get_frames` to look at the pages, slides or images. An image goes into the skill's `assets/` folder only when text would lose its meaning, such as a photo.
- `catch-the-gist doctor` checks what is installed. LibreOffice is optional: with it, PowerPoint slides render as images for `get_frames`; without it, `doctor` warns and slides still give you their text and embedded pictures.
- Agent mode only: the agent you already run does the reading and writing. catch-the-gist itself makes no model calls.
- Output is a standard Agent Skill folder (`SKILL.md`, `references/`, `PROVENANCE.json`), installed to `.agents/skills/<name>` with a symlink at `.claude/skills/<name>` (project scope) or the equivalent under your home directory (user scope).

## Requirements

[uv](https://docs.astral.sh/uv/getting-started/installation/), so that `uvx` is on your PATH. The plugin and the npm package both run catch-the-gist through `uvx`, which fetches Python 3.13 on first use if you don't have it. Installing the CLI with `pip` instead needs Python 3.11 or later.

## Install the plugin

Claude Code:

```
/plugin marketplace add Brainferno/catch-the-gist
/plugin install catch-the-gist@catch-the-gist
```

Codex:

```
codex plugin marketplace add Brainferno/catch-the-gist
codex plugin add catch-the-gist@catch-the-gist
```

The plugin starts the MCP server with `uvx`, pinned to the release tag of this repository that matches the plugin version.

## Use it

In Claude Code:

```
/catch-the-gist:catch-the-gist path/to/notes.md
```

In Codex:

```
$catch-the-gist:catch-the-gist path/to/notes.md
```

The agent ingests the file, reads its chunks, proposes a skill name and description, and waits for your confirmation before writing and installing it. Approve the catch-the-gist tools when your agent asks.

## CLI

The same package has a command line for the deterministic steps. It is published as `catch-the-gist` on [PyPI](https://pypi.org/project/catch-the-gist/) and [npm](https://www.npmjs.com/package/catch-the-gist), with the short alias `ctgist` on both.

Run it without installing:

```
uvx catch-the-gist version
npx catch-the-gist version
```

Or install it:

```
uv tool install catch-the-gist     # or: pipx install catch-the-gist, or: pip install catch-the-gist
npm install -g catch-the-gist      # the npm package still runs the Python package through uvx
```

Commands:

```
catch-the-gist version
catch-the-gist doctor [--json]
catch-the-gist ingest <path-or-url> [--confirm-pages] [--json]
catch-the-gist ingest --text "<pasted text>" [--title <title>] [--json]
catch-the-gist validate .agents/skills/<name> [--json]
catch-the-gist install <skill-dir> [--scope project|user] [--agent claude-code|codex] [--force] [--copy] [--json]
catch-the-gist mcp
```

`ctgist` takes the same commands. `validate` exits 8 when the skill has errors. Set `CATCH_THE_GIST_WORKDIR` to run somewhere other than the current directory; the cache lives in `<workdir>/.catch-the-gist/cache`.

## Run from a checkout

To work on catch-the-gist itself, run the CLI with `uv run` inside a clone (for example `uv run catch-the-gist version`), and point Claude Code's plugin at your working tree:

```
git clone https://github.com/Brainferno/catch-the-gist
CATCH_THE_GIST_FROM=$PWD/catch-the-gist claude --plugin-dir ./catch-the-gist/plugin
```

[CONTRIBUTING.md](CONTRIBUTING.md) covers tests, the Codex equivalent and releases.

## Privacy

catch-the-gist makes no network calls except fetching the URLs you ask it to read and, when your agent asks to see them, the images those pages show. For a web page it fetches the URL you give and that site's `robots.txt`; if the URL redirects (at most 5 times) to another host, it also fetches that host's `robots.txt` before following. It never looks for an `llms.txt` on its own: it reads one only when that is the URL you give, and then fetches the pages listed there on the same host only after you confirm the page count. A link that serves a document (a PDF, Office file, EPUB, CSV or image) is saved under `<workdir>/.catch-the-gist/cache/downloads` and read like a local file. `get_frames` downloads an image named in an ingested page only when your agent asks to see it; such images can live on other hosts, and each of those hosts' `robots.txt` is fetched first. Each response is capped at 20 MB, and only `http` and `https` links are followed. It reads no credentials, including nothing under `~/.claude`. It never calls `claude` or `codex`. Apart from that, the only network access is when the package itself is fetched: `uvx` (used by the plugin and the npm package) downloads catch-the-gist and its Python dependencies the first time it runs that version, and may also download a Python 3.13 interpreter; `pip`, `npm` and `npx` download from PyPI or npm in the usual way. Your sources stay on your machine, and what your agent does with the chunks it reads is governed by that agent's own settings.

## License

Apache-2.0. See `LICENSE` and `NOTICE`.
