Spiral gives your agent every tool with one account. Browse the tools →

How to Add the Typed decisions Skill to Your AI Agent

Data skillUse when you need a judgement about a text, image, audio clip, video or PDF that code or a next step will branch on, not prose — yes/no checks (is this a refund request, does the image show a person, is the answer supported by the source), picking one label or route from a fixed list (ticket routing, classification, which skill or model fits), or scoring on a rubric (quality, urgency, brand fit). Covers asking Gemini Decision 1 several narrow typed questions about one input in one call, reading its calibrated probabilities, and when to use a text model instead.

How to add Typed decisions to your agent

Pick the way that suits you. Each takes about two minutes.

Save SKILL.md into your agent's skills

  1. Download the skill

    Claude Code, and other agents that read Agent Skills, load it from this folder when they start.

    mkdir -p ~/.claude/skills/typed-decisions
    curl -fsSL https://spiral.ai/skills/typed-decisions/SKILL.md -o ~/.claude/skills/typed-decisions/SKILL.md
  2. Connect Spiral

    The skill runs its tools through Spiral. Send your agent this message once to set it up.

    set up https://spiral.ai/SKILL.md

Use the Spiral CLI

  1. Install and sign in

    Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

    npx -y spiral-cli@latest init
  2. Read the skill

    Built-in skills are on for every organization: the CLI prints this one with all its files.

    spiral agent-skills get typed-decisions --json

Read it from the Spiral API

  1. Create an API key

    In the console, under API keys.

  2. Fetch the skill

    The answer holds SKILL.md and every other file of the skill, in path order.

    curl https://api.spiral.ai/v1/skills/typed-decisions \
      -H "Authorization: Bearer $SPIRAL_API_KEY"

Then ask your agent for the task: it loads Typed decisions when a request matches the skill's description.

When to use (description)

Use when you need a judgement about a text, image, audio clip, video or PDF that code or a next step will branch on, not prose — yes/no checks (is this a refund request, does the image show a person, is the answer supported by the source), picking one label or route from a fixed list (ticket routing, classification, which skill or model fits), or scoring on a rubric (quality, urgency, brand fit). Covers asking Gemini Decision 1 several narrow typed questions about one input in one call, reading its calibrated probabilities, and when to use a text model instead.

Instructions

Typed decisions

