From c1cfacaf7670dda425d94fc7c79d2e04313a188d Mon Sep 17 00:00:00 2001 From: daymade Date: Mon, 23 Feb 2026 16:16:02 +0800 Subject: [PATCH] feat(skills-search): rewrite SKILL.md as Agent behavioral directives MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Transform from passive user documentation to active Agent instructions - Add allowed-tools: Bash, Read for direct command execution - Add intent mapping table: user intent → ccpm command - Add execution rules: Claude runs commands directly, no copy-paste - Add MCP server cross-reference for Claude Desktop users Co-Authored-By: Claude Opus 4.6 --- skills-search/SKILL.md | 212 +++++++++++++---------------------------- 1 file changed, 65 insertions(+), 147 deletions(-) diff --git a/skills-search/SKILL.md b/skills-search/SKILL.md index b7af91b..b0dcb8c 100644 --- a/skills-search/SKILL.md +++ b/skills-search/SKILL.md @@ -1,178 +1,96 @@ --- name: skills-search description: This skill should be used when users want to search, discover, install, or manage Claude Code skills from the CCPM registry. Triggers include requests like "find skills for PDF", "search for code review skills", "install cloudflare-troubleshooting", "list my installed skills", "what does skill-creator do", or any mention of finding/installing/managing Claude Code skills or plugins. +allowed-tools: Bash, Read --- -# Skills Search +# Skills Search — Agent Behavioral Directives -## Overview +## Core Behavior -Search, discover, and manage Claude Code skills from the CCPM (Claude Code Plugin Manager) registry. This skill wraps the `ccpm` CLI to provide seamless skill discovery and installation. +When this skill is activated, you MUST directly execute the appropriate `ccpm` command using the Bash tool. Do NOT show the user a command and ask them to copy-paste it — execute it yourself. -## Quick Start +If `ccpm` is not installed, use `npx @daymade/ccpm` as a drop-in replacement for all commands below. +## Intent Mapping + +Match the user's intent to the correct action: + +| User Intent | Action | +|-------------|--------| +| "find skills for X" / "search X skills" | `ccpm search ` | +| "what skills are popular" / "top skills" | `ccpm popular` | +| "what's new" / "latest skills" | `ccpm recent` | +| "install X" / "add X skill" | `ccpm install ` | +| "what does X do" / "tell me about X" | `ccpm info ` | +| "what skills do I have" / "list skills" | `ccpm list` | +| "remove X" / "uninstall X" | `ccpm uninstall ` | +| "update X" / "update all skills" | `ccpm update [name] [--all]` | +| "I need help with PDF/Excel/..." | `ccpm search `, then offer to install the best match | + +## Execution Rules + +1. **Always execute directly** — run `ccpm` commands via the Bash tool, never ask the user to run them manually. +2. **Summarize results** — after executing, present the output in a clear, readable format. +3. **Suggest next steps** — after search results, offer to install. After install, remind the user to restart Claude Code. +4. **Handle errors gracefully** — if `ccpm` is not found, fall back to `npx @daymade/ccpm`. If the registry is unreachable, say so clearly. +5. **Namespaced skills** — support `@org/skill-name` format (e.g., `ccpm install @daymade/skill-creator`). + +## Command Reference + +### Search ```bash -# Search for skills -ccpm search - -# Install a skill -ccpm install - -# List installed skills -ccpm list - -# Get skill details -ccpm info +ccpm search [--limit ] [--tags ] [--author ] [--smart] ``` -## Commands Reference - -### Search Skills - -Search the CCPM registry for skills matching a query. - +### Discovery ```bash -ccpm search [options] - -Options: - --limit Maximum results (default: 10) - --json Output as JSON +ccpm popular [--limit ] # Most downloaded +ccpm recent [--limit ] # Recently published/updated ``` -**Examples:** +### Install & Manage ```bash -ccpm search pdf # Find PDF-related skills -ccpm search "code review" # Find code review skills -ccpm search cloudflare # Find Cloudflare tools -ccpm search --limit 20 react # Find React skills, show 20 results +ccpm install # Install (user-level, default) +ccpm install --project # Install to current project only +ccpm install --force # Force reinstall +ccpm list # List installed skills +ccpm info # Detailed skill information +ccpm update [name] # Update a skill +ccpm update --all # Update all skills +ccpm uninstall # Remove a skill ``` -### Install Skills +## Post-Install Reminder -Install a skill to make it available in Claude Code. +After any successful install, always tell the user: -```bash -ccpm install [options] +> Skill installed successfully. Please restart Claude Code (or start a new conversation) for the skill to become available. -Options: - --project Install to current project only (default: user-level) - --force Force reinstall even if already installed +## MCP Server Alternative + +For Claude Desktop users who want native tool integration (no Bash needed), the same functionality is available as an MCP server: + +```json +{ + "mcpServers": { + "skill-search": { + "command": "npx", + "args": ["-y", "skills-search-mcp"] + } + } +} ``` -**Examples:** -```bash -ccpm install pdf-processor # Install pdf-processor skill -ccpm install @daymade/skill-creator # Install namespaced skill -ccpm install cloudflare-troubleshooting # Install troubleshooting skill -ccpm install react-component-builder --project # Install for current project only -``` - -**Important:** After installing a skill, Claude Code must be restarted for the skill to become available. - -### List Installed Skills - -Show all currently installed skills. - -```bash -ccpm list [options] - -Options: - --json Output as JSON -``` - -**Output includes:** -- Skill name and version -- Installation scope (user/project) -- Installation path - -### Get Skill Information - -Show detailed information about a skill from the registry. - -```bash -ccpm info -``` - -**Output includes:** -- Name, description, version -- Author and repository -- Download count and tags -- Dependencies (if any) - -**Example:** -```bash -ccpm info skill-creator -``` - -### Uninstall Skills - -Remove an installed skill. - -```bash -ccpm uninstall [options] - -Options: - --global Uninstall from user-level installation - --project Uninstall from project-level installation -``` - -**Example:** -```bash -ccpm uninstall pdf-processor -``` - -## Workflow: Finding and Installing Skills - -When a user needs functionality that might be available as a skill: - -1. **Search** for relevant skills: - ```bash - ccpm search - ``` - -2. **Review** the search results - check download counts and descriptions - -3. **Get details** on promising skills: - ```bash - ccpm info - ``` - -4. **Install** the chosen skill: - ```bash - ccpm install - ``` - -5. **Inform user** to restart Claude Code to use the new skill - -## Popular Skills - -Common skills users may want: - -| Skill | Purpose | -|-------|---------| -| `skill-creator` | Create new Claude Code skills | -| `pdf-processor` | PDF manipulation and analysis | -| `docx` | Word document processing | -| `xlsx` | Excel spreadsheet operations | -| `pptx` | PowerPoint presentation creation | -| `cloudflare-troubleshooting` | Debug Cloudflare issues | -| `prompt-optimizer` | Improve prompt quality | +Both this skill and the MCP server wrap the same `ccpm` CLI — they are complementary, not conflicting. ## Troubleshooting ### "ccpm: command not found" - -Install CCPM globally: -```bash -npm install -g @daymade/ccpm -``` - -For more information, visit [CCPM official website](https://ccpm.dev). +Use `npx @daymade/ccpm` instead, or install globally: `npm install -g @daymade/ccpm`. ### Skill not available after install - -Restart Claude Code - skills are loaded at startup. +Restart Claude Code — skills are loaded at startup. ### Permission errors - -Try installing with user scope (default) or check write permissions to `~/.claude/skills/`. +Check write permissions to `~/.claude/skills/`. Try installing with `--project` for project-level scope.