draft/latex/SKILL.md
Compile LaTeX documents using the Tectonic engine. Use this skill whenever the user wants to create, edit, or compile a LaTeX document — letters, articles, CVs, reports. Tectonic is a self-contained compiler that auto-downloads only the packages it needs.
npx skillsauth add maximebaudette/agent-skills latexInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
~/.openclaw/agent_mars/correspondance/<project-name>/<project-dir>/output/<name>.pdf\input{} relative to where you run it fromStep 1: Check if tectonic is already available
command -v tectonic || ls $HOME/bin/tectonic 2>/dev/null || echo "NOT FOUND"
Step 2: If not found, install it
bash ~/.agents/skills/latex/scripts/setup.sh
This downloads the tectonic binary from GitHub releases into ~/bin/. Only needed once per machine.
Step 3: Confirm
$(command -v tectonic || echo $HOME/bin/tectonic) --version
Expected output: tectonic X.Y.Z
Do these steps in order. No exploration needed.
Step 1: Create the directory structure
mkdir -p /home/mars/.openclaw/agent_mars/correspondance/PROJECT_NAME/output
Step 2: Create /home/mars/.openclaw/agent_mars/correspondance/PROJECT_NAME/latex-project.json
{
"name": "PROJECT_NAME",
"entrypoints": [
{ "file": "main.tex", "label": "Main document" }
],
"upload": {
"gdrive_folder_id": null,
"email": null
}
}
Step 3: Create /home/mars/.openclaw/agent_mars/correspondance/PROJECT_NAME/main.tex with the document content.
Step 4: Create /home/mars/.openclaw/agent_mars/correspondance/PROJECT_NAME/.gitignore
output/
One command — run from the project directory:
TECTONIC=$(command -v tectonic || echo $HOME/bin/tectonic) && cd /home/mars/.openclaw/agent_mars/correspondance/PROJECT_NAME && mkdir -p output && $TECTONIC --outdir output main.tex
Replace main.tex with the actual entrypoint filename if different.
Output PDF will be at:
/home/mars/.openclaw/agent_mars/correspondance/PROJECT_NAME/output/main.pdf
For multi-entrypoint projects, check latex-project.json to see the list of .tex files, then compile each one the same way.
/home/mars/bin/gws drive upload /home/mars/.openclaw/agent_mars/correspondance/PROJECT_NAME/output/main.pdf --parent FOLDER_ID
To find a Drive folder ID: ~/bin/gws drive list --type folder
Use the gws-gmail skill. The PDF is at:
/home/mars/.openclaw/agent_mars/correspondance/PROJECT_NAME/output/main.pdf
Set gdrive_folder_id or email in latex-project.json. Then run:
bash /home/mars/.agents/skills/latex/scripts/compile.sh /home/mars/.openclaw/agent_mars/correspondance/PROJECT_NAME
The compile script handles auto-upload when those fields are set.
Before writing a document from scratch, check if /home/mars/.openclaw/agent_mars/correspondance/templates/ exists. If it does, look for a suitable template there and copy it into the new project directory.
Tectonic prints errors with file name and line number. Read the output carefully — it is usually a missing \end{}, typo in a package name, or encoding issue. Fix the .tex file and re-run the compile command.
| Problem | Fix |
|---|---|
| tectonic: command not found | Run setup: bash ~/.agents/skills/latex/scripts/setup.sh |
| cannot find file X.tex | Make sure you cd into the project dir before running tectonic |
| Packages downloading slowly | Normal on first compile — tectonic auto-downloads only what's needed |
| \input{file} not found | Run tectonic from the project root (the cd command above handles this) |
tools
Maintain living stack documentation for the MARS host in the Prime Radiant KB. Use this skill whenever: updating the mars host page after infrastructure changes, appending archive entries for deprecated components, documenting a new service/skill/plugin being added or removed, or when the user asks to 'update stack docs', 'document this change', 'archive this setup', 'what's in the stack', or 'generate stack summary'. Also use when you've just finished installing or removing any service, plugin, skill, tool, or cron — proactively suggest documenting it.
tools
Run autonomous dev tasks using Gemini CLI (gemini-cli) with Maxime's free Google quota. Use for programming projects where MARS needs to delegate agentic coding work — file edits, code gen, refactoring, analysis — to Gemini in a project directory.
testing
Weekly or on-demand audit of all agent workspaces (Cooper, Andy, MARS). Checks for stale script references, wrong skill paths, snapshot count drift, config vs file drift, and contradictory instructions. Auto-fixes simple unambiguous issues. Emails Maxime only for items requiring judgment. Silent on clean runs. MARS-only — do not invoke as Cooper or Andy.
documentation
Reusable inter-agent dispatch contract; responsible for delivering structured handoff requests from MARS to other sub-agents (Andy, Cooper) via the documented transport path.