tsp-type-override

tsp-type-override is a skill for Claude Code, Codex from Azure/azure-sdk-for-java. It costs 62 tokens per session (3,410 once invoked), scanned A, original, MIT.

Instructions for mapping TypeSpec model fields to specific Java types in generated client code. TypeSpec is a language for describing APIs, and the mapping uses Java-specific decorators in a client.java.tsp file.

In plain words
What is it for?
Use them to map fields to Java types such as OffsetDateTime or DayOfWeek, update the preserved API specification, and prepare the change for a pull request.
Why use it?
Generated code may otherwise use a type that is too general or incorrect, such as a generic date or enum representation. These instructions also prevent edits from being lost in the temporary generated files.

Skill for Claude CodeCodex ✓ vendor

Written for no agent in particular: nothing here depends on one.

Good fit Use them to map fields to Java types such as OffsetDateTime or…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/azure/azure-sdk-for-java/tsp-type-override
About the project

Azure SDK for Java is a collection of Java libraries that let applications connect to and manage Azure services. Java developers use its client libraries to consume services and its management libraries to configure Azure resources. The catalogue add-ons support development with these libraries.

Azure/azure-sdk-for-java · 2,566 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Azure/azure-sdk-for-java --skill tsp-type-override
Clone the repo
git clone --depth 1 https://github.com/Azure/azure-sdk-for-java

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tsp-type-override

README.md
[![agentmods](https://agentmods.dev/badge/skills/azure/azure-sdk-for-java/tsp-type-override.svg)](https://agentmods.dev/skills/azure/azure-sdk-for-java/tsp-type-override)
Your own site
<a href="https://agentmods.dev/skills/azure/azure-sdk-for-java/tsp-type-override"><img src="https://agentmods.dev/badge/skills/azure/azure-sdk-for-java/tsp-type-override.svg" alt="Measured on agentmods" height="20"></a>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,410 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00062 $0.03410
Opus 5 $0.00031 $0.01705
Sonnet 5 $0.00012 $0.00682
Haiku 4.5 $0.00006 $0.00341

Measured 7d ago against content hash cc8fb49ceca1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

tsp-type-override scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

sdk/ai/.workflow_docs/tsp-type-override/SKILL.md · 241 lines

How it starts

The opening of the file, as written. The whole thing — 241 lines — stays where its author put it; the contents beside it link to each section on GitHub.

TypeSpec Type Override for Java

Override types in generated Java code by adding @@alternateType decorators to the client.java.tsp file.

Preconditions

  • You must be in the directory that contains tsp-location.yaml.
  • The TypeSpec must already be synced locally into TempTypeSpecFiles/. If not, run tsp-client sync first.
  • Identify the client.java.tsp file inside TempTypeSpecFiles/. This is the only file you should edit.

Important: TempTypeSpecFiles is volatile

TempTypeSpecFiles/ is a transient working directory managed by tsp-client. It is regenerated on every tsp-client sync or tsp-client update and is typically gitignored. Any changes made only in TempTypeSpecFiles/ will be lost on the next sync/update cycle.

If the user provides a local checkout of Azure/azure-rest-api-specs, always apply the same client.java.tsp edits there so the changes are preserved and can be committed to a PR. The path to the spec file inside that repo can be derived from tsp-location.yaml:

  • directory field gives the relative path (e.g. specification/ai-foundry/data-plane/Foundry)
  • The file to edit is client.java.tsp inside that directory

Workflow

1. Locate the TypeSpec model and field

Search the .tsp files under TempTypeSpecFiles/ for the model and field the user wants to override:

grep -rn "<ModelName>\|<fieldName>" TempTypeSpecFiles/ --include="*.tsp"

Read the model definition to confirm the current type of the target field (e.g. string, int32, a union, etc.).

2. Determine the correct decorator form

There are two forms of @@alternateType. Choose based on the target type:

Form A — TypeSpec built-in type (preferred when possible)

Use when there is a TypeSpec scalar that the Java emitter already maps to the desired Java type.

Desired Java type TypeSpec alternate
OffsetDateTime utcDateTime
Duration duration
byte[] bytes
long / Long int64
double / Double float64

Read the full file on GitHub · 241 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 241 lines · 62 tokens per session scan A cc8fb49ceca1

Subscribe to this mod's changes

tsp-type-override is a skill published in the GitHub repository Azure/azure-sdk-for-java (2,566 stars, last pushed yesterday), licensed MIT. It adds 62 tokens to every session and 3,410 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

azure-ai-vision-imageanalysis-java

Build image analysis applications with Azure AI Vision SDK for Java. Use when implementing image captioning, OCR text extraction, object detection, tagging, or smart cropping.

microsoft/skills · 40 tokens

generate-code-cs

Generate the code from typespec for C#. Parameter: C# SDK repository root location .

Azure/azure-sdk-for-net · 26 tokens

translate-a-sample

Translate the Azure SDK sample from python to C# and generate markdownn file for the sample. Parameters: C# SDK repository root; python SDK repository root; Package name: one of Azure.AI.Projects, Azure.AI.Projects.Agents or Azure.AI.Extensions.OpenAI; The name of sample file in Python SDK repository.

Azure/azure-sdk-for-net · 90 tokens

author-test

Generate a test given sample. Parameters: C# SDK repository root; Package name: one of Azure.AI.Projects, Azure.AI.Projects.Agents or Azure.AI.Extensions.OpenAI; the sample to use as a starting point for the test.

Azure/azure-sdk-for-net · 68 tokens

azure-appconfiguration-java

Azure App Configuration SDK for Java. Centralized application configuration management with key-value settings, feature flags, and snapshots. Triggers: "ConfigurationClient java", "app configuration java", "feature flag java", "configuration setting java", "azure config java".

microsoft/skills · 55 tokens

azure-monitor-query-java

Azure Monitor Query SDK for Java. Execute Kusto queries against Log Analytics workspaces and query metrics from Azure resources. Triggers: "LogsQueryClient java", "MetricsQueryClient java", "kusto query java", "log analytics java", "azure monitor query java". Note: This package is deprecated. Migrate to…

microsoft/skills · 81 tokens