Chainer Plugin for Claude Code

Just describe
your goal.

Chainer lets you tell Claude Code what you want to build, then it suggests and runs the right plugins—end to end.

/chainer:run Add OAuth login to my app
Chainer interprets what you want and confirms before running. Learn more
Chainer will respond with a confirmation:
Here's what I'll do:
1. /feature-dev will analyze your codebase and create a plan for adding OAuth
2. /ralph-loop will implement the plan automatically (up to 50 passes)
Result: You describe what you want in plain English, confirm the plan, come back to working code.

The Concept

Simple requests,
complex orchestrations.

Instead of knowing which plugins to run and in what order, let Chainer figure that out for you. Just describe what you're trying to do—Chainer finds the right plugins and runs them.

You're in control. Extend it to do new things your way, or use the defaults to create worktrees, plan features, implement code, run tests, and deploy.

Capabilities

Designed for multi-step workflows that benefit from automation.

  • Chain any Claude Code plugins in sequence
  • Smart question handler makes responses interactive
  • Config-driven workflows with YAML

Installation

Simple setup.

Requires Claude Code. Works with plugins like Worktree Manager, feature-dev, ralph-loop, and more.

# 1. Add the marketplace (in Claude Code) /plugin marketplace add danielraffel/worktree-manager # 2. Install Chainer /plugin install chainer@generous-corp-marketplace # 3. Restart Claude Code # Quit and reopen Claude Code to load the plugin
View on GitHub →
Zero build steps required. Installs directly from marketplace.

Example Scenarios

Just say what you want.

Chainer interprets natural language and shows you what it'll do before running. Here are common patterns.

Plan + Implement
/chainer:run Add user authentication
The default: plan it, then build it. Learn more
Here's what I'll do:
1. /feature-dev will analyze your codebase and create a plan for user authentication
2. /ralph-loop will implement the plan (up to 50 passes)
Just Planning
/chainer:run design a REST API for orders
Specify what you want - planning only or full implementation. Learn more
Here's what I'll do:
1. /feature-dev will analyze your codebase and create an API design
→ Saves plan to specs/ in your project
No automatic implementation. Review the plan, then say /chainer:run implement when ready.
Implement Existing Plan
/chainer:run implement the API spec
Have a plan already? Just implement it. Learn more
Here's what I'll do:
1. /ralph-loop will implement specs/api.md (up to 50 passes)
Isolated Worktree
/chainer:run build payments in a new worktree
Mention "worktree" for complete isolation. Learn more
Here's what I'll do:
1. /worktree-manager:start creates ~/worktrees/payments/ on a new branch
2. /feature-dev creates an implementation plan
3. /ralph-loop implements the plan (up to 50 passes)
All work stays isolated from your main branch.

Smart Questions

Interactive questions
for any plugin.

Chainer automatically detects when plugins ask clarifying questions and presents them in an easy-to-use interface. No more reading through long text lists.

Before: Text wall

Before I design the architecture: 1. Invader behavior: Should invaders move in formation or side-to-side? 2. Lives: How many starting lives? 3. Controls: Arrow keys or A/D? 4. Audio: Include sound effects? 5. UI: Start screen with instructions? Please answer these questions...

After: Interactive UI

Invader behavior
Tab through questions • Up/Down to select

Chainer detects questions, parses options, and presents them interactively - automatically.

On the Roadmap

Answer History: Chainer will remember your choices and suggest previous answers for similar questions.

Smart Defaults: Project-type detection will suggest sensible defaults. Game projects get "Arrow keys", APIs get "JWT tokens".

Works with a growing number of plugins: Chainer supports plugins that output text questions or use Claude Code's question API. See what's supported →

Enable in config: question_handling.enabled: true

Custom Patterns

Teach Chainer your workflows.

Define patterns that trigger specific chains. When Chainer sees matching words, it knows what workflow you want.

# chainer.config.yaml in your project patterns: - match: ["with tests", "and test"] chain: plan-implement-test - match: ["quick fix", "hotfix"] chain: implement-only - match: ["refactor"] chain: plan-only

Now you can say:

/chainer:run Add OAuth with tests

Chainer detects "with tests" and runs your plan-implement-test chain, which adds npm test after implementation.

See the community patterns library for more examples and ready-to-use workflows.

FAQ

Common questions.

Can you explain this without all the jargon?

Chainer lets you automate sequences of actions in Claude Code by just describing what you want in plain English.

The simple mental model: You tell Chainer what you want to build. Chainer figures out the steps, shows you what it'll do, and asks for confirmation. Then it runs everything automatically.

How it works:

1. You type something like /chainer:run Add user login
2. Chainer shows you: "I'll run feature-dev to plan, then ralph-loop to implement"
3. You click Start (or Edit if you want to change something)
4. Chainer runs each step automatically
5. You come back to working code

