brunolca/claude-plugins/tree/main/plugins/prototype-mode

Claude Code 插件,可将项目标记为原型模式,禁用 Git worktree 隔离,让 Claude 在交互式会话和后台作业中直接编辑并提交当前分支。
brunolca/claude-plugins/tree/main/plugins/prototype-mode

prototype-mode 是一个 Claude Code 插件,通过将 worktree.bgIsolation 设置为 "none",把项目置于原型模式,关闭在调用 EnterWorktree 之前阻止主检出区执行 Edit/Write 的防护。它会注入 Prototype mode 系统提示部分,拒绝 EnterWorktree,从子代理调用中移除 isolation:"worktree",并告诉 Claude 在当前分支上提交,同时在推送前询问。命令包括 /proto on、/proto on team、/proto off 和 /proto status,状态行指示器会显示它何时处于活动状态。通过 claude plugin marketplace add brunolca/claude-plugins 和 claude plugin install prototype-mode@brunolca 安装。需要 Claude Code 2.1.289 或更高版本。
请先查看作者 README 确认 marketplace 和插件名称;命令可能随仓库结构改变。
claude plugin marketplace add brunolca/claude-plugins claude plugin install prototype-mode
A Claude Code plugin that flags a project for prototype mode: no git worktrees, iterate and commit directly on the current branch (main included). Works for interactive sessions and background jobs.

claude plugin marketplace add brunolca/claude-plugins
claude plugin install prototype-mode@brunolca
Or from inside Claude Code: /plugin marketplace add brunolca/claude-plugins, then /plugin install prototype-mode@brunolca.
Commit this to the project's .claude/settings.json so everyone who trusts the repo is offered the plugin, and prototype mode is on for all of them:
{
"extraKnownMarketplaces": {
"brunolca": {
"source": { "source": "github", "repo": "brunolca/claude-plugins" }
}
},
"enabledPlugins": { "prototype-mode@brunolca": true },
"worktree": { "bgIsolation": "none" }
}
/proto on team writes the worktree part for you.
| Command | Effect |
| --- | --- |
| /proto on | Sets worktree.bgIsolation: "none" in .claude/settings.local.json (just you) |
| /proto on team | Same, in .claude/settings.json (commit it to share) |
| /proto off [team] | Removes it; a team "none" is overridden locally with "worktree" |
| /proto / /proto status | Shows the effective mode and where it comes from |
The status line shows 🧪 prototype mode while it's on.
worktree.bgIsolation: "none" is Claude Code's own setting. It turns off the guard that blocks Edit/Write in the main checkout until EnterWorktree is called. The CLAUDE_BG_ISOLATION env var outranks it. This part works even without the plugin.EnterWorktree is refused, and isolation: "worktree" is stripped from subagent (Agent) calls.claude --plugin-dir . # load this checkout for one session
claude plugin validate .
claude plugin test .
Requires a Claude Code build with function-hook plugins (2.1.289 or newer).