DA

datum-configuration

Comprehensive reference for the Datum module, used for hierarchical PowerShell DSC configuration management.

Install

mkdir -p .claude/skills/datum-configuration && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/11276" && unzip -o skill.zip -d .claude/skills/datum-configuration && rm skill.zip

Installs to .claude/skills/datum-configuration

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Reference for the Datum PowerShell DSC configuration data module: hierarchical data composition, Datum.yml, resolution precedence, merge strategies (MostSpecific, hash, deep, UniqueKeyValTuples, DeepTuple), knockout prefix, lookup_options, DatumStructure, store providers, Datum handlers (InvokeCommand, ProtectedData), RSOP, Roles/Configurations pattern, and the DscWorkshop reference. Includes ProjectDagger patterns: 15-layer hierarchy, Scenario overrides (Tiny/Normal/Extended), ServiceTag-scoped roles, TinyAdditionalRole, cross-domain refs, conditional precedence. USE FOR: Datum, Datum.yml, ResolutionPrecedence, lookup_options, merge strategy, MostSpecific, deep/hash merge, UniqueKeyValTuples, DeepTuple, knockout prefix, RSOP, Get-DatumRsop, Resolve-NodeProperty, Lookup, New-DatumStructure, DatumHandlers, Protect-Datum, DSC config data, Roles pattern, DscWorkshop, Sampler.DscPipeline, Scenario/Tiny override, ServiceTag role. DO NOT USE FOR: Sampler build framework, build debugging, AutomatedLab.
1010 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Advanced

Key capabilities

  • Hierarchical data composition
  • Merge strategy application
  • Lookup resolution
  • DSC configuration data management

How it works

Aggregates configuration data from multiple sources using a hierarchical model.

Inputs & outputs

You give it
Configuration data layers
You get back
Resolved DSC configuration data

When to use datum-configuration

  • Manage DSC configuration data
  • Resolve node properties
  • Implement Datum merge strategies
  • Apply hierarchical data patterns

About this skill

Datum — Hierarchical DSC Configuration Data

Comprehensive reference for Datum (v0.41+), a PowerShell module that aggregates configuration data from multiple sources in a hierarchical model. Designed primarily for DSC Configuration Data but usable anywhere hierarchical data lookup and merging is needed.

Related skills: For Sampler build framework, see sampler-framework. For build debugging, see sampler-build-debug. For AutomatedLab, see automatedlab-deployment.


Core Concepts

What Datum Does

Datum organises Configuration Data in a hierarchy adapted to your business context and injects it into DSC Configurations based on nodes and the roles they implement. Inspired by Puppet Hiera, Chef Databags, and Ansible Roles.

Key Terminology

TermDefinition
Datum TreeThe full hierarchical data structure created by New-DatumStructure
Store / BranchA root-level data source (e.g., AllNodes, Roles, Baselines)
LayerOne entry in ResolutionPrecedence — a path prefix to search
NodeA target machine with metadata (NodeName, Role, Environment, etc.)
RoleA YAML file defining which Configurations to apply and their data
ConfigurationA DSC Composite Resource that consumes splatted data
RSOPResultant Set of Policy — the fully merged data for a node
LookupThe process of resolving a property path through the hierarchy
Merge StrategyRules governing how values from multiple layers combine
HandlerA filter+action pair that transforms values at lookup time
Knockout PrefixThe -- prefix that removes items during merge

Data Flow

Datum.yml defines hierarchy
        |
        v
Node metadata selects layers --> ResolutionPrecedence paths resolved
        |
        v
Each property looked up through layers (most specific first)
        |
        v
Merge strategy applied per key --> lookup_options
        |
        v
Handlers transform values --> [x= ...=], [ENC= ...=]
        |
        v
RSOP = fully resolved config data for the node
        |
        v
RootConfiguration applies RSOP to generate MOF

Datum.yml Reference

Full Datum.yml schema — ResolutionPrecedence, DatumStructure, DefaultProvider, DatumHandlers, Merge_Options, and worked examples for each key — read references/datum-yml-reference.md.

Merge Strategies

Data Types for Merge

TypeDescriptionExample
BaseTypeScalarsstring, int, bool, DateTime, PSCredential
HashtableHashtable/OrderedDictionary@{ Key = 'Value' }
baseType_arrayArray of scalars@('a', 'b')
hash_arrayArray of hashtables@(@{ Name = 'x' })

Strategy Presets

Presetmerge_hashmerge_baseType_arraymerge_hash_arrayknockout
MostSpecific / FirstMostSpecificMostSpecificMostSpecificnone
hash / MergeTopKeyshashMostSpecificMostSpecific--
deep / MergeRecursivelydeepUniqueDeepTuple--

