mirror of
https://github.com/NomaDamas/k-skill.git
synced 2026-09-14 16:37:18 +08:00
720964cf49
This snapshots the current repository updates as a coherent release-prep baseline: workspace/package scaffolding, release automation docs and workflows, refreshed skill/setup documentation, roadmap expansion, and the README thumbnail polish. Constraint: Node packages in this repo must use npm workspaces and Changesets for releases Constraint: Python release automation stays scaffold-only until a real package exists Rejected: Split the current work into multiple commits | user asked to commit the current changes together Confidence: medium Scope-risk: moderate Reversibility: clean Directive: Keep release docs, workflows, and package metadata aligned when adding future packages Tested: npm run ci Not-tested: GitHub Actions execution on remote after push
57 lines
1.3 KiB
Bash
Executable File
57 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
status=0
|
|
|
|
while IFS= read -r -d '' skill_dir; do
|
|
skill_name="$(basename "$skill_dir")"
|
|
skill_file="$skill_dir/SKILL.md"
|
|
|
|
if [[ ! -f "$skill_file" ]]; then
|
|
echo "missing SKILL.md: $skill_name"
|
|
status=1
|
|
continue
|
|
fi
|
|
|
|
if ! head -n 1 "$skill_file" | grep -qx -- "---"; then
|
|
echo "missing frontmatter start: $skill_file"
|
|
status=1
|
|
fi
|
|
|
|
if ! grep -q '^name: ' "$skill_file"; then
|
|
echo "missing name field: $skill_file"
|
|
status=1
|
|
fi
|
|
|
|
if ! grep -q '^description: ' "$skill_file"; then
|
|
echo "missing description field: $skill_file"
|
|
status=1
|
|
fi
|
|
|
|
declared_name="$(sed -n 's/^name: //p' "$skill_file" | head -n 1 | tr -d '"')"
|
|
if [[ "$declared_name" != "$skill_name" ]]; then
|
|
echo "name mismatch: $skill_file declares '$declared_name' but directory is '$skill_name'"
|
|
status=1
|
|
fi
|
|
done < <(
|
|
find "$root" -mindepth 1 -maxdepth 1 -type d \
|
|
! -name .git \
|
|
! -name .github \
|
|
! -name .omx \
|
|
! -name .changeset \
|
|
! -name docs \
|
|
! -name node_modules \
|
|
! -name packages \
|
|
! -name python-packages \
|
|
! -name scripts \
|
|
! -name examples \
|
|
-print0
|
|
)
|
|
|
|
if [[ "$status" -ne 0 ]]; then
|
|
exit "$status"
|
|
fi
|
|
|
|
echo "skill layout looks valid"
|