{"slug": "insat-pfe-report-installable-skill-claude-code-opencode-codex-cli", "title": "insat-pfe-report installable skill (Claude Code / opencode / Codex CLI)", "summary": "A developer created an installable skill package for Claude Code, opencode, and Codex CLI that enables AI coding agents to generate INSAT end-of-studies (PFE) reports from a LaTeX template. The skill is discovered automatically when placed in a known directory with a SKILL.md file containing YAML frontmatter, and can be installed per project or globally.", "body_md": "Claude Code, opencode, and Codex CLI all now discover skills the same way: a folder containing a\nSKILL.md with YAML frontmatter (name, description), dropped into a known directory. That's\nwhat this package is.\n\nFastest path: one command\n\n```\ncd insat-pfe-report          # this folder\n./install.sh                 # installs into the current project for all three tools\n# or:\n./install.sh --global        # installs into your home dir, available in every project\n```\n\nThis copies the skill into:\n\n.claude/skills/insat-pfe-report/ (Claude Code)\n\n.opencode/skills/insat-pfe-report/ (opencode — also auto-detects .claude/skills/, so this is\nbelt-and-suspenders)\n\n.codex/skills/insat-pfe-report/ and .agents/skills/insat-pfe-report/ (Codex CLI — the latter\nis the officially documented cross-tool path; installing both covers older and newer Codex builds)\n\nRestart the tool / start a new session afterward so it re-scans for skills.\n\nManual install, per tool\n\nClaude Code\n\n```\nmkdir -p .claude/skills\ncp -r insat-pfe-report .claude/skills/\n# or globally: cp -r insat-pfe-report ~/.claude/skills/\n```\n\nopencode\n\n```\nmkdir -p .opencode/skills\ncp -r insat-pfe-report .opencode/skills/\n# or globally: cp -r insat-pfe-report ~/.config/opencode/skills/\n```\n\nopencode also reads .claude/skills/*/SKILL.md automatically, so if you've already installed for\nClaude Code in the same repo, opencode picks it up with no extra step.\n\nCodex CLI\n\n```\nmkdir -p .codex/skills   # or .agents/skills — Codex checks both, paths vary by version\ncp -r insat-pfe-report .codex/skills/\ncp -r insat-pfe-report .agents/skills/\n# or globally: cp -r insat-pfe-report ~/.codex/skills/\n```\n\nVerifying it loaded\n\nClaude Code: ask \"what skills do you have available?\" or run claude skills list if your\nversion supports it.\n\nopencode: the skill shows up in the <available_skills> list the agent sees; you can also check\nvia the skill tool description.\n\nCodex CLI: run /skills (or type $ to mention a skill by name) to see it listed.\n\nIf it doesn't show up: confirm the file is spelled exactly SKILL.md (all caps), confirm the\nfrontmatter has both name and description, and restart the session — none of these tools\nhot-reload skills mid-session.\n\nUsing it\n\nOnce installed, just ask the agent to work on the PFE report — e.g. \"set up a new PFE report from\nthe INSAT template\" or \"compile my report\" from inside the project directory — and the description\nin SKILL.md is enough for the agent to pick it up on its own. You can also invoke it explicitly\nif your tool supports that (Codex CLI: $insat-pfe-report).\n\nThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.\nLearn more about bidirectional Unicode characters\n\nThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.\nLearn more about bidirectional Unicode characters\n\nThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.\nLearn more about bidirectional Unicode characters\n\nThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.\nLearn more about bidirectional Unicode characters\n\nThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.\nLearn more about bidirectional Unicode characters\n\nUse this skill when the user wants to write, edit, or compile an INSAT end-of-studies (PFE) report using the ahmedsilinii/INSAT-PFE-Report-Template LaTeX template. Covers scaffolding a new report from the template, editing chapters/preliminary pages, regenerating the Word-based cover and last pages, and compiling to PDF locally (pdflatex + biber) without Overleaf. Trigger on mentions of \"PFE report\", \"INSAT report template\", \"rapport de PFE\", or a project directory containing this template's main.tex.\n\nlicense\n\nSee upstream repo (github.com/ahmedsilinii/INSAT-PFE-Report-Template) for template license terms. Scripts in this skill are provided as-is.\n\nINSAT PFE Report — local build skill\n\nTurns github.com/ahmedsilinii/INSAT-PFE-Report-Template into something you can write and compile\nentirely on the command line — no Overleaf account needed.\n\nOverview\n\nThe template is a LaTeX report-class document (main.tex) that:\n\npulls chapters from chapters/*.tex (general intro, chapter1–5, general conclusion)\n\npulls front/back matter from preliminary pages/*.tex (dedication, acknowledgements, abstract,\nrésumé, list of acronyms, appendices) and bibliography from preliminary pages/bibliography.bib\n\nuses biblatex + biber with style=ieee (set explicitly in main.tex: \\usepackage[style=ieee, backend=biber]{biblatex}), tikz, pdfpages, pdflscape + eso-pic (rotated landscape\nheaders), listings, fancyhdr, titlesec, hyperref, plus table support (tabularx,\nlongtable, booktabs, xcolor[table])\n\nincludes pages that are NOT written in LaTeX — they're Word docs exported to PDF and pulled in\nwith \\includepdf: PageDeGarde_English.pdf (cover — both pages of it are included:\n\\includepdf{PageDeGarde_English.pdf} then \\includepdf[pages=2]{PageDeGarde_English.pdf} for\nan inner declaration page) and LastPage.pdf (back cover, single page), sourced from\nPageDeGarde_English.docx and LastPage.docx respectively\n\nThis has been verified end-to-end in a clean Ubuntu container: clone → install TeX Live + biber →\n4-pass build (pdflatex → biber → pdflatex → pdflatex, or latexmk -pdf as a one-shot) → valid PDF.\ndocx→PDF conversion for the cover/last page was verified with headless LibreOffice.\n\nFirst-time setup (once per machine)\n\nRun scripts/install-deps.sh. It installs, via apt:\n\nlibreoffice (headless docx→PDF conversion for the cover/last page — optional, skip with --no-libreoffice if the user only edits chapters)\n\nThis is a ~1–2GB install the first time. If the user is on a machine without apt (macOS, etc.),\ntell them to install MacTeX (or basictex + tlmgr install biblatex biber tikz pdfpages pdflscape listings fancyhdr titlesec enumitem csquotes) and LibreOffice via brew install --cask libreoffice,\nthen skip straight to compiling.\n\nGetting the template into a project\n\nRun scripts/fetch-template.sh <target-dir>. It git clone --depth 1s the upstream repo into\n<target-dir> and strips .git so it becomes the user's own project, not a fork tracking upstream.\nIf the user already has the template cloned, skip this step and just cd into it.\n\nCompiling\n\nRun scripts/compile.sh <project-dir> (defaults to .). It runs, inside that directory:\n\n```\nlatexmk -pdf -interaction=nonstopmode -halt-on-error main.tex\n```\n\nlatexmk auto-detects that biblatex needs biber (via main.bcf) and reruns pdflatex as many times\nas needed to settle cross-references, the ToC, and citations — this replaces the manual\npdflatex → biber → pdflatex → pdflatex sequence. Output is main.pdf in the project root.\n\nIf latexmk isn't available for some reason, fall back to the manual sequence, run from the project\ndirectory:\n\n```\npdflatex -interaction=nonstopmode -halt-on-error main.tex\nbiber main\npdflatex -interaction=nonstopmode -halt-on-error main.tex\npdflatex -interaction=nonstopmode -halt-on-error main.tex\n```\n\n(Two pdflatex passes after biber are required — one pass alone can leave the bibliography or ToC\none revision stale.)\n\nOn a clean compile you'll see a handful of harmless pdfTeX warning ... PDF inclusion lines from\nthe \\includepdf calls and possibly a destination with the same identifier warning — these are\nnot errors. Treat anything under ! LaTeX Error or ! Undefined control sequence in the log as\nthe thing to actually fix.\n\nIf the user only changed a .tex file (no new citations, no cover page swap), a single\npdflatex -interaction=nonstopmode main.tex is enough for a quick preview — just remember to do\nthe full 4-step (or latexmk) pass before calling it done, or citations/toc will be stale.\n\nEditing content\n\nChapters: edit chapters/chapter1.tex … chapter5.tex, general_introduction.tex,\ngeneral_conclusion.tex. To add/remove a chapter, edit the \\input{chapters/...} lines in\nmain.tex directly — mirror the existing pattern.\n\nReferences: add BibTeX entries to preliminary pages/bibliography.bib, cite with \\cite{key}.\nStyle is IEEE via biblatex — no manual formatting needed.\n\nImages: put files under assets/ (e.g. assets/Logos/) and \\includegraphics them.\n\nCode listings: use the lstlisting environment (already configured with line numbers, a light\ngray background, and syntax highlighting via the listings package).\n\nEditing the cover and last page (no Word needed)\n\nThese two source files are DOCX documents exported to PDF; main.tex includes the PDFs, not the\nDOCX. PageDeGarde_English.docx must stay a 2-page document (cover + inner declaration page) since\nmain.tex pulls both pages in separately — deleting a page or adding one shifts what\n\\includepdf[pages=2]{...} grabs. LastPage.docx is a single page. Two ways to edit them without\nopening Word/Overleaf:\n\nText edits only, keep the Word layout: edit PageDeGarde_English.docx / LastPage.docx with\nany tool the user has (LibreOffice Writer GUI, or programmatically with python-docx if it's a\nsimple find-and-replace like a name or project title), then run\nscripts/convert-cover-pages.sh <project-dir> to headless-convert both docx files back to PDF\nwith the exact same filenames (PageDeGarde_English.pdf, LastPage.pdf) that main.tex\nexpects. Re-run the compile after.\n\nFull redesign: if the user wants a different look, they can design a new PDF (Canva, LaTeX,\nwhatever) and drop it in under the same filename — main.tex doesn't care how the PDF was made.\n\nNever hand-edit the .pdf cover files directly; always regenerate from source and keep filenames\nidentical, since \\includepdf{PageDeGarde_English.pdf} and \\includepdf{LastPage.pdf} are literal\nfilename references in main.tex.\n\nCommon failure modes\n\n! LaTeX Error: File 'preliminary pages/bibliography.bib' not found: run from the project\nroot, not from inside chapters/ or preliminary pages/ — all paths in main.tex are relative\nto the root.\n\nCitations show as [?] or bibliography is empty: biber didn't run, or ran before a .bcf was\ngenerated. Always do a pdflatex pass before biber, or just use latexmk -pdf which sequences\nthis correctly on its own.\n\nbiber: command not found: rerun scripts/install-deps.sh, or apt install biber /\ntlmgr install biber depending on the TeX distribution.\n\nCover/last page missing or stale after a docx edit: the PDF wasn't regenerated, or was saved\nunder a different filename — rerun scripts/convert-cover-pages.sh and check the two PDF\nfilenames match exactly (case-sensitive).\n\nSpace in preliminary pages/ trips up a shell one-liner: always quote the path, e.g.\n\"preliminary pages/bibliography.bib\".", "url": "https://wpnews.pro/news/insat-pfe-report-installable-skill-claude-code-opencode-codex-cli", "canonical_source": "https://gist.github.com/jawherkh/52787520b448819ee9690cf0ee4acba5", "published_at": "2026-07-12 00:26:55+00:00", "updated_at": "2026-07-14 13:24:58.691734+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools", "large-language-models"], "entities": ["Claude Code", "opencode", "Codex CLI", "INSAT"], "alternates": {"html": "https://wpnews.pro/news/insat-pfe-report-installable-skill-claude-code-opencode-codex-cli", "markdown": "https://wpnews.pro/news/insat-pfe-report-installable-skill-claude-code-opencode-codex-cli.md", "text": "https://wpnews.pro/news/insat-pfe-report-installable-skill-claude-code-opencode-codex-cli.txt", "jsonld": "https://wpnews.pro/news/insat-pfe-report-installable-skill-claude-code-opencode-codex-cli.jsonld"}}