feat(skills-search): rewrite SKILL.md as Agent behavioral directives

- 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 <noreply@anthropic.com>
This commit is contained in:
daymade
2026-02-23 16:16:02 +08:00
parent 830fc8f90f
commit c1cfacaf76

View File

@@ -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 <query>` |
| "what skills are popular" / "top skills" | `ccpm popular` |
| "what's new" / "latest skills" | `ccpm recent` |
| "install X" / "add X skill" | `ccpm install <skill-name>` |
| "what does X do" / "tell me about X" | `ccpm info <skill-name>` |
| "what skills do I have" / "list skills" | `ccpm list` |
| "remove X" / "uninstall X" | `ccpm uninstall <skill-name>` |
| "update X" / "update all skills" | `ccpm update [name] [--all]` |
| "I need help with PDF/Excel/..." | `ccpm search <topic>`, 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 <query>
# Install a skill
ccpm install <skill-name>
# List installed skills
ccpm list
# Get skill details
ccpm info <skill-name>
ccpm search <query> [--limit <n>] [--tags <t1,t2>] [--author <name>] [--smart]
```
## Commands Reference
### Search Skills
Search the CCPM registry for skills matching a query.
### Discovery
```bash
ccpm search <query> [options]
Options:
--limit <n> Maximum results (default: 10)
--json Output as JSON
ccpm popular [--limit <n>] # Most downloaded
ccpm recent [--limit <n>] # 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 <skill-name> # Install (user-level, default)
ccpm install <name> --project # Install to current project only
ccpm install <name> --force # Force reinstall
ccpm list # List installed skills
ccpm info <skill-name> # Detailed skill information
ccpm update [name] # Update a skill
ccpm update --all # Update all skills
ccpm uninstall <skill-name> # 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 <skill-name> [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 <skill-name>
```
**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 <skill-name> [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 <relevant-keywords>
```
2. **Review** the search results - check download counts and descriptions
3. **Get details** on promising skills:
```bash
ccpm info <skill-name>
```
4. **Install** the chosen skill:
```bash
ccpm install <skill-name>
```
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.