Skip to content

Restructure to plugins directory architecture - #10

Merged
ether-moon merged 1 commit into
mainfrom
restructure-to-plugins
Nov 11, 2025
Merged

Restructure to plugins directory architecture#10
ether-moon merged 1 commit into
mainfrom
restructure-to-plugins

Conversation

@ether-moon

@ether-moon ether-moon commented Nov 11, 2025

Copy link
Copy Markdown
Owner

Summary

Reorganizes the project structure by moving all plugin components into a dedicated plugins/skill-set/ directory. This change improves plugin organization and prepares the project for better distribution and management.

Changes

Directory Restructure

  • Created plugins/skill-set/ as the root directory for all plugin components
  • Moved all plugin elements into this directory:
    • .claude-plugin/ → plugin metadata
    • .mcp.json → MCP server configuration
    • commands/ → namespaced slash commands
    • skills/ → all skill definitions
    • agents/ → subagent definitions
    • hooks/ → event hooks

Script Integration

  • Integrated utility scripts directly into their respective skill directories:
    • scripts/git-helpers.shskills/managing-git-workflow/git-helpers.sh
    • scripts/session-start.shskills/using-skill-set/session-start.sh
  • Removed empty scripts/ directory

Reference Updates

  • Updated all script references in:
    • hooks/hooks.json → points to new session-start.sh location
    • managing-git-workflow/SKILL.md → updated helper script paths
    • All reference files in managing-git-workflow/reference/ (commit.md, push.md, pr.md)
  • Updated documentation:
    • README.md → reflects new plugins/ structure
    • AGENTS.md → updated project structure diagram

Benefits

  1. Clearer organization: Plugin components are now clearly separated in a dedicated directory
  2. Better colocation: Utility scripts are now co-located with the skills that use them
  3. Easier distribution: The plugins/ directory makes it clear what needs to be distributed
  4. Improved maintainability: More intuitive structure for future plugin additions

Testing

  • ✅ All script references updated and verified
  • ✅ No orphaned references to old paths
  • ✅ Documentation reflects new structure
  • ✅ Git history preserved with rename detection

Files Changed

  • 46 files moved/updated
  • 91 insertions, 85 deletions
  • All changes are structural moves with minimal content changes

Summary by CodeRabbit

  • Chores

    • Restructured plugin layout from root to plugins/skill-set/ directory for better organization.
    • Updated script paths and references to reflect new directory structure.
    • Consolidated plugin configuration and documentation under unified hierarchy.
  • Configuration

    • Updated plugin version to 1.0.0.
  • Documentation

    • Updated README and documentation to reflect new plugin directory structure and integrated resources.

- Create plugins/skill-set/ directory to contain all plugin components
- Move all plugin elements (.claude-plugin/, commands/, skills/, agents/, hooks/) into plugins/skill-set/
- Integrate utility scripts into skill directories:
  - git-helpers.sh → managing-git-workflow/
  - session-start.sh → using-skill-set/
- Update all script references in hooks and skill documentation
- Update README.md and AGENTS.md to reflect new structure
- Remove empty scripts/ directory

This change improves plugin organization and makes the project structure clearer for plugin distribution.
@coderabbitai

coderabbitai Bot commented Nov 11, 2025

Copy link
Copy Markdown

Walkthrough

The pull request restructures the plugin directory from a flat skill-set/ layout to a nested plugins/skill-set/ structure. This involves updating plugin manifests, hook configurations, version numbers, and script path references across configuration files, documentation, and skill references.

Changes

Cohort / File(s) Summary
Plugin & Hook Configuration
.claude-plugin/marketplace.json, plugins/skill-set/.claude-plugin/plugin.json, plugins/skill-set/hooks/hooks.json
Updated plugin source path from ./ to ./plugins/skill-set; downgraded plugin version from 2.0.0 to 1.0.0; modified hook command from scripts/session-start.sh to skills/using-skill-set/session-start.sh.
Changelog & Version Records
CHANGELOG.md
Changed latest version entry from 2.0.0 to 1.0.0; removed the separate 1.0.0 dated 2025-01-10 block and adjusted version reference links.
Documentation
README.md, AGENTS.md
Updated project structure documentation to reflect nested plugins/skill-set/ layout; documented new skill files, session-start.sh hook, and adjusted file path references throughout.
Git Workflow Skill References
plugins/skill-set/skills/managing-git-workflow/SKILL.md, plugins/skill-set/skills/managing-git-workflow/git-helpers.sh, plugins/skill-set/skills/managing-git-workflow/reference/commit.md, plugins/skill-set/skills/managing-git-workflow/reference/pr.md, plugins/skill-set/skills/managing-git-workflow/reference/push.md
Updated sourced helper script paths from scripts/git-helpers.sh to git-helpers.sh (or fully qualified paths adjusted for the new structure) across multiple documentation and shell files.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

  • Areas requiring attention:
    • Verify that all script path references across managing-git-workflow skill files are consistent with the new directory structure
    • Confirm that the hook command path (skills/using-skill-set/session-start.sh) correctly resolves at runtime
    • Ensure marketplace.json plugin source path aligns with the actual directory structure