Gemini Decision 1 (Gemini Decision 1) answers typed questions about one shared input and returns a calibrated probability for each, not text. Every question in a call reads the same input once; questions cannot see each other. It generates no output tokens: it costs only the input tokens it reads (the shared input once, plus each question's own words), so a check is a fraction of a cent, and it answers in about a second.

Find the tool, read its input schema before the first call, then run it.

When to use it

Use it when the result is a decision something else acts on:

ShapeQuestion typeExamples
Detection: is a property present?noul (yes/no)refund request, a person in the image, profanity, a logo visible, the answer is supported by the passage, the run met the brief
Classification: one label from a listchoice (2 to 255 options)ticket team, document type, sentiment, language, which skill or tool fits the request
Routing: the label picks the next stepchoicesend to billing or support, cheap model or strong model, regenerate or keep
Scoring: a point on an ordered scalescore (2 to 255 levels)urgency, image quality, brand fit, how well a draft follows the brief

Typical jobs:

  • Check generated media before you deliver it or pay to chain it. Ask yes/no questions about the image or video itself ("does the image contain readable text that matches the brief?", "is the product's label legible?", "is there more than one person?"). A low probability is the cue to regenerate or fix, not to describe the file in prose.
  • Guardrails and verification. Is the request allowed, does the answer stay on the source, does a citation support or contradict the claim (choice: supports, contradicts, unsupported).
  • Triage at once. One call with several questions: outage yes/no, priority choice, urgency score.
  • Pick from a long list. Up to 255 options per question (skills, categories, templates), each with a one-line meaning.
When to use a text model instead
  • You need words, numbers or values extracted from the input (names, dates, totals, a summary, a transcript): Decisions returns labels and probabilities only. Use media understanding or a text model.
  • You need to rank many separate items: each call has one shared input, so scoring 500 items is 500 calls. Prefer one call when the items fit in a single input as numbered entries and a choice over their numbers is enough.
  • The judgement needs reasoning across steps or tools: let a text model reason, then use a decision to check its result.
How to write the questions
  1. **Put the thing being judged in input.** Text, or a list of parts: text, image, audio, document (PDF), video, each by uri (a public https link Google can fetch) or base64 data, with its mime_type. Images and video take resolution (low saves input tokens; use it unless detail matters).
  2. Ask narrow, single-purpose questions in questions, keyed by your own ids. One property per question; compose the answers in your own logic rather than asking one compound question. "Is the customer asking for a refund?" and "Is the customer angry?" beat "Is this an angry refund request?".
  3. Say what the options mean. For choice, criteria maps each option id to a one-line meaning. For score, criteria lists the levels lowest first: level 0 is the first. For an ambiguous yes/no, criteria with true_description and false_description.
  4. Read the answer. A noul answer is the probability of yes (noul, 0.01 to 0.99). A choice answer is the top option (choice) with every option's probabilities. A score answer is the expected level (score), the probabilities per level and the legend. Every answer has confidence.
  5. Act on probabilities, not just the top label. Decide a threshold per use: for a costly mistake require 0.9 or more; near 0.5 the model is unsure, so ask a sharper question, add context, or fall back to a text model or the user.

Example (one support message, three questions):

{
  "input": "Every time I click Export to PDF the app crashes with error 504. Our audit is tomorrow.",
  "questions": {
    "refund": { "type": "noul", "instructions": "Is the customer asking for a refund?" },
    "route": {
      "type": "choice",
      "instructions": "Which team should handle this ticket?",
      "criteria": {
        "billing": "Invoices or refunds.",
        "technical_support": "Bugs or crashes.",
        "sales": "Plans and upgrades."
      }
    },
    "urgency": {
      "type": "score",
      "instructions": "How urgent is this ticket?",
      "criteria": ["not urgent", "somewhat urgent", "urgent", "critical"]
    }
  }
}

It answered: refund 0.015 (no), route technical_support at 0.999, urgency 2.70 (most likely "critical").

Cost and limits
  • Price: input tokens only, at Google's list price; no output tokens. Estimate the cost before a large batch.
  • The input limit is 262,144 tokens; video and long audio use many. Prefer a short clip or still frames when the question is about one moment.
  • If Google blocks the input for safety, no question is answered and the run fails with a content-policy error.

Capabilities

Used in this skill · 1

  • Use when producing a narrative video about historical figures, fictional stories, day-in-the-life pieces, educational explainers with a protagonist, brand mascot stories, and any narrative video that depends on a consistent main character across scenes. Methodology for producing multi-scene character-driven short films: covers the full 11-phase pipeline — creative brief, style reference, character sheet, scene stills, animation, voiceover, per-clip audio mix, stitching, music with proper fade technique, optional subtitles, and optional Fin card — plus approval gates, parallelization strategy, asset naming, and the prompting principles that hold across video models. Tool and model selection is delegated to model-recommendations.

  • Use when creating ultra-realistic AI-generated photography (a believable real-world photo, not art or illustration). Covers the 9-step prompt construction workflow, required/optional inputs, the structured positive+negative prompt format, anti-failure guardrails, primary focus technique, camera/light/material domain language, and the self-checklist.

  • Use when generating multiple related assets, working with character references, brand assets, or scene sequences, or revising an earlier asset. Maintains visual and tonal consistency across multi-asset media projects: character reference workflows, style briefs, model matching rules, revisions, prompt enhancement, iterative quality testing, and scene consistency.

    Built-in
  • Use when the inferred intent calls for performed speech rather than read speech with ElevenLabs V4 or V4 Turbo (Eleven v4), expressive TTS models controlled by inline audio tags ([whispers], [excited], [sighs], [pause], [long pause]), text structure (punctuation/capitalization) and stability — emotional narration, character dialogue, audiobook delivery, expressive shorts, anything where pauses, laughter, sighing, whispering, shouting or accents matter. Covers tag inventory and placement, pause tags (SSML <break> is ignored), tag combining, punctuation tricks, stability behavior (the main reason tags appear to do nothing), voice compatibility, pronunciation without dictionaries, text normalization, script length and splitting, full example scripts, and common mistakes. Older ElevenLabs V3 uses the same tags. For multi-speaker output, generate each speaker's track separately and combine in post.

Questions about Typed decisions

What does the Typed decisions skill do?

Use when you need a judgement about a text, image, audio clip, video or PDF that code or a next step will branch on, not prose — yes/no checks (is this a refund request, does the image show a person, is the answer supported by the source), picking one label or route from a fixed list (ticket routing, classification, which skill or model fits), or scoring on a rubric (quality, urgency, brand fit). Covers asking Gemini Decision 1 several narrow typed questions about one input in one call, reading its calibrated probabilities, and when to use a text model instead.

Which tools does Typed decisions use?

It runs Gemini Decision 1 through Spiral, each at the price on its tool page.

Does the Typed decisions skill cost anything?

The skill is free. The tools it runs are billed pay-as-you-go from your Spiral balance at each tool's stated price, with no plan.

How does my agent know when to use Typed decisions?

An agent reads each skill's description and loads its instructions when a request matches it.

How do I add Typed decisions to Claude Code?

Save its files into ~/.claude/skills/typed-decisions/ with the commands on this page; Claude Code loads it when it starts.

Can I use Typed decisions in other agents?

Yes. Any agent that reads Agent Skills folders loads the same files, and any other agent reads the skill with `spiral agent-skills get typed-decisions --json` or the Spiral API.

Is Typed decisions on for my Spiral organization?

Yes. Built-in skills are on for every organization; an admin can turn Typed decisions off on the console's Skills page.

Where is the Typed decisions SKILL.md file?

At https://spiral.ai/skills/typed-decisions/SKILL.md, with no key needed. On the console's Skills page, Customize saves a copy you can edit as your organization's own skill.