Agent Skill · Cerbos

cerbos-policy

Generate Cerbos authorization policies from requirements, PDFs, or specifications. Use when creating access control policies, resource permissions, derived roles, or RBAC/ABAC rules. Triggers on "cerbos", "authorization policy", "access control", "RBAC", "ABAC".

Provider: Cerbos Path in repo: cerbos/cerbos-policy/SKILL.md

Skill body

Cerbos Policy Generator

Generate production-ready Cerbos authorization policies from natural language requirements or specification documents.

Prerequisites

Before starting, verify Docker is available:

docker --version

If Docker is not installed, inform the user and provide installation guidance:

Do not proceed with policy generation until Docker is available.

Capabilities

  1. Generate policies from requirements, PDFs, or bullet points
  2. Answer questions about existing policies and Cerbos concepts
  3. Modify policies based on requests, ensuring tests pass
  4. Explain policies in plain language

Workflow Phases

Follow these phases in order. Do not skip ahead.

Phase 1 — Spec Intake

Before writing any files, converge on a compact spec by asking clarifying questions:

Produce a short spec artifact (resources, principals/roles, rules as role → action on resource [condition]) and confirm with the user before generating.

Phase 2 — Write

Batch-write all files in a single pass, in this order:

  1. _schemas/ (principal + resources)
  2. derived_roles/ and common_vars.yaml
  3. resource_policies/ / role_policies/
  4. testdata/ fixtures
  5. *_test.yaml

Every YAML file MUST begin with a # yaml-language-server: $schema=... header so LSP-aware editors validate the file. Policies use the Policy.schema.json URL, test suites use TestSuite.schema.json, and fixtures use the matching TestFixture/*.schema.json. See POLICIES.md and TEST-SUITES.md for the exact URLs.

Do not validate between files.

Phase 3 — Validate

docker run --rm -v "$(pwd):/policies" ghcr.io/cerbos/cerbos:latest compile /policies

Exit code 0 = done. Otherwise capture the error list and move to Phase 4.

Phase 4 — Fix

Apply one targeted fix per iteration, in this priority order:

  1. YAML / CEL syntax errors
  2. Schema validation errors (additionalProperties: false)
  3. Compile errors (missing imports, unresolved references)
  4. Test failures

Rules:

Phase 5 — Finalize

Confirm exit code 0, then report what was created and any assumptions made during spec intake.

Output

Complete policy bundle:

References

Skill frontmatter

license: Apache-2.0 compatibility: Requires Docker for policy validation metadata: {"author" => "cerbos", "version" => "1.0"} allowed-tools: Read Write Edit Bash Glob Grep Task WebFetch

Work with this as data

Every skill here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for agent skills

4 MCP tools reach this
  • find_skillsBrowse and filter every skill in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This skill
curl "https://apis.io/api/v1/skills/cerbos-policy"
All agent skills
curl "https://apis.io/api/v1/skills?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.