Skill: eddieguan801-oss/codex-skill-authoring (version 1.0.0)

--- 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: ```bash python3 <skill-creator>/scripts/init_skill.py <name> --path <output-dir> --resources scripts,references,assets ``` Example: ```bash 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 ```markdown --- 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 ```bash 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/`.

path: references/design-patterns.md
content: # Skill Design Patterns

## Anatomy of a Great Skill

### Frontmatter (Required)

```yaml
---
name: skill-name
description: Clear description of what AND when. This is the PRIMARY triggering mechanism.
---
```

**Description should include:**
- What the skill does
- Specific triggers (file types, query patterns, languages)
- Edge cases it handles

### Body Structure

1. **Quick Start** — Minimal example to get going
2. **Core Workflow** — Step-by-step process
3. **Details** — Progressive disclosure with links to references/

## Freedom Levels

| Level | When to Use |
|-------|-------------|
| High (text) | Multiple valid approaches, context-dependent |
| Medium (pseudocode) | Preferred pattern exists, some variation OK |
| Low (script) | Fragile operations, consistency critical |

## Progressive Disclosure

```
SKILL.md (<500 lines)
├── Core workflow
└── "See REFERENCES/xxx.md for details"

references/
├── xxx.md  (loaded on demand)
├── yyy.md
└── zzz.md
```

## Common Patterns

### Pattern 1: High-level + References

```markdown
# PDF Processing

## Quick Start

[basic example]

## Advanced

See [FORMS.md](references/FORMS.md) for form filling.
```

### Pattern 2: Multi-Domain

```
bigquery/
├── SKILL.md (overview)
└── references/
    ├── finance.md
    ├── sales.md
    └── product.md
```

### Pattern 3: Conditional Details

```markdown
## Simple Edits

Modify XML directly.

**For tracked changes**: See [REDLINING.md](references/REDLINING.md)
```


path: scripts/list_skills.py
content: #!/usr/bin/env python3
"""
List all installed skills with their names and descriptions.
"""
import os
import json
import yaml
from pathlib import Path

def list_skills(skills_root=None):
    if skills_root is None:
        # Try multiple locations
        possible_roots = [
            Path("/var/root/.openclaw/skills"),
            Path("/var/root/.openclaw/workspace/skills"),
            Path("/usr/local/lib/node_modules/openclaw/skills"),
        ]
        for root in possible_roots:
            if root.exists():
                skills_root = root
                break
        if skills_root is None:
            print("No skills directory found")
            return

    skills = []
    for skill_dir in sorted(skills_root.iterdir()):
        if skill_dir.is_dir():
            skill_file = skill_dir / "SKILL.md"
            if skill_file.exists():
                try:
                    content = skill_file.read_text(encoding="utf-8")
                    # Parse YAML frontmatter
                    if content.startswith("---"):
                        end = content.find("---", 3)
                        if end != -1:
                            frontmatter = yaml.safe_load(content[3:end])
                            name = frontmatter.get("name", skill_dir.name)
                            desc = frontmatter.get("description", "No description")
                            skills.append({
                                "name": name,
                                "description": desc,
                                "path": str(skill_dir)
                            })
                except Exception as e:
                    skills.append({
                        "name": skill_dir.name,
                        "description": f"Error reading: {e}",
                        "path": str(skill_dir)
                    })

    # Output as formatted list
    print(f"# Skills in {skills_root}\n")
    for s in skills:
        print(f"## {s['name']}")
        print(f"{s['description']}")
        print()

if __name__ == "__main__":
    import sys
    root = sys.argv[1] if len(sys.argv) > 1 else None
    list_skills(Path(root) if root else None)


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: clean (LOW)