Agent Skills › DotHarness/dotcraft › skill-authoring

skill-authoring

GitHub

指导如何使用 SkillManage 工具创建、编辑、修补或删除 DotCraft 工作区技能,规范 SKILL.md 的 Frontmatter 和结构,确保技能的复用性和准确性。

src/DotCraft.Core/Skills/BuiltIn/skill-authoring/SKILL.md DotHarness/dotcraft

触发场景

需要创建新的工作区技能 修改或更新现有技能 删除过时的技能

安装

npx skills add DotHarness/dotcraft --skill skill-authoring -g -y
更多选项

非标准路径

npx skills add https://github.com/DotHarness/dotcraft/tree/main/src/DotCraft.Core/Skills/BuiltIn/skill-authoring -g -y

不安装直接使用

npx skills use DotHarness/dotcraft@skill-authoring

指定 Agent (Claude Code)

npx skills add DotHarness/dotcraft --skill skill-authoring -a claude-code -g -y

安装 repo 全部 skill

npx skills add DotHarness/dotcraft --all -g -y

预览 repo 内 skill

npx skills add DotHarness/dotcraft --list

SKILL.md

Frontmatter
{
    "name": "skill-authoring",
    "tools": "SkillManage",
    "description": "Use when authoring or maintaining DotCraft workspace skills via SkillManage."
}

Skill Authoring

Overview

Skills are procedural memory: reusable, narrow instructions for task types that are likely to recur. Load this skill when you need to create, rewrite, or patch a workspace skill with SkillManage.

Do not create skills for simple one-off answers. A good skill teaches when to use it, what exact steps to follow, what pitfalls to avoid, and how to verify the result.

When To Use

Use SkillManage when:

  • A complex task succeeded after several tool calls and produced a reusable workflow.
  • A tricky error was fixed and the fix is likely to recur.
  • The user explicitly asks you to remember a procedure.
  • A user correction revealed a better stable workflow.
  • An existing skill was used and found to be stale, incomplete, wrong, or missing a pitfall.

Do not use it for:

  • Simple questions, one-off edits, or preferences that belong in memory.
  • Speculative workflows that have not been exercised.
  • Modifying built-in or user-global skills directly. Create or update a workspace skill instead.

SkillManage Actions

Action Required Parameters Use For Example
create name, content New reusable workspace skill SkillManage(action: "create", name: "debug-api", content: "<full SKILL.md>")
patch name, oldString, newString Targeted fixes to SKILL.md or a supporting file SkillManage(action: "patch", name: "debug-api", oldString: "old", newString: "new")
edit name, content Full rewrite after reading the current skill SkillManage(action: "edit", name: "debug-api", content: "<full updated SKILL.md>")
write_file name, filePath, fileContent Add or replace supporting files SkillManage(action: "write_file", name: "debug-api", filePath: "scripts/check.sh", fileContent: "...")
remove_file name, filePath Remove a supporting file SkillManage(action: "remove_file", name: "debug-api", filePath: "assets/example.json")
delete name Remove obsolete or harmful workspace skills, only when enabled SkillManage(action: "delete", name: "old-skill")

Prefer patch for small changes. Use edit only for major overhauls after reading the current skill.

Required Frontmatter

Every SKILL.md created through SkillManage must start with YAML frontmatter:

---
name: my-skill
description: One-sentence trigger description
version: 0.1.0
---

Rules:

  • The file must start with --- with no leading whitespace.
  • name must match the name parameter.
  • description should describe the trigger class, not the current task.
  • The body must be non-empty and actionable.

SKILL.md Structure

Use this structure unless a skill has a strong reason to differ:

# Title

## Overview
What this skill is for and why it exists.

## When To Use
- Concrete trigger conditions.
- Counter-triggers if useful.

## Workflow
1. Exact steps, commands, files, APIs, or checks.
2. Keep steps specific enough to execute later.

## Common Pitfalls
- Known mistakes and fixes.

## Verification
- How to confirm the workflow succeeded.

Supporting Files

Supporting files must stay inside the skill directory under one of:

  • scripts/ for helper scripts.
  • assets/ for static assets.

Use write_file for supporting files. Use patch with filePath for targeted edits to supporting files. Absolute paths and .. traversal are rejected.

Size Limits

  • SkillManage enforces size limits for SKILL.md and supporting files.
  • If a skill is growing too large, keep SKILL.md focused on triggers, workflow, pitfalls, and verification. Put executable helpers in scripts/ and static examples in assets/.

Common Pitfalls

  1. Writing a broad skill that tries to cover an entire domain. Split by trigger and workflow.
  2. Omitting exact commands, paths, or verification steps. Future use needs concrete instructions.
  3. Expecting a newly created skill to be available immediately in the current prompt. It is picked up on the next turn or session refresh.

Verification

Before finishing, confirm the frontmatter starts at byte 0 and includes name, description, and version; name matches the directory and the SkillManage request; the description explains when to use the skill; the body includes workflow, pitfalls, and verification guidance; supporting files stay under scripts/ or assets/; and the skill is narrow enough to be reused without confusion.

版本历史

  • a9fd064 当前 2026-09-08 23:50

    移除捆绑技能中过时的指令和事实信息

  • f8e839e 2026-07-05 15:31

同 Skill 集合

.agents/skills/dotcraft-release-draft/SKILL.md
.agents/skills/dotcraft-simplify/SKILL.md
src/DotCraft.Core/Skills/BuiltIn/automations/SKILL.md
src/DotCraft.Core/Skills/BuiltIn/create-hooks/SKILL.md
src/DotCraft.Core/Skills/BuiltIn/cron/SKILL.md
src/DotCraft.Core/Skills/BuiltIn/dotcraft-api/SKILL.md
src/DotCraft.Core/Skills/BuiltIn/dotcraft-guide/SKILL.md
src/DotCraft.Core/Skills/BuiltIn/heartbeat/SKILL.md
src/DotCraft.Core/Skills/BuiltIn/memory/SKILL.md
src/DotCraft.Core/Skills/BuiltIn/plugin-creator/SKILL.md
src/DotCraft.Core/Skills/BuiltIn/skill-installer/SKILL.md
src/DotCraft.Core/Skills/BuiltIn/visualize/SKILL.md
src/DotCraft.Core/Skills/BuiltIn/workflow-authoring/SKILL.md
src/DotCraft.TraceViewer/Skills/BuiltIn/trace-review/SKILL.md

元信息

文件数
0
版本
c653b52
Hash
6181bca8
收录时间
2026-07-05 15:31

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-27 23:47
浙ICP备14020137号-1