Agent skill

Lexoid CLI

by oidlabs-com in oidlabs-com/Lexoid

Parse and convert documents (PDFs, images, web pages, DOCX/XLSX/PPTX, audio) from the terminal using the lexoid CLI.

Apache-2.0Auto-check: notesDocuments & Office

Install Lexoid CLI

skills CLI
$ npx skills add oidlabs-com/Lexoid --skill lexoid-cli -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install oidlabs-com/Lexoid lexoid-cli --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/oidlabs-com/Lexoid.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/lexoid-cli .claude/skills/lexoid-cli && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
lexoid-cli
GitHub stars
109
Token cost
~2k tokens
SKILL.md length
769 words
Files
1
Skills in repo
2
Repo updated
First seen
Licence
Apache-2.0

At a glance

Parse and convert documents (PDFs, images, web pages, DOCX/XLSX/PPTX, audio) from the terminal using the lexoid CLI.

  • Works in 3 steps: lexoid is installed (lexoid --help or… → For LLM-based commands, the relevant API… → For Linux DOCX → PDF, LibreOffice…
  • The user wants to extract markdown / JSON / LaTeX from a file
  • SKILL.md covers When to use this skill, Setup checks, Commands and Output piping, plus 3 more sections
  • Calls ollama, python and jq; needs GOOGLE_API_KEY and OPENAI_API_KEY

What it does

Lexoid CLI is an agent skill from oidlabs-com/Lexoid. Parse and convert documents (PDFs, images, web pages, DOCX/XLSX/PPTX, audio) from the terminal using the lexoid CLI. Use when the user wants to extract markdown / JSON / LaTeX from a file or URL without writing Python, run schema-based structured extraction, or batch-parse from shell scripts. Triggers include "parse this PDF", "convert document to markdown", "extract JSON from PDF", "convert PDF to LaTeX", "use lexoid CLI", or any pipe/shell-style document-processing request.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Documents & Office, covering Document parsing, LaTeX and PDF. It works with LaTeX, Python, Microsoft Word and Microsoft Excel. The repository describes itself as: The open-source universal adapter for LLMs. Turn messy real-world data into clean, agent-ready context. The licence is Apache-2.0.

When your agent uses it

  • The user wants to extract markdown / JSON / LaTeX from a file
  • URL without writing Python
  • Run schema-based structured extraction
  • Batch-parse from shell scripts

Example prompts

  • “parse this PDF”
  • “convert document to markdown”
  • “extract JSON from PDF”
  • “/lexoid-cli”

Requirements

  • Python 3
  • A credential in GOOGLE_API_KEY
  • A credential in OPENAI_API_KEY

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. lexoid is installed (lexoid --help or python -m lexoid --help). If not, run pip install lexoid.
  2. For LLM-based commands, the relevant API key env var is set
  3. For Linux DOCX → PDF, LibreOffice (lowriter) must be installed.

What it can do on your machine

Read from SKILL.md and the folder at commit b45d174. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • ollama
    • python
    • jq
    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pip, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • GOOGLE_API_KEY
    • OPENAI_API_KEY
    • ANTHROPIC_API_KEY
    • MISTRAL_API_KEY
    • HUGGINGFACEHUB_API_TOKEN
    • TOGETHER_API_KEY
    • OPENROUTER_API_KEY
    • FIREWORKS_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Lexoid CLI loads about 2k tokens when it runs. Until then it costs about 123 tokens; SKILL.md has 769 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~123
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:29
    ### Loading API keys from `.env`
  • NoteMentions a .env fileSKILL.md:31
    API keys are commonly stored in a `.env` file at the project root rather than exported in the shell. The `lexoid` CLI do
  • NoteMentions a .env fileSKILL.md:33
    **Always load `.env` in a subshell so the keys never leak into the surrounding environment** — the parentheses scope the
  • NoteMentions a .env fileSKILL.md:36
    # Load .env for this command only (if it exists); env is reset to its prior state on exit
  • NoteMentions a .env fileSKILL.md:37
    ( set -a; [ -f .env ] && . ./.env; set +a; lexoid parse --input document.pdf --parser-type LLM_PARSE --model gpt-4o )
  • NoteMentions a .env fileSKILL.md:40
    Do **not** run a bare `set -a; . ./.env; set +a` in the parent shell — that persists secrets into the session.
  • NoteMentions a .env fileSKILL.md:60
    regardless of routing). LLM-based: load .env first.
  • NoteMentions a .env fileSKILL.md:81
    `schema` commands are LLM-based — load `.env` first (see "Loading API keys from .env") unless keys are already exported
  • NoteMentions a .env fileSKILL.md:107
    LaTeX conversion is LLM-based — load `.env` first (see "Loading API keys from .env") unless keys are already exported.
  • NoteMentions a .env fileSKILL.md:134
    the env var. The CLI does not auto-load `.env`; load it via the subshell wrapper (see "Loading API keys from .env") and

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from oidlabs-com/Lexoid at commit b45d174, republished under its Apache-2.0 licence (© oidlabs-com). 769 words, ~1,969 tokens.