Detailed Strategy Properties

lookup_options:
  MyKey:
    merge_hash: MostSpecific | hash | deep
    merge_basetype_array: MostSpecific | Sum | Unique
    merge_hash_array: MostSpecific | Sum | UniqueKeyValTuples | DeepTuple
    merge_options:
      knockout_prefix: '--'
      tuple_keys:
        - Name
        - Version

Hash-Array Merge Strategies

StrategyBehaviour
MostSpecificReturn array from most specific layer only
SumConcatenate all arrays
UniqueKeyValTuplesMerge arrays, dedup by tuple_keys. Most specific wins. Items REPLACED entirely
DeepTupleMatch items by tuple_keys, then DEEP-MERGE matched items' properties

Knockout Prefix

The -- prefix (configurable) removes items during merge:

# Baseline (lower priority)
WindowsFeatures:
  Names:
    - Telnet-Client
    - File-Services

# Role override (higher priority)
WindowsFeatures:
  Names:
    - --Telnet-Client        # Removes Telnet-Client from result

Works for: base-type arrays, hashtable keys (prefix key name), and hash-array items (prefix tuple key value). Requires hash or deep preset, or explicit knockout_prefix. Does NOT work with MostSpecific (no merge occurs).


Datum Handlers

InvokeCommand — Dynamic Expressions

Values wrapped in [x= ... =] are evaluated as PowerShell at lookup time.

Scriptblock form (most common):

ComputedValue: '[x={ Get-Date -Format "yyyy-MM-dd" }=]'
DomainFqdn: '[x={ $Datum.Environment.$($Node.Environment).DomainFqdn }=]'

Expandable string form:

LogPath: '[x="C:\Logs\$($Node.Environment)\$($Node.Name)"=]'

Available variables inside expressions: $Datum, $Node, $File (FileInfo), $PropertyPath, $InputObject, plus any CommandOptions keys.

The $File variable is a [System.IO.FileInfo] of the current data file:

  • $File.BaseName = file name without extension
  • $File.Directory.BaseName = parent directory name

Nested resolution: If result contains [x= ...=], it's recursively resolved.

ProtectedData — Encrypted Credentials

AdminCred: '[ENC=PE9ianM... (encrypted blob) ...=]'

Encrypt: Protect-Datum -InputObject $credential -Certificate $thumbprint Decrypt: Happens automatically at lookup time via the handler.

Building Custom Handlers

Create module with Test-<Name>Filter and Invoke-<Name>Action functions. Register in DatumHandlers section of Datum.yml as <ModuleName>::<HandlerName>.


RSOP (Resultant Set of Policy)

Computes the fully resolved, merged configuration data for nodes:

$Datum = New-DatumStructure -DefinitionFile .\Datum.yml
$rsop = Get-DatumRsop -Datum $Datum -AllNodes $AllNodes

# Specific node
$rsop = Get-DatumRsop -Datum $Datum -AllNodes $AllNodes -Filter { $_.NodeName -eq 'SRV01' }

# With source tracking
$rsop = Get-DatumRsop -Datum $Datum -AllNodes $AllNodes -IncludeSource

Cache management:

  • Get-DatumRsopCache — view cache
  • Clear-DatumRsopCache — clear after data changes
  • -IgnoreCache flag on Get-DatumRsop

Roles and Configurations Pattern

How It Works

  1. A Role YAML file lists Configurations (DSC Composite Resources) and their data
  2. A Node YAML file specifies which Role it implements
  3. The RootConfiguration iterates over each node's Configurations and splats the data

Role File Structure

# Roles/FileServer.yml
Configurations:
  - WindowsFeatures
  - FileSystemObjects
  - SmbShares

WindowsFeatures:
  Names:
    - File-Services

FileSystemObjects:
  Items:
    - DestinationPath: C:\Data
      Type: Directory

Node File Structure

# AllNodes/Prod/SRV01.yml
NodeName: SRV01
Environment: Prod
Role: FileServer
Location: Frankfurt
Baseline: Server
ServiceTag: PF

RootConfiguration Pattern

