write-skills

Apply test-driven development to write and verify agent Skills.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/mengdehong/opencode-dotfiles --skill write-skills-mengdehong
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-skills
Source: https://github.com/mengdehong/opencode-dotfiles/tree/main/skills/write-skills
Command: npx skills add https://github.com/mengdehong/opencode-dotfiles --skill write-skills-mengdehong

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing reliable, reusable Skills is error-prone without a disciplined process. This guide introduces test-driven development applied to skill documentation to prevent gaps, rationalizations, and inconsistent discovery.

Core Features & Use Cases

  • Enforces RED-GREEN-REFACTOR workflow for Skill creation and edits.
  • Provides a standardized frontmatter schema and evaluation patterns.
  • Includes guidance for testing Skills with subagents and meta-testing.

Quick Start

Draft a minimal SKILL.md for a new Skill, write baseline tests without the Skill, then implement and re-test until all scenarios pass.

Frequently Asked Questions about write-skills

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I apply test-driven development to agent skill creation?

To apply TDD to skill creation, draft a minimal SKILL.md, write baseline RED tests without the skill, then implement and re-test until all scenarios pass. This enforces frontmatter validation and closes loopholes before deployment.

What is the RED-GREEN-REFACTOR workflow for writing agent skills?

The RED-GREEN-REFACTOR workflow for writing agent skills involves writing baseline tests first (RED), implementing the skill to pass tests (GREEN), and refactoring to close loopholes. It prevents gaps and inconsistent discovery in skill documentation.

Why does my agent skill fail frontmatter validation during deployment?

Agent skill frontmatter validation fails when the name and description exceed length limits or lack required schema fields. Applying a disciplined TDD workflow checks frontmatter validation early, preventing deployment errors from inconsistent documentation.

Can I use TDD to verify skill documentation with subagents?

Yes, you can use TDD to verify skill documentation with subagents. The workflow provides guidance for testing skills with subagents and meta-testing, ensuring the documentation behaves correctly and consistently before final deployment.

What's the best way to write reliable agent skills without rationalizations?

The best way to write reliable agent skills without rationalizations is enforcing a test-driven documentation process. Standardized frontmatter schemas and evaluation patterns prevent gaps, ensuring reusable and error-free skill deployment.

Are there length limits for agent skill frontmatter name and description fields?

Yes, there are length limits for agent skill frontmatter name and description fields. Enforcing these frontmatter length limits during the RED-GREEN-REFACTOR workflow ensures standardized evaluation patterns and prevents discovery inconsistencies.