--- name: integration description: Integrate cadrianmae marketplace plugins into CLAUDE.md. Scans installed plugins and generates documentation section listing available skills and commands. User chooses between user-level (global) or project-level (current project only) integration. allowed-tools: Bash, Read, Write, Edit, AskUserQuestion --- # Cadrianmae Marketplace Integration Generate documentation for installed marketplace plugins and add to CLAUDE.md. ## Overview This skill helps integrate marketplace plugins into your workflow by: 1. Scanning installed plugins from cadrianmae-claude-marketplace 2. Extracting skills and commands from each plugin 3. Generating a structured reference section 4. Adding to user-level or project-level CLAUDE.md ## When to Use - After installing new marketplace plugins - Setting up a new project - Updating documentation of available tools - Creating project-specific plugin references ## Workflow ### 1. Ask User for Scope Use AskUserQuestion to determine integration level: ``` Question: "Where should I add the marketplace plugin documentation?" Options: - "User-level (~/.claude/CLAUDE.md)" - Available in all projects - "Project-level (./CLAUDE.md)" - Only this project ``` ### 2. Scan Installed Plugins ```bash MARKETPLACE_DIR=~/.claude/marketplaces/cadrianmae-claude-marketplace/plugins # List all installed plugins for plugin in "$MARKETPLACE_DIR"/*/; do plugin_name=$(basename "$plugin") echo "Found: $plugin_name" done ``` ### 3. Extract Plugin Information For each plugin, read: - `plugin.json` - Plugin metadata (name, version, description) - `skills/*/SKILL.md` - Skill information - `commands/*.md` - Slash command list ### 4. Generate Documentation File Create separate markdown file with plugin documentation: **File:** `marketplace-plugins.md` ```markdown # Cadrianmae Marketplace Plugins Available plugins from cadrianmae-claude-marketplace. ## Plugin: semantic-search **Version:** 1.0.0 **Description:** Semantic search across codebases using odino **Skills:** - `semantic-search` - Natural language code search with query inference **Commands:** - `/semq:search ` - Search indexed codebase - `/semq:here ` - Search with directory traversal - `/semq:index [path]` - Create semantic index - `/semq:status` - Show index stats **Usage:** Auto-invokes on "where is..." or "find code that..." queries --- ## Plugin: pandoc **Version:** 1.0.0 **Description:** Document conversion toolkit **Skills:** - `pandoc` - Document conversion with templates and validation **Commands:** - `/pandoc:help` - Plugin overview - `/pandoc:template` - Generate templates - `/pandoc:validate` - Validate frontmatter - `/pandoc:convert` - Convert documents - `/pandoc:restyle` - Transform document styles **Usage:** Auto-invokes for document conversion tasks --- *Last updated: 2025-11-19* *Generated by cadrianmae-integration skill* ``` ### 5. Add Import to CLAUDE.md Use import syntax: `@ path/to/file` (no space between @ and path). Supports up to 5 nesting levels. Imports inside code blocks are ignored. **User-level:** ```bash CLAUDE_FILE=~/.claude/CLAUDE.md PLUGINS_DOC=~/.claude/marketplace-plugins.md # Write plugin documentation to separate file cat > "$PLUGINS_DOC" << 'EOF' # Cadrianmae Marketplace Plugins ... EOF # Add import to CLAUDE.md if not already present IMPORT_LINE="@ ~/.claude/marketplace-plugins.md" if ! grep -q "@ ~/.claude/marketplace-plugins.md" "$CLAUDE_FILE"; then echo "" >> "$CLAUDE_FILE" echo "# Marketplace Plugins" >> "$CLAUDE_FILE" echo "$IMPORT_LINE" >> "$CLAUDE_FILE" fi ``` **Project-level:** ```bash CLAUDE_FILE=./CLAUDE.md PLUGINS_DOC=./marketplace-plugins.md # Write plugin documentation cat > "$PLUGINS_DOC" << 'EOF' # Project-Specific Plugin Documentation ... EOF # Create CLAUDE.md if doesn't exist if [[ ! -f "$CLAUDE_FILE" ]]; then echo "# Project CLAUDE.md" > "$CLAUDE_FILE" echo "" >> "$CLAUDE_FILE" fi # Add import IMPORT_LINE="@ ./marketplace-plugins.md" if ! grep -q "@ ./marketplace-plugins.md" "$CLAUDE_FILE"; then echo "" >> "$CLAUDE_FILE" echo "# Marketplace Plugins" >> "$CLAUDE_FILE" echo "$IMPORT_LINE" >> "$CLAUDE_FILE" fi ``` **Import syntax rules:** - Format: `@ path` (@ immediately followed by path, space for display only) - Relative: `@ ./file.md` or `@ subdir/file.md` - Absolute: `@ /absolute/path/file.md` - Home dir: `@ ~/.claude/file.md` - Code blocks: Imports in backticks/code blocks are ignored - Nesting: Max 5 levels deep - Verify: Use `/memory` command to check loaded imports **Benefits:** - Clean separation of concerns - Update plugin docs without touching CLAUDE.md - Easier to maintain and regenerate - Can share plugin docs across multiple CLAUDE.md files ## Output Format After completion, show: ``` ✓ Marketplace integration complete Files created: ~/.claude/marketplace-plugins.md (plugin documentation) Import added to: ~/.claude/CLAUDE.md Added line: @ ~/.claude/marketplace-plugins.md Plugins documented: • semantic-search (1.0.0) • pandoc (1.0.0) • cadrianmae-integration (1.0.0) 3 plugins, 3 skills, 11 commands Plugin docs will be loaded in all Claude Code sessions! Verify with: /memory ``` ## Edge Cases **No plugins installed:** ``` No marketplace plugins found in: ~/.claude/marketplaces/cadrianmae-claude-marketplace/plugins/ Install plugins first, then run this skill. ``` **Section already exists:** Ask user: - Replace existing section - Append to existing section - Cancel **File locations:** - User-level: `~/.claude/CLAUDE.md` (affects all projects) - Project-level: `./CLAUDE.md` (workspace root, affects only this project) ## Best Practices 1. **Run after installing plugins** - Keep documentation current 2. **Choose scope wisely:** - User-level: Plugins you use in all projects - Project-level: Project-specific plugin workflows 3. **Update regularly** - Re-run when adding/removing plugins 4. **Review generated section** - Verify accuracy before committing ## Example Integration **User-level CLAUDE.md:** ```markdown # CLAUDE.md (Global) ## User Context ... ## Coding Preferences ... ## Cadrianmae Marketplace Plugins Available plugins from cadrianmae-claude-marketplace. ### Plugin: semantic-search ... ### Plugin: pandoc ... ``` **Project-level CLAUDE.md:** ```markdown # Project: Data Pipeline ## Project Context This project uses semantic-search for finding algorithm implementations and pandoc for generating reports. ## Cadrianmae Marketplace Plugins ### Plugin: semantic-search **Primary use:** Finding ML algorithm implementations in knowledge base **Commands used:** /semq:search, /semq:here ### Plugin: pandoc **Primary use:** Converting weekly reports to PDF **Commands used:** /pandoc:convert, /pandoc:validate ``` ## Related - Global CLAUDE.md: `~/.claude/CLAUDE.md` - Project CLAUDE.md: `./CLAUDE.md` (workspace root) - Plugin directory: `~/.claude/marketplaces/cadrianmae-claude-marketplace/plugins/`