Manuscript scaffold
Skill youngeun1209/oh-my-claudecode-research/skills/manuscript-scaffold
Scaffold a LaTeX manuscript directory for a research project — copy the bundled skeleton (main.tex + sections/* + figures/ + references.bib + .gitignore + README), optionally apply a journal-specific documentclass from templates/journal-registry.json, optionally clone an Overleaf project and cache the Git credential helper (token never persisted to tracked files), commit on the default branch, and ask before pushing. Invoked by /start-research phase 6, but also standalone-callable when adding a manuscript dir to an existing project later.From its SKILL.md
npx -y skills add youngeun1209/oh-my-claudecode-research --skill manuscript-scaffoldAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
5.7 KB, as published. Nobody here has run it
<Use_When>
/start-researchreaches phase 6 and the user did not opt out of manuscript scaffolding.- A project that was set up with
Manuscript dirempty later wants to add a manuscript directory without re-running the full/start-researchinterview. - An existing manuscript directory needs to be wired up to a fresh Overleaf project (re-invoke with the new URL — the skill detects existing state and asks before clobbering). </Use_When>
<Do_Not_Use_When>
- The user wants only journal-template metadata captured in
CLAUDE.mdwithout creating files (no skeleton, no commit) — that is aCLAUDE.mdedit, not this skill. - The manuscript dir already has substantive content and the user is not asking to scaffold (phase 1 will stop anyway, but don't invoke if you already know).
- The project explicitly opted out of LaTeX (e.g. plain-markdown-only workflow). This skill is LaTeX-shaped. </Do_Not_Use_When>
| Input | Required | Source | Used by |
|---|---|---|---|
MANUSCRIPT_DIR | yes | ## Research stack → Manuscript dir (default paper/) | all phases |
TARGET_VENUE | no | ## Project context → Target venue | phase 2 (journal lookup) |
OVERLEAF_GIT_URL | no | ## Research stack → Overleaf git URL | phase 3 (clone), phase 4 (push target) |
WORKING_TITLE | no | ## Project context → Working title | phase 3 (README seed) |
CLAUDE_PLUGIN_ROOT | yes | env var (set by Claude Code) | phase 2 (registry path), phase 3 (skeleton source) |
When invoked standalone (not from /start-research), if MANUSCRIPT_DIR is not given, read the project's CLAUDE.md ## Research stack block. If still missing, stop and ask the user.
</Configuration>
Phases
Execute in order. Each phase is a separate file — read it, follow it exactly, then return here for the next phase.
- Phase 1 — State check. Read
phases/01-state-check.md. Decide whether to proceed, stop and ask the user, or skip (existing-content path). - Phase 2 — Journal template lookup. Read
phases/02-journal-template.md. MatchTARGET_VENUEagainst the bundled registry; on user-confirmed match, prepare thedocumentclass/bibstylerewrite values for phase 3. Skip if no venue. - Phase 3 — Skeleton (with or without Overleaf). Read
phases/03-skeleton.md. Branches internally on whetherOVERLEAF_GIT_URLwas provided. - Phase 4 — Commit and ask before push. Read
phases/04-commit-push.md. Always commit locally; only push on explicit user confirmation (default no on empty input).
If phase 1 stops the flow (existing content, user declines), do not run phases 2–4. Report what happened and return control to the caller.
Security invariants (apply across all phases)
- No
.clsfiles bundled in this plugin. Phase 2 may swap a\documentclassline in the skeleton copy only; any.clsarchives a user opts into fetching go into the user'sMANUSCRIPT_DIR, never into the plugin repo. - No silent network calls. Phase 2's URL-fetch fallback runs WebFetch only when the user passes an
https://URL and confirms the SHA256 of the downloaded archive before extraction. - No fuzzy venue matching. Phase 2 matches case-insensitive exact against the registry name and aliases. A near-miss is a miss.
- Overleaf token never written to a tracked file. Phase 3 stores the token only in
git credential-store(scoped togit.overleaf.com) or~/.netrc. Never write the token intoCLAUDE.md, agent memory, the project repo, or this plugin. When referencing the token in any output, mask all but the last 4 chars. - No auto-push. Phase 4 always asks; default on empty input is
no. On push failure, leave the local commit in place and surface the exact retry command.
Return value (for the caller)
After phase 4 (or early stop), return a structured summary in this shape so the caller can fold it into its own report:
Manuscript scaffold: <created | skipped | stopped at phase N>
Manuscript dir: <path> (<created | existed empty | existed with content — skipped | overleaf clone>)
Journal template: <applied <class> + bibstyle <style> | not applied | no venue>
Overleaf: <connected to <masked URL> | local only | not configured>
Branch / commit: <branch> @ <short-SHA> (<pushed | push deferred | no remote>)
Deferred push: <exact `git -C <dir> push origin <branch>` command, only if push deferred>
The caller (e.g. /start-research phase 6) merges this into its end-of-run report.