Deft directive write skill

From deftai/directive · View interactive version

Deft directive write skill is an AI agent skill from the GitHub repository deftai/directive. Create new deft skills with proper structure, RFC2119 notation, triggers, and progressive disclosure. Use when user wants to create, write, or build a new deft skill.

How to use this skill

Skill file

<!-- AUTO-GENERATED by task packs:render -- DO NOT EDIT MANUALLY -->

<!-- Purpose: rendered skill -->

<!-- Source of truth: packs/skills/skills-pack-0.1.json -->

<!-- Regenerate with: task packs:render -->

<!-- Edit the source, not this file. Slice instead of loading every SKILL.md: task packs:slice skills by-trigger --trigger <kw> (or list) -->

Deft Write Skill

Create new deft skills that follow directive's conventions: RFC2119 notation, YAML frontmatter with triggers, clear When-to-Use sections, and proper naming.

Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.

Inspired by write-a-skill from mattpocock/skills. Adapted to deft's SKILL.md conventions, RFC2119 notation, and naming patterns.

When to Use


Deft Skill Naming Conventions

| Skill type | Naming pattern | Example |

|---|---|---|

| Framework / meta | deft-{verb} | deft-build, deft-setup |

| GitHub-integrated | deft-directive-gh-{verb} | deft-directive-gh-slice (triage verb reclaims to deft-directive-refinement) |

| Domain / project-specific | {project}-{verb} | my-app-deploy |


Process

Step 1: Gather requirements

Ask the user (one question at a time):

  1. What task or domain does this skill cover?
  2. What specific use cases should it handle?
  3. Does it require external tools (e.g., gh, docker, database CLIs)?
  4. Should it produce files, run commands, or guide a conversation?
  5. Any reference material or existing workflows to model from?

Step 2: Draft the skill

Step 3: Review with user

Present the draft and ask:

Iterate until approved.

Step 4: Create the skill


Deft SKILL.md Template

---
name: {skill-name}
description: >
  {What it does in 1–2 sentences}. Use when {specific triggers —
  what the user would say or what context activates this skill}.
  Do NOT trigger on {near-miss phrase 1} or {near-miss phrase 2}.
triggers:
  - {trigger phrase 1}
  - {trigger phrase 2}
[metadata:
  clawdbot:
    requires:
      bins: ["gh"]   # only if external CLI is needed]
---

# {Skill Title}

{One-line description of what this skill does.}

Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.

[> Inspired by ... — optional attribution]

## When to Use

- {Use case 1}
- {Use case 2}

[## Prerequisites

- ! Verify {tool} is available — stop and report if not]

---

## Process

### Step 1: {Name}

- ! {mandatory action}
- ~ {recommended action}
- ⊗ {forbidden action}

### Step 2: {Name}

...

---

## Anti-Patterns

- ⊗ {what NOT to do}
- ⊗ {what NOT to do}

Description Writing Rules

The description is the only thing the agent sees when deciding whether to load this skill. Write it to answer:

  1. What capability does this provide?
  2. When should it trigger? (use "Use when..." pattern)
  3. What near-miss phrases must NOT trigger it? (use "Do NOT trigger on..." pattern)

Anti-Patterns


Host-adapter skills (multi-host) (#2928)

Large skills that branch on agent host (the runtime: Warp, Cursor, OpenClaw, Grok Build, generic-terminal) SHOULD use progressive host adapters:

  1. ! Keep a thin host-neutral core in SKILL.md (triggers, phase overview, detect, route table, cross-host MUST gates).
  2. ! Put shared depth in references/core-*.md.
  3. ! Put each host path in references/host-<id>.md (spawn primitive, cwd rules, monitor liveness, host MUST NOT list).
  4. ! Default load path: detect host → read core + one adapter.
  5. ⊗ Load all host adapters “just in case.”

Exemplar: skills/deft-directive-swarm/ (route table in SKILL + references/host-openclaw.md etc.).

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.