microsoft/wellknown-analyzer
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 required pre-requisite resources available. USE FOR: analyzing well-known test fixture requirements for new resources, determining creation strategies, and generating code snippets for Set-WellKnown.ps1 and wellknown.go additions.
npx skills add https://github.com/microsoft/terraform-provider-fabric --skill wellknown-analyzer
Determine what infrastructure must be added to tools/scripts/Set-WellKnown.ps1 so that acceptance tests for a new resource have all required pre-requisite resources available.
Acceptance tests run against real Fabric APIs and need pre-existing infrastructure. The PowerShell script tools/scripts/Set-WellKnown.ps1 creates all required resources and writes their IDs/metadata to a .wellknown.json fixture that tests consume at runtime.
When adding a new resource, you must determine:
CreationPayload or Definition?Read the SDK analysis (from #skill:sdk-contract-navigator) and Fabric API documentation to answer:
| Question | How to Check | Example |
| -------------------------------------------- | -------------------------------------------- | ----------------------------------------------------------------------- |
| Does Create require a workspace_id? | Almost always yes | All workspace-scoped items |
| Does Create require another resource's ID? | Check CreationPayload for reference fields | KQL Database needs parentEventhouseItemId |
| Does Create require a Definition? | Check if API requires definition on create | Report needs definition.pbir, Semantic Model needs definition.pbism |
| Does it have a parent resource relationship? | Check if resource is scoped under another | DigitalTwinBuilderFlow requires a DigitalTwinBuilder |
| Does it need data populated after creation? | Check if tests rely on resource content | Lakehouse needs sample data loaded for shortcut tests |
| Question | How to Check | Example |
| ------------------------------------- | ------------------------------------------------ | ---------------------------------- |
| Does it need an Azure Resource Group? | Check if the resource references Azure resources | Mounted Data Factory, VNet Gateway |
| Does it need a Storage Account? | Check for blob/storage references | Managed Private Endpoints |
| Does it need a Virtual Network? | Check for VNet/subnet references | Virtual Network Gateway |
| Does it need an Azure Data Factory? | Check for ADF references | Mounted Data Factory |
| Does it need Azure RBAC assignments? | Check if Azure roles must be pre-assigned | Network Contributor on VNet |
| Question | How to Check | Example |
| ---------------------------------------- | --------------------------------- | -------------------------- |
| Does it need a Service Principal? | Check for role assignment tests | Role assignment resources |
| Does it need an Entra Group? | Check for group-based assignments | Workspace role assignments |
| Does it need specific app registrations? | Check for OAuth/auth requirements | Connection resources |
| Question | How to Check | Example |
| ---------------------------------- | ----------------------------------- | ------------------------------------------ |
| Does it need an AzDO project/repo? | Check for Git integration | Workspace Git |
| Does it need a GitHub connection? | Check for GitHub references | Workspace Git |
| Does it need a Fabric Connection? | Check for connection references | Connection role assignments |
| Does it need a Gateway? | Check for gateway-scoped operations | Gateway role assignments, VNet connections |
Read tools/scripts/Set-WellKnown.ps1 to determine what already exists and what's missing.
Set-FabricItem switch blockLook at the switch ($Type) block in the Set-FabricItem function. If the new item type is missing, it needs an entry mapping to its REST API endpoint:
'<NewItemType>' {
$itemEndpoint = '<camelCasePluralEndpoint>'
}
The endpoint is the camelCase plural of the item type (e.g. lakehouses, eventhouses, sqlDatabases, dataPipelines).
$itemNaming hashtableEvery item that gets created needs a short naming abbreviation in $itemNaming:
'<NewItemType>' = '<2-5 char abbreviation>'
Determine which creation pattern applies.
If the Fabric API can create the item with just displayName and description, add it to the $itemTypes array:
$itemTypes = @('ApacheAirflowJob', ..., '<NewItemType>', ..., 'Warehouse')
The loop handles creation automatically:
foreach ($itemType in $itemTypes) {
$displayNameTemp = "${displayName}_$($itemNaming[$itemType])"
$item = Set-FabricItem -DisplayName $displayNameTemp -WorkspaceId $wellKnown['WorkspaceDS'].id -Type $itemType
$wellKnown[$itemType] = @{
id = $item.id
displayName = $item.displayName
description = $item.description
}
}
Fabric Items currently using this pattern: ApacheAirflowJob, CopyJob, Dataflow, DataPipeline, DigitalTwinBuilder, Environment, Eventhouse, GraphQLApi, KQLDashboard, KQLQueryset, Lakehouse, Map, MLExperiment, MLModel, Notebook, Reflex, SparkJobDefinition, SQLDatabase, VariableLibrary, Warehouse
If the API requires a creationPayload on create, add a dedicated block after any dependencies have been created:
# Create <NewItemType> if not exists
$displayNameTemp = "${displayName}_$($itemNaming['<NewItemType>'])"
$creationPayload = @{
<requiredField> = <value>
}
$item = Set-FabricItem -DisplayName $displayNameTemp -WorkspaceId $wellKnown['WorkspaceDS'].id -Type '<NewItemType>' -CreationPayload $creationPayload
$wellKnown['<NewItemType>'] = @{
id = $item.id
displayName = $item.displayName
description = $item.description
}
Current examples:
databaseType and parentEventhouseItemId (depends on Eventhouse)digitalTwinBuilderItemReference (depends on DigitalTwinBuilder)parentWarehouseId (depends on Warehouse)If the API requires a definition on create (items that are definition-required):
$displayNameTemp = "${displayName}_$($itemNaming['<NewItemType>'])"
$definition = @{
parts = @(
@{
path = '<definition-path>'
payload = Get-DefinitionPartBase64 -Path 'internal/testhelp/fixtures/<item_type>/<file>.tmpl' -Values @(
@{ key = '{{ .PlaceholderVar }}'; value = $actualValue }
)
payloadType = 'InlineBase64'
}
)
}
$item = Set-FabricItem -DisplayName $displayNameTemp -WorkspaceId $wellKnown['WorkspaceDS'].id -Type '<NewItemType>' -Definition $definition
$wellKnown['<NewItemType>'] = @{
id = $item.id
displayName = $item.displayName
description = $item.description
}
Current examples:
mirroring.json definitiondefinition.pbism + model.bimdefinition.pbir + report.json + static resources (depends on SemanticModel)eventstream.json definition (depends on Lakehouse)mountedDataFactory-content.json (depends on Azure Data Factory)This strategy also requires:
internal/testhelp/fixtures/<item_type>/Get-DefinitionPartBase64 to Base64-encode the definition contentFor non-Fabric-Item resources that need dedicated setup:
Azure resources:
# Create Azure resource
$resource = Set-Azure<Resource> -ResourceGroupName $wellKnown['ResourceGroup'].name -Name $displayNameTemp ...
$wellKnown['<ResourceKey>'] = @{
id = $resource.Id
name = $resource.Name
}
Fabric connections:
$connection = Set-FabricConnection -DisplayName $displayNameTemp -ConnectivityType "<type>"
$wellKnown['<ConnectionKey>'] = @{
id = $connection.id
displayName = $connection.displayName
}
Role assignments:
Set-FabricGatewayRoleAssignment -GatewayId $gatewayId -PrincipalId $principalId -PrincipalType 'ServicePrincipal' -Role 'Admin'
Domains:
$domain = Set-FabricDomain -DisplayName $displayNameTemp
$wellKnown['<DomainKey>'] = @{ id = $domain.id; displayName = $domain.displayName }
Well-known resources are created sequentially. Ensure dependencies are created before dependents:
$itemTypes arrayIf the new resource depends on something not yet created, note it as a prerequisite.
Output a structured recommendation:
Resource: fabric_<name>
Category: Fabric Item / non-item
Creation Strategy: A (simple) / B (payload) / C (definition) / D (non-item infra)
List all identified dependencies:
✅ Already exists: <dependency>
❌ Missing: <dependency> — needs to be added
Set-WellKnown.ps1internal/testhelp/fixtures/Provide ready-to-paste PowerShell code for each required change.
wellknown.go)Well-known data is loaded from internal/testhelp/fixtures/.wellknown.json (or the FABRIC_TESTACC_WELLKNOWN env var) and accessed in tests via:
entity := testhelp.WellKnown()["Lakehouse"].(map[string]any)
entityID := entity["id"].(string)
| Key | Purpose |
| -------------- | ------------------------------------- |
| WorkspaceRS | Resource tests (create/update/delete) |
| WorkspaceDS | Data source tests (read-only) |
| WorkspaceMPE | Managed private endpoint tests |
| WorkspaceOAP | Outbound access policy tests |
tools/scripts/Set-WellKnown.ps1internal/testhelp/wellknown.gointernal/testhelp/fixtures/internal/testhelp/fixtures/.wellknown.jsonTake microsoft/wellknown-analyzer from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.