ai-document-engine

ai-document-engine is a skill for Codex from flyfish-dev/file-ai. It costs 81 tokens per session (624 once invoked), scanned A, original, Apache-2.0.

A local document-reading service that gives coding agents searchable context and stable references for files such as PDFs, Word documents, spreadsheets, slides, emails, archives, Markdown, code, and logs.

In plain words
What is it for?
Use it to analyze local files, search for exact terms, retrieve focused sections, and answer questions grounded in document content.
Why use it?
It avoids manually opening complex file formats and makes it easier to find and refer back to specific parts of a document.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: mentions Codex.

Good fit Use it to analyze local files, search for exact terms, retrieve focused sections, and answer questions grounded in document content.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/flyfish-dev/file-ai/ai-document-engine
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add flyfish-dev/file-ai --skill ai-document-engine
Clone the repo
git clone --depth 1 https://github.com/flyfish-dev/file-ai

Made for: Codex.

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 ai-document-engine

README.md
[![agentmods](https://agentmods.dev/badge/skills/flyfish-dev/file-ai/ai-document-engine/github.svg)](https://agentmods.dev/skills/flyfish-dev/file-ai/ai-document-engine)
Your own site
<a href="https://agentmods.dev/skills/flyfish-dev/file-ai/ai-document-engine"><img src="https://agentmods.dev/badge/skills/flyfish-dev/file-ai/ai-document-engine/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 ai-document-engine

Your own site · 80×15
<a href="https://agentmods.dev/skills/flyfish-dev/file-ai/ai-document-engine"><img src="https://agentmods.dev/badge/skills/flyfish-dev/file-ai/ai-document-engine.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 81 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 624 The whole file, excluding the scripts and references it only reads on demand.
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.00081 $0.00624
Opus 5.5 $0.00032 $0.00250
Sonnet 5.5 $0.00016 $0.00125
Haiku 4.5 $0.00008 $0.00062

Measured 1mo ago against content hash e8ca855e8598, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ai-document-engine 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 1mo ago.

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.

skills/ai-document-engine/SKILL.md · 37 lines

How it starts

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

AI Document Engine

Use the File AI MCP tools as the source of truth for document content. Do not manually unzip Office files, inspect PDF internals, or infer spreadsheet structure when these tools are available.

File AI format recognition follows the Flyfish File Viewer core registry. Treat profile.format as the authoritative format decision and profile.extraction as the current content-awareness strategy for that format.

Core Workflow

  1. Call doc_analyze with the local file path before answering content questions.
  2. Use profile.indexId for all later calls in the same task.
  3. Use doc_context when the user asks about a topic, section, page, slide, sheet, or nearby content.
  4. Use doc_search for exact terms, entities, clauses, headings, table labels, filenames inside archives, or attachment names.
  5. Use doc_read for a specific anchorId, blockId, or chunkId returned by the engine.
  6. Cite or mention the relevant anchorId values in answers when making document-grounded claims.

Tool Rules

  • Prefer doc_context over reading all chunks when the user asks a focused question.
  • Prefer doc_search before broad summarization if the user provides keywords or entity names.
  • Use doc://{indexId}/profile, doc://{indexId}/outline, and doc://{indexId}/chunks resources only after doc_analyze has cached the document.
  • Treat warnings in profile.warnings as part of the evidence, especially scanned PDFs, clipped sheets, unsupported formats, or best-effort fallback text.
  • Use doc_list_formats when choosing whether a file extension is recognized by File Viewer; do not infer supported formats from extractor names alone.
  • If profile.format.known is true but profile.extraction.structured is false, say the file is recognized by File Viewer but File AI only has metadata or best-effort text for that renderer-only format.
  • For spreadsheets, keep sheet names and row context in the answer when available.
  • For presentations, keep slide numbers in the answer when available.
  • For PDFs, keep page numbers in the answer when available.
  • For archives, report manifest entries and nested paths; do not extract or mutate archive entries unless another explicit tool supports it.

Read the full file on GitHub · 37 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago First seen · 37 lines · 81 tokens per session scan A e8ca855e8598

Subscribe to this mod's changes

ai-document-engine is a skill published in the GitHub repository flyfish-dev/file-ai (3 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 81 tokens to every session and 624 once invoked, about $0.0003 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-31.

Related

Other skills, from other repositories

excel-cli

Discover and launch the Excel CLI for ordinary Excel workbook requests on Windows, including reads, writes, formulas, data refreshes, and workbook automation. Use the installed excel-cli plugin's npx launcher and native help to find commands; report presentation conventions are a separate optional skill.

sbroenne/mcp-server-excel · 58 tokens

document-processing

Use when the deliverable is a document's bytes or its literal content — text/tables out of PDFs, AcroForm fill and flatten, page merge/split, PDF/DOCX from templates, OCR of image-only scans. NOT schema-typed fields pulled from text (that is structured-extraction), NOT signature routing (e-signature) or spreadsheet…

ericrisco/rsc-harness · 84 tokens

excel-cli-report-formatting

Apply optional presentation conventions when the user requests Excel report formatting or a new reader-facing report through excelcli. Use for readable headers, meaningful number formats, financial-model colours, and report layout. Do not load for ordinary reads, raw exports, targeted data updates, Power Query or Data…

sbroenne/mcp-server-excel · 75 tokens

excel-mcp-report-formatting

Apply optional presentation conventions when the user requests Excel report formatting or a new reader-facing report through Excel MCP tools. Use for readable headers, meaningful number formats, financial-model colours, and report layout. Do not load for ordinary reads, raw exports, targeted data updates, Power Query…

sbroenne/mcp-server-excel · 77 tokens

document-management

Handle ServiceNow attachments from both sides — the six /api/now/attachment tools that move file bytes in and out of the agent, and GlideSysAttachment for copying between records — plus document generation from sysreporttemplate, PDFs, dmsdocument versioning, and attachment access checks.

serac-labs/serac · 61 tokens

kernelcad-drawings

Export 2D engineering-drawing sheets (SVG, or a printable PDF on a standard sheet) from any model or assembly — third-angle front/top/left + isometric views with hidden-line removal, overall dimensions, and a title block. Use when the deliverable is a human-readable fabrication or review drawing.

w1ne/kernelCAD-web · 69 tokens