nickel

Nickel configuration language with gradual typing, contracts, and dynamic sufficiency verification. Use for type-safe configs, transformation contracts, and validation pipelines.

16 stars

Best use case

nickel is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Nickel configuration language with gradual typing, contracts, and dynamic sufficiency verification. Use for type-safe configs, transformation contracts, and validation pipelines.

Teams using nickel should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/nickel/SKILL.md --create-dirs "https://raw.githubusercontent.com/plurigrid/asi/main/plugins/asi/skills/nickel/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/nickel/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How nickel Compares

Feature / AgentnickelStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Nickel configuration language with gradual typing, contracts, and dynamic sufficiency verification. Use for type-safe configs, transformation contracts, and validation pipelines.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Nickel Configuration Language

Gradual typing + contracts for configuration that composes correctly.

## Dynamic Sufficiency

A Nickel config is **dynamically sufficient** when:

1. **Structural**: Contract coverage is complete (all fields typed)
2. **Computational**: Same outputs for all valid inputs
3. **Semantic**: Olog types preserved through transformations

```nickel
# Sufficiency levels (from dynamic_sufficiency.jl)
let SufficiencyLevel = [|
  'NOT_SUFFICIENT,           # Different behavior
  'WEAKLY_SUFFICIENT,        # Same structure, different labels  
  'COMPUTATIONALLY_SUFFICIENT,  # Same outputs
  'SEMANTICALLY_SUFFICIENT      # Same olog meaning
|]
```

## Core Contracts

Import from workspace:
```nickel
let contracts = import ".topos/nickel/contracts/transformation-contracts.ncl"
```

Available contracts:
- `TransformationPattern` - rename/refactor operations
- `TransformationStrategy` - checkpoint + rollback + validation
- `BalancedTernarySelector` - GF(3) strategy selection (seed 1069)
- `ValidationResult` - gate pass/fail with exit codes

## Gradual Typing Pattern

```nickel
# Untyped (dynamic) - simple configs
{ name = "example", count = 42 }

# Typed block - contract enforcement
let typed_config : { name: String, count: Number } = 
  { name = "example", count = 42 }

# Contract annotation - runtime validation
let validated = config | TransformationStrategy
```

## Idempotent Contracts

```nickel
# Good: applying twice yields same result
let Positive = std.contract.from_predicate (fun x => x > 0)
5 | Positive | Positive  # ✓ idempotent

# Key property for dynamic sufficiency:
# ∀c: Contract, ∀x: (x | c) | c ≡ x | c
```

## Workspace Integration

| Path | Purpose |
|------|---------|
| `.topos/nickel/contracts/` | Reusable contract library |
| `.topos/nickel/examples/` | Transformation examples |
| `environment-specs/environments.ncl` | Flox env specs |
| `seth-rs/nickel/` | Pipeline + telemetry modules |

## CLI Usage

```bash
# Evaluate config
nickel eval config.ncl

# Type-check without eval
nickel typecheck config.ncl

# Export to JSON
nickel export config.ncl --format json

# REPL
nickel repl
```

## GF(3) Integration

```
Trit: 0 (ERGODIC - synthesis/validation)
Home: Prof
Poly Op: ⊗
Color: #FFFF00
```

Triadic pairing:
- `dune-analytics` (+1) - expanding/querying
- `nickel` (0) - contract validation
- `sicp` (-1) - foundational evaluation

## Dynamic Sufficiency Verification

```nickel
# Verify sufficiency between two configs
let verify_sufficiency = fun cfg1 cfg2 =>
  let fields1 = std.record.fields cfg1 in
  let fields2 = std.record.fields cfg2 in
  if std.array.all (fun f => std.array.elem f fields2) fields1
  then 'COMPUTATIONALLY_SUFFICIENT
  else 'NOT_SUFFICIENT
```

Related Skills

jepsen-testing

16
from plurigrid/asi

Jepsen-style correctness testing for distributed systems under faults (partitions, crashes, clock skew) using concurrent operation histories and formal checkers (linearizability/serializability and Elle-style anomalies). Use when designing, implementing, or running Jepsen tests, or interpreting histories/violations.

Deterministic Color Generation via Metadata Hashing

16
from plurigrid/asi

**Status**: ✅ Production Ready

cyton-dongle

16
from plurigrid/asi

Connect and stream from OpenBCI Cyton/Daisy via USB dongle, including first-time radio channel pairing

asi-transient-agenda

16
from plurigrid/asi

Org-agenda-like transient views for ASI skill orchestration via nbb/squint + Emacs hydra

Topological Superintelligence (TSI)

16
from plurigrid/asi

Compositional AI framework using GF(3) triadic balance and category-theoretic foundations.

zx-calculus

16
from plurigrid/asi

Coecke's ZX-calculus for quantum circuit reasoning via string diagrams with Z-spiders (green) and X-spiders (red)

zulip-cogen

16
from plurigrid/asi

Zulip Cogen Skill 🐸⚡

zls-integration

16
from plurigrid/asi

zls-integration skill

zig

16
from plurigrid/asi

zig skill

zig-syrup-bci

16
from plurigrid/asi

Multimodal BCI pipeline in Zig: DSI-24 EEG, fNIRS mBLL, eye tracking IVT, LSL sync, EDF read/write, GF(3) conservation

zig-programming

16
from plurigrid/asi

zig-programming skill

zeroth-bot

16
from plurigrid/asi

Zeroth Bot - 3D-printed open-source humanoid robot platform for sim-to-real and RL research. Affordable entry point for humanoid robotics.