writing-skills: A Systematic Approach to Creating and Improving Agent Skills

Introduction

In environments like Cursor, Claude Code, and Codex, skills usually exist in the form of SKILL.md plus an optional references/ folder. In practice, three common problems arise: new skills have only scattered steps and lack clear “when to use” triggers; complex skills pile details into a single file, causing slow context loading; and agents repeatedly bypass critical rules or simply cannot retrieve the skill. Manually adjusting documentation to match each platform’s conventions is time-consuming and makes it difficult to unify standards within a team.

Below is an introduction to writing-skills on SkillHub (coordinates: @org-02qudk26/writing-skills-zh). When you need to create, update, or improve agent skills, it organizes tiered architecture, description optimization, rule anti-bypassing, naming conventions, and verification processes into a followable entry point, rather than having you figure out the documentation structure from scratch.

What is this

writing-skills is a meta-skill for skill authors and maintainers (SkillHub category ai-agent, version 1.0.0, source enterprise, publisher ZhiYu Tech). The official description is: Use when you need to create, update, or improve agent skills.

The main document within the skill package outlines capabilities: creating or improving discoverable, followable, and maintainable agent skills through tiered architecture, trigger description optimization, rule anti-bypassing, naming standards, and real-world testing. Tagged with requires_api_key=false, it does not rely on extra API keys.

  • SkillHub Page: writing-skills
  • API Coordinate: https://api.skillhub.cn/org-02qudk26/writing-skills-zh

Core Features

The following content is derived from the published skill package’s main document SKILL.md and its index, categorized by usage.

Tiered Architecture (Tier 1 / 2 / 3)

Skills guide you to choose volume and structure via a decision tree:

  1. Tier 1: Simple, single-file, recommended to be kept under about 200 lines, see references/tier-1-simple/.
  2. Tier 2: Multiple concepts, approximately 200–1000 lines, see references/tier-2-expanded/.
  3. Tier 3: Large platform types (documented examples include 10+ product scenarios), see references/tier-3-platform/, and lengthy content can be split into references/.

When improving existing skills, the same decision tree points to the corresponding fix path; for example, “too long” leads to modularization (Tier 3 templates), and “users can’t find it” leads to CSO.

Component and Template Library

The main document provides an index of components, with individual explanations for each component under references/:

Component Purpose
CSO Writing descriptions optimized for model retrieval and triggering (referred to as “LLM SEO” in the documentation)
Standards File naming, YAML frontmatter, directory structure
Anti-Rationalization Reducing the probability of agents ignoring or bypassing rules
Testing Verifying that skills are correctly followed using reproducible scenarios

Template types include technique, reference, discipline, and pattern, located in references/templates/ (e.g., technique.md, reference.md, discipline.md, pattern.md).

Workflow and Deployment Checks

The recommended workflow is summarized as: Clarify goals (decision tree) → Select template → Apply CSO to optimize description → Add anti-rationalization for prescriptive skills → Perform Red-Green-Refactor validation according to testing guidelines.

Pre-deployment checklist (excerpted from main document) includes: name matches directory name, SKILL.md has uppercase filename, description starts with a “Use when…” trigger phrase, metadata.triggers contains multiple keywords, main file line count recommended to be kept under 500 lines (put more content in references/), avoid using @ to force loading in cross-references, and test with real-world scenarios.

In-Package Case Studies

The case materials included with the skill (not user interviews) illustrate three typical use cases:

  1. New skill has few steps → Choose a lightweight single-file architecture and clearly state “when to use”.
  2. Complex platform skill is lengthy → Split details into references/ and keep the main process lightweight for fast loading.
  3. Agent ignores critical rules → Strengthen executable rules and test samples, and verify that descriptions, naming, and metadata facilitate triggering.

Installation and Enabling

Before installation, the skillhub CLI must be available on your local machine. The official page suggests referring to SkillHub Installation and Preferred Source Configuration.

Check CLI

command -v skillhub && skillhub --version

If not installed, execute according to the official documentation (full installation example):

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash

