diff options
| author | sillylaird <sillyfanboy@gmail.com> | 2026-09-03 00:33:59 +0000 |
|---|---|---|
| committer | sillylaird <sillyfanboy@gmail.com> | 2026-09-03 00:33:59 +0000 |
| commit | 898b52edcb47bcb3e9d6106e74ca73e74ea01e70 (patch) | |
| tree | 85c6ee5ad58b860144551184d4cf86b560c62b91 /.agents/skills/skill-quality-reviewer/scripts/extract-yaml.sh | |
| download | www-898b52edcb47bcb3e9d6106e74ca73e74ea01e70.tar.gz www-898b52edcb47bcb3e9d6106e74ca73e74ea01e70.zip | |
Diffstat (limited to '')
| -rwxr-xr-x | .agents/skills/skill-quality-reviewer/scripts/extract-yaml.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/.agents/skills/skill-quality-reviewer/scripts/extract-yaml.sh b/.agents/skills/skill-quality-reviewer/scripts/extract-yaml.sh new file mode 100755 index 0000000..55f81a6 --- /dev/null +++ b/.agents/skills/skill-quality-reviewer/scripts/extract-yaml.sh @@ -0,0 +1,28 @@ +#!/bin/bash +# extract-yaml.sh - Extract YAML frontmatter from SKILL.md files +# Part of skill-quality-reviewer + +# Usage: ./extract-yaml.sh <path-to-skill> +# Example: ./extract-yaml.sh ~/.claude/skills/git-workflow + +set -euo pipefail + +# Check if path provided +if [ $# -eq 0 ]; then + echo "Usage: $0 <path-to-skill>" + echo "Example: $0 ~/.claude/skills/git-workflow" + exit 1 +fi + +SKILL_PATH="$1" +SKILL_FILE="${SKILL_PATH}/SKILL.md" + +# Check if SKILL.md exists +if [ ! -f "$SKILL_FILE" ]; then + echo "Error: SKILL.md not found at ${SKILL_FILE}" + exit 1 +fi + +# Extract YAML frontmatter (between --- lines) +# Using sed to extract content between first and second --- +sed -n '/^---$/,/^---$/{ /^---$/d; p; }' "$SKILL_FILE" |
