Skill Manager (SM)
Repository Structure & Flattened Design (扁平化設計)
custom/: Your internal/original skills.
external/: Community skills downloaded for inspection and reference.
Flattened vs. Conditional Nesting (扁平化與條件式嵌套)
To balance discoverability and organization:
- Default (Flattened): Every skill folder SHOULD be a direct child of its domain folder for default detection by
npx skills add <directory>.
- Exception (Conditional Nesting): If a domain directory contains more than 10 skills, you MAY create one level of sub-directories (categories) to avoid clutter.
- Note: When nesting is used, users must use
npx skills add <path> --full-depth to find all skills.
- Sync Requirement: Whenever a skill's location changes, you MUST immediately update the corresponding link in
SKILLS_LIST.md.
Taxonomy Alignment (目錄架構對齊)
To prevent fragmentation (e.g., mixing search/ and fetch/ for similar tools), you MUST map external skills to our existing local domains/categories:
- Local Domains:
basic/, develop/, obsidian/, video-design/, writing/.
- Ignore Provider Names: If an external repo uses
research/firecrawl, but we use basic/, move it to external/basic/firecrawl-search/.
- Consistency over Originality: Always prioritize our folder structure over the external repository's original layout.
Utility Skills
Leverage these skills to maintain the repository:
/find-skills: Discover existing skills in the ecosystem to avoid duplication.
/skills-validator: Validate skills in custom/ or external/ against the agentskills.io spec.
/skills-creator: Follow guided workflows to create new skills with proper structure.
Refactoring & Efficiency
- Progressive Disclosure: Use the
/reference pattern to keep skills efficient. Read references/REFACTORING.md for the refactoring SOP.
Core Commands
- Single-Skill Update (default for the "Remote Install" SOP step): When only one skill changed, run
npx skills add <user>/<repo>/<custom|external>/<domain>/<skill-name> for that skill alone. Do NOT run ./setup.sh for a single-skill change — it re-registers every skill in the repo, which is out of scope and can touch unrelated installs.
- Bulk Setup:
./setup.sh registers all local skills (defaults to remote mode to preserve skills-lock.json). Reserve this for full onboarding/re-sync (e.g. setting up a new machine), not routine single-skill edits. Use ./setup.sh --local for active development; the script automatically safeguards skills-lock.json from local path changes.
- Bulk Export:
./export.sh <domain> imports domain skills to a specific project.
- Manual Add:
npx skills add <path_to_directory> -l to list all detectable skills.
Gem Export Workflow (Gem 導出流程)
Use this workflow to consolidate multiple skills into a single "Gem" instruction set for Google Gemini.
- Identify Categories: Group related skills (e.g., Lifestyle, Development, Writing).
- Extract Essence: For each skill, extract:
- Core Role/Persona.
- Mandates/Principles (Mandates prioritized).
- Primary Workflows (Step-by-step).
- Synthesize: Combine into a structured prompt:
# Role: A unified persona (e.g., "The Lifestyle Architect").
# Principles: Consolidated foundational concepts (e.g., Minerva HCs + Learning Principles).
# Capabilities: Categorized toolsets (Health, Learning, etc.).
# Interaction Style: Guidelines for tone and output.
- Export: Write the result to
gem/<category-name>.txt.
Plugin Export Workflow (Plugin 導出流程)
Use this workflow to bundle a set of existing skills (e.g. the user's most-used skills) into an installable Claude Code plugin, registered via a local marketplace.
- Select Skills: Decide which skills to bundle. If ranking by usage, scan
~/.claude/projects/*/*.jsonl for Skill tool_use invocations (input.skill) and <command-name> slash-command tags — merge both, since some skills are only auto-triggered (no matching slash command) and some are only typed.
- Verify Source Location: Confirm each selected skill actually resolves to a real directory under
custom/<domain>/ or external/<domain>/. Do not bundle names that turn out to be built-in CLI commands, marketplace-plugin commands, or orphaned skills still sitting in .agents/skills/ (categorize those into custom//external/ first, per the SOPs below, before including them).
- Scaffold the Plugin: Create
<plugin-dir>/.claude-plugin/plugin.json (name, description, version, author) and <plugin-dir>/skills/. Inside skills/, symlink each bundled skill back to its real location (ln -s ../../custom/<domain>/<skill> <plugin-dir>/skills/<skill>) — never copy, so the plugin always tracks the canonical skill content. This makes the plugin local-only (not portable to a fresh clone without the rest of the repo); note that if the plugin is ever meant to be published externally.
- Register a Marketplace: Create or update
.claude-plugin/marketplace.json at the repo root ($schema, name, owner, plugins[] with each plugin's source as a relative path, e.g. "./<plugin-dir>").
- Validate: Run
/validate-skills against every symlinked skill (validation follows symlinks to the real SKILL.md, so this re-checks the canonical copy) and sanity-check both plugin.json and marketplace.json parse as valid JSON.
- Document: Add a
## 🔌 Plugins entry to SKILLS_LIST.md listing the marketplace and each plugin, with the bundled skill names and links to their manifests.
- Push: Commit the new plugin/marketplace files and the
SKILLS_LIST.md update.
- Install:
/plugin marketplace add <repo-path> then /plugin install <plugin-name>@<marketplace-name>.
SOP for External Skills
- Download: Run
npx skills add <repo_path> in root (without -g) to inspect the skill.
- Archive: Move from
.agents/skills/ to external/<domain>/ (Ensure it is a direct child).
- Validate: Run
/validate-skills on the archived skill. Fix any FAIL items (name mismatch, body too long, bad link format, missing "when to use") before proceeding.
- Document: Update
SKILLS_LIST.md with the new skill's name, Chinese description, and link.
- Push: Commit and push changes to GitHub.
- Remote Install: Run
npx skills add <user>/<repo>/external/<domain>/<skill-name> for that one skill — never ./setup.sh for a single-skill change.
SOP for Custom Skills
- Create: Create skill directory in
custom/<domain>/.
- Implement: Write
SKILL.md following skill-creator guidelines.
- Validate: Run
/validate-skills on the new skill. Fix any FAIL items before proceeding.
- Document: Add the new skill to
SKILLS_LIST.md.
- Push: Commit and push changes to GitHub.
- Remote Install: Run
npx skills add <user>/<repo>/custom/<domain>/<skill-name> for that one skill — never ./setup.sh for a single-skill change.
1---2name: skill-manager3description: Guides AI agents on how to maintain the separated custom/ and external/ domains in the Firstsun Skill Arsenal.4---56# Skill Manager (SM)78## Repository Structure & Flattened Design (扁平化設計)910- `custom/`: Your internal/original skills.11- `external/`: Community skills downloaded for inspection and reference.1213### Flattened vs. Conditional Nesting (扁平化與條件式嵌套)14To balance discoverability and organization:15- **Default (Flattened)**: Every skill folder SHOULD be a direct child of its domain folder for default detection by `npx skills add <directory>`.16- **Exception (Conditional Nesting)**: If a domain directory contains **more than 10 skills**, you MAY create one level of sub-directories (categories) to avoid clutter. 17 - *Note*: When nesting is used, users must use `npx skills add <path> --full-depth` to find all skills.18- **Sync Requirement**: Whenever a skill's location changes, you **MUST** immediately update the corresponding link in `SKILLS_LIST.md`.1920### Taxonomy Alignment (目錄架構對齊)21To prevent fragmentation (e.g., mixing `search/` and `fetch/` for similar tools), you **MUST** map external skills to our existing local domains/categories:22- **Local Domains**: `basic/`, `develop/`, `obsidian/`, `video-design/`, `writing/`.23- **Ignore Provider Names**: If an external repo uses `research/firecrawl`, but we use `basic/`, move it to `external/basic/firecrawl-search/`.24- **Consistency over Originality**: Always prioritize our folder structure over the external repository's original layout.2526## Utility Skills27Leverage these skills to maintain the repository:28- `/find-skills`: Discover existing skills in the ecosystem to avoid duplication.29- `/skills-validator`: Validate skills in `custom/` or `external/` against the agentskills.io spec.30- `/skills-creator`: Follow guided workflows to create new skills with proper structure.3132### Refactoring & Efficiency33- **Progressive Disclosure**: Use the `/reference` pattern to keep skills efficient. Read [references/REFACTORING.md](references/REFACTORING.md) for the refactoring SOP.3435## Core Commands36- **Single-Skill Update (default for the "Remote Install" SOP step)**: When only one skill changed, run `npx skills add <user>/<repo>/<custom|external>/<domain>/<skill-name>` for that skill alone. Do NOT run `./setup.sh` for a single-skill change — it re-registers every skill in the repo, which is out of scope and can touch unrelated installs.37- Bulk Setup: `./setup.sh` registers **all** local skills (defaults to remote mode to preserve `skills-lock.json`). Reserve this for full onboarding/re-sync (e.g. setting up a new machine), not routine single-skill edits. Use `./setup.sh --local` for active development; the script automatically safeguards `skills-lock.json` from local path changes.38- Bulk Export: `./export.sh <domain>` imports domain skills to a specific project.39- Manual Add: `npx skills add <path_to_directory> -l` to list all detectable skills.4041## Gem Export Workflow (Gem 導出流程)42Use this workflow to consolidate multiple skills into a single "Gem" instruction set for Google Gemini.43441. **Identify Categories**: Group related skills (e.g., Lifestyle, Development, Writing).452. **Extract Essence**: For each skill, extract:46 - Core Role/Persona.47 - Mandates/Principles (Mandates prioritized).48 - Primary Workflows (Step-by-step).493. **Synthesize**: Combine into a structured prompt:50 - `# Role`: A unified persona (e.g., "The Lifestyle Architect").51 - `# Principles`: Consolidated foundational concepts (e.g., Minerva HCs + Learning Principles).52 - `# Capabilities`: Categorized toolsets (Health, Learning, etc.).53 - `# Interaction Style`: Guidelines for tone and output.544. **Export**: Write the result to `gem/<category-name>.txt`.5556## Plugin Export Workflow (Plugin 導出流程)57Use this workflow to bundle a set of existing skills (e.g. the user's most-used skills) into an installable Claude Code plugin, registered via a local marketplace.58591. **Select Skills**: Decide which skills to bundle. If ranking by usage, scan `~/.claude/projects/*/*.jsonl` for `Skill` tool_use invocations (`input.skill`) and `<command-name>` slash-command tags — merge both, since some skills are only auto-triggered (no matching slash command) and some are only typed.602. **Verify Source Location**: Confirm each selected skill actually resolves to a real directory under `custom/<domain>/` or `external/<domain>/`. Do not bundle names that turn out to be built-in CLI commands, marketplace-plugin commands, or orphaned skills still sitting in `.agents/skills/` (categorize those into `custom/`/`external/` first, per the SOPs below, before including them).613. **Scaffold the Plugin**: Create `<plugin-dir>/.claude-plugin/plugin.json` (name, description, version, author) and `<plugin-dir>/skills/`. Inside `skills/`, symlink each bundled skill back to its real location (`ln -s ../../custom/<domain>/<skill> <plugin-dir>/skills/<skill>`) — never copy, so the plugin always tracks the canonical skill content. This makes the plugin local-only (not portable to a fresh clone without the rest of the repo); note that if the plugin is ever meant to be published externally.624. **Register a Marketplace**: Create or update `.claude-plugin/marketplace.json` at the repo root (`$schema`, `name`, `owner`, `plugins[]` with each plugin's `source` as a relative path, e.g. `"./<plugin-dir>"`).635. **Validate**: Run `/validate-skills` against every symlinked skill (validation follows symlinks to the real `SKILL.md`, so this re-checks the canonical copy) and sanity-check both `plugin.json` and `marketplace.json` parse as valid JSON.646. **Document**: Add a `## 🔌 Plugins` entry to `SKILLS_LIST.md` listing the marketplace and each plugin, with the bundled skill names and links to their manifests.657. **Push**: Commit the new plugin/marketplace files and the `SKILLS_LIST.md` update.668. **Install**: `/plugin marketplace add <repo-path>` then `/plugin install <plugin-name>@<marketplace-name>`.6768## SOP for External Skills691. **Download**: Run `npx skills add <repo_path>` in root (without -g) to inspect the skill.702. **Archive**: Move from `.agents/skills/` to `external/<domain>/` (Ensure it is a direct child).713. **Validate**: Run `/validate-skills` on the archived skill. Fix any FAIL items (name mismatch, body too long, bad link format, missing "when to use") before proceeding.724. **Document**: Update `SKILLS_LIST.md` with the new skill's name, Chinese description, and link.735. **Push**: Commit and push changes to GitHub.746. **Remote Install**: Run `npx skills add <user>/<repo>/external/<domain>/<skill-name>` for that one skill — never `./setup.sh` for a single-skill change.7576## SOP for Custom Skills771. **Create**: Create skill directory in `custom/<domain>/`.782. **Implement**: Write `SKILL.md` following `skill-creator` guidelines.793. **Validate**: Run `/validate-skills` on the new skill. Fix any FAIL items before proceeding.804. **Document**: Add the new skill to `SKILLS_LIST.md`.815. **Push**: Commit and push changes to GitHub.826. **Remote Install**: Run `npx skills add <user>/<repo>/custom/<domain>/<skill-name>` for that one skill — never `./setup.sh` for a single-skill change.