# writing-pigment-formulas

> Claude/Codex skill by [@gopigment](https://omgskills.com/library/gopigment/index.md) · 23 stars · Updated 2026-10-23

Execution skill. Load it before the first \`validate\_formula\`, or before any \`create\_metric\`, \`bulk\_update\_metrics\`, \`create\_list\_property\` or \`update\_list\_property\` call that sets a formula; never write a formula without loading it first. Use when writing, editing, or debugging Pigment metric or list property formulas — quoting, references, data types, BLANK, comments, and replacing hard-coded items, dates and thresholds with input metrics.

## Install

```sh
git clone https://github.com/gopigment/ai-plugins /tmp/ai-plugins && ln -s /tmp/ai-plugins/skills/writing-pigment-formulas ~/.claude/skills/writing-pigment-formulas
```

## From README

Write Pigment Formulas Pigment syntax only. Never write Excel, SQL, Python, DAX, or any other language. Formulas operate on metrics (multidimensional grids). Each cell = intersection of one item per dimension. Modifiers control dimension alignment. --- Stage 1 — Identify Inputs Before writing any formula: Confirm the target metric — name, dimensions, type (Number / Date / Text / Dimension / Boolean). The formula result type must match. Confirm source blocks — metrics, lists, properties referenced in the formula. Use tool:searchmetricsandlists (or tool:semanticsearch when names are unclear) to find exact names and spot duplicates. Map dimensions — compare source dimensions vs target dimensions. If they differ, you will need modifiers (Stage 2.4). Check for circular dependencies — if the formula references its own metric or forms a cycle, you need PREVIOUS / PREVIOUSOF with a declared cycle.

## Links

- HTML page: https://omgskills.com/library/gopigment/ai-plugins/skills/writing-pigment-formulas/
- GitHub: https://github.com/gopigment/ai-plugins
- Author: [@gopigment](https://omgskills.com/library/gopigment/index.md)

## More from this repo

- [aggregating-view-data](https://omgskills.com/library/gopigment/ai-plugins/skills/aggregating-view-data/index.md) — Execution skill.
   - [@gopigment](https://omgskills.com/library/gopigment/index.md) · 23 stars
- [architecting-multi-application-solutions](https://omgskills.com/library/gopigment/ai-plugins/skills/architecting-multi-application-solutions/index.md) — Planning skill.
   - [@gopigment](https://omgskills.com/library/gopigment/index.md) · 23 stars
- [auditing-a-pigment-application](https://omgskills.com/library/gopigment/ai-plugins/skills/auditing-a-pigment-application/index.md) — Execution skill.
   - [@gopigment](https://omgskills.com/library/gopigment/index.md) · 23 stars
