sync-skills-readme
CommandSync root README.md with current skills inventory from skills/ directory
Add a skill to the project with validation and README generation
$ npx -y skills add softaworks/agent-toolkit --agent claude-code
description: Add a skill to the project with validation and README generation argument-hint: <source-path>
Copy a skill from a source path to the project, verify naming consistency, and generate README.md if missing.
/add-skill <source-path>
**Arguments:**
**Examples:**
/add-skill ~/.claude/skills/my-skill /add-skill ~/workspace/other-project/skills/awesome-skill /add-skill /home/leo/workspace/softaworks/projects/claude-plugins/plugins/planning/skills/spec-interview
Check that the source path exists and is a directory:
if [ -d "<source-path>" ]; then echo "Source path exists" else echo "Error: Source path does not exist or is not a directory" exit 1 fi
If source path is invalid, stop and report the error to the user.
Get the skill name from the source path (basename of the directory):
basename <source-path>
Example: `/path/to/my-skill` → `my-skill`
Store this as the skill name for the rest of the workflow.
Copy the entire skill directory to `skills/`:
cp -r <source-path> skills/
Report to user: "✅ Copied skill to skills/[skill-name]"
Check that the folder name follows kebab-case convention:
**Regex pattern:** `^[a-z0-9]+(-[a-z0-9]+)*$`
Use Bash to check:
skill_name="[skill-name]" if [[ $skill_name =~ ^[a-z0-9]+(-[a-z0-9]+)*$ ]]; then echo "Folder name is valid kebab-case" else echo "Warning: Folder name is not kebab-case" fi
If invalid, warn the user but continue (we'll check SKILL.md next).
Check for SKILL.md in the copied skill directory:
ls skills/[skill-name]/SKILL.md
If SKILL.md doesn't exist:
If SKILL.md exists, read it with the Read tool to extract the frontmatter.
**Extract the `name:` field from frontmatter:**
The frontmatter is between the first two `---` markers:
--- name: skill-name-here description: ... ---
Parse the YAML and extract the value of the `name:` field.
Compare: 1. **Folder name:** `[skill-name]` (from basename) 2. **SKILL.md name field:** `[name-from-frontmatter]`
**Check 1: Both are kebab-case**
Both should match the regex: `^[a-z0-9]+(-[a-z0-9]+)*$`
If either is not kebab-case:
**Check 2: Folder name matches name field**
If `folder-name` != `name-from-frontmatter`:
**Ask user for fix:**
If there's a mismatch or non-kebab-case naming, ask:
"Would you like me to fix the naming inconsistency? I can: 1. Rename the folder to match SKILL.md name field 2. Update SKILL.md name field to match folder name 3. Leave as-is"
Based on user choice:
Report the action taken.
Check if README.md exists in the skill directory:
ls skills/[skill-name]/README.md
**If README.md exists:**
**If README.md does NOT exist:**
Use the Task tool to spawn a general-purpose sub-agent with this prompt:
For the skill at /home/leo/workspace/softaworks/projects/agent-skills/skills/[skill-name]: 1. Read the SKILL.md file completely 2. Analyze what the skill does, how it works, and when to use it 3. Create a comprehensive README.md that explains: - **Purpose**: What the skill does and why it exists - **When to Use**: Specific scenarios and trigger phrases - **How It Works**: Step-by-step explanation of the workflow - **Key Features**: Main capabilities and highlights - **Usage Examples**: Practical examples showing how to use it - **Prerequisites** (if any): Required tools, dependencies, or setup - **Output** (if applicable): What the skill produces - **Best Practices** (if applicable): Tips for getting the best results The README should be user-friendly, comprehensive, and help users understand the skill's purpose and functionality in detail. Write the README.md to: skills/[skill-name]/README.md
**Agent parameters:**
Wait for the agent to complete, then report success.
Add a new plugin entry to `.claude-plugin/marketplace.json` for the new skill.
**Read the marketplace.json file** to get current plugins array.
**Ask user for category** using AskUserQuestion:
"Which category does this skill belong to?"
Options:
**Create the plugin entry:**
{
"name": "[skill-name]",
"description": "[descriptionOpinionated skills shared by @leonardocouy for improving daily work efficiency with Claude Code. Skills are packaged instructions and scripts that extend agent capabilities across development, documentation, planning, and professional workflows.
Sync root README.md with current skills inventory from skills/ directory
Create a detailed implementation plan using Codex 5.2 with high reasoning
Draft a professional email using the What-Why-How framework. Use when you need to compose emails to colleagues, stakeholders, or…
Build a mental model of changes by splitting them into smaller logical chunks
You are `Code-Sage`, an expert AI code reviewer and technical writer. Your purpose is to assist human developers by providing…
Run or manage the SkillOpt-Sleep self-evolution cycle (review past sessions, replay tasks through a selected backend, consolidate…
Create or update an OpenCode skill using the bundled skill-creator workflow