\begin{article}
formatex Claude Code Skill: Compile, Template, Integrate
One Claude Code install covers every FormatEx workflow: API compilation, template creation, and multi-language integration code generation.

Most Claude Code skills do one thing. The formatex skill does everything you will ever need when working with the FormatEx API — compile documents, scaffold templates, generate client code in any language, debug LaTeX errors, and wire up production pipelines. If you build PDF generation systems or write LaTeX regularly, this is the one skill to install and keep installed.
The Problem: Too Many Moving Parts
Building a document generation pipeline is not a single task. You need to write valid LaTeX, structure it correctly for your use case, call the FormatEx compilation API, handle errors when the compiler rejects your markup, integrate the API call into your application code, and eventually maintain templates across multiple document types. Each of those steps has its own friction.
Without tooling, you are context-switching constantly: writing LaTeX in one tab, reading the FormatEx API docs in another, debugging undefined control sequence errors by scanning log output, and copy-pasting boilerplate HTTP client code into your project. The formatex Claude Code skill collapses all of that into a single conversational interface backed by a model that understands both LaTeX and the FormatEx API surface.
How to Install
The skill lives in the latex-skills GitHub repository. Clone the repo, then copy the skill into your Claude Code skills directory:
cp -r skills/formatex ~/.claude/skills/If you want the full latex meta-skill as well (which covers pure LaTeX authoring workflows separately from API workflows):
cp -r skills/latex ~/.claude/skills/To install every skill at once:
cp -r skills/latex-full ~/.claude/skills/After copying, restart Claude Code or reload your session. The skill activates automatically when you reference FormatEx, LaTeX compilation, or PDF generation in your prompts. No configuration file to edit, no API token to hardcode into the skill itself — it reads FORMATEX_API_KEY from your environment.
Set your key once:
export FORMATEX_API_KEY=fx_live_your_key_hereFrom that point on, every formatex skill invocation uses that key against https://api.formatex.io/api/v1/.
What the formatex Skill Does
The formatex meta-skill is a routing layer over several focused capabilities. When you invoke it, the model identifies which workflow you are in and applies the right behavior automatically.
API compilation — You describe a document or paste LaTeX source, and the skill compiles it against the FormatEx API using your key. It selects the appropriate engine (pdflatex, xelatex, lualatex, or latexmk), sets reasonable timeout and size defaults for your plan, and returns either a download link or a structured error with the compiler log parsed into human-readable diagnostics.
Template creation and rendering — You describe a document type (invoice, report, certificate, contract) and the skill generates a LaTeX template with parameterized fields. It can render the template against sample data immediately by compiling it through the API, so you see real PDF output before you integrate anything.
Multi-language code integration — You name your stack and the skill generates a production-ready API client: Go, PHP/Laravel, Ruby/Rails, Python, Node.js, or serverless environments like AWS Lambda. The generated code follows idioms for each language rather than generic HTTP boilerplate. See the dedicated integration guides for Go, PHP/Laravel, Ruby on Rails, and AWS Lambda if you want the full walkthroughs.
LaTeX error diagnosis — When compilation fails, the skill does not just hand you the raw TeX log. It parses the error, identifies the offending line and command, explains what went wrong, and proposes a fix. This is the same capability covered in the standalone latex-skill-fix-errors post, but integrated directly into the compile-and-iterate loop.
Markup authoring — If you are writing LaTeX from scratch, the skill helps you write well-structured markup, format math equations, organize document structure, and manage citations and bibliography. These are not separate invocations — they happen inline as you build the document you are about to compile.
Before and After
Before: Manual Compile-Debug Loop
You have a LaTeX invoice template. A client needs a customized version. The old workflow looks like this:
- Open the
.texfile, manually substitute client name, address, line items, totals. - Run pdflatex locally or upload to Overleaf.
- Get an error:
! Undefined control sequence. \euro. Spend 10 minutes searching for the right package. - Fix the error, recompile.
- Get a second error because you forgot to escape an ampersand in a table cell.
- Fix that, recompile, get a PDF.
- Write a curl command to POST the final source to the FormatEx API for your production pipeline.
- Realize the curl command needs base64 encoding. Look that up.
- Get the PDF. It took 45 minutes for what should have been a 5-minute task.
After: formatex Skill
You: Compile this invoice template with these client details:
name: Acme Corp, address: 123 Main St, items: [consulting 3h @ $150, hosting $49], due: 2026-07-01
formatex: Compiling with pdflatex via FormatEx API...
PDF ready: https://api.formatex.io/output/abc123.pdf
Note: I added \usepackage{eurosym} since your template uses \euro.
Also escaped the ampersand in the services table cell on line 47.The skill handled the package lookup, the escaping fix, the API call, and the error recovery — without you leaving your editor. Total time: under 30 seconds.
Common Use Cases
1. Rapid Prototyping of Document Templates
You are building a SaaS product that generates PDF reports. You need to prototype three template designs before committing to one. With the formatex skill, you describe each design in plain language, the skill generates the LaTeX, compiles it through the API, and you review real PDFs. Iteration happens in conversation rather than in a local TeX installation.
2. Integrating FormatEx into an Existing Application
You have a Rails application and want to add PDF invoice generation. Ask the skill to generate a service class that calls the FormatEx API, handles errors, streams the PDF response, and stores the result. The output follows Rails conventions and uses your existing HTTP client patterns. The Rails integration guide covers this in depth, but the skill generates code tailored to your specific models and routes.
3. Debugging Inherited LaTeX Templates
You inherited a 500-line LaTeX template from a previous developer. It compiled once, now it does not. You paste the error log into Claude Code. The formatex skill, drawing on the same logic as the latex-skill-explain-commands reference, identifies deprecated commands, missing packages, and version incompatibilities, then patches the template and recompiles to confirm the fix.
4. Batch Document Generation Scripts
You need to generate 200 personalized certificates for a training program. The skill scaffolds a script in your language of choice that reads a CSV, renders each certificate template with the participant's data, calls https://api.formatex.io/api/v1/compile, and writes the PDFs to a local directory. You review the script, run it, and the batch is done.
5. Serverless PDF Generation Pipelines
You are building an AWS Lambda function triggered by S3 uploads that converts structured JSON payloads into formatted PDF reports. The skill generates the Lambda handler, the LaTeX template with conditional sections driven by the JSON schema, the FormatEx API call with error handling and retries, and the S3 upload of the output PDF. The serverless AWS Lambda guide covers the full architecture.
Related Skills
The formatex meta-skill covers the full API workflow. If you want focused skills for specific LaTeX authoring tasks outside of the compilation loop, install these separately:
- latex-skill-fix-errors — dedicated error diagnosis and repair
- latex-skill-write-markup — LaTeX authoring from prose descriptions
- latex-skill-math-equations — equation formatting and AMS environments
- latex-skill-document-structure — sectioning, cross-references, layout
- latex-skill-citations-bibliography — BibTeX, biblatex, citation styles
- latex-skill-explain-commands — command lookup and package documentation
Install them alongside formatex with:
cp -r skills/latex-full ~/.claude/skills/Get Started
The formatex Claude Code skill removes the gap between writing LaTeX and shipping PDFs. One install handles compilation, template authoring, client code generation, and error recovery — all connected to the FormatEx API through your existing key.
Get your API key and read the getting started guide at formatex.io. Then grab the skill from github.com/formatex/latex-skills and stop switching contexts every time you need a PDF.
\end{article}
\related{posts}




