init repo structure and first skill #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Lint | |
| on: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| jobs: | |
| markdown: | |
| name: Markdown lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: DavidAnson/markdownlint-cli2-action@v19 | |
| with: | |
| globs: "**/*.md" | |
| frontmatter: | |
| name: YAML frontmatter check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Check SKILL.md frontmatter | |
| run: | | |
| exit_code=0 | |
| for file in $(find skills -name "SKILL.md" 2>/dev/null); do | |
| if ! head -1 "$file" | grep -q "^---$"; then | |
| echo "::error file=$file::Missing YAML frontmatter" | |
| exit_code=1 | |
| continue | |
| fi | |
| end=$(awk 'NR>1 && /^---$/{print NR; exit}' "$file") | |
| if [ -z "$end" ]; then | |
| echo "::error file=$file::Unclosed YAML frontmatter" | |
| exit_code=1 | |
| continue | |
| fi | |
| fm=$(sed -n "2,$((end-1))p" "$file") | |
| if ! echo "$fm" | grep -q "^name:"; then | |
| echo "::error file=$file::Missing 'name' in frontmatter" | |
| exit_code=1 | |
| fi | |
| if ! echo "$fm" | grep -q "^description:"; then | |
| echo "::error file=$file::Missing 'description' in frontmatter" | |
| exit_code=1 | |
| fi | |
| echo "OK: $file" | |
| done | |
| exit $exit_code |