Install writing-skills

During installation, you must use --dir to point to the skills directory actually read by your current agent, otherwise installing to the default ./skills/ may not be recognized.

skillhub install @org-02qudk26/writing-skills-zh --dir <skills 目录>

Common directories for each environment (excerpted from SkillHub installation documentation, please use the corresponding path based on the product you are using):

Environment Skills Directory Example
Cursor ~/.cursor/skills/
Claude Code ~/.claude/skills/
Codex ~/.codex/skills/ or .agents/skills/ in the project
Windsurf ~/.codeium/windsurf/skills/ or .windsurf/skills/ in the project

After installation, restart or refresh the skill index according to the convention of the agent you are using, so that the new skill appears in the list of available skills.

Typical Usage

1. Create a New Simple Technique Skill (Tier 1)

Directory and file examples provided in the main document (OpenCode paths, you can change them to the directories in the table above based on your agent):

mkdir -p ~/.config/opencode/skills/my-technique
touch ~/.config/opencode/skills/my-technique/SKILL.md

SKILL.md YAML header example (excerpted from main document, focuses on repeating trigger conditions rather than a full workflow):

---
name: my-technique
description: Use when [specific symptom occurs].
metadata:
  category: technique
  triggers: error-text, symptom, tool-name
---

# My Technique

## When to Use
- [Symptom A]
- [Error message]

In Cursor, you can replace the root path with ~/.cursor/skills/my-technique/SKILL.md; the syntax and checks are the same.

2. Create a New Expanded Skill with References (Tier 2)

mkdir -p ~/.config/opencode/skills/my-skill/references/core
touch ~/.config/opencode/skills/my-skill/{SKILL.md,gotchas.md}
touch ~/.config/opencode/skills/my-skill/references/core/README.md

The main process stays in SKILL.md, while details and pitfalls go into references/ and gotchas.md, consistent with the Tier 2 architecture description.

3. Improve an Existing Skill

Just follow the decision tree in the main document, for example:

  • Description writes full workflow making it hard to trigger → Check references/cso/.
  • Rules are bypassed → Check references/anti-rationalization/.
  • Metadata and naming are non-standard → Check references/standards/.
  • Lack of verification before launch → Check references/testing/.

The main document also mentions the optional command /write-skill for guided creation, and the related skill opencode-expert (OpenCode environment configuration); whether it is available locally depends on whether you have installed the corresponding skill or product integration. This article does not elaborate on behaviors not declared in the SkillHub entry.

Applicable Scenarios and Notes

Who is this for

  • Developers and platform maintainers who need to batch produce or iterate on SKILL.md within a team.
  • When skills already exist but have low trigger rates, rules are frequently ignored, or single-file bloat requires modularization.

Limitations and Notes

  • This skill is a methodology and template scheduling entry point; specific clauses are in references/ sub-documents; after installation, it should be loaded together with the agent workspace, not just remembered as one sentence from the SkillHub introduction.
  • The example paths in the documentation mix OpenCode (~/.config/opencode/skills/) with generic agent directories; when writing files, ensure alignment with the skills root directory of your current product.
  • SkillHub statistics show a rating of 100000, downloads of 726, and installations of 0 (data point at time of scraping); a zero installation count only reflects the store’s statistical口径 and does not mean the skill is unavailable.
  • The main document lists a table of common errors (e.g., description written as a workflow summary, missing metadata.triggers, overly generic naming, single file too long, etc.), which can serve as a self-check list when revising drafts.

Conclusion

writing-skills treats agent skill documentation as an engineerable product: choose Tier by volume, use CSO and triggers to solve “not found”, use anti-rationalization and testing to solve “not followed”, and use standards and checklists to solve “not maintainable”. When you need to create or retool a skill next time, you can first install this skill, and then open the corresponding references/ chapter following the decision tree to start writing.

  • SkillHub: https://www.skillhub.cn/skills/org-02qudk26/writing-skills-zh
  • Installation Guide: https://skillhub.cn/install/skillhub.md
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye