designing-policy-templates

Designs YAML policy templates with key-naming rules aligned to Rego rule data paths.

1|Updated Jun 11, 2026
One-click install
npx skills add https://github.com/fianulabs/fianu-skills --skill designing-policy-templates-fianulabs
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: designing-policy-templates
Source: https://github.com/fianulabs/fianu-skills/tree/main/skills/designing-policy-templates
Command: npx skills add https://github.com/fianulabs/fianu-skills --skill designing-policy-templates-fianulabs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Policy templates define the YAML schema users fill in to set policy values, but poorly named keys and mismatches with the Rego rule's data.* paths cause silent evaluation failures and confusing user experiences. This Skill enforces consistent key syntax and schema alignment so templates work correctly at evaluation time. ## Core Features & Use Cases - Key Syntax Enforcement: Validates that every template key is alphanumeric with underscores only, never starts with a number, and uses underscore-separated words like vulnerability_count. - Readability Conventions: Guides template structure toward sentence-like, self-evident schemas (e.g., vulnerabilities.critical.maximum) instead of opaque flat keys. - Rego Schema Alignment: Ensures every template key maps to a data.* reference in the control's Rego rule, preventing undefined evaluation results. - Use Case: When authoring a new control that checks code coverage thresholds, use this Skill to design a template like coverage.overall.minimum and verify the paired Rego rule reads exactly that path before publishing. ## Quick Start Design a YAML policy template for a control that limits critical and high vulnerability counts, with keys that match the Rego rule's data paths.

Frequently Asked Questions about designing-policy-templates

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design a YAML policy template for a control?▼

Identify what the control evaluates, choose readable underscore-separated key names, write the YAML template, then pair it with the Rego rule. Every data.* reference in the rule must map to a template key before publishing.

What characters are allowed in policy template keys?▼

Keys must be alphanumeric and case-sensitive, with underscores as the only allowed special character. They cannot start with a number, and spaces, hyphens, and periods are invalid.

Why does my Rego rule return undefined for a policy value?▼

Undefined results happen when the template key path does not match the rule's data.* reference, such as coverage.overall.threshold versus data.coverage.overall.minimum. Cross-check every rule reference against the template before publishing.

How readable should policy template keys be?▼

Templates should read as close to a sentence as possible, like vulnerabilities.critical.maximum, since users see them every time they set or review a policy. Flat keys like critical: 0 leave the measured value and its meaning ambiguous.

What does a policy template control besides the YAML schema?▼

A policy template serves four roles: it provides the schema the Rego rule references via data.* paths, drives the GUI form in the dashboard, defines the YAML schema for policy-as-code users, and enforces value types when policies are set.