Back to Skills

managing-snippets

verified

Comprehensive guide for managing Claude Code snippets v2.0 - discovering locations, creating snippets from files, searching by name/pattern/description, and validating configurations. Use this skill when users want to create, search, or manage snippet configurations in their Claude Code environment. Updated for LLM-friendly interface with TTY auto-detection.

View on GitHub

Marketplace

warren-claude-code-plugin-marketplace

WarrenZhu050413/Warren-Claude-Code-Plugin-Marketplace

Plugin

claude-context-orchestrator

Repository

WarrenZhu050413/Warren-Claude-Code-Plugin-Marketplace
5stars

claude-context-orchestrator/skills/managing-snippets/SKILL.md

Last Verified

January 18, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/WarrenZhu050413/Warren-Claude-Code-Plugin-Marketplace/blob/main/claude-context-orchestrator/skills/managing-snippets/SKILL.md -a claude-code --skill managing-snippets

Installation paths:

Claude
.claude/skills/managing-snippets/
Powered by add-skill CLI

Instructions

# Managing Snippets (v2.0)

Snippets auto-inject context when regex patterns match user messages. This skill provides a streamlined workflow for discovering snippet locations, creating snippets, searching configurations, and direct file editing.

## About Snippets

Snippets are pattern-triggered context injection files that enhance Claude's capabilities by automatically loading relevant information when specific keywords appear in user prompts. Think of them as "smart bookmarks" that activate based on what you're working on.

### What Snippets Provide

1. **Automatic context loading** - Inject relevant documentation when keywords match
2. **Workflow enhancement** - Load domain-specific guidance without manual selection
3. **Consistency** - Ensure same context is available across sessions
4. **Efficiency** - Skip manual skill invocation for frequently-used contexts

### When to Use Snippets

- Frequently-used skills that should activate on keywords (e.g., "DOCKER", "TERRAFORM")
- Domain-specific documentation that's needed for specific topics
- Quick-reference material that should load automatically
- Workflow guides tied to specific technologies or tasks

## Anatomy of a Snippet

Every snippet consists of two components:

### 1. config.local.json Entry (Required)

Located at:
```
/Users/wz/.claude/plugins/marketplaces/warren-claude-code-plugin-marketplace/claude-context-orchestrator/scripts/config.local.json
```

**Structure:**
```json
{
  "name": "snippet-identifier",
  "pattern": "\\b(PATTERN)\\b[.,;:!?]?",
  "snippet": ["../snippets/local/category/name/SNIPPET.md"],
  "separator": "\n",
  "enabled": true
}
```

**Key fields:**
- `name`: Unique identifier for the snippet
- `pattern`: Regex pattern that triggers the snippet (MUST follow standard format)
- `snippet`: Array of file paths to inject (relative to config file)
- `separator`: How to join multiple files (usually `"\n"`)
- `enabled`: Whether snippet is active (`true`/`false`)

### 2. SNIPPET.md File (Requir

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
16231 chars