Skip to content
Back to skills

Integration With Git Hooks

ASecurity

Sub-skill of pandoc: Integration with Git Hooks (+1).

  • 17 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 9, 2026
toolsgoshellbashgit

Security analysis

A100/100

Scanned September 9, 2026

npx -y skills add vamseeachanta/workspace-hub --skill integration-with-git-hooks --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Integration With Git Hooks?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Integration With Git Hooks
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vamseeachanta-integration-with-git-hooks/badge)](https://www.skillsdirectory.com/skills/vamseeachanta-integration-with-git-hooks)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: pandoc-integration-with-git-hooks
description: 'Sub-skill of pandoc: Integration with Git Hooks (+1).'
version: 1.0.0
category: development
type: reference
scripts_exempt: true
---

# Integration with Git Hooks (+1)

## Integration with Git Hooks


```bash
#!/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


```json
{
    "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": []
        }
    ]
}
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.