Download SKILL.mdSave it as .claude/skills/lexoid-cli/SKILL.md (or your agent's skills folder).
name
lexoid-cli
description
Parse and convert documents (PDFs, images, web pages, DOCX/XLSX/PPTX, audio) from the terminal using the `lexoid` CLI. Use when the user wants to extract markdown / JSON / LaTeX from a file or URL without writing Python, run schema-based structured extraction, or batch-parse from shell scripts. Triggers include "parse this PDF", "convert document to markdown", "extract JSON from PDF", "convert PDF to LaTeX", "use lexoid CLI", or any pipe/shell-style document-processing request.

Lexoid CLI

Lexoid ships a lexoid console script (also runnable as python -m lexoid) for document parsing without writing Python. There are three sub-commands: parse, schema, and latex.

When to use this skill

  • The user has a document (PDF, image, HTML, DOCX, XLSX, PPTX, CSV, TXT, audio) or a URL and wants it converted to markdown/JSON/LaTeX.
  • The user wants structured extraction (JSON conforming to a schema) from the shell.
  • The task is one-off or scripted — no need to build a Python integration.

If the user wants to embed parsing into a Python application or library, use the lexoid-python skill instead.

Setup checks

Before invoking, confirm:

  1. lexoid is installed (lexoid --help or python -m lexoid --help). If not, run pip install lexoid.
  2. For LLM-based commands, the relevant API key env var is set:
    • GOOGLE_API_KEY (Gemini, default), OPENAI_API_KEY, ANTHROPIC_API_KEY, MISTRAL_API_KEY, HUGGINGFACEHUB_API_TOKEN, TOGETHER_API_KEY, OPENROUTER_API_KEY, FIREWORKS_API_KEY.
    • Ollama needs no key, but needs ollama serve running at OLLAMA_BASE_URL (default http://localhost:11434) and the target model pulled (ollama pull <model>).
    • Local backends (SmolDocling/granite-docling, PaddleOCR-VL) need no key and no server — they run in-process; the first call downloads weights from Hugging Face.
  3. For Linux DOCX → PDF, LibreOffice (lowriter) must be installed.
Loading API keys from .env

API keys are commonly stored in a .env file at the project root rather than exported in the shell. The lexoid CLI does not auto-load .env, so for any LLM-based command (LLM_PARSE, schema, latex, or AUTO when it routes to an LLM) you must load it yourself.

Always load .env in a subshell so the keys never leak into the surrounding environment — the parentheses scope the exports to that one command, restoring the environment to its previous state automatically afterward. Guard the source with [ -f .env ] so the command still runs (using already-exported keys) when no .env is present:

bash
# Load .env for this command only (if it exists); env is reset to its prior state on exit
( set -a; [ -f .env ] && . ./.env; set +a; lexoid parse --input document.pdf --parser-type LLM_PARSE --model gpt-4o )

Do not run a bare set -a; . ./.env; set +a in the parent shell — that persists secrets into the session.

The examples in the rest of this skill are written as plain lexoid … for readability. Apply the wrapper above to any LLM-based command (LLM_PARSE, schema, latex, or AUTO when it routes to an LLM). If your keys are already exported in the environment, run the commands as-is.

Commands

lexoid parse — Markdown / JSON output

Convert a document to markdown (default) or JSON (with segments, token usage, parser info).

bash
# Default: AUTO routing, markdown to stdout
lexoid parse --input document.pdf

# Save to file
lexoid parse --input document.pdf --output output.md

# Full result as JSON (includes per-page segments, token usage, parsers_used)
lexoid parse --input document.pdf --format json --output result.json

# Explicit LLM parsing (forces an LLM regardless of routing). LLM-based: load .env first.
lexoid parse --input document.pdf --parser-type LLM_PARSE --model gpt-4o
lexoid parse --input document.pdf --parser-type LLM_PARSE --model claude-3-5-sonnet-20241022
lexoid parse --input scanned.pdf --parser-type LLM_PARSE --model mistral-ocr-latest

# Force static parsing (no LLM, no API key needed for PDFs)
lexoid parse --input document.pdf --parser-type STATIC_PARSE --framework pdfplumber

# Parse a URL
lexoid parse --input https://example.com --output page.md

# Tune chunking / parallelism
lexoid parse --input big.pdf --pages-per-split 8 --max-processes 8

Key flags: --parser-type (AUTO/LLM_PARSE/STATIC_PARSE), --model, --framework (pdfplumber/paddleocr), --api (override provider), --format (markdown/json), --pages-per-split, --max-processes, --verbose.

lexoid schema — Structured extraction

Extract data conforming to a JSON schema. Schema can be a file path or inline JSON.

All schema commands are LLM-based — load .env first (see "Loading API keys from .env") unless keys are already exported.

bash
# Inline schema
lexoid schema \
  --input invoice.pdf \
  --schema '{"type":"object","properties":{"invoice_number":{"type":"string"},"total":{"type":"number"}}}' \
  --output invoice.json

# Schema from file, explicit provider
lexoid schema --input invoice.pdf --schema schema.json --api openai --model gpt-4o

# Example-guided extraction (improves accuracy)
lexoid schema --input invoice.pdf --schema schema.json \
  --example-schema example.json

# Treat the whole doc as one instance (vs. one per page)
lexoid schema --input contract.pdf --schema schema.json --fill-single-schema

Defaults: model gpt-4o-mini. The provider is auto-detected from the model name unless --api is given.

Show full SKILL.md (313 more words)Show less
lexoid latex — LaTeX conversion

Convert a document to a self-contained LaTeX source.

LaTeX conversion is LLM-based — load .env first (see "Loading API keys from .env") unless keys are already exported.

bash
lexoid latex --input paper.pdf --output paper.tex
lexoid latex --input paper.pdf --model gpt-4o

Output piping

When no --output is given, only the parsed content is written to stdout; status messages, token usage, and parser info go to stderr. This means standard piping works:

bash
lexoid parse --input report.pdf | grep -i "revenue"
lexoid parse --input report.pdf --format json | jq '.token_usage'

Common patterns

  • Default to AUTO: with no --parser-type, the CLI uses AUTO, which inspects the document and routes to the best parser (often an LLM for scans, charts, or complex tables). This is the right choice unless the user asks otherwise.
  • STATIC_PARSE is opt-in, not the default: choose it when the user explicitly wants no API calls / no cost, or you know the input is a clean native-text PDF. It returns empty output on scanned/image-only pages, so it is not a safe first guess for unknown documents.
  • LLM_PARSE for quality: force it with --parser-type LLM_PARSE --model <model> for scans, chart/figure-heavy pages, or messy tables where layout fidelity matters.
  • Scanned PDFs / images: use --parser-type STATIC_PARSE --framework paddleocr (no API key) or an LLM model with vision.
  • Batch: drive the CLI from a shell loop (for f in inputs/*.pdf; do lexoid parse -i "$f" -o "out/${f%.pdf}.md"; done).
  • Debug: add --verbose to surface loguru logs to stderr.

Failure modes to watch for

  • Missing API key → CLI raises a clean error naming the env var. The CLI does not auto-load .env; load it via the subshell wrapper (see "Loading API keys from .env") and retry.
  • DOCX on Linux without LibreOffice installed → conversion to PDF fails. Install libreoffice.
  • --model and --api mismatch → use --api only to override an auto-inferred provider (e.g., to send a model through OpenRouter).
  • Ollama: must run ollama serve and ollama pull <model> first; the CLI does not start the server.

See also

  • Full reference: docs/cli.rst and docs/api.rst in this repo.
  • Python equivalent: lexoid-python skill.

© oidlabs-com, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/lexoid-cli of oidlabs-com/Lexoid.

Open the folder on GitHubat commit b45d174

Compare with similar skills

Lexoid CLI next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Lexoid CLI compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Lexoid CLI this skilloidlabs-com/Lexoid109—~2kAutomated safety check: NotesApache-2.0
MineruNebutra/MinerU-Skill122—~1.4kAutomated safety check: PassMIT
MineruNebutra/MinerU-Skill122—~504Automated safety check: PassMIT
Markdown ConverterTeam-Commonly/commonly1.4k—~557Automated safety check: PassApache-2.0
Doclingzhuzhaoyun/Molio431—~2.6kAutomated safety check: PassCustom licence
Document ConverterBlackBeltTechnology/pi-agent-dashboard316—~999Automated safety check: PassMIT

Similar skills

  • Mineru

    Nebutra/MinerU-Skill

    An AI-Native skill for parsing PDF / Office / image files into clean Markdown with MinerU — a fast, zero-config document parser for AI agents.

    122 GitHub stars~1.4k tokensUpdated 13 days ago
    Documents & OfficeAuto-check passed
  • Mineru

    Nebutra/MinerU-Skill

    An AI-Native skill for parsing PDF / Office / image files into Markdown with MinerU — a fast, zero-config document parser for AI agents.

    122 GitHub stars~504 tokensUpdated 13 days ago
    Documents & OfficeAuto-check passed
  • Markdown Converter

    Team-Commonly/commonly

    Convert binary documents (PDF, DOCX, XLSX, PPTX, HTML, EPUB, images) to clean LLM-friendly Markdown using Microsoft's markitdown Python tool.

    1.4k GitHub stars~557 tokensUpdated today
    Documents & OfficeAuto-check passed
  • Docling

    zhuzhaoyun/Molio

    PRIMARY skill for converting .pdf, .docx, .pptx, .xlsx, .doc, .ppt, .xls, images, and audio/video files (.mp3, .wav, .m4a, .mp4, .mov, etc.) to Markdown.

    431 GitHub stars~2.6k tokensUpdated today
    Documents & OfficeAuto-check passed
  • Document Converter

    BlackBeltTechnology/pi-agent-dashboard

    Convert documents bidirectionally via the pi-doc-engine facade: ingest PDF/DOCX/PPTX/XLSX to provenance-stamped Markdown (with OCR), and produce templated DOCX/PDF from Markdown with diagrams, TOC…

    316 GitHub stars~999 tokensUpdated today
    Documents & OfficeAuto-check passed
  • Markdown Exporter

    bowenliang123/markdown-exporter

    Convert Markdown text to DOCX, PPTX, XLSX, PDF, PNG, SVG, HTML, IPYNB, MD, CSV, JSON, JSONL, XML files, and extract code blocks in Markdown to Python, Bash,JS and etc files.

    271 GitHub starsUsed in 1 repo~5.3k tokens
    Documents & OfficeAuto-check passed

More from oidlabs-com/Lexoid

  • Lexoid Python

    oidlabs-com/Lexoid

    Parse and convert documents (PDFs, images, web pages, DOCX/XLSX/PPTX, audio) inside a Python program using the lexoid library.

    109 GitHub stars~3.5k tokensUpdated yesterday
    Auto-check: notes

Questions about Lexoid CLI

What does Lexoid CLI do?

Parse and convert documents (PDFs, images, web pages, DOCX/XLSX/PPTX, audio) from the terminal using the lexoid CLI. Lexoid CLI is an agent skill from oidlabs-com/Lexoid. Parse and convert documents (PDFs, images, web pages, DOCX/XLSX/PPTX, audio) from the terminal using the lexoid CLI.

When should I use Lexoid CLI?

Lexoid CLI fits situations like: the user wants to extract markdown / JSON / LaTeX from a file; URL without writing Python; run schema-based structured extraction; batch-parse from shell scripts.

How do I install Lexoid CLI in Claude Code?

Run `npx skills add oidlabs-com/Lexoid --skill lexoid-cli -a claude-code`. Or copy the skill folder (skills/lexoid-cli in oidlabs-com/Lexoid) into .claude/skills/lexoid-cli in your project. Claude Code loads it when a task matches its description.

How do I install Lexoid CLI in Codex?

Run `npx skills add oidlabs-com/Lexoid --skill lexoid-cli -a codex`. Or copy the skill folder (skills/lexoid-cli in oidlabs-com/Lexoid) into .agents/skills/lexoid-cli in your project. Codex loads it when a task matches its description.

Can I use Lexoid CLI in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add oidlabs-com/Lexoid --skill lexoid-cli -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/lexoid-cli, .gemini/skills/lexoid-cli, .github/skills/lexoid-cli and .opencode/skills/lexoid-cli in your project.

What does Lexoid CLI need to run?

Going by SKILL.md and its folder, Lexoid CLI needs the command-line tools its instructions call (ollama, python, jq and pip) and credentials named GOOGLE_API_KEY, OPENAI_API_KEY, ANTHROPIC_API_KEY and MISTRAL_API_KEY. Our summary lists: Python 3; A credential in GOOGLE_API_KEY; A credential in OPENAI_API_KEY.

Does Lexoid CLI access the network?

SKILL.md contains no URLs. Its commands use pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Lexoid CLI safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Lexoid CLI use?

Lexoid CLI is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Lexoid CLI use?

About 2k tokens (SKILL.md is roughly 7.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Lexoid CLI?

Skills that share tags, products or a category with Lexoid CLI: Mineru (Nebutra/MinerU-Skill, 122 stars), Mineru (Nebutra/MinerU-Skill, 122 stars), Markdown Converter (Team-Commonly/commonly, 1.4k stars) and Docling (zhuzhaoyun/Molio, 431 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Lexoid CLI?

oidlabs-com (a GitHub organization) maintains it in oidlabs-com/Lexoid, which has 109 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on October 6, 2026.

Source: oidlabs-com/Lexoid on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.