一键导入
generate-json
Generate test JSON configurations following JSON_STRUCTURE_REFERENCE.md rules
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate test JSON configurations following JSON_STRUCTURE_REFERENCE.md rules
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Create git commit following project conventions
Full Jira-tracked change workflow — create/select Jira ticket under epic SDK-5256, create feat/SDK-XXXX branch, commit with ticket id, push, and open PR with ticket id in title and Jira links in body
Review code changes against project standards and conventions
Show current project status and development phase progress
Run tests for Android or iOS SDK
| name | generate-json |
| description | Generate test JSON configurations following JSON_STRUCTURE_REFERENCE.md rules |
| user-invocable | true |
| disable-model-invocation | false |
Generates valid Native Display JSON configurations for testing purposes, strictly following the JSON_STRUCTURE_REFERENCE.md specification.
# Interactive mode - asks what to generate
/generate-json
# Specify what to generate
/generate-json product-card
/generate-json vertical-container-arrangement-test
/generate-json gallery-snapping-mode
References Specification
.claude/reference/JSON_STRUCTURE_REFERENCE.mdGenerates Valid JSON
NativeDisplayConfig structureValidates Output
jqSaves to Test Directory
test-configs/generated/product-card-test.json)#RRGGBBAA or #RRGGBBDP, SP, PERCENT, PX, WRAP_CONTENT, MATCH_PARENT{
"theme": {
"id": "default",
"defaultStyle": { "textColor": "#FF000000", "fontSize": 14 }
},
"variables": {},
"root": {
"id": "root",
"containerType": "vertical",
"layout": {
"width": { "value": 100, "unit": "percent" },
"padding": { "all": 16 }
},
"children": []
}
}
{
"theme": {
"id": "product-theme",
"defaultStyle": {
"textColor": "#FF000000",
"fontSize": 14,
"fontFamily": "System"
}
},
"variables": {
"productName": "Product Name",
"price": "$99.99",
"imageUrl": "https://example.com/product.jpg"
},
"root": {
"id": "product-card",
"containerType": "vertical",
"layout": {
"width": { "value": 100, "unit": "percent" },
"padding": { "all": 16 }
},
"children": [
{
"id": "product-image",
"elementType": "image",
"bindings": { "src": "{{imageUrl}}" },
"layout": {
"width": { "value": 100, "unit": "percent" },
"height": { "value": 200, "unit": "dp" }
}
},
{
"id": "product-name",
"elementType": "text",
"bindings": { "text": "{{productName}}" },
"layout": {
"width": { "value": 100, "unit": "percent" }
},
"style": {
"fontSize": 18,
"fontWeight": "bold"
}
},
{
"id": "product-price",
"elementType": "text",
"bindings": { "text": "{{price}}" },
"layout": {
"width": { "value": 100, "unit": "percent" }
},
"style": {
"fontSize": 16,
"textColor": "#FF0066CC"
}
}
]
}
}
Container Testing
Element Testing
Layout Testing
Style Testing
Gallery Testing
After generation, this skill:
jq to validate JSON syntaxGenerated files saved to:
test-configs/generated/
├── product-card-test.json
├── vertical-arrangement-test.json
├── gallery-snapping-test.json
└── ...
This skill works seamlessly with the testing agent:
/generate-json to create test casesjqCommon mistakes this skill prevents:
.claude/reference/JSON_STRUCTURE_REFERENCE.md - Complete JSON spec.claude/reference/COMPONENTS_GUIDE.md - Component examples.claude/agents/testing/templates/ - JSON templates