Multi-client practitioners work across multiple clients and matters. A matter workspace isolates one client's or engagement's context from other clients or engagements. This command manages those workspaces.
Subcommands
/commercial-legal:matter-workspace new <slug>— Create a new matter workspace, run a brief intake interview, writematter.md/commercial-legal:matter-workspace list— List matters and their statuses/commercial-legal:matter-workspace switch <slug>— Set the current matter/commercial-legal:matter-workspace close <slug>— Archive a matter (move to_archived/, never delete)/commercial-legal:matter-workspace none— Detach from any current matter, pure practice-area-level work
Instructions
- Read the review guidelines — confirm that the
## 事项工作区section is populated. IfEnabledis✗, inform the user that matter workspaces are closed — suitable for corporate legal users serving only one company. Do not error — the closed state is the expected state for corporate legal users. - Use the following subcommand logic.
- Dispatch based on the subcommand.
- Show the user the changes and confirm before writing.
Notes
- Unless
跨事项上下文in the practice-area-level CLAUDE.md ison, skills never read files across matters. - Archiving is not deletion — closed matters remain readable for retention/conflicts purposes.
- Short names use lowercase plus hyphens. If a short name is reused across archived and current matters, the archived one is retained under
_archived/<slug>/.
Multi-client practitioners (private practice — solo practice, small firm, large firm) work across multiple matters. The context of one matter must not leak to another matter.
The default state is closed. Corporate legal users will never see — they operate only at the practice-area level. The matter workspace is turned on for private-practice users at cold start, or by editing ## 事项工作区 in the review guidelines.
Storage layout
All matter data is located at:
~/.claude/plugins/config/claude-for-legal-zh/commercial-legal/
├── CLAUDE.md # 业务领域级审查指引
└── matters/
├── <slug>/
│ ├── matter.md # 客户、对方当事人、事项类型、关键事实、覆盖规则
│ ├── history.md # 日期化的事件日志
│ ├── notes.md # 自由形式的工作笔记
│ └── outputs/ # 事项的技能输出(可选子文件夹)
└── _archived/
└── <slug>/ # 已关闭的事项——可读但非当前
Subcommand logic
new <slug>
- Confirm the short name is not already taken. If taken, ask the user to choose another short name.
- Run the intake interview: client, opposing party, matter type, confidentiality level, key facts, matter-specific overriding rules, related matters.
- Write
matters/<slug>/matter.md。 - per the template, seeding
history.md。 - Create empty
notes.md。 - Do not switch automatically. Ask whether to switch.
list
Enumerate matters/*/matter.md. Print a table. Mark the current matter as *。
switch <slug>
- Confirm
matters/<slug>/matter.mdexists. - Edit the
Active matter:line in the review guidelines. - Show the user the matter.md summary.
close <slug>
- Confirm the folder exists.
- Append a "closed" entry to
history.md。 - Move the folder to
_archived/。 - If it is the current matter, set
Active matter:tonone。
none
Set Active matter: to none. Confirm with the user.
Cross-matter context
When Cross-matter context: is off(default), a skill working in matter A never reads matter B's files. When it is on , the skill reads across matters only when the user explicitly requests it.
What this skill does not do
- Does not run conflict-of-interest checks. Conflict of interest is the practitioner's/firm's job.
- Does not enforce retention policies. Closes the archive but does not delete.
- Does not automatically route output. The substantive skill decides where to write; this skill tells which folder is current.