scaledockhq/scaledock-skills/cedar
Claude Code and agent skill by scaledockhq/scaledock-skills
- community
Checking that the SKILL.md file is still in the repository.
Cedar policy language 4.5: write, validate and evaluate authorization policies with entities, schemas, templates and PARC requests. Targets Cedar 4.x (language 4.5, SDK 4.13.0) and upgrades policies and schemas from Cedar 3.x and 2.x. 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, upgrading to Cedar 4, 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.
Install
npx vskill@latest install scaledockhq/scaledock-skills/cedarSKILL.md
The same SKILL.md was published earlier as scaledockhq/scaledock-skills/cedar.
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.
- Target version: Cedar 4.x (current, the default): 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). Cedar 3.x and Cedar 2.x are legacy: read their policies and schemas and upgrade them, never author them. No preview exists. See `references/versions.md`.
- 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 `?principal` and `?resource` only, 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
- Pick the version. Target Cedar 4.x at language 4.5 unless the deployment pins an older language version; then use only features at or below it.
-> `references/versions.md` ✓ The language and SDK versions are recorded, and neither is from a legacy line.
- 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, with appliesTo for 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.
- Upgrade (only when asked). Follow the 2.x to 3.x and 3.x to 4.x checklists in order.
-> `references/versions.md` ✓ The upgraded policies validate under language 4.5 and the test requests return the same decisions.
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/versions.md`: Cedar 4.x, 3.x and 2.x, the language and SDK versions in each, what changed, the upgrade checklists, and why no preview is listed. Load for steps 1 and 8.
- `references/policies.md`: policy structure, scope forms, conditions, annotations, operators, templates and patterns. Load for steps 3 and 4.
- `references/schema-entities.md`: the Cedar schema format, the JSON schema form, entity and context JSON, and requests. Load for steps 2 and 6.
- `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 5 and 7.
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.regofor writing the policy in Rego for Open Policy Agent instead:npx skills add ScaleDockHQ/scaledock-skills --skill rego.openfgafor relationship-based (Zanzibar-style) authorization models:npx skills add ScaleDockHQ/scaledock-skills --skill openfga.celfor policy conditions written as Common Expression Language expressions:npx skills add ScaleDockHQ/scaledock-skills --skill cel.
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, language versions 2.0 to 4.5 (4.5: SDK 4.10.0 to 4.13.0; April 23, 2026), checked 2026-10-05.
- Cedar v4.13.0 release: Released, v4.13.0 (2026-09-15), checked 2026-10-02.
- cedar-policy SDK changelog: Released (changelog), main branch; entries 2.0.0 (2023-05-10) to 4.13.0 (2026-09-15), Unreleased language version TBD, checked 2026-10-05.
- 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.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/cedar/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/scaledockhq/scaledock-skills/cedar)