What Is the Purpose of SKILL.md in Patent-Disclosure-Skill?

SKILL.md serves as the thin routing manifest and central entry-point dispatcher for the patent-disclosure-skill repository, defining the skill’s metadata, four exclusive workflow modes, and the mapping from user commands to specific prompt directories while containing no implementation logic itself.

The patent-disclosure-skill repository by handsomestWei orchestrates complex patent documentation workflows through a declarative, modular architecture. At the center of this system sits SKILL.md, a lightweight YAML-fronted markdown file that functions as the skill's command router rather than its processing engine. Understanding the purpose of SKILL.md in patent-disclosure-skill is essential for developers extending the tool or agents interpreting its workflow structure.

Core Architecture of SKILL.md

Unlike traditional entry points that contain business logic, SKILL.md operates as a declarative configuration layer. As implemented in handsomestWei/patent-disclosure-skill, the file uses YAML front-matter to declare the skill’s identity and a structured routing table to delegate execution to discrete prompt files.

Metadata Declaration

Lines 12–19 of SKILL.md establish the skill’s identity block. This section declares the name, description, version, and invocation permissions. Crucially, it sets user-invocable: true, allowing direct user activation of the skill. This metadata ensures that skill discovery systems can index the repository without parsing implementation files.

The Routing Manifest

The same line range (12–19) defines the mode routing specification. Rather than embedding logic, SKILL.md maintains a thin router pattern where every operational step is executed by reading corresponding markdown prompt files from dedicated subdirectories. This design enforces a strict separation between routing configuration and functional implementation.

The Four Operating Modes

According to the routing table defined in lines 12–19 and expanded in lines 24–34, SKILL.md dispatches user intent into four mutually exclusive workflow modes. Each mode points to a specific prompts directory that contains the actual conversation flows and processing instructions.

  • Mode A – Disclosure Writing: Triggered by commands like /patent-disclosure-skill or /交底书, this routes to prompts/disclosure/ to guide users through creating technical disclosure documents.

  • Mode B – Plain-Language Reading: Activated by /patent-read or /读专利, this directs to prompts/reader/ for translating dense patent claims into accessible language.

  • Mode C – Skill Evolution: Invoked via /patent-evolve or /技能进化, this maps to prompts/evolution/ for policy sniffing and capability refinement workflows.

  • Mode D – Office-Action Response: Triggered by /oa or /审查答复, this routes to prompts/oa/ to assist with patent examination rebuttals and amendment strategies.

Safety Guards and Directory Mapping

Lines 63–70 of SKILL.md implement safety guards that prevent accidental mode crossover. For example, the router explicitly blocks evolution or office-action workflows when the user intent is strictly document reading. This ensures that high-stakes patent operations execute in controlled contexts.

The file also provides a comprehensive directory map listing the repository layout—encompassing prompts/, references/, tools/, and outputs/ directories—so that both human developers and autonomous agents understand where functional components reside without hardcoding paths.

Programmatic Usage

Downstream tools consume SKILL.md to dynamically load the correct workflow. Below are practical implementations showing how to parse the routing manifest and dispatch commands.

import yaml
import pathlib

# Load the skill’s routing map from SKILL.md

skill_path = pathlib.Path(__file__).parent.parent / "SKILL.md"
with skill_path.open(encoding="utf-8") as f:
    # Read YAML front-matter only (lines 12-19 typically)

    meta = yaml.safe_load(f)
    # meta now contains name, description, version, modes, etc.

def pick_mode(command: str) -> str:
    """Route user commands to prompt directories based on SKILL.md triggers."""
    if command in ("/patent-disclosure-skill", "/交底书"):
        return "disclosure"
    if command in ("/patent-read", "/读专利"):
        return "reader"
    if command in ("/patent-evolve", "/技能进化"):
        return "evolution"
    if command in ("/oa", "/审查答复"):
        return "oa"
    raise ValueError("Unsupported command: not defined in SKILL.md routing table")

# CLI invocation using the SKILL.md router

# The driver reads SKILL.md to determine which prompt to load

$ claude-skill run --skill ./SKILL.md --mode disclosure

# Internally, the driver performs a Read operation on prompts/disclosure/intake.md,

# then chains subsequent prompts as defined in the manifest routing table.

Summary

  • SKILL.md functions as a declarative routing manifest, not an implementation file.
  • It defines four exclusive modes (Disclosure, Reader, Evolution, OA) mapping to prompts/disclosure/, prompts/reader/, prompts/evolution/, and prompts/oa/.
  • The file contains metadata (name, version, user-invocable status) in lines 12–19.
  • Safety guards in lines 63–70 prevent workflow mode crossover and enforce context-appropriate prompt loading.
  • All heavy processing is delegated by reading markdown prompt files; SKILL.md only routes.

Frequently Asked Questions

What file format does SKILL.md use?

SKILL.md is a markdown file with YAML front-matter. The YAML block (lines 12–19) contains the structured metadata and routing configuration, while the remaining markdown sections provide human-readable documentation about the skill's purpose and directory structure.

How does SKILL.md prevent workflow conflicts?

According to lines 63–70 of the source file, SKILL.md enforces safety guards that block mode crossover. For instance, if a user invokes a reading command, the router prevents accidental execution of evolution or office-action prompts, ensuring that destructive or high-stakes operations only run in explicitly intended contexts.

Where is the actual implementation logic stored?

The implementation logic resides entirely within the prompts/ subdirectories (prompts/disclosure/, prompts/reader/, prompts/evolution/, prompts/oa/) and the tools/ directory. SKILL.md only stores references to these locations; it delegates execution by issuing Read operations on the specific markdown prompt files that contain the conversational workflows and processing instructions.

Which commands trigger the different routing modes?

As defined in the routing table, Mode A (Disclosure) responds to /patent-disclosure-skill or /交底书; Mode B (Reader) to /patent-read or /读专利; Mode C (Evolution) to /patent-evolve or /技能进化; and Mode D (OA Response) to /oa or /审查答复. These trigger conditions map directly to the directory structure outlined in lines 12–19 of SKILL.md.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →