Official agent skill

Schema Model Generator

by microsoft in microsoft/terraform-provider-fabric

Given a Go SDK contract (DTOs), generate the corresponding Terraform schema attributes and model structs with high fidelity.

OfficialMPL-2.0Auto-check passedDevOps & Cloud

Install Schema Model Generator

skills CLI
$ npx skills add microsoft/terraform-provider-fabric --skill schema-model-generator -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install microsoft/terraform-provider-fabric schema-model-generator --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/microsoft/terraform-provider-fabric.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/schema-model-generator .claude/skills/schema-model-generator && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
schema-model-generator
GitHub stars
128
Token cost
~2.5k tokens
SKILL.md length
562 words
Files
1
Skills in repo
5
Repo updated
First seen
Licence
MPL-2.0

At a glance

Given a Go SDK contract (DTOs), generate the corresponding Terraform schema attributes and model structs with high fidelity.

  • Works in 4 steps: Classify Each SDK Field → Generate Model Struct Fields → Generate Model Methods → …
  • : creating schema.go and models.go files from SDK DTOs
  • SKILL.md covers Prerequisites, Step 1 — Classify Each SDK Field, Step 2 — Generate Model Struct… and Step 3 — Generate Model Methods, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Schema Model Generator is an agent skill from microsoft/terraform-provider-fabric, published by the product's own GitHub organization. Given a Go SDK contract (DTOs), generate the corresponding Terraform schema attributes and model structs with high fidelity. USE FOR: creating schema.go and models.go files from SDK DTOs, mapping Go types to Terraform attribute types and custom types.

Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in DevOps & Cloud, covering Infrastructure as code. It works with Terraform. The repository describes itself as: Terraform Provider for Microsoft Fabric. The licence is MPL-2.0.

When your agent uses it

  • : creating schema.go and models.go files from SDK DTOs
  • Mapping Go types to Terraform attribute types and custom types

Example prompts

  • “/schema-model-generator”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Classify Each SDK Field
  2. Generate Model Struct Fields
  3. Generate Model Methods
  4. Generate Schema Attributes

What it can do on your machine

Read from SKILL.md and the folder at commit 86c83be. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are go).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Schema Model Generator loads about 2.5k tokens when it runs. Until then it costs about 69 tokens; SKILL.md has 562 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~69
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from microsoft/terraform-provider-fabric at commit 86c83be, republished under its MPL-2.0 licence (© microsoft). 562 words, ~2,542 tokens.

