|
| 1 | +# Claude Code Skills for Plugin Development |
| 2 | + |
| 3 | +This directory contains skills that enhance Claude's capabilities for developing, testing, and managing Claude Code plugins. |
| 4 | + |
| 5 | +## Available Skills |
| 6 | + |
| 7 | +### 1. plugin-creator (Project Skill) |
| 8 | + |
| 9 | +**Purpose**: Comprehensive guidance for creating Claude Code plugins |
| 10 | + |
| 11 | +**Use when**: |
| 12 | +- Building a new Claude Code plugin |
| 13 | +- Understanding plugin structure and architecture |
| 14 | +- Setting up commands, agents, hooks, and scripts |
| 15 | +- Configuring plugin.json and marketplace.json |
| 16 | +- Following best practices and conventions |
| 17 | + |
| 18 | +**Key features**: |
| 19 | +- Step-by-step plugin creation guide |
| 20 | +- Complete examples and templates |
| 21 | +- Best practices for all plugin components |
| 22 | +- Testing and validation guidance |
| 23 | +- Marketplace publishing workflow |
| 24 | + |
| 25 | +### 2. shell-script-quality (Project Skill) |
| 26 | + |
| 27 | +**Purpose**: Lint and test shell scripts with ShellCheck and BATS |
| 28 | + |
| 29 | +**Use when**: |
| 30 | +- Working with bash/sh scripts |
| 31 | +- Setting up linting and testing |
| 32 | +- Configuring CI/CD for shell scripts |
| 33 | +- Following shell script best practices |
| 34 | +- Adding pre-commit hooks |
| 35 | + |
| 36 | +**Key features**: |
| 37 | +- ShellCheck configuration and usage |
| 38 | +- BATS test framework setup |
| 39 | +- Complete testing workflow |
| 40 | +- CI/CD integration patterns |
| 41 | +- Pre-commit hook examples |
| 42 | + |
| 43 | +### 3. github-repo-management (Project Skill) |
| 44 | + |
| 45 | +**Purpose**: Manage GitHub repositories for Claude Code plugins |
| 46 | + |
| 47 | +**Use when**: |
| 48 | +- Setting up GitHub repository |
| 49 | +- Configuring issues and pull requests |
| 50 | +- Creating release workflows |
| 51 | +- Setting up CI/CD with GitHub Actions |
| 52 | +- Managing repository settings and permissions |
| 53 | + |
| 54 | +**Key features**: |
| 55 | +- Issue and PR templates |
| 56 | +- GitHub Actions workflows |
| 57 | +- Release automation |
| 58 | +- Branch protection configuration |
| 59 | +- GitHub CLI commands |
| 60 | + |
| 61 | +### 4. web-research (Project Skill) |
| 62 | + |
| 63 | +**Purpose**: Research web content using gemini-search agent |
| 64 | + |
| 65 | +**Use when**: |
| 66 | +- Need to research documentation |
| 67 | +- Looking for best practices |
| 68 | +- Troubleshooting errors |
| 69 | +- Learning about tools/frameworks |
| 70 | +- Comparing approaches |
| 71 | + |
| 72 | +**Key features**: |
| 73 | +- Token-efficient searches (30-40% savings) |
| 74 | +- Smart caching (1-hour TTL) |
| 75 | +- Context isolation via agent |
| 76 | +- Analytics tracking |
| 77 | +- Structured research patterns |
| 78 | + |
| 79 | +## How Skills Work |
| 80 | + |
| 81 | +Skills are **model-invoked** - Claude automatically determines when to use them based on: |
| 82 | +- The skill's `description` in YAML frontmatter |
| 83 | +- The current task context |
| 84 | +- The user's request |
| 85 | + |
| 86 | +Unlike slash commands (user-invoked), skills activate automatically to provide expertise when needed. |
| 87 | + |
| 88 | +## Skill Structure |
| 89 | + |
| 90 | +Each skill consists of: |
| 91 | +``` |
| 92 | +skill-name/ |
| 93 | +├── SKILL.md # Main skill file with YAML frontmatter and instructions |
| 94 | +├── README.md # Documentation and quick reference |
| 95 | +└── resources/ # Optional supporting files |
| 96 | +``` |
| 97 | + |
| 98 | +## Token Efficiency |
| 99 | + |
| 100 | +### web-research Skill |
| 101 | + |
| 102 | +The **web-research** skill provides significant token savings: |
| 103 | +- **30-40% reduction** through context isolation |
| 104 | +- **Caching** prevents redundant API calls |
| 105 | +- **Structured output** focuses on relevant information |
| 106 | + |
| 107 | +**Example**: Researching documentation without web-research might use 10,000 tokens in main context. With web-research, the agent handles search in isolation and returns only essential results, using ~6,000 tokens total. |
| 108 | + |
| 109 | +**Check savings**: |
| 110 | +```bash |
| 111 | +/gemini-search:search-stats |
| 112 | +``` |
| 113 | + |
| 114 | +## Skill Integration |
| 115 | + |
| 116 | +Skills work together for a complete workflow: |
| 117 | + |
| 118 | +**Plugin Development Flow**: |
| 119 | +1. **plugin-creator** → Structure and create plugin |
| 120 | +2. **web-research** → Research best practices and examples |
| 121 | +3. **shell-script-quality** → Set up linting and testing |
| 122 | +4. **github-repo-management** → Configure repository and CI/CD |
| 123 | + |
| 124 | +**Example workflow**: |
| 125 | +``` |
| 126 | +User: "Create a new Claude Code plugin for JSON validation" |
| 127 | +
|
| 128 | +Claude uses: |
| 129 | +1. plugin-creator: Guide plugin structure |
| 130 | +2. web-research: Research JSON validation tools and best practices |
| 131 | +3. shell-script-quality: Set up ShellCheck for scripts |
| 132 | +4. github-repo-management: Create GitHub workflows for CI/CD |
| 133 | +``` |
| 134 | + |
| 135 | +## Using Skills |
| 136 | + |
| 137 | +### As a User |
| 138 | + |
| 139 | +You don't need to invoke skills manually. Claude uses them automatically when appropriate. |
| 140 | + |
| 141 | +**Example**: |
| 142 | +``` |
| 143 | +You: "How do I set up a GitHub Actions workflow for my plugin?" |
| 144 | +
|
| 145 | +Claude automatically uses github-repo-management skill |
| 146 | +``` |
| 147 | + |
| 148 | +### As a Developer |
| 149 | + |
| 150 | +When working on skills or understanding their behavior: |
| 151 | + |
| 152 | +1. **Review SKILL.md** for complete documentation |
| 153 | +2. **Check README.md** for quick reference |
| 154 | +3. **Test with examples** from the skill documentation |
| 155 | +4. **Monitor analytics** (for web-research skill) |
| 156 | + |
| 157 | +## Skill Configuration |
| 158 | + |
| 159 | +### web-research Configuration |
| 160 | + |
| 161 | +```bash |
| 162 | +# Adjust cache TTL (seconds) |
| 163 | +export GEMINI_SEARCH_CACHE_TTL=3600 # 1 hour default |
| 164 | + |
| 165 | +# Change cache location |
| 166 | +export GEMINI_SEARCH_CACHE_DIR="/tmp/gemini-search-cache" |
| 167 | + |
| 168 | +# Enable debug logging |
| 169 | +export DEBUG=true |
| 170 | +``` |
| 171 | + |
| 172 | +### Tool Restrictions |
| 173 | + |
| 174 | +Some skills restrict available tools for security/safety: |
| 175 | + |
| 176 | +**web-research** restricts to: |
| 177 | +- `Task` (to invoke gemini-search agent) |
| 178 | +- `Read` (to read local files) |
| 179 | +- `Write` (to save research results if needed) |
| 180 | + |
| 181 | +This prevents accidental destructive operations during research. |
| 182 | + |
| 183 | +## Best Practices |
| 184 | + |
| 185 | +### For Skill Usage |
| 186 | + |
| 187 | +1. **Trust the system**: Let Claude decide when to use skills |
| 188 | +2. **Be specific**: Provide clear context in your requests |
| 189 | +3. **Review results**: Skills provide guidance, but review suggestions |
| 190 | +4. **Iterate**: Use skills multiple times as you refine your work |
| 191 | + |
| 192 | +### For Skill Development |
| 193 | + |
| 194 | +1. **Clear descriptions**: Make `description` specific and trigger-aware |
| 195 | +2. **Focus**: One skill = one capability area |
| 196 | +3. **Examples**: Include concrete examples in documentation |
| 197 | +4. **Testing**: Test skills with various request patterns |
| 198 | +5. **Integration**: Reference related skills for comprehensive workflows |
| 199 | + |
| 200 | +## Troubleshooting |
| 201 | + |
| 202 | +### Skill Not Activating |
| 203 | + |
| 204 | +**Issue**: Claude doesn't seem to use a skill |
| 205 | + |
| 206 | +**Solutions**: |
| 207 | +1. Make request more specific to skill's domain |
| 208 | +2. Check skill description matches your use case |
| 209 | +3. Verify SKILL.md has valid YAML frontmatter |
| 210 | +4. Review skill's "When to Use" section |
| 211 | + |
| 212 | +### web-research Issues |
| 213 | + |
| 214 | +**Issue**: Search results not relevant |
| 215 | + |
| 216 | +**Solutions**: |
| 217 | +1. Make queries more specific |
| 218 | +2. Include source constraints (e.g., site:docs.github.com) |
| 219 | +3. Clear cache: `/gemini-search:clear-cache` |
| 220 | +4. Check Gemini API key configuration |
| 221 | + |
| 222 | +**Issue**: Token savings not showing |
| 223 | + |
| 224 | +**Solutions**: |
| 225 | +1. Check analytics: `/gemini-search:search-stats` |
| 226 | +2. Ensure using agent (not direct WebFetch) |
| 227 | +3. Verify cache is working (check cache directory) |
| 228 | + |
| 229 | +## Resources |
| 230 | + |
| 231 | +### Official Documentation |
| 232 | + |
| 233 | +- **Claude Code Docs**: https://docs.claude.com/en/docs/claude-code |
| 234 | +- **Skills Guide**: https://docs.claude.com/en/docs/claude-code/skills |
| 235 | +- **Plugin Development**: https://docs.claude.com/en/docs/claude-code/plugins |
| 236 | + |
| 237 | +### GitHub Resources |
| 238 | + |
| 239 | +- **Example Skills**: https://github.com/anthropics/skills |
| 240 | +- **Awesome Claude Code**: https://github.com/hesreallyhim/awesome-claude-code |
| 241 | + |
| 242 | +### Internal Resources |
| 243 | + |
| 244 | +- **Commands**: `.claude/commands/` |
| 245 | +- **Agents**: `.claude/agents/` |
| 246 | +- **Hooks**: `hooks/` |
| 247 | + |
| 248 | +## Analytics |
| 249 | + |
| 250 | +### web-research Analytics |
| 251 | + |
| 252 | +View search analytics: |
| 253 | +```bash |
| 254 | +/gemini-search:search-stats |
| 255 | +``` |
| 256 | + |
| 257 | +**Metrics tracked**: |
| 258 | +- Total searches performed |
| 259 | +- Cache hit rate (percentage) |
| 260 | +- Estimated token savings |
| 261 | +- Top queries |
| 262 | +- Search patterns |
| 263 | + |
| 264 | +### Interpreting Results |
| 265 | + |
| 266 | +**High cache hit rate (>50%)**: |
| 267 | +- Good: Efficient use of caching |
| 268 | +- Consider: Increasing cache TTL if frequently reusing results |
| 269 | + |
| 270 | +**Low cache hit rate (<20%)**: |
| 271 | +- Normal for diverse queries |
| 272 | +- Each query is unique and needs fresh results |
| 273 | + |
| 274 | +**Token savings**: |
| 275 | +- Shows estimated tokens saved via context isolation |
| 276 | +- Compare against baseline (searches without agent) |
| 277 | + |
| 278 | +## Contributing |
| 279 | + |
| 280 | +When adding or modifying skills: |
| 281 | + |
| 282 | +1. Follow SKILL.md format with YAML frontmatter |
| 283 | +2. Include comprehensive "When to Use" section |
| 284 | +3. Provide concrete examples |
| 285 | +4. Document integration with other skills |
| 286 | +5. Create README.md for quick reference |
| 287 | +6. Test with various request patterns |
| 288 | +7. Update this main README.md |
| 289 | + |
| 290 | +## Version Information |
| 291 | + |
| 292 | +**Last updated**: 2025-01-21 |
| 293 | + |
| 294 | +**Skills version**: |
| 295 | +- plugin-creator: 1.0 |
| 296 | +- shell-script-quality: 1.0 |
| 297 | +- github-repo-management: 1.0 |
| 298 | +- web-research: 1.0 |
| 299 | + |
| 300 | +**Compatible with**: |
| 301 | +- Claude Code: 1.0+ |
| 302 | +- gemini-search plugin: 0.1.0+ |
| 303 | + |
| 304 | +## Next Steps |
| 305 | + |
| 306 | +1. **Explore each skill**: Review SKILL.md files for detailed guidance |
| 307 | +2. **Try examples**: Use examples from skill documentation |
| 308 | +3. **Monitor usage**: Check analytics for web-research skill |
| 309 | +4. **Provide feedback**: Report issues or suggest improvements |
| 310 | +5. **Contribute**: Add new skills or enhance existing ones |
0 commit comments