SuperAPI AI Directory

cx-fix

Coding & development

View repository

Updated 10-16 00:03

About this skill

cx-fix: lightweight fix and complex escalation

Fix quickly first, and only escalate to a heavier investigation when the problem is clearly complex.

Mandatory rules

All file reads and writes must use absolute paths. Do not use ../ relative paths. First use git rev-parse --show-toplevel to get the absolute path.

Worktree detection

cx-fix has looser worktree requirements than other skills:

  • Small fixes (bug fix, hotfix): allowed to fix directly on the current branch (--inline mode)
  • Large fixes (involving multi-file refactoring): recommended to create a worktree for isolation

Detection before execution:

check_output=$(bash ${CLAUDE_PLUGIN_ROOT}/scripts/cx-worktree.sh check \
  --inline \
  --project-root "$(git rev-parse --show-toplevel)" 2>&1) || true

Default to inline mode, worktree is not mandatory.

Read first:

  • ${CLAUDE_PLUGIN_ROOT}/core/workflow/README.md
  • ${CLAUDE_PLUGIN_ROOT}/core/workflow/protocols/fix.md

How to use

/cx:cx-fix {问题描述}
/cx:cx-fix

Default path

  1. Investigate and reproduce
  2. Locate the root cause
  3. Minimal fix
  4. Run the most relevant verification
  5. Record the fix conclusion
  6. Commit the code

This is the cc adapter fix entry point on the Claude Code side; if the feature to which the current problem belongs is already held by codex , first prompt for handoff, then decide whether to continue.

Prefer to call the shared runner:

bash ${CLAUDE_PLUGIN_ROOT}/scripts/cx-workflow-fix.sh \
  --title "<问题标题>" \
  --runner cc \
  --session-id <session-id>

Escalation conditions

Only escalate the fix to complex mode in these situations:

  • The root cause is unclear and requires parallel investigation of multiple hypotheses
  • Involves multiple modules or high-risk compatibility
  • Chained regressions appear after a failed fix
  • Need to structurally record the blocking reason

Artifacts and paths

Save the fix record to:

开发文档/CX工作流/修复/{问题标题}/修复记录.md

If the fix process is blocked, also state clearly in the fix record:

  • What has been tried
  • Where it is currently stuck
  • Whether user decision or external information is needed

Commit conventions

The fix path commit uses:

fix(scope): description [cx-fix:<fix-slug>]

Example:

fix(liuyao): repair divine transaction path [cx-fix:liuyao-divine-500]

Relationship with GitHub

GitHub only handles sync records, it is not the fix controller. Local 开发文档/CX工作流/修复/ is the runtime truth.