latex-file-cleanlisted
Install: claude install-skill vpsantanna/latex-file-clean
# LaTeX build-file cleanup
Add four settings to the project's `.vscode/settings.json`: three LaTeX Workshop settings that make VS Code delete auxiliary files after every successful build, and one `files.exclude` entry that hides the SyncTeX file from the Explorer.
## Target settings
```json
"latex-workshop.latex.autoClean.run": "onBuilt",
"latex-workshop.latex.clean.method": "glob",
"latex-workshop.latex.clean.fileTypes": [
"*.aux", "*.bbl", "*.blg", "*.log",
"*.out", "*.toc", "*.fls", "*.fdb_latexmk",
"*.nav", "*.snm", "*.vrb",
"*.bcf", "*.run.xml", "*.lof", "*.lot",
"*.idx", "*.ilg", "*.ind", "*.xdv"
],
"files.exclude": {
"**/*.synctex.gz": true
}
```
- `autoClean.run: "onBuilt"`: runs cleanup after every successful build.
- `clean.method: "glob"`: matches files by the patterns in `fileTypes`.
- `clean.fileTypes`: the patterns to delete. Never add `*.synctex.gz` (it's needed for PDF-to-source sync) or `*.pdf`.
- `files.exclude`: hides `*.synctex.gz` from the Explorer, search and Quick Open without deleting it, so SyncTeX keeps working.
## Steps
1. **Find the project root.** Use the current working directory. If it has no `.tex` files at the top level or in its subfolders, say so and ask the user to confirm before continuing. Do not create or switch folders on your own.
2. **Read `.vscode/settings.json`** if it exists.
- **Missing:** create `.vscode/` if needed and write a new file containing only the four settings, in a JSON object with 2-space indenta