node $ConfigurationData.AllNodes.NodeName {
    $configurationNames = (Lookup 'Configurations')
    foreach ($configurationName in $configurationNames) {
        $properties = Lookup $configurationName -DefaultValue @{}
        Get-DscSplattedResource -ResourceName $configurationName `
            -ExecutionName $configurationName -Properties $properties
    }
}

ProjectDagger-Specific Patterns

ProjectDagger conventions: 15-layer hierarchy, Scenario overrides (Tiny/Normal/Extended), ServiceTag-scoped roles, TinyAdditionalRole, cross-domain refs, and conditional precedence rules — read references/projectdagger-patterns.md.

Public Functions

FunctionPurpose
New-DatumStructureCreate Datum hierarchy from Datum.yml
Resolve-NodePropertyDSC-friendly lookup (aliases: Lookup, Resolve-DscProperty)
Resolve-DatumCore lookup engine with merge strategy support
Merge-DatumMerge two datum objects using configured strategy
Get-DatumRsopCompute Resultant Set of Policy
Get-DatumRsopCacheView RSOP cache
Clear-DatumRsopCacheClear RSOP cache
New-DatumFileProviderCreate file provider for a path
Get-FileProviderDataRead and parse data files (YAML, JSON, PSD1)
Get-MergeStrategyFromPathResolve merge strategy for a property path
Get-DatumSourceFileGet source file path for RSOP source tracking

Common Troubleshooting

RSOP Shows Wrong Value

  1. Check lookup_options — is the key using MostSpecific when deep is needed?
  2. Check subkey merge — did you declare strategies at each nesting level?
  3. Use Get-DatumRsop -IncludeSource to see which file contributed each value
  4. Clear cache: Clear-DatumRsopCache

Knockout Not Working

  • Verify merge strategy enables knockout (hash or deep preset, or explicit knockout_prefix)
  • MostSpecific does NOT support knockout (no merge occurs)

Expression Not Evaluating

  • Check SkipDuringLoad: true is set for InvokeCommand handler
  • Check DatumHandlersThrowOnError: true to surface expression errors
  • Verify quoting: YAML single quotes around [x= ... =] prevent YAML parsing issues

Scenario Override Not Applied

  • Verify layer order in ResolutionPrecedence
  • File name must match exactly: Roles\$($Scenario)$($Node.Role) maps to e.g. TinyScomManagement.yml
  • Configurations merges (Unique), but other keys use MostSpecific (replace)

Node Property Not Available

  • $Node.Name = file name (set by FileProvider, always available)
  • $Node.NodeName = value in data file (may not exist during load)
  • Use $Node.Name for bootstrapping

File System Layout

source/
  Datum.yml                          # Central configuration
  RootConfiguration.ps1              # DSC root config
  AllNodes/                          # Node definitions
    <Environment>/
      <NodeName>.yml
  Roles/                             # Role definitions
    <RoleName>.yml
    <ServiceTag>/                  

---

*Content truncated.*

When not to use it

  • When simple configuration files are sufficient
  • When not using PowerShell DSC

Prerequisites

PowerShell

Limitations

  • Requires understanding of Datum hierarchy

How it compares

Provides a structured, hierarchical approach to configuration data rather than flat files.

Compared to similar skills

datum-configuration side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
datum-configuration (this skill)02moNo flagsAdvanced
cost-optimization15moNo flagsIntermediate
cloudflare-manager259moReviewIntermediate
storage-networking67moReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

cost-optimization

wshobson

Optimize cloud costs through resource rightsizing, tagging strategies, reserved instances, and spending analysis. Use when reducing cloud expenses, analyzing infrastructure costs, or implementing cost governance policies.

13

cloudflare-manager

qdhenry

Comprehensive Cloudflare account management for deploying Workers, KV Storage, R2, Pages, DNS, and Routes. Use when deploying cloudflare services, managing worker containers, configuring KV/R2 storage, or setting up DNS/routing. Requires CLOUDFLARE_API_KEY in .env and Bun runtime with dependencies installed.

25135

storage-networking

pluginagentmarketplace

Master Kubernetes storage management and networking architecture. Learn persistent storage, network policies, service discovery, and ingress routing.

663

aws-solution-architect

alirezarezvani

Design AWS architectures for startups using serverless patterns and IaC templates. Use when asked to design serverless architecture, create CloudFormation templates, optimize AWS costs, set up CI/CD pipelines, or migrate to AWS. Covers Lambda, API Gateway, DynamoDB, ECS, Aurora, and cost optimization.

2047

terraform-module-library

wshobson

Build reusable Terraform modules for AWS, Azure, and GCP infrastructure following infrastructure-as-code best practices. Use when creating infrastructure modules, standardizing cloud provisioning, or implementing reusable IaC components.

759

cloud-architect

sickn33

Expert cloud architect specializing in AWS/Azure/GCP multi-cloud infrastructure design, advanced IaC (Terraform/OpenTofu/CDK), FinOps cost optimization, and modern architectural patterns. Masters serverless, microservices, security, compliance, and disaster recovery. Use PROACTIVELY for cloud architecture, cost optimization, migration planning, or multi-cloud strategies.

649

Search skills

Search the agent skills registry