txtify: Instructions file for Claude Code

CLAUDE.md

txtify CLAUDE.md is an instructions file for Claude Code from lkmeta/txtify. It costs 1,549 tokens per session, scanned A, original, Apache-2.0.

A repository guide for Txtify, a FastAPI web app that turns uploaded media or YouTube videos into transcripts, translations, subtitles, and documents.

In plain words
What is it for?
Use it to maintain transcription jobs, media conversion, translation, uploads, cancellation, status handling, templates, and Docker deployment.
Why use it?
It explains the job-processing flow and important limits, helping agents avoid breaking status polling, cancellation, worker handling, or duplicated settings.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md.

This is lkmeta/txtify's own configuration. It tells Claude Code how to work on txtify itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything txtify configures →

Reuse

Borrowing it

Nothing to install: this file belongs to lkmeta/txtify. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/lkmeta/txtify/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/lkmeta/txtify

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for txtify CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/lkmeta/txtify/claude-md/github.svg)](https://agentmods.dev/instructions/lkmeta/txtify/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/lkmeta/txtify/claude-md"><img src="https://agentmods.dev/badge/instructions/lkmeta/txtify/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for txtify CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/lkmeta/txtify/claude-md"><img src="https://agentmods.dev/badge/instructions/lkmeta/txtify/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,549 This file is loaded in full into every session.
When invoked 1,549 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01549 $0.01549
Opus 5.5 $0.00620 $0.00620
Sonnet 5.5 $0.00310 $0.00310
Haiku 4.5 $0.00155 $0.00155

Measured today against content hash 599910c0c132, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

txtify CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 51 lines

How it starts

The opening of the file, as written. The whole thing — 51 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Txtify — agent guide

FastAPI web app that transcribes/translates audio & video: YouTube URL or upload → Whisper via stable-ts → optional DeepL translation → export as txt/srt/vtt/sbv/pdf. Single Docker container on port 8011, Jinja2 templates + vanilla JS frontend, SQLite for job state. Deployed from Docker Hub lkmeta/txtify.

Architecture (read this before touching job flow)

  • src/main.py — all HTTP endpoints. POST /transcribe inserts a DB row (the job id), then handle_transcription spawns a detached worker subprocess and stores its OS pid in the same row. The frontend polls GET /status?pid=<job id> — the query param is named pid for historical reasons but it is the job id, not the OS pid. Keep it that way; the OS pid (row column 12) is only for cancellation/kill.
  • src/utils.py — media download/upload handling, worker spawn, format converters (srt/vtt/sbv/pdf). MAX_UPLOAD_SIZE_MB / MAX_VIDEO_DURATION live here — when changing them, update the copy in templates/index.html and templates/faq.html too.
  • src/transcribe_process.py — worker entrypoint; receives the job id as argv[1]. Never look up "the latest row" — that reintroduces the concurrency race fixed in #15.
  • src/models.py — stable-ts transcription + DeepL translation. DeepL may merge/split lines; save_final_transcription aligns best-effort and must never raise on count mismatch.
  • src/db.py — per-operation SQLite connections with WAL (async handlers + worker subprocesses share the file). Don't add a module-level shared connection.
  • GET /history renders the read-only dashboard of past jobs (db.list_jobs, template history.html + static/history.js for client-side sort/filter/paginate). POST /history/delete and POST /history/clear remove a job's files + DB row (both refuse in-flight jobs). All three 404 when ENABLE_HISTORY=False (default True) — the page lists every job by id and there's no auth.
  • src/status.py — single source of truth for job status strings and the terminal-state guard. The status values are a contract: the frontend (static/scripts.js) branches on the exact strings via /status's phase (=== 'Completed successfully!', === 'Canceled', .includes('Error'), .startsWith('Error:')), and existing DB rows store them — change a VALUE only with a matching frontend change + migration. Use the constants/predicates (PROCESSING, CANCELED, error(), is_locked(), NOT_LOCKED_SQL), never hardcode a status string or the != 'Canceled' AND NOT LIKE '%Error%' guard. test_status.py asserts is_locked (Python) and NOT_LOCKED_SQL (SQLite) agree on every status.
  • Job outputs live in output/<job id>/; output/ is gitignored and dockerignored — media, transcripts, and .db files must never be committed or baked into the image.

Read the full file on GitHub · 51 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed · +140 tokens per session 599910c0c132
  2. 1mo ago First seen · 51 lines · 1,409 tokens per session scan A a0ec2c5b3679

Subscribe to this mod's changes

txtify CLAUDE.md is an instructions file published in the GitHub repository lkmeta/txtify (135 stars, last pushed today), licensed Apache-2.0. It adds 1,549 tokens to every session, about $0.0062 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories