guide
Guidelines for using llm-food
Install / Use
npx skills add altaidevorg/llm-foodInstalls into whichever agent you are using.
Cursor Rules
Cursor IDE rules (v2)
Quality Score
Category
AI & Machine LearningSupported Platforms
Skill content
View source on GitHubdescription: Guidelines for using llm-food globs: alwaysApply: true
The llm-food project is a Python-based service designed for converting various document formats (including PDF, DOCX, RTF, PPTX, HTML) into Markdown. It provides both synchronous and asynchronous processing capabilities, exposed through a FastAPI-based RESTful API (FastAPIServerEndpoints).
Key functionalities include:
- Synchronous Conversion: The
/convertendpoint handles on-demand conversion of single files or URLs. This is managed by theSynchronousConversionService, which dynamically selects processing logic based on file type. For PDFs, it employs a configurablePDFProcessingStrategy, allowing users to choose between backends like Google Gemini,pymupdf4llm, orpypdf2via an environment variable. This demonstrates the Strategy design pattern for flexible PDF handling. - Asynchronous Batch Processing: The
/batchendpoint, managed by theBatchJobOrchestrator, processes multiple files. It intelligently routes PDFs to Google's Gemini Batch Prediction API for scalable OCR and other formats to server-side FastAPI background tasks. - State Management: Asynchronous job states, including individual file progress and Gemini sub-job details, are persisted in a local DuckDB database (
TaskStateRepository). This ensures reliability for long-running tasks. - API and Data Handling:
FastAPIServerEndpointsact as Controllers, orchestrating calls to services. Pydantic models (APIDataModels) are extensively used as Data Transfer Objects (DTOs) for request/response validation and serialization, ensuring type safety. Optional API authentication is supported via Bearer tokens. - Client Interaction: An asynchronous Python client library (
LLMFoodClient), built withhttpx, provides a Facade for easy programmatic interaction with the server's API. This client also powers the project's Command Line Interface (CLI).
The architecture emphasizes separation of concerns, with distinct abstractions for API handling, conversion logic, batch orchestration, and persistence. It leverages external services like Google Cloud Storage (GCS) for temporary file storage during batch PDF processing and the Google Gemini API for its advanced OCR capabilities. Configuration is managed through environment variables.
Source Repository: None
## Chapters
[FastAPIServerEndpoints](fastapiserverendpoints.mdc)
[APIDataModels (Pydantic)](apidatamodels__pydantic_.mdc)
[LLMFoodClient](llmfoodclient.mdc)
[SynchronousConversionService](synchronousconversionservice.mdc)
[BatchJobOrchestrator](batchjoborchestrator.mdc)
[PDFProcessingStrategy (Synchronous)](pdfprocessingstrategy__synchronous_.mdc)
[TaskStateRepository (DuckDB)](taskstaterepository__duckdb_.mdc)
---
Generated by [Rules for AI](https://github.com/altaidevorg/rules-for-ai)
Related Skills
caveman
107.2k🪨 why use many token when few token do trick. Viral skill + proxy for coding agents that cuts 65% of tokens by talking like a caveman.
claude-mem
94.4kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Agent-Reach
84.5kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Understand-Anything
83.6kGraphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
Security Score
Audited on Invalid Date
