Agent skill
pandoc-integration-with-git-hooks
Sub-skill of pandoc: Integration with Git Hooks (+1).
Install this agent skill to your Project
npx add-skill https://github.com/vamseeachanta/workspace-hub/tree/main/.claude/skills/_archive/development/documentation/pandoc/integration-with-git-hooks
SKILL.md
Integration with Git Hooks (+1)
Integration with Git Hooks
#!/bin/bash
# .git/hooks/pre-commit
# Rebuild PDFs before commit
set -e
# Check if any markdown files changed
changed_md=$(git diff --cached --name-only --diff-filter=ACM | grep '\.md$' || true)
if [[ -n "$changed_md" ]]; then
echo "Rebuilding PDF documents..."
for file in $changed_md; do
if [[ -f "$file" ]]; then
output="${file%.md}.pdf"
echo " Converting: $file -> $output"
pandoc "$file" -o "$output" --pdf-engine=xelatex --toc
git add "$output"
fi
done
fi
Integration with VS Code Tasks
{
"version": "2.0.0",
"tasks": [
{
"label": "Pandoc: Build PDF",
"type": "shell",
"command": "pandoc",
"args": [
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}.pdf",
"--pdf-engine=xelatex",
"--toc",
"--number-sections"
],
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"echo": true,
"reveal": "always"
}
},
{
"label": "Pandoc: Build DOCX",
"type": "shell",
"command": "pandoc",
"args": [
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}.docx",
"--toc"
]
},
{
"label": "Pandoc: Watch and Build",
"type": "shell",
"command": "find . -name '*.md' | entr -c pandoc ${file} -o ${fileDirname}/${fileBasenameNoExtension}.pdf --pdf-engine=xelatex",
"isBackground": true,
"problemMatcher": []
}
]
}
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
gsd-complete-milestone
Archive completed milestone and prepare for next version
gsd-reapply-patches
Reapply local modifications after a GSD update
gsd-verify-work
Validate built features through conversational UAT
gsd-thread
Manage persistent context threads for cross-session work
clinical-trial-protocol
Generate clinical trial protocols for medical devices or drugs through a modular, waypoint-based architecture with research-only and full protocol modes.
single-cell-rna-qc
Performs quality control on single-cell RNA-seq data (.h5ad or .h5 files) using scverse best practices with MAD-based filtering and comprehensive visualizations.
Didn't find tool you were looking for?