Agent skill

Pure Code Style

by finos in finos/legend-engine

Reformats a .pure file (or a block of Pure code) to a consistent house style: 2-space indentation with no column-aligned hanging indents, tight colons in type annotations, spaced pipes on…

Apache-2.0Auto-check passed

Install Pure Code Style

skills CLI
$ npx skills add finos/legend-engine --skill pure-code-style -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install finos/legend-engine pure-code-style --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/finos/legend-engine.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/pure-dev/skills/pure-code-style .claude/skills/pure-code-style && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
pure-code-style
GitHub stars
112
Token cost
~1.6k tokens
SKILL.md length
695 words
Files
1
Skills in repo
15
Repo updated
First seen
Licence
Apache-2.0

At a glance

Reformats a .pure file (or a block of Pure code) to a consistent house style: 2-space indentation with no column-aligned hanging indents, tight colons in type annotations, spaced pipes on…

  • Works in 6 steps: Indentation: 2 spaces per nesting level → Type annotations: no space around → Pipe (|) spacing: space on both sides,… → …
  • Asked to format this Pure file
  • SKILL.md covers Rules, Applying this to a file and Scope
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Pure Code Style is an agent skill from finos/legend-engine. Reformats a .pure file (or a block of Pure code) to a consistent house style: 2-space indentation with no column-aligned hanging indents, tight colons in type annotations, spaced pipes on if/match/lambda branches, one-parameter-per-line for long function signatures, and no stray blank lines or trailing whitespace. Whitespace-only - never changes tokens, logic, or semantics. Use when asked to 'format this Pure file', 'clean up the formatting', 'make this more readable', 'fix indentation', or 'make the style…

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The licence is Apache-2.0.

When your agent uses it

  • Asked to format this Pure file
  • Clean up the formatting
  • Make this more readable
  • Fix indentation

Example prompts

  • “format this Pure file”
  • “clean up the formatting”
  • “make this more readable”
  • “/pure-code-style”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Indentation: 2 spaces per nesting level
  2. Type annotations: no space around
  3. Pipe (|) spacing: space on both sides, with one carve-out
  4. Long function signatures: one parameter per line
  5. Blank lines
  6. No trailing whitespace

What it can do on your machine

Read from SKILL.md and the folder at commit 1c701e1. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Pure Code Style loads about 1.6k tokens when it runs. Until then it costs about 139 tokens; SKILL.md has 695 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~139
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from finos/legend-engine at commit 1c701e1, republished under its Apache-2.0 licence (© finos). 695 words, ~1,564 tokens.

Download SKILL.mdSave it as .claude/skills/pure-code-style/SKILL.md (or your agent's skills folder).
name
pure-code-style
description
Reformats a .pure file (or a block of Pure code) to a consistent house style: 2-space indentation with no column-aligned hanging indents, tight colons in type annotations, spaced pipes on if/match/lambda branches, one-parameter-per-line for long function signatures, and no stray blank lines or trailing whitespace. Whitespace-only - never changes tokens, logic, or semantics. Use when asked to 'format this Pure file', 'clean up the formatting', 'make this more readable', 'fix indentation', or 'make the style consistent' on .pure source.

Pure code style

A whitespace-only formatting pass for .pure source. Every rule below changes layout, never tokens — the function/class declarations, expressions, and comments must be byte-identical modulo whitespace before and after. This is not a logic refactor: don't rename, reorder, inline, or alter any expression while applying it.

Rules

1. Indentation: 2 spaces per nesting level

No tabs. No column-aligned "hanging indent to match the opening paren" style — that's what makes large Pure files look ragged as expressions get edited over time. Every continuation line is indented exactly 2 spaces from the line that opened its block, not aligned to wherever a paren or earlier token happened to land.

// Before (column-aligned, drifts every time something upstream gets renamed)
let x = someCall(a, b,
                  c, d);

// After (fixed 2-space continuation)
let x = someCall(a, b,
  c, d);
2. Type annotations: no space around :

Function parameters and Class properties: name:Type[mult], never name: Type[mult] or name :Type[mult]. This is the single most common inconsistency in hand-edited Pure files — the same function signature often mixes both within one parameter list.

// Before
function f(a:String[1], b: Integer[1], c :Boolean[1]):String[1]

// After
function f(a:String[1], b:Integer[1], c:Boolean[1]):String[1]
3. Pipe (|) spacing: space on both sides, with one carve-out

| introduces a lambda body in Pure, and it shows up in three shapes. Two of them always get a space on both sides; the third stays tight by established codebase convention:

  • if(...)/branch pipes (zero-arg lambda): | thenBranch, not |thenBranch.
  • match() arms (typed single-arg lambda): binding:Type[mult] | body, not binding:Type[mult]|body.
  • Short inline map/filter callbacks (untyped single-arg lambda used as a tight one-liner): stays tight, no space — map(x|$x->foo()), not map(x | $x->foo()). This is the one deliberate exception; it matches how these appear throughout the existing codebase and keeps short ->map(...)/->filter(...) chains compact.
// Before
if($x->isEmpty(),
  |$default,
  |$x->toOne()
);
$v->match([
  s:String[1]|$s->toUpper(),
  a:Any[1]|$a->toString()
]);

// After
if($x->isEmpty(),
  | $default,
  | $x->toOne()
);
$v->match([
  s:String[1] | $s->toUpper(),
  a:Any[1] | $a->toString()
]);

// Unchanged either way - short inline callback stays tight
$xs->map(x|$x->toOne())

Multi-param lambdas passed to fold/similar ({a, b | ...}) also get spaces around |, same as match arms — only the single-arg short callback shape stays tight.

4. Long function signatures: one parameter per line

A signature that's hard to scan at a glance (rule of thumb: over ~140 characters, or 4+ parameters with non-trivial types) breaks onto multiple lines — one parameter per line, each indented 2 spaces under function, with the closing ) and return type on their own line back at the base indent:

// Before
function meta::foo::bar(a:TypeA[1], b:TypeB[1], c:Function<{X[1] -> Y[1]}>[1], d:DebugContext[1]):Result[1]

// After
function meta::foo::bar(
  a:TypeA[1],
  b:TypeB[1],
  c:Function<{X[1] -> Y[1]}>[1],
  d:DebugContext[1]
):Result[1]

Short signatures that already read fine on one line stay on one line — don't break a signature just because a rule says "always break", only because it's genuinely hard to scan. Splitting at the top-level parameter commas is the hard part here: commas inside a parameter's own generic (Map<String, AccessorQualifier>) or function type (Function<{A[1], B[1] -> C[1]}>) are not split points. When in doubt, do this by hand per signature rather than with a blind comma-splitting regex — a wrong split silently breaks the file.

Show full SKILL.md (284 more words)Show less
5. Blank lines

Exactly one blank line between top-level declarations (functions, classes). Never a blank line immediately after the opening { or immediately before the closing } of a function body. Never two consecutive blank lines anywhere, including right after the import block.

6. No trailing whitespace

Strip trailing spaces/tabs from every line.

Applying this to a file

  1. Before touching anything, capture a declaration inventory so you can prove nothing was dropped or duplicated: grep -c "^function\|^Class " <file>.pure, and ideally a list of the actual function/Class signatures (name + arity), since a reformat is exactly the kind of change where a copy/paste slip silently drops or duplicates a block.
  2. Reformat. For anything beyond trivial whitespace/indent fixes (i.e. rule 4's signature splitting), do it by hand, function by function, rather than with a single generic regex pass — Pure's generics and function types make "split on every comma" unsafe. Simple mechanical fixes (rules 2, 3, 5, 6) are safe to script with a line-based pass, since they never need to know where a parameter boundary is.
  3. Re-run the same inventory command and diff it against the before-snapshot — the set of declaration names and their counts must match exactly.
  4. If a build/compile loop is available for the project (e.g. pure-lsp-check for a fast single-file check, or the project's own Maven/LSP build), run it. Formatting changes should never fail a build; if one does, you introduced a real change, not a whitespace one — find and fix it before calling the pass done.

Scope

This is a per-file or per-diff pass, not a repo-wide sweep. Apply it to the file(s) the user names, not every .pure file in the project, unless explicitly asked to do a full-codebase pass.

© finos, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/pure-dev/skills/pure-code-style of finos/legend-engine.

Open the folder on GitHubat commit 1c701e1

Compare with similar skills

Pure Code Style next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Pure Code Style compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Pure Code Style this skillfinos/legend-engine112—~1.6kAutomated safety check: PassApache-2.0
Render Blockingthedaviddias/Front-End-Checklist74k—~430Automated safety check: PassMIT
Blocking IO Guardbytedance/deer-flow83k—~1.7kAutomated safety check: PassMIT
Color Blockingsickn33/agentic-awesome-skills47k1 repos~2.4kAutomated safety check: PassMIT
Add Block Previewsimstudioai/sim30k—~1.3kAutomated safety check: PassApache-2.0
Add Blocksimstudioai/sim30k—~10kAutomated safety check: PassApache-2.0

Similar skills

  • Render Blocking

    thedaviddias/Front-End-Checklist

    A skill your agent uses when auditing slow page loads, heavy assets, or rendering delays related to Eliminate render-blocking resources.

    74k GitHub stars~430 tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Blocking IO Guard

    bytedance/deer-flow

    Adds a runtime test anchor for backend async code that could block the asyncio event loop, and proves the anchor fails when the blocking call returns.

    83k GitHub stars~1.7k tokensUpdated today
    DevelopmentAuto-check passed
  • Color Blocking

    sickn33/agentic-awesome-skills

    Web and App implementation guide for Color Blocking. An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 1 repo~2.4k tokens
    MobileAuto-check passed
  • Add Block Preview

    simstudioai/sim

    Gate a block's visibility — ship an unreleased block as a preview (hidden until revealed via AppConfig/env), reveal it to admins/orgs, GA it, or kill-switch a shipped block

    30k GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Add Block

    simstudioai/sim

    Create or update a Sim integration block with correct subBlocks, conditions, dependsOn, modes, canonicalParamId usage, outputs, and tool wiring.

    30k GitHub stars~10k tokensUpdated today
    Backend & APIsAuto-check passed
  • Link In Text Block

    thedaviddias/Front-End-Checklist

    A skill your agent uses when applies to hyperlinks (<a elements) that appear inline within paragraphs or text blocks.

    74k GitHub stars~918 tokensUpdated yesterday
    Frontend & DesignAuto-check passed

More from finos/legend-engine

All 15 skills in this repo
  • Pure Backend Start

    finos/legend-engine

    Starts (or confirms) the standalone legend-engine backend - engine Server + H2 + local metadata server on fixed ports 9095/9092 - so a Pure LSP started with -Dlegend.test.

    112 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Pure Chain Update

    finos/legend-engine

    Procedure for git-syncing and rebuilding a local legend-pure + legend-engine checkout, in dependency order, with pinned dependency versions resynced.

    112 GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Pure Lsp Check

    finos/legend-engine

    Compiles/checks a single .pure file against the already-running Legend Pure LSP bridge and reports diagnostics (errors/warnings) in under a second, as a fast alternative to a full mvn test/mvn…

    112 GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Pure Lsp Connect

    finos/legend-engine

    Attaches the pure-lsp HTTP bridge to an LSP daemon that is ALREADY running (e.g.

    112 GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Pure Lsp Execute

    finos/legend-engine

    Runs exactly ONE existing Pure function by path (signature, mangled id or bare path) through the running Legend Pure LSP bridge, without a go() wrapper, and returns its typed value in returnValue.

    112 GitHub stars~883 tokensUpdated today
    Auto-check passed
  • Pure Lsp Execute Parallel

    finos/legend-engine

    Runs 2 to 30 Pure functions or tests concurrently on the warm LSP daemon via pure-lsp execute-parallel, or every test in a package or .pure file with --package/--source.

    112 GitHub stars~927 tokensUpdated today
    Auto-check passed

Questions about Pure Code Style

What does Pure Code Style do?

Reformats a .pure file (or a block of Pure code) to a consistent house style: 2-space indentation with no column-aligned hanging indents, tight colons in type annotations, spaced pipes on…. Pure Code Style is an agent skill from finos/legend-engine.pure file (or a block of Pure code) to a consistent house style: 2-space indentation with no column-aligned hanging indents, tight colons in type annotations, spaced pipes on if/match/lambda branches, one-parameter-per-line for long function signatures, and no stray blank lines or trailing whitespace.

When should I use Pure Code Style?

Pure Code Style fits situations like: asked to format this Pure file; clean up the formatting; make this more readable; fix indentation.

How do I install Pure Code Style in Claude Code?

Run `npx skills add finos/legend-engine --skill pure-code-style -a claude-code`. Or copy the skill folder (plugins/pure-dev/skills/pure-code-style in finos/legend-engine) into .claude/skills/pure-code-style in your project. Claude Code loads it when a task matches its description.

How do I install Pure Code Style in Codex?

Run `npx skills add finos/legend-engine --skill pure-code-style -a codex`. Or copy the skill folder (plugins/pure-dev/skills/pure-code-style in finos/legend-engine) into .agents/skills/pure-code-style in your project. Codex loads it when a task matches its description.

Can I use Pure Code Style in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add finos/legend-engine --skill pure-code-style -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pure-code-style, .gemini/skills/pure-code-style, .github/skills/pure-code-style and .opencode/skills/pure-code-style in your project.

What does Pure Code Style need to run?

SKILL.md names no scripts, command-line tools or credentials: Pure Code Style is instructions for the agent only.

Does Pure Code Style access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Pure Code Style safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Pure Code Style use?

Pure Code Style is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Pure Code Style use?

About 1.6k tokens (SKILL.md is roughly 6.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Pure Code Style?

Skills that share tags, products or a category with Pure Code Style: Render Blocking (thedaviddias/Front-End-Checklist, 74k stars), Blocking IO Guard (bytedance/deer-flow, 83k stars), Color Blocking (sickn33/agentic-awesome-skills, 47k stars) and Add Block Preview (simstudioai/sim, 30k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Pure Code Style?

finos (a GitHub organization) maintains it in finos/legend-engine, which has 112 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on October 7, 2026.

Source: finos/legend-engine on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.