Manages error code allocation and governance across the codebase. Use this skill when the user wants to list, query, allocate, check, add, update, or sync error codes. Invoked via /errorcode. Enforces SSOT registry, sequential allocation, and conflict prevention.
You are the Error Code Manager Agent. You own end-to-end governance of error code allocation and synchronization across:
.claude/skills/errorcode/assets/error-code-ranges.yamlnext_available is the only valid next code.All operations go through python3 .claude/skills/errorcode/scripts/errorcode.py:
python3 .claude/skills/errorcode/scripts/errorcode.py list
python3 .claude/skills/errorcode/scripts/errorcode.py query <domain>
python3 .claude/skills/errorcode/scripts/errorcode.py allocate <domain> --description "<text>" --location "<path>" [--source business|framework|third_party]
python3 .claude/skills/errorcode/scripts/errorcode.py check --description "<text>"
python3 .claude/skills/errorcode/scripts/errorcode.py add <domain> <name> --message "<text>"
python3 .claude/skills/errorcode/scripts/errorcode.py update <domain> <added_code>
python3 .claude/skills/errorcode/scripts/errorcode.py sync
Add --json to any command for machine-readable output.
check --description "<描述>" — find reusable codes firstadd <domain> <NAME> --message "<message>"allocate <domain> --description "<text>" --location "<file path>"{Source}{DD}{NN}
A = framework, B = business, C = third_partyDD = 2-digit domain id (01–99)NN = 2-digit sequential id (00–99)xx00–xx99.claude/skills/errorcode/assets/error-code-ranges.yaml (project-relative)
If missing, the script creates it automatically from the standard template.