Download SKILL.mdSave it as .claude/skills/schema-model-generator/SKILL.md (or your agent's skills folder).
name
schema-model-generator
description
Given a Go SDK contract (DTOs), generate the corresponding Terraform schema attributes and model structs with high fidelity. USE FOR: creating schema_*.go and models.go files from SDK DTOs, mapping Go types to Terraform attribute types and custom types.

Skill: Schema & Model Generator

Given a Go SDK contract (DTOs), generate the corresponding Terraform schema attributes and model structs with high fidelity.

Prerequisites

  • SDK DTO struct fields have been identified (from #skill:sdk-contract-navigator)
  • You know the item archetype (basic, definition, properties, etc.)
  • If the issue contains a 🌳 DTO Nesting Depth Map, use it to determine:
    • One model struct per tree node that introduces []Type or *Type
    • Each such struct needs its own set() method
    • Which fields use supertypes.ListNestedObjectValueOf (nested objects) vs supertypes.ListValueOf (scalars) vs supertypes.SingleNestedObjectValueOf (optional nested)

Step 1 — Classify Each SDK Field

For each field in the SDK DTO struct, determine its category using the "Attribute Behaviors" table in .github/instructions/schema-model-patterns.instructions.md.

Classification criteria:

CategoryCriterion
Read-onlyOnly appears in Get response Properties struct
Create-time-onlyAppears in CreationPayload and cannot be updated
Updatable requiredUser must provide, can be changed after create
Updatable optionalUser may provide, can be changed after create
Optional with defaultServer sets a default if not provided

Step 2 — Generate Model Struct Fields

Map each SDK field type to the corresponding Terraform model type using the "SDK Type → Model Type Mapping" table in .github/instructions/schema-model-patterns.instructions.md.

Every field must have a tfsdk:"<snake_case_name>" tag.

Naming Conventions
  • Model struct: <item><purpose>Model — e.g. lakehousePropertiesModel, lakehouseConfigurationModel
  • Nested model: <item><nested>Model — e.g. lakehouseSQLEndpointPropertiesModel
  • Field names: PascalCase in Go, with tfsdk:"snake_case" tag
  • SDK PascalCase → Terraform snake_case: OneLakeFilesPath → onelake_files_path
Example Properties Model
go
type lakehousePropertiesModel struct {
    OneLakeFilesPath      types.String                                                              `tfsdk:"onelake_files_path"`
    OneLakeTablesPath     types.String                                                              `tfsdk:"onelake_tables_path"`
    SQLEndpointProperties supertypes.SingleNestedObjectValueOf[lakehouseSQLEndpointPropertiesModel] `tfsdk:"sql_endpoint_properties"`
    DefaultSchema         types.String                                                              `tfsdk:"default_schema"`
}
Example Configuration Model (CreationPayload)
go
type lakehouseConfigurationModel struct {
    EnableSchemas types.Bool `tfsdk:"enable_schemas"`
}
Example Nested Model
go
type lakehouseSQLEndpointPropertiesModel struct {
    ID                 customtypes.UUID `tfsdk:"id"`
    ConnectionString   types.String     `tfsdk:"connection_string"`
    ProvisioningStatus types.String     `tfsdk:"provisioning_status"`
}

Step 3 — Generate Model Methods

Generate both directions of mapping: response set() (SDK → TF) and request builders (TF → SDK).

3a. Response set() — SDK → TF (both Fabric Items and non-items)

Every model struct needs a set() method that maps SDK response DTO → TF model.

Top-level set() (with nested objects):

Signature includes context.Context and returns diag.Diagnostics:

go
func (to *<item>PropertiesModel) set(ctx context.Context, from fab<package>.<DTO>) diag.Diagnostics {
    to.SimpleField = types.StringPointerValue(from.SimpleField)
    // ... other simple fields

    // Handle nested struct
    nestedValue := supertypes.NewSingleNestedObjectValueOfNull[<nestedModel>](ctx)
    if from.NestedField != nil {
        nestedModel := &<nestedModel>{}
        nestedModel.set(*from.NestedField)  // or with ctx if nested has its own nested
        if diags := nestedValue.Set(ctx, nestedModel); diags.HasError() {
            return diags
        }
    }
    to.NestedField = nestedValue

    return nil
}

Leaf set() (no nested objects):

Simpler signature without context.Context or diag.Diagnostics:

go
func (to *<nestedModel>) set(from fab<package>.<NestedDTO>) {
    to.ID = customtypes.NewUUIDPointerValue(from.ID)
    to.StringField = types.StringPointerValue(from.StringField)
    to.EnumField = types.StringPointerValue((*string)(from.EnumField))
}

Setter patterns by type: Use the "Setter Pattern" column in the "SDK Type → Model Type Mapping" table and collection iteration templates in schema-model-patterns.instructions.md.

Show full SKILL.md (243 more words)Show less
3b. Request Builders — TF → SDK (Create/Update)

Both Fabric Items and non-items need TF→SDK mapping for writable fields. The pattern differs by category:

  • Fabric Items: Inline in creationPayloadSetter closure (simple — typically 1-3 fields from configuration model). See fabric-item-patterns.instructions.md § "Closure Examples".
  • Non-items: Dedicated request builder structs with set() method that builds the SDK request directly (complex — full request DTOs)

Non-item request builder struct — embeds the SDK request type, set() populates it:

go
type requestCreate<Type> struct {
    fabcore.Create<Type>Request // embedded SDK request type
}

func (to *requestCreate<Type>) set(ctx context.Context, from <type>ResourceModel) diag.Diagnostics {
    to.DisplayName = from.DisplayName.ValueStringPointer()
    to.Description = from.Description.ValueStringPointer()
    // ... map each writable field into the embedded struct
    return nil
}

Usage: r.client.Create<Type>(ctx, reqCreate.Create<Type>Request, nil)

Inverse mapping rules: Use the inverse of the "SDK Type → Model Type Mapping" table in schema-model-patterns.instructions.md. For each TF type, call its Value*Pointer() method (e.g., types.String → .ValueStringPointer(), types.Bool → .ValueBoolPointer()).

Non-obvious cases:

TF Model TypeSDK TypePattern
types.Int64*int32ptr.To(int32(from.Field.ValueInt64())) — type narrowing required
supertypes.SingleNestedObjectValueOf[M]*NestedDTO.Get(ctx) → construct nested DTO from sub-model
supertypes.ListNestedObjectValueOf[M][]NestedDTO.Get(ctx) → iterate slice, build each DTO

Reference: internal/services/connection/models_resource_connection.go

Step 4 — Generate Schema Attributes

For Fabric Item resources, schema attributes go in separate functions:

Resource Properties Schema
go
// schema_resource_<item>.go
func getResource<Item>PropertiesAttributes(ctx context.Context) map[string]schema.Attribute {
    return map[string]schema.Attribute{
        "<field_name>": schema.StringAttribute{
            MarkdownDescription: "<description>.",
            Computed:            true,
        },
        // ... more attributes
    }
}
Resource Configuration Schema (for CreationPayload)
go
func getResource<Item>ConfigurationAttributes() map[string]schema.Attribute {
    return map[string]schema.Attribute{
        "<field_name>": schema.BoolAttribute{
            MarkdownDescription: "<description>.",
            Required:            true,
            PlanModifiers: []planmodifier.Bool{
                boolplanmodifier.RequiresReplace(),
            },
        },
    }
}
Schema Attribute Type Mapping

Use the "SDK Type → Schema Mapping" table in .github/instructions/schema-model-patterns.instructions.md.

Rules for All Schema Attributes

For attribute behavior flags, plan modifiers, and validators, refer to the "Attribute Behaviors", "Plan Modifiers", and "Validators" sections in .github/instructions/schema-model-patterns.instructions.md.

Additional rules:

  1. Always use MarkdownDescription (never Description)
  2. Nested objects: Must include CustomType: supertypes.NewSingleNestedObjectTypeOf[<model>](ctx)
  3. UUID fields: Must include CustomType: customtypes.UUIDType{}
Example Nested Attribute
go
"sql_endpoint_properties": schema.SingleNestedAttribute{
    MarkdownDescription: "An object containing the properties of the SQL endpoint.",
    Computed:            true,
    CustomType:          supertypes.NewSingleNestedObjectTypeOf[lakehouseSQLEndpointPropertiesModel](ctx),
    Attributes: map[string]schema.Attribute{
        "provisioning_status": schema.StringAttribute{
            MarkdownDescription: "The SQL endpoint provisioning status.",
            Computed:            true,
        },
        "connection_string": schema.StringAttribute{
            MarkdownDescription: "SQL endpoint connection string.",
            Computed:            true,
        },
        "id": schema.StringAttribute{
            MarkdownDescription: "SQL endpoint ID.",
            Computed:            true,
            CustomType:          customtypes.UUIDType{},
        },
    },
},

Canonical References

  • Model struct patterns: internal/services/lakehouse/models.go
  • Resource schema patterns: internal/services/lakehouse/schema_resource_lakehouse.go
  • Data source schema patterns: internal/services/lakehouse/schema_data_lakehouse.go
  • Non-item schema (superschema): internal/services/connection/schema.go
  • Request builder patterns: internal/services/connection/models_resource_connection.go

© microsoft, MPL-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .github/skills/schema-model-generator of microsoft/terraform-provider-fabric.

Open the folder on GitHubat commit 86c83be

Compare with similar skills

Schema Model Generator next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Schema Model Generator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Schema Model Generator this skillmicrosoft/terraform-provider-fabric128—~2.5kAutomated safety check: PassMPL-2.0
Terraform and OpenTofu Guideagentscope-ai/QwenPaw35k6 repos~4.2kAutomated safety check: PassApache-2.0
Terraform Skillantonbabenko/terraform-skill2.4k1 repos~5.1kAutomated safety check: PassApache-2.0
Senior DevOps Toolkitmaslennikov-ig/claude-code-orchestrator-kit2596 repos~1.1kAutomated safety check: NotesCustom licence
Cloudflarehodgef/apiker1277 repos~2.2kAutomated safety check: PassMIT
Terravision Cloud Diagramspatrickchugh/terravision1.6k—~5.6kAutomated safety check: NotesAGPL-3.0-only

Similar skills

  • Terraform and OpenTofu Guide

    agentscope-ai/QwenPaw

    Guidance for writing and testing Terraform and OpenTofu code: module structure, naming, test approaches, CI/CD workflows, state handling and security scanning.

    35k GitHub starsUsed in 6 repos~4.2k tokens
    DevOps & CloudAuto-check passed
  • Terraform Skill

    antonbabenko/terraform-skill

    A skill your agent uses when writing, reviewing, or debugging Terraform/OpenTofu modules, tests, CI, scans, or state ops - diagnoses failure mode (identity churn, secrets, blast radius, CI drift…

    2.4k GitHub starsUsed in 1 repo~5.1k tokens
    DevOps & CloudAuto-check passed
  • Senior DevOps Toolkit

    maslennikov-ig/claude-code-orchestrator-kit

    Comprehensive DevOps skill for CI/CD, infrastructure automation, containerization, and cloud platforms (AWS, GCP, Azure). Includes pipeline setup…

    259 GitHub starsUsed in 6 repos~1.1k tokens
    DevOps & CloudAuto-check: notes
  • Cloudflare

    hodgef/apiker

    Comprehensive Cloudflare platform skill covering Workers, Pages, storage (KV, D1, R2), AI (Workers AI, Vectorize, Agents SDK), feature flags (Flagship), networking (Tunnel, Spectrum), security (WAF…

    127 GitHub starsUsed in 7 repos~2.2k tokens
    DevOps & CloudAuto-check passed
  • Terravision Cloud Diagrams

    patrickchugh/terravision

    Draw cloud architecture diagrams for AWS, Azure or GCP with the official provider icon sets, using TerraVision.

    1.6k GitHub stars~5.6k tokensUpdated today
    DevOps & CloudAuto-check: notes
  • Cloudflare

    dmmulroy/cloudflare-skill

    Comprehensive Cloudflare platform skill covering Workers, Pages, storage (KV, D1, R2), AI (Workers AI, Vectorize, Agents SDK), networking (Tunnel, Spectrum), security (WAF, DDoS), and…

    728 GitHub stars~1.6k tokensUpdated 8 mo ago
    DevOps & CloudAuto-check passed

More from microsoft/terraform-provider-fabric

  • Itemgen Command Builder

    microsoft/terraform-provider-fabric

    Official

    Given SDK analysis results, automatically determine the correct itemgen archetype and build the full go run tools/itemgen/main.go command.

    128 GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed
  • SDK Contract Navigator

    microsoft/terraform-provider-fabric

    Official

    Navigate the fabric-sdk-go SDK source to find the correct client factory, DTOs, item type constants, and pager methods for a given Fabric Item or non-item resource.

    128 GitHub stars~3k tokensUpdated yesterday
    Auto-check passed
  • Wellknown Analyzer

    microsoft/terraform-provider-fabric

    Official

    Analyze dependencies and determine what infrastructure must be added to tools/scripts/Set-WellKnown.ps1 and internal/testhelp/wellknown.go so that acceptance tests for a new resource have all…

    128 GitHub stars~3.2k tokensUpdated yesterday
    Auto-check passed
  • Resource Designer

    microsoft/terraform-provider-fabric

    Official

    Research SDK contracts, design Terraform schema approach, and compose a GitHub issue for a new resource, data source, ephemeral resource, or enhancement to an existing resource.

    128 GitHub stars~6k tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about Schema Model Generator

What does Schema Model Generator do?

Given a Go SDK contract (DTOs), generate the corresponding Terraform schema attributes and model structs with high fidelity. Schema Model Generator is an agent skill from microsoft/terraform-provider-fabric, published by the product's own GitHub organization. Given a Go SDK contract (DTOs), generate the corresponding Terraform schema attributes and model structs with high fidelity.

When should I use Schema Model Generator?

Schema Model Generator fits situations like: : creating schema.go and models.go files from SDK DTOs; mapping Go types to Terraform attribute types and custom types.

How do I install Schema Model Generator in Claude Code?

Run `npx skills add microsoft/terraform-provider-fabric --skill schema-model-generator -a claude-code`. Or copy the skill folder (.github/skills/schema-model-generator in microsoft/terraform-provider-fabric) into .claude/skills/schema-model-generator in your project. Claude Code loads it when a task matches its description.

How do I install Schema Model Generator in Codex?

Run `npx skills add microsoft/terraform-provider-fabric --skill schema-model-generator -a codex`. Or copy the skill folder (.github/skills/schema-model-generator in microsoft/terraform-provider-fabric) into .agents/skills/schema-model-generator in your project. Codex loads it when a task matches its description.

Can I use Schema Model Generator in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add microsoft/terraform-provider-fabric --skill schema-model-generator -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/schema-model-generator, .gemini/skills/schema-model-generator, .github/skills/schema-model-generator and .opencode/skills/schema-model-generator in your project.

What does Schema Model Generator need to run?

SKILL.md names no scripts, command-line tools or credentials: Schema Model Generator is instructions for the agent only.

Does Schema Model Generator access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Schema Model Generator safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Schema Model Generator use?

Schema Model Generator is published under the MPL-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Schema Model Generator use?

About 2.5k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Schema Model Generator?

Skills that share tags, products or a category with Schema Model Generator: Terraform and OpenTofu Guide (agentscope-ai/QwenPaw, 35k stars), Terraform Skill (antonbabenko/terraform-skill, 2.4k stars), Senior DevOps Toolkit (maslennikov-ig/claude-code-orchestrator-kit, 259 stars) and Cloudflare (hodgef/apiker, 127 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Schema Model Generator?

microsoft (a GitHub organization, an official publisher) maintains it in microsoft/terraform-provider-fabric, which has 128 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on October 6, 2026.

Source: microsoft/terraform-provider-fabric on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.