Add In Skills Master
This skill helps developers register their custom skills into the skills-master library, making them available as standard templates for distribution. It supports both local project skills and skills from external project paths.
When to Use
Invoke this skill when:
- The user has created a new skill and wants to "publish" or "add" it to the
skills-masterlibrary. - The user wants to update an existing template in
skills-masterwith changes from a working skill instance. - The user asks to "contribute" a skill.
- The user wants to import a skill from another local project into the current project's
skills-master.
Capabilities
- Template Registration: Copies a skill directory (source) to the
skills-master/assets/skill-templates/directory. - External Path Support: Can import skills from any local path, not just the current project directory.
- Target Directory Specification: Allows explicit specification of the target
skills-masterdirectory. - Auto-detection of Skill Metadata: Automatically extracts skill name and description from
SKILL.mdfrontmatter if not provided. - Source Validation: Validates that the source directory contains a valid
SKILL.mdfile. - Duplicate Detection: Checks for existing skills and prompts for confirmation before overwriting.
- Documentation Update: Automatically updates
skills-master/SKILL.mdto list the new skill under "Capabilities" with its description. - Project README Update: If the script detects it's running in the Skills Master open-source repository root, it automatically updates
README.mdandREADME_zh-CN.mdwith the new skill.
Usage
Basic Usage (Add skill from current project)
python3 scripts/add_skill.py \
--name <skill-name> \
--description "<skill description>" \
--source <path-to-skill-source>
Import Skill from External Project
python3 scripts/add_skill.py \
--source /path/to/other-project/skills/external-skill
When importing from an external path, the script will automatically extract the skill name and description from the SKILL.md frontmatter if --name and --description are not provided.
Specify Target skills-master Directory
python3 scripts/add_skill.py \
--source /path/to/skill \
--target /path/to/target/skills-master
Force Overwrite (Skip Confirmation)
python3 scripts/add_skill.py \
--source ./my-skill \
--force
Parameters:
--name: (Optional) The unique identifier of the skill. If not provided, will be extracted fromSKILL.mdor use the directory name.--description: (Optional) A brief description of what the skill does. If not provided, will be extracted fromSKILL.md.--source: (Required) The local path to the skill you want to add. Supports any valid local path.--target: (Optional) The targetskills-masterdirectory. If not specified, the script will auto-detect.--force,-f: (Optional) Skip confirmation prompts and force overwrite existing skills.
Examples
Example 1: Add a skill from the current project
User: "I want to add my 'database-manager' skill to the master library."
Agent:
python3 scripts/add_skill.py \
--name database-manager \
--description "Automates database migrations and backups." \
--source skills/database-manager
Example 2: Import a skill from an external project
User: "Import the 'api-generator' skill from my other project at /Users/john/projects/backend-tools."
Agent:
python3 scripts/add_skill.py \
--source /Users/john/projects/backend-tools/skills/api-generator
Example 3: Import with explicit target directory
User: "Add the 'logging-helper' skill from /tmp/my-skills/logging-helper to the skills-master at /Users/john/main-project/skills-master."
Agent:
python3 scripts/add_skill.py \
--source /tmp/my-skills/logging-helper \
--target /Users/john/main-project/skills-master
Helper Instructions for Agent
- Path Resolution: The scripts are located in
scripts/. You must determine the skill's location and prepend it. - External Paths: The
--sourceparameter accepts any valid local path, including absolute paths to other projects. - Auto-detection: If
--nameand--descriptionare not provided, the script will attempt to extract them from the sourceSKILL.mdfrontmatter. - Root-Level
skills-masterSupport: This script automatically detects ifskills-masteris in the project root (common in the open-source repository) or nested in askills/directory (common in user projects). - Verify Source: Ensure the source directory exists and contains a valid
SKILL.mdbefore running the script. - Duplicate Handling: If a skill with the same name already exists, the script will prompt for confirmation unless
--forceis used. - Confirmation: After running the script, verify that
skills-master/assets/skill-templates/<skill-name>exists andskills-master/SKILL.mdhas been updated.
Scan to join WeChat group