Loading...
Loading...
CX Workflow - Configuration Management. View and modify configuration fields in config.json, such as developer_id, github_sync mode, code review toggle, agent team mode, auto-formatting, etc. Trigger words: config, settings, modify config, change mode. Only execute when the user explicitly calls /cx-config. Do not trigger automatically.
npx skill4agent add m19803261706/cx-workflow cx-config${GIT_ROOT}/.claude/cx/config.jsonGIT_ROOT=$(git rev-parse --show-toplevel)
CONFIG_FILE="${GIT_ROOT}/.claude/cx/config.json"
if [ ! -f "$CONFIG_FILE" ]; then
echo "❌ Workflow not initialized"
echo "Please run first: /cx-init"
exit 1
fi{
"version": "2.0",
"developer_id": "cx",
"github_sync": "collab",
"current_feature": "cx-payment",
"agent_teams": false,
"background_agents": false,
"code_review": true,
"auto_format": {
"enabled": true,
"formatter": "auto"
},
"hooks": {
"session_start": true,
"pre_compact": true,
"prompt_refresh_interval": 5,
"stop_verify": true,
"post_edit_format": true,
"notification": true,
"permission_auto_approve": true
}
}⚙️ CX Workflow — Current Configuration
📋 Basic Configurations
├─ developer_id: cx
├─ github_sync: collab
└─ current_feature: cx-payment
🤖 AI Features
├─ agent_teams: false
├─ background_agents: false
└─ code_review: true
🎨 Code Processing
├─ auto_format.enabled: true
└─ auto_format.formatter: auto
🔧 Hooks Toggles
├─ session_start: true
├─ pre_compact: true
├─ prompt_refresh_interval: 5
├─ stop_verify: true
├─ post_edit_format: true
├─ notification: true
└─ permission_auto_approve: true
Modify config: /cx-config <field> <value>
Or: /cx-config (enter interactive menu)Select the configuration item to modify:
【Basic Configurations】
1. developer_id (Current: cx)
2. github_sync (Current: collab)
3. current_feature (Current: cx-payment)
【AI Features】
4. agent_teams (Current: false)
5. background_agents (Current: false)
6. code_review (Current: true)
【Code Processing】
7. auto_format.enabled (Current: true)
8. auto_format.formatter (Current: auto)
【Hooks Toggles】
9. session_start (Current: true)
10. pre_compact (Current: true)
11. prompt_refresh_interval (Current: 5)
12. stop_verify (Current: true)
13. post_edit_format (Current: true)
14. notification (Current: true)
15. permission_auto_approve (Current: true)
0. Return
Select (enter number or directly input field name):Current: developer_id = "cx"
Modified to: "alice"
Feature directory: features/alice-payment/ (instead of cx-payment/)offlocalcollabfullcollab| Mode | Document Issue | Task Issue | PR | Applicable Scenario |
|---|---|---|---|---|
| ❌ | ❌ | ❌ | Solo projects, internal testing |
| ❌ | ❌ | ❌ | Solo review, documentation |
| ✅ (PRD/Design) | ❌ | ✅ (Summary) | Recommended for 2-5 person teams |
| ✅ (All) | ✅ (All) | ✅ | Large teams, strict processes |
Current: github_sync = "collab"
Modified to: "off"
Effect: cx-summary will no longer create GitHub Issues, only generate local summary.mdCurrent GitHub sync mode: collab
Select new mode:
① off — Local-only, no GitHub Issues/PRs created
② local — Create summary Issue upon completion
③ collab — Create Issues for PRD/Design Docs, Issue+PR for summary (Recommended)
④ full — Create Issues for all documents
Select (1-4):Current: current_feature = "cx-payment"
Modified to: "cx-refund"
Effect: Next /cx-exec will execute tasks related to cx-refund
/cx-status will display progress of cx-refundfalseWhen cx-plan executes:
└─ Automatically identify front-end/back-end task groups
When cx-exec executes:
├─ Launch frontend-agent (handles front-end tasks)
├─ Launch backend-agent (handles back-end tasks)
└─ SubagentStop hook verifies contract consistency between both partiesCurrent: agent_teams = false
Modified to: true
Note: After enabling, Claude Code must support Agent Teams. It is recommended to consult the documentationfalseAfter cx-summary is generated:
├─ Local summary is completed immediately (user can continue operations)
└─ GitHub sync (Issue/PR creation) runs in the backgroundAfter cx-summary is generated:
├─ Execute local summary
├─ Block and wait for GitHub sync
└─ Return after completiontrueAfter all tasks are completed, prompt the user:
"All tasks are completed. Would you like to perform a code review?"
User options:
① Full review (logic bugs + security + quality + cleanup)
② Quick check (only logic bugs)
③ SkipDirectly enter cx-summary after task completion
Skip the code review processCurrent: code_review = true
Modified to: false
Effect: No more code review prompts in subsequent executionstrueAfter Edit/Write tool execution, automatically run:
├─ JavaScript/TypeScript → prettier
├─ Python → black
├─ Go → gofmt
├─ Rust → rustfmt
└─ Others → Detect according to formatterFiles are not automatically formatted, need to run format command manuallyautoprettierblackgofmtrustfmtauto| Value | Description |
|---|---|
| Auto-detect, select according to file type |
| Force use of prettier (JS/TS/JSON) |
| Force use of black (Python) |
| Force use of gofmt (Go) |
| Force use of rustfmt (Rust) |
Current: auto_format.formatter = "auto"
Modified to: "prettier"
Effect: All formatable files are processed with prettiertrueAutomatically execute at the start of each session:
├─ Read status.json
├─ Detect interrupted tasks
├─ Load context summary
└─ Prompt user for available operationsSession does not automatically load context
Need to manually query progress via /cx-statustrueAutomatically execute before compaction:
└─ Generate context-snapshot.md
├─ Current task number
├─ Contract summary
└─ Progress information
Use snapshot to quickly restore context when recovering after compaction50N > 0Current: prompt_refresh_interval = 5
Modified to: 3
Effect: Automatically inject progress reminder every 3 rounds of dialoguetrueAutomatically check when user wants to leave:
├─ Read status.json
├─ Detect if there are in_progress but unfinished tasks
└─ If yes, remind user to confirmUser can leave directly without reminderstrueAutomatically execute after each Edit/Write:
└─ Call auto_format.formatter to format filesNo automatic formatting
Used in combination with auto_format.enabledtrueSend desktop notifications for the following events:
├─ All tasks of cx-exec are completed
├─ cx-fix completes repair
└─ cx-summary completes aggregationosascriptnotify-sendNo desktop notifications are senttruePermissionRequest hook automatically approves the following commands:
├─ git add/commit/push/checkout/branch
├─ gh issue/pr/project
└─ npm test / pytest / cargo test / go testAll commands require manual confirmation from the user/cx-config
→ Display current configuration
→ Prompt to select the item to modify
→ Provide input/selection interface according to field type/cx-config developer_id alice
/cx-config github_sync off
/cx-config code_review false
/cx-config hooks.notification truevim ${GIT_ROOT}/.claude/cx/config.json- developer_id: Used when creating features next time
- current_feature: Takes effect immediately in next /cx-exec
- code_review: Takes effect immediately after next cx-exec completion
- auto_format.enabled/formatter: Takes effect immediately after next Write/Edit
- hooks.prompt_refresh_interval: Takes effect immediately in next UserPromptSubmit- github_sync: Takes effect in next /cx-summary
- agent_teams: Need to re-run /cx-plan to apply new task grouping
- background_agents: Takes effect in next /cx-summary- Take effect immediately in the next trigger of the corresponding hook after modification
- Disabling a hook will not retroactively clean up (e.g., after session_start=false
already loaded context remains valid)cp ${GIT_ROOT}/.claude/cx/config.json \
${GIT_ROOT}/.claude/cx/config.json.backupcp ${GIT_ROOT}/.claude/cx/config.json.backup \
${GIT_ROOT}/.claude/cx/config.json| Field | Valid Values | Description |
|---|---|---|
| Non-empty string | Maximum 32 characters, only alphanumeric and underscores |
| off/local/collab/full | Must be allowed values |
| String | Can be empty |
| true/false | Boolean value |
| true/false | Boolean value |
| true/false | Boolean value |
| true/false | Boolean value |
| auto/prettier/... | Must be allowed values |
| Boolean/Integer | According to field type |
Current Configuration:
github_sync: off
code_review: false
Modified to:
github_sync: collab
code_review: true
Result: Subsequent development will create GitHub Issues for review, supporting team collaborationModification:
auto_format.enabled: false
Result: Written code will not be automatically formattedModification:
hooks.notification: false
Result: No more notifications sent upon task completionModification:
agent_teams: true (Enable parallel front-end and back-end development)
background_agents: true (Background GitHub sync)
hooks.prompt_refresh_interval: 10 (Reduce refresh frequency)
Result: Multi-agent parallel development, reducing manual waiting time| Problem | Solution |
|---|---|
| No effect after modification | Check if commands need to be rerun or session needs to be restarted |
| config.json format error | Validate with |
| Cannot write to config | Check file permissions: |
| GitHub sync not working | Ensure |