Skip to content

Commit 988f066

Browse files
jwaldripclaude
andcommitted
feat(plugin): block /reset, /refine, /setup, /resume in cowork mode
These skills modify state, write config files, or manage worktrees — all operations that require a full Claude Code CLI session. Cowork sessions should only use /elaborate for collaborative planning. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a6261ec commit 988f066

File tree

4 files changed

+52
-0
lines changed

4 files changed

+52
-0
lines changed

plugin/skills/refine/SKILL.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,20 @@ You are refining an AI-DLC intent or unit specification mid-construction. Your j
1010

1111
---
1212

13+
## Pre-check: Reject Cowork Mode
14+
15+
```bash
16+
if [ "${CLAUDE_CODE_IS_COWORK:-}" = "1" ]; then
17+
echo "ERROR: /refine cannot run in cowork mode."
18+
echo "Run this in a full Claude Code CLI session."
19+
exit 1
20+
fi
21+
```
22+
23+
If `CLAUDE_CODE_IS_COWORK=1`, stop immediately with the message above. Do NOT proceed.
24+
25+
---
26+
1327
## Step 1: Load Intent State
1428

1529
```bash

plugin/skills/reset/SKILL.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,18 @@ The work you did is preserved in git. Only the AI-DLC workflow state is cleared.
3131

3232
## Implementation
3333

34+
### Pre-check: Reject Cowork Mode
35+
36+
```bash
37+
if [ "${CLAUDE_CODE_IS_COWORK:-}" = "1" ]; then
38+
echo "ERROR: /reset cannot run in cowork mode."
39+
echo "Run this in a full Claude Code CLI session."
40+
exit 1
41+
fi
42+
```
43+
44+
If `CLAUDE_CODE_IS_COWORK=1`, stop immediately with the message above. Do NOT proceed.
45+
3446
### Step 1: Confirm (Optional)
3547

3648
If the task is not complete, warn:

plugin/skills/resume/SKILL.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,18 @@ User: /construct
3434

3535
## Implementation
3636

37+
### Pre-check: Reject Cowork Mode
38+
39+
```bash
40+
if [ "${CLAUDE_CODE_IS_COWORK:-}" = "1" ]; then
41+
echo "ERROR: /resume cannot run in cowork mode."
42+
echo "Run this in a full Claude Code CLI session."
43+
exit 1
44+
fi
45+
```
46+
47+
If `CLAUDE_CODE_IS_COWORK=1`, stop immediately with the message above. Do NOT proceed.
48+
3749
### Step 1: Find Resumable Intents
3850

3951
If no slug provided, scan multiple sources for active intents:

plugin/skills/setup/SKILL.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,20 @@ This skill is **idempotent** — re-running `/setup` preserves existing settings
3535

3636
---
3737

38+
## Pre-check: Reject Cowork Mode
39+
40+
```bash
41+
if [ "${CLAUDE_CODE_IS_COWORK:-}" = "1" ]; then
42+
echo "ERROR: /setup cannot run in cowork mode."
43+
echo "Run this in a full Claude Code CLI session inside your project directory."
44+
exit 1
45+
fi
46+
```
47+
48+
If `CLAUDE_CODE_IS_COWORK=1`, stop immediately with the message above. Do NOT proceed.
49+
50+
---
51+
3852
## Phase 0: Load Existing Settings
3953

4054
1. Check if `.ai-dlc/settings.yml` exists using the `Read` tool.

0 commit comments

Comments
 (0)