Add using-skill-set plugin with automatic session initialization - #4
Conversation
Create new plugin that automatically activates skill-set awareness at session start:
- Auto-detects installed skill-set plugins from ~/.claude/plugins/
- Enforces mandatory workflow to check for relevant plugins before tasks
- Provides plugin descriptions and use case guidelines
- Uses SessionStart hook to inject plugin list into agent context
Plugin structure:
- SKILL.md: Main skill file with {{INSTALLED_PLUGINS}} template
- scripts/session-start.sh: Scans filesystem and generates plugin list
- .claude-plugin/plugin.json: Plugin metadata with hooks defined inline
WalkthroughThis PR introduces a new core plugin framework for "using-skill-set" that establishes mandatory workflows at session start. It includes a plugin manifest, documentation templates, and a shell script to detect and inject installed skill-set plugins into workflow guidance. The README is updated to prioritize this core plugin as a prerequisite. Changes
Sequence DiagramsequenceDiagram
participant Claude
participant SessionStart as Session Start Hook
participant Script as session-start.sh
participant SKILL as SKILL.md
participant Claude2 as Claude (Updated)
Claude->>SessionStart: Session begins (startup/resume/clear/compact)
SessionStart->>Script: Execute session-start.sh
Script->>Script: Enumerate plugins in PLUGINS_DIR
Script->>Script: Filter for installed plugins
Script->>Script: Format as bolded list
Script->>SKILL: Replace {{INSTALLED_PLUGINS}} placeholder with list
Script->>Claude: Output enriched SKILL.md content
Claude2->>Claude2: Receives mandatory workflow with installed plugins
Estimated Code Review Effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🪛 LanguageToolREADME.md[grammar] ~15-~15: Possible subject-verb agreement error. (IS_AND_ARE) 🔇 Additional comments (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
using-skill-set/scripts/session-start.sh (1)
10-16: Extract hardcoded plugin list to a configuration file or environment variable.The SKILL_SET_PLUGINS array is hardcoded, requiring manual script updates whenever new plugins are added. This creates a maintenance burden and couples the script to plugin inventory.
Consider externalizing the plugin list to a configuration file or reading it dynamically. For example, scan the PLUGINS_DIR for all directories matching a naming pattern:
# Dynamic plugin discovery (alternative approach) declare -a SKILL_SET_PLUGINS=() if [ -d "${PLUGINS_DIR}" ]; then while IFS= read -r -d '' plugin_dir; do SKILL_SET_PLUGINS+=("$(basename "$plugin_dir")") done < <(find "${PLUGINS_DIR}" -maxdepth 1 -type d -printf '%f\0' 2>/dev/null) fiOr maintain a separate config file (e.g.,
.claude-plugin/plugin-list.txt) and source it.using-skill-set/README.md (1)
85-85: Minor: "Markdown" capitalization.Static analysis suggests capitalizing "Markdown" as a proper noun (line 85). This is a styling preference—feel free to standardize per project convention, or leave as-is if consistency with other docs requires it.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
using-skill-set/.claude-plugin/plugin.json(1 hunks)using-skill-set/README.md(1 hunks)using-skill-set/SKILL.md(1 hunks)using-skill-set/scripts/session-start.sh(1 hunks)
🧰 Additional context used
🪛 LanguageTool
using-skill-set/SKILL.md
[uncategorized] ~22-~22: Possible missing comma found.
Context: ...ANY plugin match this request?" 3. ☐ If yes → Use the Skill tool to read and run th...
(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~57-~57: Use a comma before ‘or’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...in for your task exists, you must use it or you will fail at your task. ## Plugin ...
(COMMA_COMPOUND_SENTENCE)
using-skill-set/README.md
[uncategorized] ~85-~85: Did you mean the formatting language “Markdown” (= proper noun)?
Context: ...h skill-set plugin directory - Builds a markdown list of installed plugins - Injects the...
(MARKDOWN_NNP)
🔇 Additional comments (4)
using-skill-set/.claude-plugin/plugin.json (1)
1-22: JSON structure is valid and hook configuration looks sound.The manifest correctly defines the SessionStart hook with appropriate matcher values and command reference. The use of
${CLAUDE_PLUGIN_ROOT}ensures the script path is resolved correctly at runtime.using-skill-set/SKILL.md (2)
6-57: Well-structured mandatory protocol with clear guidance and anti-patterns.The document effectively establishes mandatory workflows with clear section hierarchy, rationale ("Common Rationalizations"), and specific use cases. The tone is deliberately strong to enforce compliance, which aligns with the plugin's purpose. The checklist protocol (lines 16–26) and anti-patterns section (lines 42–57) are particularly effective for guiding agent behavior.
Note: Static analysis flagged potential comma issues (lines 22, 57), but these are false positives—list formatting and single clauses don't require additional punctuation.
59-92: Plugin descriptions are comprehensive with clear activation triggers.Each plugin includes "Use when" guidance, brief descriptions, and (where applicable) specific command syntax. This makes it straightforward for agents to determine when a plugin is relevant and how to invoke it.
using-skill-set/README.md (1)
1-88: Comprehensive and well-organized documentation.The README clearly explains the plugin's purpose, workflow, and technical implementation. The "How It Works" section (lines 13–21) provides a clear 4-step overview, and the "Technical Details" section accurately describes the SessionStart hook and plugin detection logic. Installation and usage guidance are straightforward.
The README aligns well with the actual implementation in
plugin.json,session-start.sh, andSKILL.md.
- Remove using-skill-set/README.md (redundant) - Add using-skill-set to main README as required core plugin - Emphasize installation order: core plugin first, then feature plugins - Explain that using-skill-set enables proper recognition of other plugins - Add using-skill-set to Available Plugins section
✅ CodeRabbit Feedback AddressedAll CodeRabbit review comments have been processed and resolved: Critical Issues Fixed1. 🔴 CRITICAL - Line 35: sed command unsafe with multiline variable
2. 🟠 MAJOR - Line 39: Missing error handling and cleanup
Changes MadeAll fixes have been applied to
The script now safely handles multiline content with special characters and provides robust error handling with guaranteed resource cleanup. |
|
@coderabbitai resolve |
✅ Actions performedComments resolved. |
|
@coderabbitai help |
ChatThere are 3 ways to chat with CodeRabbit:
CodeRabbit commands
Other keywords and placeholders
CodeRabbit configuration file (
|
Create new plugin that automatically activates skill-set awareness at session start:
Plugin structure:
Summary by CodeRabbit
New Features
Documentation