← ClaudeAtlas

aide-to-pdflisted

Generate PDF from a spec. Use when: exporting documentation to PDF, generating a print-friendly spec. Do NOT use for: creating documentation (use aide-create)
ragnarwestad/aide · ★ 0 · Code & Development · score 75
Install: claude install-skill ragnarwestad/aide
You will help the user **generate a PDF** from a spec. ## Input **Input:** $ARGUMENTS (a spec number, a full folder ID, or an issue key its title began with) The user has run: ```bash /aide-to-pdf <ISSUE_ID> ``` **Examples:** - `/aide-to-pdf 17` - by number - `/aide-to-pdf 17-fix-validation` - by folder - `/aide-to-pdf PROJ-7637` - by the issue key the title began with ## Your task 1. **Validate input:** - If the input matches an issue key (`PROJ-<number>`): the key is part of the slug - If the input is a number only (`NN`): number shorthand - Anything else: full directory ID (`NN-slug`) - If no input: Ask the user for a number or full ID 2. **Determine REPORTS_ROOT:** ```bash # The lib resolves it: .aide/config in the project root wins, # otherwise <project-root>/specs source ~/.local/bin/_aide-spec-lib.sh REPORTS_ROOT="$(aide_specs_root)" ``` 3. **Resolve to the full directory ID** (flat structure: everything lives as `<NN>-slug/` directly under REPORTS_ROOT): ```bash if echo "$INPUT" | grep -qE '^PROJ-[0-9]+$'; then # Issue key: find the directory containing it DIR=$(find "$REPORTS_ROOT" -maxdepth 1 -type d -name "*${INPUT}*" | head -1 | xargs basename) elif echo "$INPUT" | grep -qE '^[0-9]+$'; then # Number shorthand: find <NN>-* NN=$(printf '%02d' "$INPUT") DIR=$(find "$REPORTS_ROOT" -maxdepth 1 -type d -name "${NN}-*" | head -1 | xargs basename) else # Assume full directory ID DIR="$INP