Possibly related PRs

Poem

A rabbit restructures with care and delight,
Nested folders now shining so bright,
From flat paths to plugins so neat,
Scripts shuffle their feet,
The skill-set now stands at its height! 🐰

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately summarizes the main change: restructuring the repository to use a plugins directory architecture, which is the primary objective of this PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch restructure-to-plugins

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ether-moon
ether-moon merged commit c611433 into main Nov 11, 2025
1 check was pending

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
CHANGELOG.md (1)

54-62: Semantic inconsistency: Added section contradicts Changed section.

The "Added" section describes the old 6-plugin structure as if it were new in v1.0.0, contradicting the "Changed" section which describes consolidating those 6 plugins into a unified structure. Per Keep a Changelog conventions, the "Added" section should document what's new in v1.0.0, not the historical architecture being replaced.

This appears to be incomplete placeholder content carried over during the restructuring.

Consider either:

  1. Removing the Added section entirely (this is not an initial release, but a structural reorganization)
  2. Renaming to "### Migrated From" and clarifying it documents the legacy structure being unified
  3. Replacing with actual new features introduced in v1.0.0 alongside the structural changes
-### Added
-
-- Initial release with 6 independent plugins:
-  - `managing-git-workflow`: Git automation (commit, push, PR)
-  - `understanding-code-context`: LSP-based code exploration
-  - `browser-automation`: Playwright templates
-  - `consulting-peer-llms`: Peer review integration
-  - `using-skill-set`: Session initialization
-  - `coderabbit-feedback`: CodeRabbit review processing
AGENTS.md (1)

12-12: Inconsistent Playwright template count across document.

Line 12 references 19 Playwright scripts, but the project structure at line 55 and the PR summary both indicate 16 scripts in the new layout. Update line 12 to match the actual count in the restructured layout.

-3. **browser-automation**: Pre-built Playwright templates (19 scripts) for browser automation tasks without MCP server overhead
+3. **browser-automation**: Pre-built Playwright templates (16 scripts) for browser automation tasks without MCP server overhead

Also applies to: 55-55

README.md (1)

50-50: Resolve template count discrepancy.

Line 50 claims "19 pre-built templates" for browser automation, but the project structure at line 154 documents "16 Playwright scripts". Verify the actual count and update one or both references to ensure accuracy.

Also applies to: 154-154

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0576b24 and 2821854.

📒 Files selected for processing (11)
  • .claude-plugin/marketplace.json (1 hunks)
  • AGENTS.md (1 hunks)
  • CHANGELOG.md (1 hunks)
  • README.md (1 hunks)
  • plugins/skill-set/.claude-plugin/plugin.json (1 hunks)
  • plugins/skill-set/hooks/hooks.json (1 hunks)
  • plugins/skill-set/skills/managing-git-workflow/SKILL.md (1 hunks)
  • plugins/skill-set/skills/managing-git-workflow/git-helpers.sh (1 hunks)
  • plugins/skill-set/skills/managing-git-workflow/reference/commit.md (1 hunks)
  • plugins/skill-set/skills/managing-git-workflow/reference/pr.md (2 hunks)
  • plugins/skill-set/skills/managing-git-workflow/reference/push.md (2 hunks)
🔇 Additional comments (7)
plugins/skill-set/.claude-plugin/plugin.json (1)

1-14: Version and path updates look consistent.

The version downgrade to 1.0.0 and relative path references align with the restructured layout and marketplace registry.

.claude-plugin/marketplace.json (1)

8-10: Marketplace path updated correctly.

The source reference now properly points to the restructured plugins/skill-set location.

plugins/skill-set/hooks/hooks.json (1)

7-9: Hook command path correctly updated to new location.

Properly references session-start.sh from its new home under the using-skill-set skill directory using environment-aware path variable.

plugins/skill-set/skills/managing-git-workflow/SKILL.md (1)

39-46: Path references are correct and use environment variables properly.

This file correctly uses $SKILL_DIR/git-helpers.sh, which is the reliable pattern for skill-internal script sourcing within the Claude plugin environment. The example at line 46 provides the correct reference model that should be applied consistently across commit.md and git-helpers.sh comments.

Ensure commit.md and git-helpers.sh comments are updated to match this pattern to maintain consistency across the skill documentation.

plugins/skill-set/skills/managing-git-workflow/reference/pr.md (1)

32-32: Verify path resolution for sourced helper script.

Both instances reference .claude/skills/managing-git-workflow/git-helpers.sh, but the actual file location after restructuring is plugins/skill-set/skills/managing-git-workflow/git-helpers.sh. Confirm that .claude/ is a valid runtime path from the skill execution context (e.g., symlink, environment variable, or working directory relative path).

Also applies to: 189-189

plugins/skill-set/skills/managing-git-workflow/reference/push.md (1)

15-15: Verify path resolution for sourced helper script.

Both instances reference .claude/skills/managing-git-workflow/git-helpers.sh. Confirm that .claude/ resolves correctly from the skill execution context (same concern as in pr.md).

Also applies to: 106-106

README.md (1)

132-164: Project structure documentation is clear and well-organized.

The new plugins/skill-set/ hierarchy is properly documented with nested directories, integrated scripts, and session hooks clearly mapped. The structure reflects the restructuring goals from the PR.

#!/bin/bash
# Git workflow helper functions
# Source this file to use: source .claude/skills/managing-git-workflow/scripts/git-helpers.sh
# Source this file to use: source .claude/skills/managing-git-workflow/git-helpers.sh

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Source path uses unreliable directory-relative format.

The path .claude/skills/managing-git-workflow/git-helpers.sh relies on a .claude/ directory existing relative to the caller's working directory, which is fragile and error-prone. This will fail with "source: not found" if executed from any directory that doesn't have .claude/ at the root.

Correct the comment to use a reliable path format consistent with hooks.json and other plugin patterns.

-# Source this file to use: source .claude/skills/managing-git-workflow/git-helpers.sh
+# Source this file to use: source $SKILL_DIR/git-helpers.sh
+# (Or from outside skill context: source ${CLAUDE_PLUGIN_ROOT}/skills/managing-git-workflow/git-helpers.sh)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Source this file to use: source .claude/skills/managing-git-workflow/git-helpers.sh
# Source this file to use: source $SKILL_DIR/git-helpers.sh
# (Or from outside skill context: source ${CLAUDE_PLUGIN_ROOT}/skills/managing-git-workflow/git-helpers.sh)
🤖 Prompt for AI Agents
In plugins/skill-set/skills/managing-git-workflow/git-helpers.sh around line 3,
the comment currently instructs sourcing via a fragile relative path
".claude/skills/managing-git-workflow/git-helpers.sh"; update it to use a
reliable path consistent with hooks.json and other plugins by either referencing
the repository-relative plugin path
"plugins/skill-set/skills/managing-git-workflow/git-helpers.sh" or instructing
callers to compute the repo root (e.g., via git rev-parse or dirname of the
script) and source from that absolute/repo-root location so sourcing works
regardless of the current working directory.

Comment on lines 54 to 58
**Helper for ticket extraction:**
```bash
source .claude/skills/managing-git-workflow/scripts/git-helpers.sh
source .claude/skills/managing-git-workflow/git-helpers.sh
extract_ticket_from_branch
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Source path in documentation uses unreliable format and conflicts with SKILL.md.

Line 56 shows .claude/skills/managing-git-workflow/git-helpers.sh, which is the same problematic CWD-relative format flagged in git-helpers.sh. Additionally, SKILL.md (line 46) uses the more reliable $SKILL_DIR/git-helpers.sh variable format, creating inconsistency across the documentation.

Users copying this example code will encounter "source: not found" errors if executed from directories without the .claude/ structure.

 Helper for ticket extraction:
 ```bash
-source .claude/skills/managing-git-workflow/git-helpers.sh
+source $SKILL_DIR/git-helpers.sh
 extract_ticket_from_branch

<details>
<summary>🤖 Prompt for AI Agents</summary>

plugins/skill-set/skills/managing-git-workflow/reference/commit.md around lines
54 to 58: the documentation uses a CWD-relative path
.claude/skills/managing-git-workflow/git-helpers.sh which is unreliable and
inconsistent with SKILL.md; change the example to use the canonical
variable-based path source $SKILL_DIR/git-helpers.sh (and ensure the
surrounding docs mention that $SKILL_DIR must be set by the skill loader or
provide a short note that SKILL.md defines it) so users won't get "source: not
found" errors and the docs remain consistent.


</details>

<!-- This is an auto-generated comment by CodeRabbit -->

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant