skills/formae-policy/SKILL.md
Use when the user wants to set, remove, or inspect a TTL or auto-reconcile policy on a stack — e.g. 'expire X in 20 minutes', 'reject out-of-band changes on Y', 'auto-reconcile production every 5 minutes', 'remove the TTL on dev', 'what policies are on lifeline?'
npx skillsauth add platform-engineering-labs/formae-mcp formae-policyInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill to manage formae stack policies via natural language. Two policy types are supported:
TTLPolicy).AutoReconcilePolicy).Reusable / standalone policies are out of scope for this skill (handled separately).
onDependents defaults to "abort". Override with "cascade" if the user says "cascade", "destroy dependents too", or similar.interval defaults to 5 minutes (300 seconds) when the user does not specify one.Always state the chosen defaults to the user before applying.
User says something like "expire lifeline in 20 minutes" or "auto-reconcile production every 10 minutes".
20m → 1200, 4h → 14400, 1d → 86400).list_stacks and find a matching label. If no match, present the available labels and ask the user which one they meant.onDependents = "abort" by default) to the lifeline stack."create_inline_policy with operation: "set", the resolved policy_type, and the relevant duration field (ttl_seconds or interval_seconds). The tool returns:
file_path — the PKL file declaring the stack.operation — "create" or "update".pkl_snippet — the text to insert.insertion_anchor_start / insertion_anchor_end — the line range; for create they are equal (insert before that line); for update they cover the existing block (replace those lines).existing_policy_snippet — only for update; show this as the "before" in the diff.imports_to_add — add each entry near the top of the file if missing.create insert the snippet before the anchor line; for update replace the lines covered by the anchor range. Add any missing imports near the top of the file. Indent the snippet to match the surrounding context (the snippet is emitted unindented).reconcile (simulate first)?" If the user declines, stop — the file edit stands and the policy will activate on the next manual apply.apply_forma with mode: "reconcile", simulate: true, force: true, file_path: <returned file_path>.apply_forma with simulate: false. Then poll get_command_status every 5 seconds (with sleep 5); only report state transitions.User says "don't expire lifeline anymore", "stop auto-reconciling production", etc.
Same shape as set, but call create_inline_policy with operation: "remove". The tool returns:
operation: "remove" — apply the deletion at the anchor lines.operation: "noop" — no policy of that type was attached. Tell the user there's nothing to remove and stop.For remove, the Edit tool deletes the lines covered by the anchor range. The existing_policy_snippet shows what's being removed; surface it in the diff.
If notes mentions "removed empty policies block", explain to the user that the stack's policies = new Listing { ... } wrapper was also removed because that was the last policy.
User asks "what policies are on lifeline?".
list_stacks, locate the stack, surface its inline Policies.list_policies, filter to entries whose AttachedStacks includes the target stack label.pkl eval — ALWAYS use formae eval --output-consumer machine. Forma files use formae-specific extensions.devops
Use when the user asks about their cloud targets, configured regions, provider accounts, or which cloud accounts are set up
devops
Use when the user asks about running commands, deployment progress, recent operations, command history, or what failed
devops
Use when the user asks about their infrastructure stacks, how infrastructure is organized, or needs a stack overview with resource counts
testing
Use when the user asks about deployed infrastructure, what resources exist, resource counts, or wants to find specific resources by type, stack, label, or management status