DEV Community

kanta13jp1
kanta13jp1

Posted on

Why Prompt-Only Agent Skills Fail — And 3 Zero-Dependency Python CLI Skills Built to the agentskills.io Spec

If you rely on coding agents like Claude Code, OpenAI Codex, Google Antigravity, Gemini CLI, or Cursor in daily shipping pipelines, prompt-only rules eventually fail in predictable ways: a silent UTF-16LE file break on Windows PowerShell, an unverified 30+ MB video missing AAC audio, or an architecture decision based on an LLM search summary instead of live repository metrics.

After auditing the open Agent Skills Specification (agentskills.io/specification) from primary docs, I published agent-skills (MIT License) — a compact repository of SKILL.md modules backed by zero-dependency Python 3.10+ CLI gates.


Key Takeaways from the agentskills.io Specification

The open specification centers on 3-stage progressive disclosure so hundreds of skills never bloat the active context window:

  1. Metadata (~100 tokens): Only name (max 64 lowercase alphanumeric/hyphen chars matching the folder name) and description (max 1024 chars) from SKILL.md YAML frontmatter are loaded at startup.
  2. Instructions (< 5000 tokens / under 500 lines recommended): The Markdown body is loaded only once the agent activates the skill.
  3. Resources (scripts/, references/, assets/): Bundled scripts and references are loaded on demand, keeping references one directory level deep, and validated via skills-ref validate ./my-skill.

In short: keep SKILL.md concise and move deterministic verification into self-contained scripts/.


3 Deterministic Skills Included in kanta13jp1/agent-skills

Every bundled check uses only the Python 3.10+ standard library (video-delivery-qc additionally calls ffmpeg / ffprobe).

1. video-delivery-qc — Pre-Publish Video & Audio Gate

Checks landscape (1920x1080) or vertical (1080x1920) output streams, AAC audio presence, EBU R128 / ITU-R BS.1770 integrated loudness (-14 LUFS target), and file-size ceilings (e.g., < 30 MB), and renders a frame contact sheet PNG for visual verification.

python -B skills/video-delivery-qc/scripts/video_qc.py path/to/output.mp4 \
  --profile landscape_1080p \
  --max-size-mb 30 \
  --contact-sheet contact_sheet.png \
  --json
Enter fullscreen mode Exit fullscreen mode

2. windows-powershell-guard — Prevent PowerShell 5.1 Encoding & Syntax Traps

Static auditor that catches UTF-16LE corruption from Windows PowerShell 5.1 > redirection, unexpected UTF-8 BOMs in JSON/Python/Markdown, CRLF drift, and POSIX && chains before CI rejects them. Includes --strict-ps1 to verify .ps1 scripts use UTF-8 BOM + CRLF as PowerShell 5.1 expects.

python -B skills/windows-powershell-guard/scripts/check_text_hygiene.py . --json
Enter fullscreen mode Exit fullscreen mode

3. primary-source-oss-review — Primary GitHub Telemetry Over Guesswork

Queries GitHub's REST API directly for Stars, true Watchers (subscribers_count, instead of watchers_count which mirrors stars), Forks, license, and push recency to support a disciplined 3-option OSS-first review (Direct Integration vs. Fork & Extend vs. Build from Scratch).


One Real Cross-OS Lesson from CI (ubuntu-latest + windows-latest)

Even with strict scripts, our very first CI run (ubuntu-latest + windows-latest, 13 unit/E2E tests) failed on Windows because Git checked out .py and .md files with CRLF line endings. Adding an explicit .gitattributes (* text=auto eol=lf and *.ps1 text eol=crlf) resolved the cross-OS failure cleanly, and both matrices now pass 13/13 tests.


Install in One Command

npx skills add kanta13jp1/agent-skills
Enter fullscreen mode Exit fullscreen mode

What repetitive failure in your agent workflow do you most wish were enforced by a deterministic CLI script instead of a prompt rule?

Top comments (0)