Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

Permission Diff

identity.permission_diff

ProductionBounded custom (Class B)Deterministicstrictinstantv1.0.0
No network

Overview

You send before and after arrays of canonical permission strings. caseSensitivity defaults to SENSITIVE; ASCII_INSENSITIVE lowercases with Locale.ROOT. Optional hierarchyDelimiter plus expandHierarchy=false expands ancestors when true. Results are sorted. This does not decide authorization or look up a directory.

A permission change that both adds and removes grants is not a pure increase.

Reliability

Order is lexical after canonicalization. PERMISSION_DIFF_INVALID — trigger: expandHierarchy without a one-character delimiter; retryable: no; next: send hierarchyDelimiter. IDENTITY_LIMIT_EXCEEDED — trigger: more than 10,000 permissions; retryable: no; next: split the lists.

Context footprint

Sorted names and counts only. A successful call costs 1 execution credit.

When to use it

When two already-canonical permission lists must be compared.

When you need to decide authorization or expand roles from a directory.

Scope

Note
Compares two permission sets and reports sorted added, removed and privilege change.

Non-goals

  • Does not decide authorization
  • Does not look up a directory
  • Does not evaluate wildcards

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

validation

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input2 MB

How we handle your data

Sensitive processing
What this means

This skill is designed to detect, mask, redact, validate, or otherwise process sensitive data.

Squillify guarantees
  • Runs inside Squillify
  • This skill runs inside Squillify.
  • Payloads are not sent to an external service by this skill.
  • Squillify does not permanently store submitted payloads.
  • Telemetry records metadata only, not submitted content.
  • Submitted payloads are not used for training.
  • Submitted payloads are not reviewed by humans.
  • Targets sensitive data
  • The response does not contain submitted content.
Your responsibility

Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
beforearrayYesBounded array of 0 through 10001 previous permissions; runtime accepts at most 10000.
afterarrayYesBounded array of 0 through 10001 next permissions; runtime accepts at most 10000.
caseSensitivitystringNoSENSITIVE or ASCII_INSENSITIVE. Omit it for SENSITIVE.
hierarchyDelimiterstringNoSingle-character ancestor delimiter. Omit it when hierarchy is unused.
expandHierarchybooleanNoWhether to add ancestor permissions. Omit it for false.

Output schema

FieldTypeRequiredDescription
addedarrayYesBounded array of 0 through 10000 sorted canonical permission strings.
removedarrayYesBounded array of 0 through 10000 sorted canonical permission strings.
unchangedarrayYesBounded array of 0 through 10000 sorted canonical permission strings.
addedCountintegerYesHow many permissions were added.
removedCountintegerYesHow many permissions were removed.
unchangedCountintegerYesHow many permissions stayed the same.
privilegeChangestringYesINCREASE, DECREASE, MIXED or NONE.
caseSensitivitystringYesApplied case mode SENSITIVE or ASCII_INSENSITIVE.
expandHierarchybooleanYesWhether ancestors were expanded.
rulesetVersionstringYesPinned permission-diff ruleset identifier.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"identity.permission_diff","input":{"before":["docs.read"],"after":["docs.read","docs.write"]}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });

const { output } = await sq.execute("identity.permission_diff", {"before":["docs.read"],"after":["docs.read","docs.write"]});

Errors

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.
PERMISSION_DIFF_INVALID400NoThe request payload failed this skill's input validation.
IDENTITY_LIMIT_EXCEEDED429NoA size, quota, rate, or time limit was exceeded.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • Does not decide authorization
  • Does not look up a directory
  • Does not evaluate wildcards
  • Enforcing the resulting set
  • Expanding roles from a directory

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "identity.permission_diff",
  "input": {
    "before": [
      "docs.read"
    ],
    "after": [
      "docs.read",
      "docs.write"
    ]
  }
}

Examples

Adding docs.write is INCREASE

Inputjson
{
  "before": [
    "docs.read"
  ],
  "after": [
    "docs.read",
    "docs.write"
  ]
}
Expected outputjson
{
  "expandHierarchy": false,
  "unchanged": [
    "docs.read"
  ],
  "addedCount": 1,
  "unchangedCount": 1,
  "removed": [],
  "privilegeChange": "INCREASE",
  "rulesetVersion": "identity.permission_diff.v1",
  "removedCount": 0,
  "added": [
    "docs.write"
  ],
  "caseSensitivity": "SENSITIVE"
}
Tip
added contains docs.write and privilegeChange is INCREASE.

Replacing admin and read with write is MIXED

Inputjson
{
  "before": [
    "docs.read",
    "admin"
  ],
  "after": [
    "docs.write"
  ]
}
Expected outputjson
{
  "expandHierarchy": false,
  "unchanged": [],
  "addedCount": 1,
  "unchangedCount": 0,
  "removed": [
    "admin",
    "docs.read"
  ],
  "privilegeChange": "MIXED",
  "rulesetVersion": "identity.permission_diff.v1",
  "removedCount": 2,
  "added": [
    "docs.write"
  ],
  "caseSensitivity": "SENSITIVE"
}
Tip
privilegeChange is MIXED.
  • Detect an increase when a write grant is added
  • Report MIXED when grants both appear and disappear

Avoid for

  • Enforcing the resulting set
  • Expanding roles from a directory

Composable with

Safety & privacy

  • Runs without calling any external service.
  • Your payloads are never stored permanently.
  • Telemetry captures metadata only — never your payload contents.
  • We never train models on your payloads.
  • No human reviews your payloads.

Tags

validationidentity