json-data-handling-guidance
Work with JSON data structures, APIs, and serialization effectively.
от rondoflow★ 37 звёзд на GitHub
Установить json-data-handling-guidance в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Schema & Validation
- Always validate against JSON Schema before processing untrusted input—don't assume structure
- Define schemas for API responses—catches contract violations early
- Use
additionalProperties: falseto reject unknown fields in strict contexts
Naming & Consistency
- Pick one convention and stick to it—
camelCasefor JS ecosystems,snake_casefor Python/Ruby - Avoid mixed conventions in same payload—
userIdalongsideuser_nameconfuses consumers - Use plural for collections:
"users": []not"user": []
Null Handling
- Distinguish "field is null" from "field is absent"—they mean different things
- Omit optional fields entirely rather than sending
null—reduces payload, clearer intent - Document which fields are nullable in schema—don't surprise consumers
Dates & Times
- Always use ISO 8601:
"2024-01-15T14:30:00Z"—no ambiguous formats like"01/15/24" - Include timezone or use UTC with
Zsuffix—local times without zone are useless - Timestamps as strings, not epoch integers—human-readable, no precision loss
Numbers & IDs
- Large IDs as strings:
"id": "9007199254740993"—JavaScript loses precision above 2^53 - Money as string or integer cents—never float:
"price": "19.99"or"price_cents": 1999 - Avoid floats for anything requiring exactness—currency, coordinates with precision
Structure Best Practices
- Keep nesting shallow—3 levels max; flatten or split into related endpoints
- Consistent envelope for APIs:
{"data": ..., "meta": ..., "errors": ...} - Paginate large arrays—never return unbounded lists; include
next/prevlinks or cursor
API Response Patterns
- Errors as structured objects:
{"code": "INVALID_EMAIL", "message": "...", "field": "email"} - Include request ID in responses for debugging:
"request_id": "abc-123" - Return created/updated resource in response—saves client a follow-up GET
Serialization
toJSON()method silently overrides output—Date becomes string, custom classes may surprise- Map, Set, BigInt don't serialize—need custom replacer function
- Circular references throw—detect cycles before stringify or use libraries like
flatted - Strip sensitive data before serializing—don't rely on client to ignore extra fields
Parsing Safety
__proto__key can pollute prototypes—sanitize input or useObject.create(null)- Parse in try/catch—malformed JSON from external sources is common
- Reviver function for type reconstruction: dates, BigInt, custom types
Unicode
- Emoji need surrogate pairs in escapes: 😀 =
\uD83D\uDE00—single\u1F600invalid - Control chars U+0000–U+001F must be escaped—pasted text may contain invisible ones
- BOM at file start breaks parsing—strip
\uFEFFfrom file input
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- manifest.json
FAQ
Что делает скилл json-data-handling-guidance?
Work with JSON data structures, APIs, and serialization effectively.
Как установить скилл json-data-handling-guidance?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл json-data-handling-guidance запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…