/ack:ack-provider-schemasfrom ack
Exports Ack 2.0 schemas as JSON Schema for AI providers (Gemini, MCP) and validates responses with safeParse. Use when building tool schemas or structured output from Dart Ack schemas.
Ships in ack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Before adding packages, follow the Ack version check.
safeParse is the gateYou send the provider a JSON Schema exported from an Ack schema. The provider uses it to shape what it generates or sends: tool arguments, a structured response. It enforces only part of it:
minLength, maxLength, and uniqueItems, for example.So every payload coming in from a provider or client goes through safeParse on the same Ack schema you exported, before any of your code uses it. Treat a Fail as an expected outcome: return a tool error, retry, or report it. Never cast it away.
Pick the service and read its reference. Read only the one that matches:
ack_mcp_dart): references/mcp.mdfirebase_ai, ack_firebase_ai): references/gemini-firebase.mdDone when you have read the matching reference.
Shape the schema for the provider. The root is an Ack.object (tools and function parameters require an object root, and a discriminated or nullable root exports as anyOf). Keep it focused, because schema size costs input tokens. Add .describe(...) or /// @description on fields the model has to fill in. A @Schemable class's Model.schema works anywhere a schema does. Done when schema.toJsonSchema()['type'] == 'object', you have reviewed warnings from all reachable model nodes, and you have checked lazy targets separately for runtime rules missing from the export.
Export it the way the reference says, and send it. Use the adapter call or the toJsonSchema() map unchanged. Don't hand-edit the map to fit a provider unless the reference says to.
Gate what comes back. Decode the JSON, then call schema.safeParse(decoded) (for a generated class, use Model.schema.safeParse). Use the parsed value, never the raw map. On Fail, report path: message using leafErrors. Never surface the top error's toString() or an AckException, which echo the whole payload. ack_mcp_dart already reports leaf lines.
schema.toJsonSchema() (or the adapter's output) in the right field.minLength the provider ignores, a codec) and asserts that the gate rejects it. You watched that test fail before the gate existed.dart analyze is clean, and the model id comes from the caller or config, not a literal in library code.Adding a service means adding one file under references/ and one line to step 1.
Siblings: using-ack (schemas, errors, JSON Schema export), build-data-classes-with-ack (@Schemable models to pass as Model.schema).
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
ack-schema, json-schema, mcp-tools, gemini-api, structured-output
npx claudepluginhub btwld/ack --plugin ack3 skills in this plugin
/build-data-classes-with-ackGenerate Dart data classes with Ack 2.0's @Schemable and ack_generator. Use when adding or changing a @Schemable model (class-first or schema-first), its @Is…/@Has… rule annotations, @AckKey, cross-field .refine, custom field types, the .g.dart part and build_runner, loading JSON into a model, or generating models from a .schema.json file./using-ackAck 2.0 runtime schemas for Dart. Use when validating JSON or maps with package:ack (Ack.object, Ack.string, parse/safeParse, SchemaError), choosing optional/nullable/withDefault, writing refine or codecs, exporting or importing JSON Schema, installing or pinning ack, or migrating Ack 1.x code (@AckModel, @AckInfer, ack_annotations, .ack.dart parts) to 2.0.Other plugins' skills for the same job