working-with-entities

Fetch and create Fianu controls, policies, exceptions, and gates via REST endpoints.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Agents working with the Fianu compliance platform need a single canonical reference for reading and writing versioned entities — controls, policies, policy exceptions, and gates — without guessing endpoint shapes or misunderstanding the draft-then-approval lifecycle. ## Core Features & Use Cases - Entity reads: Fetch controls, policies, policy exceptions, and gates by key, with branching logic based on a ticket's targetEntityType. - History and schema discovery: Retrieve policy change history per control and discover evidence schemas via GET /controls/:key/schemas?producer=.... - Draft creation with approval flow: Create entities through POST /create/control and POST /create/policy, which produce drafts and automatically open approval tickets rather than publishing immediately. - Use Case: An agent processing an approval ticket for a policy exception fetches the exception, its parent policy, and the parent control, then reviews the policy's change history to detect repeated relaxations before recommending approval. ## Quick Start Ask the agent to fetch the Fianu control with a given entity key and summarize its Rego rule, policy template, and version history.

Frequently Asked Questions about working-with-entities

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

FAQPage Schema
How do I fetch a Fianu control or policy by key?▼

Use GET /controls/:entity_key or GET /policies/:entity_key to retrieve the entity. When working from a ticket, branch on its targetEntityType to pick the correct endpoint and also fetch parent entities for policies and exceptions.

How do I create a new control or policy in Fianu?▼

POST to /create/control or /create/policy. The entity is created in draft state and the platform automatically opens an approval ticket; it is not published until that ticket is approved.

Why is my newly created Fianu entity not showing as published?▼

Entities enter as drafts after POST and only become published when the associated approval ticket closes with result approved. Downstream operations requiring the published version must wait for approval or use the latest published version.

How do I see the version history of a policy in Fianu?▼

Call GET /controls/:entity_key/policies/history to get the chronological list of policy versions for a control. This is useful for detecting patterns like repeated relaxations or recent reversals.

What should I do when a Fianu entity update returns 409?▼

A 409 means another writer updated the entity between your read and write. Re-fetch the entity and re-attempt the update, or escalate to a human if the workflow cannot reconcile the conflict.