Example: Instead of remembering commands and syntax, just say /chainer:run build payments in a new worktree and Chainer handles creating the isolated workspace, planning, and implementing.

What's the status of this project?

Very early beta. Chainer is experimental and should be considered a proof-of-concept. Only a handful of people have tested it so far.

Expect rough edges, breaking changes, and incomplete features. Some features shown on this site (like Answer History and interactive Start/Edit/Cancel buttons) are designed but not yet implemented.

Use at your own risk. This notice will be updated when the project matures.

What do I need to use Chainer?

You need Claude Code installed. That's it for basic use.

The built-in chains use these plugins, so install them to use those chains:

Worktree Manager - For the worktree-plan-implement chain
feature-dev - For planning chains
ralph-loop - For implementation chains

Missing a plugin? Chainer will detect missing dependencies and show exactly how to install them.

What plugins are supported?

Chainer officially supports and is tested with:

feature-dev - Planning and architecture
ralph-loop - Autonomous implementation
Worktree Manager - Isolated workspaces
frontend-design - UI/UX design

Many other plugins should work in custom chains. See SUPPORTED_PLUGINS.md for the full compatibility matrix and feature support details.

How do I create my own workflows?

Add a chainer.config.yaml file to your project. Define patterns (words that trigger your workflow) and chains (what steps to run):

patterns:
  - match: ["with tests", "and test"]
    chain: plan-implement-test

chains:
  plan-implement-test:
    steps:
      - skill: feature-dev
      - skill: ralph-loop
      - script: npm test

Now when you say /chainer:run Add OAuth with tests, Chainer detects "with tests" and runs your custom workflow.

See the community patterns for more examples.

Why use Chainer instead of running plugins manually?

No syntax to remember: Just describe what you want. Chainer figures out the right plugins and order.

Transparency: See exactly what will happen before it runs. Edit or cancel if it's not what you want.

Consistency: The same steps happen every time, in the same order.

Shareability: Teams can share patterns so everyone uses the same workflows.

Can I run multiple chains in parallel?

Yes! Chainer supports parallel execution using tmux.

When you try to run a second chain while one is already running, Chainer detects the conflict and offers to spawn a new tmux window or session. Each chain runs independently in its own isolated environment.

Use /chainer:status to see all running and recently completed chains.

Do I need to install feature-dev and ralph-loop?

No, they're optional. But, Chainer was designed to work best with other plugins like Worktree Manager.

The power comes from pairing Chainer with other plugins for workflow automation. Chainer chains together feature-dev (planning) and ralph-loop (implementation) so you can describe what you want in plain English and come back to a completed feature in an isolated worktree.

Don't worry about missing plugins: Chainer automatically detects missing dependencies before running a chain and shows you exactly how to install them.

Why does ralph-loop keep looping after the work is done?

This is a known quirk of ralph-loop's design. To exit the loop, Claude must output the literal text <promise>DONE</promise>. Sometimes Claude completes the work but says things like "Done", "Complete", or "Finished" instead of outputting the exact escape tag.

When this happens, you'll see iterations increment (e.g., "Ralph iteration 25... 26... 27...") with Claude repeatedly confirming completion but not exiting. The loop will run until it hits the max iterations limit (default: 50).

This is harmless but wasteful. Your work was completed successfully—the extra iterations just burn through API credits. You can manually stop Claude (Ctrl+C) once you see the work is done, or wait for max iterations.

Update: We've added explicit exit instructions to the task prompt, and testing shows this significantly improves Claude's exit behavior. Most tasks now exit cleanly with the proper tag.

If you still see excessive looping:

1. Lower default_max_iterations in your config file (e.g., to 20) to cap wasted iterations.

2. Manually stop Claude (Ctrl+C) once you see the work is done.

How do I share my chains with the community?

We'd love to see what workflows you create! To contribute a chain to the community library:

1. Create your chain in a YAML file (e.g., my-workflow.yaml)
2. Fork the Chainer repository
3. Add your chain to the community-chains/ directory
4. Include a README explaining what it does and what plugins it requires
5. Submit a pull request

Check out existing chains in the community-chains library for examples.

Can I run multiple ralph-loop loops in parallel worktrees?

Not from the same directory. Ralph-wiggum's state file (.claude/ralph-loop.local.md) is tied to your Claude session's current working directory, not the worktree. If you run multiple Claude sessions from the same parent directory, they'll all see the same state file and interfere with each other.

Workaround: Run each Claude session from within the worktree directory instead of your main project directory:

cd ~/worktrees/feature-a
claude

This way each worktree has its own isolated .claude/ directory, and ralph loops won't cross-contaminate. You can then have multiple terminals, each running Claude from a different worktree, all working independently.