360 Secure SkillHub
360 安全技能中心

Skill Authoring

面向技能创作场景,按 6 步流程(理解、规划、初始化、编辑、打包、迭代)指导生成 SKILL.md 及 scripts/references/assets 目录结构,调用 init_skill.py 初始化、package_skill.py 校验并打包为 .skill 文件,并给出命名规则、渐进式披露与精简写作规范。

eddieguan801-oss
eddieguan801-oss
热度 39.86
最近更新 2026-05-11 17:42:59
分类:开发依赖:代码执行 / 读写文件应用场景:代码生成 / 模板 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add codex-skill-authoring
Metadata
name
codex-skill-authoring
version
1.0.0
description
Create, edit, and package new AgentSkills. Use when asked to create a skill, build a skill, author a skill, or when需要对技能进行创建、打包或审核。Triggers on phrases like "create a skill", "author a skill", "build a skill", "package a skill", "审核技能", or any request to make a new skill from scratch. Supports Chinese and English requests.

Skill Authoring

Create modular, self-contained skills that extend agent capabilities.

The 6-Step Workflow

1. Understand → 2. Plan → 3. Init → 4. Edit → 5. Package → 6. Iterate

Step 1: Understand the Skill

Ask clarifying questions if needed. Understand:

  • What functionality should this skill support?
  • What are concrete usage examples?
  • What should trigger this skill?

When to skip: When usage patterns are already clear.

Step 2: Plan Reusable Contents

Identify what to bundle:

  • scripts/ — Executable code (Python/Bash) for deterministic tasks
  • references/ — Documentation to load when needed
  • assets/ — Files used in output (templates, icons)

Step 3: Initialize the Skill

Always use init_skill.py — never create manually:

python3 <skill-creator>/scripts/init_skill.py <name> --path <output-dir> --resources scripts,references,assets

Example:

python3 /usr/local/lib/node_modules/openclaw/skills/skill-creator/scripts/init_skill.py my-skill --path /var/root/.openclaw/workspace/skills --resources scripts,references

Step 4: Edit the Skill

SKILL.md Structure

---
name: skill-name
description: Clear description of what it does AND when to trigger it. Include Chinese triggers too.
---

# Skill Name

## Quick Start

## Details...

Naming Rules

  • Lowercase, hyphens only
  • Under 64 characters
  • Verb-led preferred (e.g., pdf-edit, list-skills)

Key Principles

  • Concise: Only add what the model doesn't already know
  • Progressive disclosure: Keep SKILL.md lean, put details in references/
  • Imperative mood: Use "do this" not "does this"

Step 5: Package the Skill

python3 <skill-creator>/scripts/package_skill.py <path/to/skill-folder>

Output: .skill file (zip format).

Validation runs automatically before packaging.

Step 6: Iterate

Test with real tasks, gather feedback, improve.

Skill Template

skill-name/
├── SKILL.md           # Required: name + description + instructions
├── scripts/           # Optional: executable code
├── references/        # Optional: load-as-needed docs
└── assets/            # Optional: output files

Quick Reference

Resource When to Use
scripts/ Same code rewritten repeatedly
references/ Large docs the model should read on demand
assets/ Templates, images, boilerplate

Keep SKILL.md under 500 lines. Move details to references/.