cedar
Skill1 starsChanged 31 days agoMITView on GitHub
Cedar policy language 4.5: write, validate and evaluate authorization policies with entities, schemas, templates and PARC requests. Use when adding fine-grained authorization to an application, modelling RBAC or ABAC as permit and forbid policies, designing a Cedar schema, writing entity and context JSON, linking policy templates for sharing features, debugging an unexpected Allow or Deny, or reviewing policies for safety. Triggers: Cedar, cedar-policy, Cedar policy, cedarschema, permit, forbid, when, unless, principal action resource context, PARC, policy template, ?principal, ?resource, template-linked policy, entity hierarchy, Cedar validator, default deny, forbid overrides permit, Amazon Verified Permissions.
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 41
Write the policies: Start from least privilege, use in for groups and hierarchies, and use forbid for guardrails.
- Very specific: line 47
Validate: Run the validator against the schema and fix every error.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Cedar
Cedar is an open-source policy language for authorization, maintained in the cedar-policy project. Policies permit or forbid a principal taking an action on a resource in a context, an authorizer combines them into Allow or Deny, and a validator checks policies against a schema. With this skill the agent writes Cedar policies, schemas and entity data that validate and that decide requests as intended.
Follow the workflow below step by step. Every rule here comes from a source in Sources, with the section it cites. When a rule and the pinned source disagree, the source wins; when the source has a newer revision than the pin, follow the refresh steps.
Inputs (fill in, or ask before starting)
- Role: policy author, application integrating the authorizer, or reviewer.
- Model: the principals, actions, resources and hierarchies of the application, and which decisions need attributes or context.
- Revision: Cedar language version 4.5, implemented by SDK versions 4.10.0 to 4.13.0; pinned to SDK v4.13.0 (Released, 2026-09-15).
- Sources: when refreshing, re-read every URL in Sources, check the document history for a new language version and the releases page for a new SDK, and update the pins.
Invariants
- Default deny, forbid overrides permit, skip on error. Any satisfied
forbidgivesDeny; else any satisfiedpermitgivesAllow; elseDeny. A policy whose evaluation errors is ignored (authorization, Algorithm and Discussion). - Every policy has an effect and a full scope.
permitorforbid, thenprincipal,actionandresource, each unconstrained or constrained with==,inoris; optionalwhenandunless; a closing;(policy syntax). - A request is PARC: principal, action and resource are entity references and context is a record (authorization, Request creation).
- Entity IDs are unique, immutable and never reused, such as UUIDs, so that a recycled name never inherits old grants (policy syntax; security best practices).
- Validate policies against a schema before use. The authorizer does not validate; requests and entities must follow the schema, or a valid policy may error at run time and be skipped (validation, Request validation expectations).
- Guard optional attributes and tags with
hasor.hasTag()before access; access to a missing attribute is an error (operators,has). - Template placeholders are
?principaland?resourceonly, on the right of==orinin the scope (templates). - Build dynamic policies from templates, never string concatenation, to prevent Cedar code injection (security best practices).
- Annotations do not affect evaluation;
@idis not special in the language (policy syntax, Annotations).
Workflow
- Model entities and actions. Choose entity types, parent relations and attributes, and the actions with the principal and resource types they apply to.
->
references/schema-entities.md✓ A Cedar schema declares every entity type and action, withappliesTofor each action. - Write the policies. Start from least privilege, use
infor groups and hierarchies, and useforbidfor guardrails. ->references/policies.md✓ Each policy has a reason in an annotation and uses only schema names. - Use templates where grants are per user or per resource. Link templates rather than generating policy text.
->
references/policies.md✓ No policy text is built by concatenating input. - Validate. Run the validator against the schema and fix every error; review warnings.
->
references/validation-evaluation.md✓ Validation reports no errors. - Build requests and entity data. Produce PARC requests and entity JSON that follow the schema, with schema-based parsing where available.
->
references/schema-entities.md✓ Test requests cover allow, deny and forbid-override cases, and the expected determining policies. - Integrate and review. Authenticate before authorizing, bound input sizes, log decisions with determining policies and errors, and re-validate on schema change.
->
references/validation-evaluation.md✓ Errors in the response are monitored, not silently dropped.
Verify before done
- Every policy validates against the schema with no errors.
- Optional attributes and tags are guarded with
hasor.hasTag(). - Entity IDs are UUIDs or other non-reusable IDs, not names.
- Tests include a request where a
forbidoverrides a matchingpermit. - Policies created at run time are template-linked, not concatenated.
- Authorization responses' errors are logged.
Reference index
references/policies.md: policy structure, scope forms, conditions, annotations, operators, templates and patterns. Load for steps 2 and 3.references/schema-entities.md: the Cedar schema format, the JSON schema form, entity and context JSON, and requests. Load for steps 1 and 5.references/validation-evaluation.md: the authorization algorithm, policy evaluation, validation checks and their limits, the 4.13.0 warning change, and security practices. Load for steps 4 and 6.
Related skills
openfeaturewhen authorization and feature flags share targeting attributes:npx skills add ScaleDockHQ/scaledock-skills --skill openfeature.ocsfto log authorization decisions as audit events:npx skills add ScaleDockHQ/scaledock-skills --skill ocsf.
Sources
Status uses the publishing body's own maturity term. Checked is the date the source was last read.
- Cedar Policy Language Reference Guide: reference for Version 4.5, docs commit 3a37098 (2026-09-25), checked 2026-10-02.
- Cedar document history: language version table, 4.5 (SDK 4.10.0 to 4.13.0; April 23, 2026), checked 2026-10-02.
- Cedar v4.13.0 release: Released, v4.13.0 (2026-09-15), checked 2026-10-02.
- Cedar repository: Apache-2.0, main branch, checked 2026-10-02.
- Basic policy construction: reference, language 4.5, checked 2026-10-02.
- Operators and functions: reference, language 4.5, checked 2026-10-02.
- Policy templates: reference, language 4.5, checked 2026-10-02.
- JSON policy format: reference, language 4.5, checked 2026-10-02.
- How Cedar authorization works: reference, language 4.5, checked 2026-10-02.
- Entities and context syntax: reference, language 4.5, checked 2026-10-02.
- Cedar schema: reference, language 4.5, checked 2026-10-02.
- Cedar schema format: reference, language 4.5, checked 2026-10-02.
- JSON schema format: reference, language 4.5, checked 2026-10-02.
- Policy validation against schema: reference, language 4.5, checked 2026-10-02.
- Cedar security: reference, language 4.5, checked 2026-10-02.
In this repository40 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- find-skillsSkill
- a2aSkill
- ag-uiSkill
- ap2Skill
- asyncapiSkill
- authzenSkill
- cloudeventsSkill
- eu-ai-actSkill
- fapiSkill
- gnapSkill
- jwtSkill
- mcp-authorizationSkill
- oauthSkill
- ocsfSkill
- openapi-arazzoSkill
- openapi-overlaySkill
- openapiSkill
- openfeatureSkill
- openid4vcSkill
- openid-connectSkill
- openid-federationSkill
- openidSkill
- opentelemetry-genaiSkill
- owasp-agenticSkill
- problem-detailsSkill
- ratelimit-headersSkill
- scaledock-agent-permissionsSkill
- scaledock-enterprise-identitySkill
- scaledock-http-apiSkill
- scaledock-mcp-serverSkill
- scaledock-repo-standardSkill
- scimSkill
- shared-signalsSkill
- spiffeSkill
- standard-schemaSkill
- typespecSkill
- web-bot-authSkill
- webmcpSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

