Align skills with frozen Ink contracts
This commit is contained in:
Executable
+35
@@ -0,0 +1,35 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
repo=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd -P)
|
||||
count=0
|
||||
for skill in "$repo"/skills/*/SKILL.md; do
|
||||
[ -f "$skill" ] || continue
|
||||
directory=$(basename -- "$(dirname -- "$skill")")
|
||||
name=$(sed -n 's/^name:[[:space:]]*//p' "$skill" | sed -n '1p')
|
||||
[ "$name" = "$directory" ] || {
|
||||
printf 'name mismatch: %s != %s\n' "$name" "$directory" >&2
|
||||
exit 1
|
||||
}
|
||||
grep '^description:' "$skill" >/dev/null
|
||||
count=$((count + 1))
|
||||
done
|
||||
[ "$count" -eq 3 ] || {
|
||||
printf 'expected 3 skills, found %s\n' "$count" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
configure=$repo/skills/configure-ink-agent/SKILL.md
|
||||
grep 'access.*read.*write' "$configure" >/dev/null
|
||||
grep 'named agent policy is metadata-only' "$configure" >/dev/null
|
||||
grep 'no `INK_AGENT_HOME` contract' "$configure" >/dev/null
|
||||
|
||||
ink_cli=$repo/skills/ink-cli/SKILL.md
|
||||
grep 'ink agent catalog' "$ink_cli" >/dev/null
|
||||
grep 'frozen `tool delegate` subject' "$ink_cli" >/dev/null
|
||||
|
||||
create_tool=$repo/skills/create-ink-agent-cli-tool/SKILL.md
|
||||
grep 'stage/match/apply' "$create_tool" >/dev/null
|
||||
grep 'projection' "$create_tool" >/dev/null
|
||||
|
||||
printf 'ok\n'
|
||||
Reference in New Issue
Block a user