hardkoded/typesafe-sdk-dotnet/typesafe-dotnet
- community
Checking that the SKILL.md file is still in the repository.
Use the community TypeSafe.AI.Sdk .NET client to ask System One questions (Choice, Score, Noul), batch them, handle retries and errors, and read probabilities/confidence. Use when adding TypeSafe judgments to a C# / .NET app, when porting JS/Python TypeSafe code, or when an agent needs the .NET API instead of HTTP or the official JS/Python SDKs.
Install
npx vskill@latest install hardkoded/typesafe-sdk-dotnet/typesafe-dotnetSKILL.md
TypeSafe .NET SDK
This skill is for `TypeSafe.AI.Sdk` (dotnet add package TypeSafe.AI.Sdk), a community port of `@typesafe-ai/sdk` by Dario Kondratiuk. It is not an official TypeSafe product.
Live TypeSafe docs remain the source of truth for concepts. This skill covers the .NET client surface.
- Index: https://docs.typesafe.ai/llms.txt
- HTTP API: https://docs.typesafe.ai/api.md
- JS SDK (parity source): https://docs.typesafe.ai/sdk/javascript.md
- Official agent skill (language-agnostic design): https://docs.typesafe.ai/agent-skill.md
When to use which question
| Need | Primitive | .NET builder | Answer | |
|---|---|---|---|---|
| One of a closed set | Choice | Question.Choice(instructions, criteria) | GetChoice(id).Choice, .Probabilities, .Confidence | |
| Degree on ordered levels | Score | Question.Score(instructions, level0, level1, …) ≥ 2 levels | GetScore(id).Score, .Legend, .Probabilities, .Confidence | |
| Yes / no | Noul | Question.Noul(instructions, criteria?) | GetNoul(id).Noul in [0, 1] — no Confidence |
- Choice criteria is a map of label → description (
nullif the label is enough). Not a list. - Score criteria is an ordered list (index 0, 1, …). Not a map. The API accepts 2–10 levels.
- Noul criteria is optional
{ true, false }descriptions (NoulCriteria/NoulCriteria.Yes/NoulCriteria.No). - A Noul of
0.5means yes and no are equally likely, not “medium intensity”. Use Score for a spectrum. - Question IDs are for your code only. Put the full meaning in
instructions. - Ask every independent question over the same state in one
SystemOneAsynccall (speculative fan-out). A second request is only needed when the next state or option set depends on an earlier answer.
Construct state
state can be a string, null, array, or object (Dictionary<string, object?>, anonymous type, JsonNode). Prefer named JSON fields. Point instructions at nested values with backticked paths: ` ticket.messages[0].text `.
instructions and criteria values may be strings, objects, arrays, or null (structured questions). See https://docs.typesafe.ai/primitives/advanced.md.
Client, env, retries
Environment (empty/whitespace ignored; constructor wins):
| Variable | Purpose | Default | |
|---|---|---|---|
TYPESAFE_API_KEY | Bearer token | required | |
TYPESAFE_BASE_URL | API root | https://api.typesafe.ai | |
TYPESAFE_DEFAULT_MODEL | When request omits model | jev-latest | |
TYPESAFE_LOG_LEVEL | debug info warn error off | warn |
Retry defaults match JS: MaxRetries = 2, BackoffInitialMs = 500, BackoffMaxMs = 5000, BackoffJitter = 0.25, statuses 408/429/5xx, honor Retry-After up to 60s, retry connection errors and timeouts. Timeout is per attempt (default 10s), not a total budget.
Every public async method takes CancellationToken. Cancel → ApiUserAbortException (not retried).
Errors
| .NET | JS | When | |
|---|---|---|---|
TypeSafeException | TypeSafeError | Missing key, bad config, empty questions, score < 2 levels | |
AuthenticationException | AuthenticationError | 401 | |
RateLimitException | RateLimitError | 429 (RetryAfterMs) | |
UnprocessableEntityException | UnprocessableEntityError | 422 | |
ApiTimeoutException | APITimeoutError | attempt timeout | |
ApiConnectionException | APIConnectionError | transport failure | |
ApiUserAbortException | APIUserAbortError | caller cancel |
Do not invent request/response fields. Usage is input_tokens / output_tokens (Usage.InputTokens / OutputTokens, both int? and null when the API reports no count). Models: client.Models.ListAsync().
Agent habits
- Read https://docs.typesafe.ai/llms.txt and the relevant primitive page before writing questions.
- Keep questions and thresholds in one file for human review.
- Use probabilities when you have a statistical rule; use confidence as a second axis for Choice/Score, not as a substitute for Noul.
- Validate on the user’s data. Cookbook numbers are examples, not defaults.
- Keep API keys server-side. Never commit
TYPESAFE_API_KEY.
Security
- Security scanPassed, 90 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 repositoryCheckingskills/typesafe-dotnet/SKILL.md
Popularity
- 7-day trend score
- 0
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/hardkoded/typesafe-sdk-dotnet/typesafe-dotnet)