Skip to content

Commit cc2deac

Browse files
aRustyDevclaude
andcommitted
fix(design-to-code): Correct hooks.json structure with required 'hooks' wrapper
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent e02b99f commit cc2deac

1 file changed

Lines changed: 14 additions & 12 deletions

File tree

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
{
2-
"PostToolUse": [
3-
{
4-
"matcher": "Write|Edit|MultiEdit",
5-
"hooks": [
6-
{
7-
"type": "command",
8-
"command": "bash -c 'FILE=\"$TOOL_INPUT_FILE_PATH\"; case \"$FILE\" in *design-tokens*.json|*tokens.json) python3 -c \"import json,sys; data=json.load(open(sys.argv[1])); tokens=[k for k in data if not k.startswith(chr(36))] if isinstance(data,dict) else []; print(f\\\"✓ Valid design tokens: {len(tokens)} root keys\\\") if tokens else print(\\\"⚠ No tokens found\\\")\" \"$FILE\" 2>/dev/null || echo \"✓ Token file saved\";; esac; true'",
9-
"timeout": 5
10-
}
11-
]
12-
}
13-
]
2+
"hooks": {
3+
"PostToolUse": [
4+
{
5+
"matcher": "Write|Edit|MultiEdit",
6+
"hooks": [
7+
{
8+
"type": "command",
9+
"command": "bash -c 'FILE=\"$TOOL_INPUT_FILE_PATH\"; case \"$FILE\" in *design-tokens*.json|*tokens.json) python3 -c \"import json,sys; data=json.load(open(sys.argv[1])); tokens=[k for k in data if not k.startswith(chr(36))] if isinstance(data,dict) else []; print(f\\\"✓ Valid design tokens: {len(tokens)} root keys\\\") if tokens else print(\\\"⚠ No tokens found\\\")\" \"$FILE\" 2>/dev/null || echo \"✓ Token file saved\";; esac; true'",
10+
"timeout": 5
11+
}
12+
]
13+
}
14+
]
15+
}
1416
}

0 commit comments

Comments
 (0)