clj-kondo-3color
clj-kondo linter with Gay.jl 3-color integration for GF(3) conservation in Clojure code analysis.
Best use case
clj-kondo-3color is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
clj-kondo linter with Gay.jl 3-color integration for GF(3) conservation in Clojure code analysis.
Teams using clj-kondo-3color 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
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/clj-kondo-3color/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How clj-kondo-3color Compares
| Feature / Agent | clj-kondo-3color | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
clj-kondo linter with Gay.jl 3-color integration for GF(3) conservation in Clojure code analysis.
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
# clj-kondo 3-Color Integration
> *"A linter for Clojure code that sparks joy — now with deterministic color-coded diagnostics."*
## Overview
clj-kondo is a static analyzer and linter for Clojure. This skill integrates Gay.jl's 3-color streams for:
1. **Diagnostic classification** via GF(3) trit assignment
2. **Parallel linting** with SPI-compliant color forking
3. **Visual feedback** with deterministic color palettes
4. **Plurigrid/ASI alignment** for safety-aware linting
## Diagnostic Trit Mapping
| Trit | Level | Color Range | clj-kondo Level |
|------|-------|-------------|-----------------|
| -1 | MINUS | Cold (blue) | `:error` |
| 0 | ERGODIC | Neutral (green) | `:warning` |
| +1 | PLUS | Warm (red) | `:info` |
GF(3) Conservation: For any 3 consecutive diagnostics:
```
trit(d₁) + trit(d₂) + trit(d₃) ≡ 0 (mod 3)
```
## Configuration
### .clj-kondo/config.edn
```clojure
{:linters
{:unresolved-symbol {:level :error}
:unused-binding {:level :warning}
:type-mismatch {:level :error}}
;; Gay.jl color integration
:gay-colors
{:enabled true
:seed 0x42D
:trit-mapping {:error -1, :warning 0, :info 1}
:conservation :strict}}
```
### Plurigrid/ASI Safety Hooks
```clojure
;; .clj-kondo/hooks/gay_safety.clj
(ns hooks.gay-safety
(:require [clj-kondo.hooks-api :as api]))
(defn check-gf3-conservation
"Verify GF(3) conservation across findings."
[{:keys [findings]}]
(let [trits (map #(case (:level %)
:error -1
:warning 0
:info 1) findings)
sum (reduce + 0 trits)]
(when-not (zero? (mod sum 3))
(api/reg-finding!
{:message "GF(3) conservation violated"
:type :gay-conservation
:level :warning}))))
```
## Integration with SplitMixTernary
```clojure
(ns music-topos.clj-kondo-gay
(:require [clj-kondo.core :as clj-kondo]))
(def GOLDEN 0x9E3779B97F4A7C15)
(def MIX1 0xBF58476D1CE4E5B9)
(def MIX2 0x94D049BB133111EB)
(def MASK64 0xFFFFFFFFFFFFFFFF)
(defn splitmix64 [state]
(let [s (bit-and (+ state GOLDEN) MASK64)
z (bit-and (* (bit-xor s (unsigned-bit-shift-right s 30)) MIX1) MASK64)
z (bit-and (* (bit-xor z (unsigned-bit-shift-right z 27)) MIX2) MASK64)]
{:state s :value (bit-xor z (unsigned-bit-shift-right z 31))}))
(defn color-at [seed idx]
(loop [s seed i idx]
(if (zero? i)
(let [{:keys [value]} (splitmix64 s)]
{:L (+ 10 (* 85 (/ (double (bit-and value 0xff)) 255)))
:C (* 100 (/ (double (bit-and (unsigned-bit-shift-right value 8) 0xff)) 255))
:H (* 360 (/ (double (bit-and (unsigned-bit-shift-right value 16) 0xffff)) 65535))})
(recur (:state (splitmix64 s)) (dec i)))))
(defn color-finding [seed finding idx]
(let [color (color-at seed idx)
trit (case (:level finding) :error -1 :warning 0 :info 1)]
(assoc finding
:gay-color color
:gay-trit trit
:gay-hex (lch-to-hex (:L color) (:C color) (:H color)))))
(defn lint-with-colors [paths seed]
(let [result (clj-kondo/run! {:lint paths})
findings (:findings result)]
(assoc result
:findings (map-indexed (fn [i f] (color-finding seed f i)) findings)
:gf3-sum (reduce + 0 (map :gay-trit findings)))))
```
## Parallel Linting with SPI Guarantee
```clojure
(defn parallel-lint-files
"Lint files in parallel with deterministic coloring."
[files seed]
(let [child-seeds (for [i (range (count files))]
(bit-xor seed (* i GOLDEN)))]
(pmap (fn [[file child-seed]]
(lint-with-colors [file] child-seed))
(map vector files child-seeds))))
```
## Emacs Integration
```elisp
;; flycheck-clj-kondo-gay.el
(require 'flycheck)
(require 'gay)
(defun flycheck-clj-kondo-gay-colorize (errors)
"Colorize flycheck errors with Gay.jl colors."
(let ((idx 0))
(dolist (err errors)
(let* ((color (gay-color-at gay-seed-default idx))
(hex (gay-color-to-hex color)))
(overlay-put (flycheck-error-overlay err)
'face `(:background ,hex)))
(cl-incf idx))))
(add-hook 'flycheck-after-syntax-check-hook
#'flycheck-clj-kondo-gay-colorize)
```
## Plurigrid ASI Safety Integration
Plurigrid provides programmable guardrails for AI safety. clj-kondo integration:
```clojure
(ns music-topos.plurigrid-lint
(:require [music-topos.clj-kondo-gay :as linter]))
(defn safety-aware-lint
"Lint with ASI safety awareness."
[paths seed safety-config]
(let [result (linter/lint-with-colors paths seed)
findings (:findings result)]
;; Check for unsafe patterns
(doseq [f findings]
(when (and (= (:level f) :error)
(contains? (:unsafe-patterns safety-config) (:type f)))
(println "⚠️ ASI Safety Alert:" (:message f))))
result))
```
## Visual Output
```
┌─────────────────────────────────────────────────────────────────┐
│ CLJ-KONDO 3-COLOR REPORT │
├─────────────────────────────────────────────────────────────────┤
│ File: src/music_topos/core.clj │
│ │
│ ██ L1:15 :unresolved-symbol 'foo' trit: -1 (MINUS) │
│ ██ L5:22 :unused-binding 'x' trit: 0 (ERGODIC) │
│ ██ L8:10 :type-mismatch int/str trit: -1 (MINUS) │
│ │
│ GF(3): -1 + 0 + (-1) = -2 ≡ 1 (mod 3) ⚠️ │
│ Conservation: VIOLATED (adjust via info diagnostics) │
└─────────────────────────────────────────────────────────────────┘
```
## Commands
```bash
just clj-kondo-3color # Lint with 3-color output
just clj-kondo-gay-conservation # Check GF(3) conservation
just clj-kondo-parallel # Parallel lint with SPI
just clj-kondo-asi-check # Run with ASI safety hooks
```
## References
- [clj-kondo GitHub](https://github.com/clj-kondo/clj-kondo) (1.8k ⭐)
- [clj-kondo Configuration](https://cljdoc.org/d/clj-kondo/clj-kondo/2025.10.23/doc/configuration)
- [Plurigrid PolicyGrid](https://resources.aigr.id/16.3_PolicyGridxAIGrid/)Related Skills
zx-calculus
Coecke's ZX-calculus for quantum circuit reasoning via string diagrams with Z-spiders (green) and X-spiders (red)
zulip-cogen
Zulip Cogen Skill 🐸⚡
zls-integration
zls-integration skill
zig
zig skill
zig-syrup-bci
Multimodal BCI pipeline in Zig: DSI-24 EEG, fNIRS mBLL, eye tracking IVT, LSL sync, EDF read/write, GF(3) conservation
zig-programming
zig-programming skill
zeroth-bot
Zeroth Bot - 3D-printed open-source humanoid robot platform for sim-to-real and RL research. Affordable entry point for humanoid robotics.
xlsx
Comprehensive spreadsheet creation, editing, and analysis with support
wycheproof
Google's Wycheproof test vectors for cryptographic implementation testing.
Writing Hookify Rules
This skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
worldmat-tidar
worldmat-tidar
worlding
Gay.jl world_ pattern: persistent composable state builders with GF(3) conservation, Möbius invertibility, and Narya verification