senrecep/tsentials/tsentials-json
Claude Code and agent skill by senrecep/tsentials
- community
Checking that the SKILL.md file is still in the repository.
Use when parsing or stringifying JSON safely without exceptions — safeJsonParse/safeJsonStringify return Result<T> instead of throwing, parseAndValidate combines parsing with a custom type guard, and Json/JsonObject/JsonArray/JsonPrimitive types plus isJson/isJsonObject guards enforce structural validity at compile and runtime.
Install
npx vskill@latest install senrecep/tsentials/tsentials-jsonSKILL.md
tsentials/json
Type-safe JSON parsing and validation that returns Result<T> — no exceptions, no try/catch, fits directly into the railway pipeline.
Installation
Import
safeJsonParse
Parses a JSON string and returns Result<Json>. Never throws.
safeJsonStringify
Stringifies a Json value and returns Result<string>. Catches circular reference errors.
parseAndValidate
Parses JSON and validates with a custom type guard. Returns Result<T> — typed to your domain type.
Type Guards
Important:isJsonObjectonly accepts plain objects (Object.prototypeornullprototype).new Date(),new Map(), class instances all returnfalse.
Error Codes
| Code | Cause | |
|---|---|---|
Json.SyntaxError | JSON.parse threw — malformed input string | |
Json.ValidationError | Parsed successfully but failed isJson or custom guard | |
Json.StringifyFailed | JSON.stringify threw — typically a circular reference |
Pipeline Integration
safeJsonParse returns Result<Json> so it chains directly into any railway pipeline:
Json Types
All types are readonly — immutability is enforced at compile time.
Best Practices
- Use
safeJsonParseinstead ofJSON.parse— eliminates uncaughtSyntaxErrorexceptions - Use
parseAndValidateto combine parsing and domain validation in one step - Combine with
Err.fromExceptiononly if wrapping legacy code that throws — prefersafeJsonParsenatively isJsonObjectis the right guard to use insideparseAndValidatetype guards — it rejects class instances thattypeof x === 'object'would accept- Do not use
Jsonas a domain type — parse to a specific interface withparseAndValidateinstead
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.well-known/agent-skills/tsentials-json/SKILL.md
Popularity
- Repository stars
- 58
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/senrecep/tsentials/tsentials-json)