Skip to content

/edikt:sync

Translate linter configs into Claude rule packs — so Claude enforces the same standards your linter does.

Usage

/edikt:sync              ← sync all detected linter configs
/edikt:sync golangci     ← sync only golangci-lint rules
/edikt:sync eslint       ← sync only ESLint rules
/edikt:sync ruff         ← sync only Ruff rules
/edikt:sync rubocop      ← sync only RuboCop rules
/edikt:sync biome        ← sync only Biome rules
/edikt:sync --dry-run    ← preview what would be generated

Arguments

ArgumentDescription
(none)Detect all linters and sync rules for all found
golangci or goSync only golangci-lint rules
eslintSync only ESLint rules
ruff or pythonSync only Ruff rules
rubocop or rubySync only RuboCop rules
biomeSync only Biome rules
--dry-runShow what would be generated without writing files
{linter} --dry-runPreview output for a specific linter only

What it does

Reads your existing linter configs (golangci-lint, ESLint, Ruff, RuboCop, Biome, PHP CS Fixer) and generates .claude/rules/linter-*.md files that teach Claude the same rules — with plain-English explanations of why each rule exists.

The result: Claude writes code that passes your linter on the first attempt, not after several correction rounds.

Supported linters

LinterConfig file
golangci-lint.golangci-lint.yaml, .golangci.yaml
ESLint.eslintrc*, eslint.config.*
Ruffruff.toml, pyproject.toml [tool.ruff]
RuboCop.rubocop.yml
Biomebiome.json
PHP CS Fixer.php-cs-fixer.php, .php-cs-fixer.dist.php

Monorepo support

In monorepos with per-package linter configs, edikt generates scoped rules with path prefixes so the right rules apply to the right directories.

Generated file format

markdown
---
source: .golangci-lint.yaml
generated-by: edikt:sync
linter: golangci-lint
paths: ["**/*.go"]
---

# Linter Rules: Go

<!-- edikt:generated -->

## cyclop — Cyclomatic Complexity
Keep functions simple. Max complexity: 10.
...

When to run

  • After adding or changing a linter config
  • After running /edikt:init on an established project (it runs sync automatically)
  • When /edikt:doctor warns "linter config changed since last sync"

Natural language triggers

  • "sync linter rules"
  • "update Claude with our lint config"
  • "translate our linter config"

Released under the Elastic License 2.0. Free to use, not for resale.