andersonlimahw/lemon-ai-hub/type-safe-contracts
Claude Code and agent skill by andersonlimahw/lemon-ai-hub
- community
Checking that the SKILL.md file is still in the repository.
Build provider-neutral typed AI contracts with JSON Schema validation, adapters for native or generic LMs, bounded repair, and explicit failure handling.
Install
npx vskill@latest install andersonlimahw/lemon-ai-hub/type-safe-contractsSKILL.md
The same SKILL.md was published earlier as andersonlimahw/lemon-ai-hub/type-safe-contracts.
Type-Safe Contracts
Boundary
Define one provider-neutral DecisionSpec; implement adapters. Internal schemas are not provider wire schemas: adapters enforce current criteria shape, cardinality, context, and media limits.
native: provider returns typed probabilities directly.structured-output: LM uses JSON Schema/tool calling.prompt-parse: last-resort JSON extraction; stricter validation and lower trust.
All adapters normalize into same validated result (references/decision-result.schema.json). Types generated by SDK do not replace runtime validation. After schema validation, run equivalent of scripts/validate_result.py: answer IDs/types match questions, selected Choice exists, probability keys match criteria, distributions sum to 1 within documented tolerance, and Score range matches levels.
Pipeline
Failure policy
- Reject unknown question/result types and missing options.
- Ensure probability values are finite and within
[0,1]; validate distribution sum with documented tolerance. - Allow at most one schema-repair retry unless evidence justifies more.
- On invalid/low-confidence output, use declared safe fallback. Never silently coerce.
- Pin provider model/version after calibration; aliases can move.
- Hash cache by model/version, canonical state, question semantics, and schema version. Do not include policy weights when raw answers remain reusable.
Preserve raw response for audit after redaction. Never log API keys, secrets, or sensitive state.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/typed-decision-engineering/skills/type-safe-contracts/SKILL.md
Popularity
- Repository stars
- 16
- Repository forks
- 3
- 7-day trend score
- 19
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/andersonlimahw/lemon-ai-hub/type-safe-contracts)