/pigment:securing-with-access-rightsfrom Pigment
Guides building Access Rights metrics in Pigment to control cell-level data read/write based on dimension values. Covers AR metric creation, Apply/Ignore rules, and Role vs User dimensioning.
Ships in Pigment. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Keep these three concepts separate — they are managed by different tools and control different things:
| Concept | Controls | Managed by |
|---|---|---|
| Permissions | Feature access — which actions a user can perform (create metrics, edit boards, import data, …) | Pigment UI (Roles, permissions & access) |
| Roles | A named bundle of granted permissions (+ default read/write access) assigned to users | Pigment UI (Roles, permissions & access) |
| Access Rights (AR) | Cell-level data read/write (e.g. user can write US data, read FR data) | AR metrics and rules — this skill |
Golden rule: Roles and Permissions protect actions; Access Rights protect data. Fine-grained data security is enforced by AR rules, not by roles alone. Managing Roles or Permissions themselves is out of scope for this skill.
Access rights control which data cells a member can read or write, based on dimension values.
Two layers:
When multiple rules apply to the same Role x dimension combination, the most restrictive wins. BLANK in an AR metric is restrictive (No Read / No Write).
Access rights inherit along the metric dependency graph: if Metric B references Metric A, A's access rules flow to B unless cleared.
Building an AR metric and applying it are two separate steps. Never skip the Apply rule after creating the metric.
Role-based (recommended): Dimension by Role x secured dimension. Assign members to roles via Users roles. Scales cleanly.
User-based: Dimension by User x secured dimension. Use only when individual exceptions cannot be expressed through roles.
Use tool:create_metric with data type Access Rights, dimensioned by Role x the dimension to secure. Example: [Role] x [Country].
Use tool:bulk_update_metrics. Set TRUE (via ACCESSRIGHTS) only for allowed pairs; leave all others BLANK (never FALSE).
ACCESSRIGHTS(
IF('Role Country Mapping', TRUE, BLANK),
IF('Role Country Mapping', TRUE, BLANK)
)
Read-only access:
ACCESSRIGHTS(
IF('Role Country Mapping', TRUE, BLANK),
BLANK
)
Critical: BLANK means no access and is not stored (sparse). FALSE also denies access but is stored and degrades performance. Always prefer BLANK.
IFDEFINED('Users roles', 'AR_Metric_Formula')
Users with no role produce BLANK, skipping expensive evaluation. Ensure administrators retain access:
IF('Users roles' = SET_Admin_Role, ACCESSRIGHTS(TRUE, TRUE), 'Country_AR_Logic')
No agent tool exists for creating Apply/Ignore rules; ask the user to configure them in the Pigment UI (Application Settings -> Roles, permissions & access -> Data access rights):
Use Ignore rules to exempt metrics from the broad Apply rule.
ACCESSRIGHTS(ReadBoolean, WriteBoolean): Convert boolean flags into Access Rights values inside the AR metric.IFDEFINED('Users roles', ...): Skip AR computation for users without role assignments.RESETACCESSRIGHTS(expression): Clear inherited AR from a referenced block; essential in PULL metrics from source apps.Apply RESETACCESSRIGHTS to the specific expression referencing the shared block:
RESETACCESSRIGHTS('Hub App'::'Shared Revenue')
No agent tool exists for the RESETACCESSRIGHTS setting. Ask the user to enable "Use RESETACCESSRIGHTS() to remove inherited access rights for Blocks shared from other Applications" in Data access -> Manage inheritance.
Members need at least Read access in every application whose shared blocks they consume.
Flag and fix these when auditing or building AR:
'Users roles'. Building them on User creates per-user maintenance overhead and breaks when users change roles.ARM_Country_Access, ARM_Period_Lock, ARM_Role_Write) and combine them in one final AR metric. Easier to debug and maintain.ACCESSRIGHTS(...): Complex business rules (revenue thresholds, approval status, etc.) should be precomputed into boolean metrics outside the AR formula. The AR formula should reference those booleans, not re-derive them. Keeps AR formulas auditable and separates security from business logic.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
39 skills in this plugin
/aggregating-view-dataExecution skill. Use when a View needs totals or subtotals, when a value must roll up with something other than Sum (average, min, max, count, last), when a snapshot metric adds up across time instead of holding, or when a ratio, percentage, margin, growth or variance metric is added to a Table View or shows a wrong total (e.g. a row for margin as a percent of revenue). Covers metric default aggregators, pivot versus hidden-dimension aggregation, the aggregator reference per value type, and Advanced Aggregators on Table Views./architecting-multi-application-solutionsPlanning skill. Use when deciding how to split work across Pigment applications, designing Hub-and-spoke data flows, or planning Test & Deploy across environments./auditing-a-pigment-applicationExecution skill. Use when auditing, reviewing, or health-checking a Pigment application. Covers the structured audit checklist, severity classification, and output format. Also triggers on requests to clean up, find unused blocks, assess model quality, or find what is wrong with an application./building-a-full-applicationPlanning skill. Use when building a complete Pigment application from scratch or when the request spans multiple modeling phases. This skill, together with any other planning skill the request calls for, is sufficient to produce the full architecture spec; do not load execution skills until the spec is approved and you begin building blocks./building-pigment-framesUse this skill whenever you're building, updating, or troubleshooting a Pigment Frame — a full-page, custom-coded visualisation (JavaScript, canvas, or inline SVG) that reads Pigment data through the PigmentSDK. Reach for it any time a native View (Grid, Chart, KPI) or Board can't produce what's being asked for - a bespoke chart, a custom canvas drawing, an interactive widget, or a standalone page in the left navigation that behaves like a small app. Also use it if a Frame you've already built shows up blank or broken and needs debugging./building-versions-and-planning-cyclesExecution skill. Use when implementing versions, planning cycles, or actuals vs forecast separation, and whenever realized data is extended into a plan or budget — loading actuals then planning the remaining periods, forecasting forward from actuals, Actual/Budget/Plan layering, plan vs actual variance — even when the request never uses the word version. Covers Version Dimensions, Switchover patterns, Actual/Forecast layering, Native Scenarios, and Snapshots.Other plugins' skills for the same job
npx claudepluginhub gopigment/ai-plugins --plugin pigment