JordanGunn/nunchuck / skills/md/md-merge
md-merge
VerifiedMerges markdown chunks back into a single document, reversing the split operation with integrity checks.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 486 B |
| references/00_ROUTER.md | markdown | 468 B |
| references/01_SUMMARY.md | markdown | 490 B |
| references/02_TRIGGERS.md | markdown | 394 B |
| references/03_ALWAYS.md | markdown | 335 B |
| references/04_NEVER.md | markdown | 212 B |
| references/05_PROCEDURE.md | markdown | 503 B |
| references/06_FAILURES.md | markdown | 347 B |
| scripts/include/md_merge_cli.py | script | 3.0 KB |
| scripts/skill.ps1 | script | 1.6 KB |
| scripts/skill.sh | script | 1.5 KB |
scripts/skill.ps1
View on GitHub$ErrorActionPreference = "Stop"
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
$IncludeDir = Join-Path $ScriptDir "include"
$ConfigPath = Join-Path $ScriptDir ".config.ps1"
if (Test-Path $ConfigPath) {
. $ConfigPath
}
function Show-Help {
@"
md-merge - Merge markdown chunks back into a single document
Commands:
help
validate
Usage:
md-merge <chunks_dir> [--out <file>] [--force] [--dry-run]
md-merge help
md-merge validate
Notes:
- Reads chunks from <chunks_dir>.
- Uses .SPLIT.json if present for ordering; otherwise uses file order.
- Converts chunk H1 headings back to H2.
"@
}
function Invoke-Validate {
$errors = 0
if (-not (Get-Command uv -ErrorAction SilentlyContinue)) {
Write-Error "error: uv not found. Install from https://docs.astral.sh/uv/"
$errors++
}
$pyproject = Join-Path $IncludeDir "pyproject.toml"
if (-not (Test-Path $pyproject)) {
Write-Error "error: missing $pyproject"
$errors++
}
$cli = Join-Path $IncludeDir "md_merge_cli.py"
if (-not (Test-Path $cli)) {
Write-Error "error: missing $cli"
$errors++
}
if ($errors -gt 0) {
exit 1
}
Write-Output "ok: md-merge skill is runnable"
}
function Invoke-Run {
param([string[]]$Arguments)
Push-Location $IncludeDir
try {
& uv run python md_merge_cli.py @Arguments
} finally {
Pop-Location
}
}
$command = if ($args.Count -gt 0) { $args[0] } else { "help" }
switch ($command) {
"help" { Show-Help }
"validate" { Invoke-Validate }
default { Invoke-Run -Arguments $args }
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |