Skip to content

feat: comprehensive plugin boilerplate with dotfiles, ralph-loop, and BATS replacement - #3

Merged
baleen37 merged 7 commits into
mainfrom
feat/boilerplate-implementation
Jan 9, 2026
Merged

feat: comprehensive plugin boilerplate with dotfiles, ralph-loop, and BATS replacement#3
baleen37 merged 7 commits into
mainfrom
feat/boilerplate-implementation

Conversation

@baleen37

@baleen37 baleen37 commented Jan 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add dotfiles-plugin with 12 commands, 7 skills, 2 agents, and git hooks for Claude Code development workflow
  • Add ralph-loop plugin for iterative task completion with self-referential feedback
  • Replace BATS with native bash test suite (8 tests covering structure, JSON, fields, and frontmatter)
  • Add comprehensive validation scripts (structure, JSON, frontmatter, naming, paths)
  • Update CI workflow to run both validation and tests

Key Features

dotfiles-plugin:

  • Commands: create-command, create-hook, create-skill, handoff, pickup, research, sdd, debug, fix-ci, git-exclude, clean-worktree, make-local-issues
  • Skills: commit-push-pr, ci-troubleshooting, nix-direnv-setup, setup-precommit-and-ci, using-git-worktrees, using-superpowers, web-browser, writing-claude-commands
  • Agents: code-reviewer for systematic code review
  • Hooks: git-command-validator for safe git operations

ralph-loop plugin:

  • Iterative task execution with configurable max iterations
  • Completion promise mechanism for task finalization
  • Stop hook that manages iteration state and blocks premature exit

Testing & Validation:

  • Bash test suite replacing BATS (no external dependencies)
  • 8 comprehensive tests covering all plugin requirements
  • Validation scripts for structure, JSON schemas, frontmatter, naming conventions, and hardcoded paths

Test plan

  • All 8 bash tests pass
  • Validation scripts pass (structure, JSON, frontmatter, naming, paths)
  • CI workflow updated to use bash tests instead of BATS
  • Merge conflicts from main resolved

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

Summary by CodeRabbit

  • New Features

    • Added dotfiles-plugin with Git workflows, CI troubleshooting, code review agents, and development skills
    • Added ralph-loop plugin for self-referential iterative AI-driven development
    • Added web browser automation tools for navigation, interaction, and monitoring
    • Added plugin hook system for Git command validation and loop management
  • Refactor

    • Migrated test suite from BATS framework to custom shell script validation
  • Documentation

    • Added comprehensive guides for skills, commands, agents, and plugin development

✏️ Tip: You can customize this high-level summary in your review settings.

baleen37 and others added 7 commits January 9, 2026 21:12
* chore: initial placeholder

* chore: remove temporary file

* fix: enable submodules in CI for BATS helpers

* fix: install BATS helpers in CI, remove submodules

* chore: update author info to jito

Update marketplace.json, example-plugin plugin.json, and README.md with jito's author information.

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Jiho <jito.hello@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
* chore: initial placeholder

* chore: remove temporary file

* fix: enable submodules in CI for BATS helpers

* fix: install BATS helpers in CI, remove submodules

* chore: update author info to jito

Update marketplace.json, example-plugin plugin.json, and README.md with jito's author information.

Co-Authored-By: Claude <noreply@anthropic.com>

* feat: add ralph-loop plugin

Add the ralph-loop plugin from the official claude-plugins repository.
This plugin implements the Ralph Wiggum technique for iterative,
self-referential AI development loops.

Features:
- /ralph-loop command to start iterative development loops
- /cancel-ralph command to cancel active loops
- Stop hook that blocks session exit and feeds prompts back
- Support for completion promises and max iterations
- Comprehensive documentation and examples

Files:
- 8 plugin files copied from anthropics/claude-plugins-official
- Executable permissions set on shell scripts
- marketplace.json updated with plugin entry

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Jiho <jito.hello@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
Add new test infrastructure and improve CI workflow:

- Add tests/run-tests.sh: Comprehensive test suite with 8 test cases
  - Required directories existence
  - plugin.json validation (JSON, required fields, naming)
  - marketplace.json validation (JSON, required fields)
  - SKILL.md frontmatter validation
  - Command/Agent file frontmatter validation
  - Colored output and test summary

- Add scripts/validate-structure.sh: Plugin structure validation
  - Validates all required directories exist
  - Validates required files exist and have valid JSON

- Update CI workflow:
  - Remove BATS installation (using custom test runner instead)
  - Add new test step to run tests/run-tests.sh
  - Keep validation script step

- Update documentation:
  - README.md: Add test instructions, update project structure
  - docs/TESTING.md: Add "Running Tests" section with example

All tests pass with clear pass/fail reporting.

Co-Authored-By: Claude <noreply@anthropic.com>
Migrate all Claude Code configuration from dotfiles repository into
a single plugin. This includes 12 commands, 7 skills, 1 agent, and 1 hook.

Components:
- Commands: clean-worktree, create-command, create-hook, create-skill,
  debug, fix-ci, git-exclude, handoff, make-local-issues, pickup,
  research, sdd
- Skills: ci-troubleshooting, commit-push-pr, nix-direnv-setup,
  setup-precommit-and-ci, using-git-worktrees, web-browser,
  writing-claude-commands
- Agents: code-reviewer
- Hooks: git-command-validator (prevents --no-verify usage)

Co-Authored-By: Claude <noreply@anthropic.com>
BATS (Bash Automated Testing System) has been completely removed and replaced with a native bash test suite. All validation functionality is preserved.

Changes:
- Replace BATS tests with bash-based test suite in tests/run-tests.sh
- Tests cover: directory structure, JSON validity, required fields, and frontmatter validation
- All 8 tests passing successfully

Co-Authored-By: Claude <noreply@anthropic.com>
@baleen37
baleen37 merged commit 32b3dac into main Jan 9, 2026
2 of 3 checks passed
@coderabbitai

coderabbitai Bot commented Jan 9, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This PR comprehensively reorganizes the plugin infrastructure by migrating from BATS-based testing to shell script validation, establishing a new plugin marketplace structure, adding two significant new plugins (dotfiles-plugin and ralph-loop), and introducing extensive skill and tool implementations for development workflows and web browser automation.

Changes

Cohort / File(s) Summary
Plugin Configuration & Manifests
.claude-plugin/marketplace.json, marketplace.json, plugins/example-plugin/.claude-plugin/plugin.json, plugins/dotfiles-plugin/.claude-plugin/plugin.json, plugins/ralph-loop/.claude-plugin/plugin.json
Updated owner and author fields from placeholders to real identities; established new marketplace structure; added dotfiles-plugin and ralph-loop manifests with metadata and source references
Test Infrastructure Migration
.github/workflows/test.yml, tests/run-tests.sh, tests/setup.bash, tests/test-*.bats (removed), .pre-commit-config.yaml
Replaced BATS framework with shell script-based test execution; refactored workflow to run bash tests/run-tests.sh and validation scripts; removed BATS helper configurations
Validation Script Suite
scripts/validate-plugin.sh, scripts/validate-structure.sh, scripts/validate-json.sh, scripts/validate-frontmatter.py
Added comprehensive validation covering structure, JSON schemas, required fields, and frontmatter; integrated into test pipeline with specific field and format enforcement
Documentation Updates
README.md, docs/DEVELOPMENT.md, docs/TESTING.md
Updated test references from BATS to shell scripts; renamed sections from "BATS Tests" to "Structure Validation"; removed explicit bats invocation; clarified repository clone URL
Dotfiles Plugin - Commands
plugins/dotfiles-plugin/commands/*.md
Added 12 command files defining workflows for Git management, CI troubleshooting, code review, handoffs, debugging, skill/hook/command creation, and local issue tracking
Dotfiles Plugin - Skills
plugins/dotfiles-plugin/skills/README.md, plugins/dotfiles-plugin/skills/*/SKILL.md, plugins/dotfiles-plugin/skills/*/scripts/*.sh
Introduced 7 comprehensive skills: CI troubleshooting, commit-push-PR automation, Nix/direnv setup, pre-commit/CI configuration, Git worktree management, web browser interaction, and command writing guidelines
Dotfiles Plugin - Web Browser Tools
plugins/dotfiles-plugin/skills/web-browser/tools/*.js, plugins/dotfiles-plugin/skills/web-browser/tools/package.json
Implemented 16 Node.js tools using Playwright CDP for browser automation: navigation, typing, clicking, element picking, screenshot capture, network monitoring, console logging, cookie management, CSS/JS injection, accessibility tree extraction, and API request capture
Dotfiles Plugin - Hooks & Config
plugins/dotfiles-plugin/hooks/*.sh, plugins/dotfiles-plugin/hooks/hooks.json, plugins/dotfiles-plugin/.claude-plugin/plugin.json, plugins/dotfiles-plugin/README.md
Added Git command validator hook for PreToolUse enforcement; defined plugin metadata and comprehensive README documenting 12 commands, 7 skills, hooks, and development philosophy
Ralph Loop Plugin
plugins/ralph-loop/commands/*.md, plugins/ralph-loop/scripts/setup-ralph-loop.sh, plugins/ralph-loop/hooks/stop-hook.sh, plugins/ralph-loop/hooks/hooks.json, plugins/ralph-loop/README.md
Implemented self-referential AI loop mechanism with setup script, state management, completion promise validation, iteration tracking, and stop hook logic; includes three commands (/ralph-loop, /cancel-ralph, help) and comprehensive documentation

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant CLI as Ralph Loop Script
    participant StateFile as .claude/.br/ralph-loop.local.md
    participant Hook as Stop Hook
    participant Claude as Claude AI

    User->>CLI: /ralph-loop "task" --max-iterations 5
    CLI->>StateFile: Create with iteration=0, prompt
    CLI->>Claude: Send initial prompt
    
    loop Until completion or max iterations
        Claude->>Hook: Send response + completion-promise
        Hook->>StateFile: Read iteration, max, promise
        
        alt Max iterations reached
            Hook->>StateFile: Delete state file
            Hook->>Claude: Block & report completion
        else Completion promise valid
            Hook->>StateFile: Delete state file
            Hook->>Claude: Block & report success
        else Continue loop
            Hook->>StateFile: Increment iteration
            Hook->>Claude: Block & return prompt for next iteration
            Claude->>Claude: Process same prompt again
        end
    end
    
    alt User cancels
        User->>Hook: /cancel-ralph
        Hook->>StateFile: Remove state, report iteration
    end
Loading
sequenceDiagram
    participant User
    participant Validator as validate-plugin.sh
    participant Structure as validate-structure.sh
    participant JSON as validate-json.sh
    participant Frontmatter as validate-frontmatter.py
    participant TestRunner as run-tests.sh

    User->>Validator: Run validation
    Validator->>Structure: Check directories & required files
    Structure-->>Validator: Report structure status
    
    Validator->>JSON: Validate marketplace.json schema
    JSON-->>Validator: Report JSON validity & fields
    
    Validator->>Frontmatter: Check SKILL.md & command/agent frontmatter
    Frontmatter-->>Validator: Report frontmatter status
    
    Validator-->>User: Combined result
    
    alt CI/CD context
        User->>TestRunner: Run full test suite
        TestRunner->>Structure: Directory/file validation
        TestRunner->>JSON: Schema & field checks
        TestRunner->>Frontmatter: Frontmatter checks
        TestRunner-->>User: Pass/fail with summary
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

This PR introduces substantial breadth across infrastructure, configuration, documentation, and functional tooling. Key complexity drivers include: 60+ files spanning multiple distinct domains (test migration, plugin manifests, skill implementations, browser automation tools); heterogeneous patterns requiring separate reasoning for validation logic, hook mechanisms, and tool implementations; logic density in shell scripts (stop-hook.sh iteration/promise handling, conflict detection, branch protection setup) and Python validators; and comprehensive web browser tool suite requiring careful understanding of Playwright CDP integration patterns and error handling paths.

Possibly related PRs

Poem

🐰 A burrow of plugins now grows,
Ralph loops through thoughts, round and round it goes,
Web browser tools hop through the DOM with grace,
Skills and commands in their proper place,
Validation scripts keep structure sound—
The best plugin garden ever found! 🌿✨

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5045da7 and 4e17fb0.

📒 Files selected for processing (77)
  • .claude-plugin/marketplace.json
  • .github/workflows/test.yml
  • .pre-commit-config.yaml
  • README.md
  • docs/DEVELOPMENT.md
  • docs/TESTING.md
  • marketplace.json
  • plugins/dotfiles-plugin/.claude-plugin/plugin.json
  • plugins/dotfiles-plugin/README.md
  • plugins/dotfiles-plugin/agents/code-reviewer.md
  • plugins/dotfiles-plugin/commands/clean-worktree.md
  • plugins/dotfiles-plugin/commands/create-command.md
  • plugins/dotfiles-plugin/commands/create-hook.md
  • plugins/dotfiles-plugin/commands/create-skill.md
  • plugins/dotfiles-plugin/commands/debug.md
  • plugins/dotfiles-plugin/commands/fix-ci.md
  • plugins/dotfiles-plugin/commands/git-exclude.md
  • plugins/dotfiles-plugin/commands/handoff.md
  • plugins/dotfiles-plugin/commands/make-local-issues.md
  • plugins/dotfiles-plugin/commands/pickup.md
  • plugins/dotfiles-plugin/commands/research.md
  • plugins/dotfiles-plugin/commands/sdd.md
  • plugins/dotfiles-plugin/hooks/git-command-validator.sh
  • plugins/dotfiles-plugin/hooks/hooks.json
  • plugins/dotfiles-plugin/skills/README.md
  • plugins/dotfiles-plugin/skills/ci-troubleshooting/SKILL.md
  • plugins/dotfiles-plugin/skills/commit-push-pr/CONFLICT_RESOLUTION.md
  • plugins/dotfiles-plugin/skills/commit-push-pr/EVALUATION.md
  • plugins/dotfiles-plugin/skills/commit-push-pr/QUICK_START.md
  • plugins/dotfiles-plugin/skills/commit-push-pr/SKILL.md
  • plugins/dotfiles-plugin/skills/commit-push-pr/scripts/conflict-check.sh
  • plugins/dotfiles-plugin/skills/commit-push-pr/scripts/pr-check.sh
  • plugins/dotfiles-plugin/skills/nix-direnv-setup/SKILL.md
  • plugins/dotfiles-plugin/skills/setup-precommit-and-ci/SKILL.md
  • plugins/dotfiles-plugin/skills/setup-precommit-and-ci/scripts/setup-branch-protection.sh
  • plugins/dotfiles-plugin/skills/setup-precommit-and-ci/templates/ci-workflow-template.yml
  • plugins/dotfiles-plugin/skills/setup-precommit-and-ci/templates/precommit-config-template.yml
  • plugins/dotfiles-plugin/skills/using-git-worktrees/SKILL.md
  • plugins/dotfiles-plugin/skills/web-browser/SKILL.md
  • plugins/dotfiles-plugin/skills/web-browser/tools/.gitignore
  • plugins/dotfiles-plugin/skills/web-browser/tools/.worktrees/feat-api-testing/docs/plans/2025-12-29-playwright-migration.md
  • plugins/dotfiles-plugin/skills/web-browser/tools/a11y.js
  • plugins/dotfiles-plugin/skills/web-browser/tools/api.js
  • plugins/dotfiles-plugin/skills/web-browser/tools/click.js
  • plugins/dotfiles-plugin/skills/web-browser/tools/console.js
  • plugins/dotfiles-plugin/skills/web-browser/tools/cookies.js
  • plugins/dotfiles-plugin/skills/web-browser/tools/dev.js
  • plugins/dotfiles-plugin/skills/web-browser/tools/eval.js
  • plugins/dotfiles-plugin/skills/web-browser/tools/extract.js
  • plugins/dotfiles-plugin/skills/web-browser/tools/nav.js
  • plugins/dotfiles-plugin/skills/web-browser/tools/network.js
  • plugins/dotfiles-plugin/skills/web-browser/tools/package.json
  • plugins/dotfiles-plugin/skills/web-browser/tools/pick.js
  • plugins/dotfiles-plugin/skills/web-browser/tools/screenshot.js
  • plugins/dotfiles-plugin/skills/web-browser/tools/start.js
  • plugins/dotfiles-plugin/skills/web-browser/tools/stop.js
  • plugins/dotfiles-plugin/skills/web-browser/tools/type.js
  • plugins/dotfiles-plugin/skills/web-browser/tools/wait.js
  • plugins/dotfiles-plugin/skills/writing-claude-commands/SKILL.md
  • plugins/example-plugin/.claude-plugin/plugin.json
  • plugins/ralph-loop/.claude-plugin/plugin.json
  • plugins/ralph-loop/README.md
  • plugins/ralph-loop/commands/cancel-ralph.md
  • plugins/ralph-loop/commands/help.md
  • plugins/ralph-loop/commands/ralph-loop.md
  • plugins/ralph-loop/hooks/hooks.json
  • plugins/ralph-loop/hooks/stop-hook.sh
  • plugins/ralph-loop/scripts/setup-ralph-loop.sh
  • scripts/validate-frontmatter.py
  • scripts/validate-json.sh
  • scripts/validate-plugin.sh
  • scripts/validate-structure.sh
  • tests/run-tests.sh
  • tests/setup.bash
  • tests/test-frontmatter.bats
  • tests/test-json-validation.bats
  • tests/test-plugin-structure.bats

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.

@baleen37
baleen37 deleted the feat/boilerplate-implementation branch January 9, 2026 13:13
github-actions Bot added a commit that referenced this pull request Jan 10, 2026
# [1.1.0](v1.0.0...v1.1.0) (2026-01-10)

### Bug Fixes

* **ci:** correct BATS installation method in release workflow ([7212ad5](7212ad5))
* **ci:** disable commitlint max line length rules ([bfa16ec](bfa16ec))
* **ci:** install bats-support and bats-assert correctly ([f79e24b](f79e24b))
* **ci:** remove example-plugin and fix marketplace.json schema ([f35efff](f35efff))
* correct bats helper paths and test assertions ([2df9de7](2df9de7))
* enable submodules in CI for BATS helpers ([9f0d4ba](9f0d4ba))
* improve jq error handling in stop-hook.sh ([e643725](e643725))
* install BATS helpers in CI, remove submodules ([5045da7](5045da7))
* ralph-loop CLAUDE_ENV_FILE fallback ([db1128a](db1128a))
* remove stray EOF at end of setup-ralph-loop.sh ([fb2161a](fb2161a))
* remove unsupported fields from plugin.json ([1e7a03c](1e7a03c))
* rename marketplace to baleen-plugins ([928d3f6](928d3f6))
* sanitize session_id and improve error handling in SessionStart hook ([325649f](325649f))

### Features

* add cancel-ralph.sh script for session-based loop cancellation ([7a97fb3](7a97fb3))
* add git-guard plugin for commit and pre-commit protection ([a3d9b25](a3d9b25))
* add SessionStart hook to hooks.json for multi-session support ([0da6ad5](0da6ad5))
* add SessionStart hook to store session_id in CLAUDE_ENV_FILE ([7fa7197](7fa7197))
* **ci:** add semantic-release for automatic versioning ([499424e](499424e))
* comprehensive plugin boilerplate with dotfiles, ralph-loop, and BATS replacement ([#3](#3)) ([32b3dac](32b3dac)), closes [#1](#1)
* **git-guard:** block dangerous git commands (update-ref, filter-branch, hooksPath) ([1c094d3](1c094d3))
* **me:** add /brainstorm command and remove writing-claude-commands skill ([02ecbbf](02ecbbf))
* **ralph-loop:** show active loop status in SessionStart hook ([30ddcc3](30ddcc3))
* update setup script to use session-based state files in ~/.claude/ralph-loop/ ([e84793f](e84793f))
* update stop-hook to use session-based state files in ~/.claude/ralph-loop/ ([cf993dd](cf993dd))
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant