Skip to main content

necronomicon: lint errors that explain themselves to coding agents. A spiral-eyed pixel robot, wrapped by a green tentacle, takes a dashed feed from a glowing, floating book.

necronomicon

PyPI crates.io Coverage License: Apache-2.0

A simple way to organize a repo's pre-commit hooks for progressive disclosure, steering coding agents toward the repo's conventions and intended architecture. Each rule pairs a command that finds violations with what to say about them: what's wrong, why the rule exists, and what to do instead. An agent sees a rule only when its commit breaks it, at the line it broke, with the long form one necro --explain away.

You write a rule; an agent's commit breaks it; pre-commit blocks it and pushes the why; the agent pulls the rest and commits the fix

Why not AGENTS.md

An instruction file is read every session, whether or not today's work touches it, and followed when the agent remembers to. A rule costs nothing until it's broken, and then it blocks the commit. Use both: AGENTS.md for orientation and a one-line pointer to the rules that shape the code, rules for every "never do X" a command can check. docs/agents-and-rules.md covers keeping the two in step.

Agent mind control

When an agent trips a rule, necro tells it just enough, and the rest is one command away. From examples/layers:

core-isolated:
  command: necro grep '^\s*(from|import)\s+app\b' -- 'src/core/*.py'
  message: core imports the app layer
  why: Core runs in tests without a database; importing app/ drags one in.
  fix: Take a port from core/ports.py as an argument; app/ passes the real one in.
  details: …   # the long form, and bad and good examples, for necro --explain
An agent that never read the rule commits from app.db import session in core. The commit fails, and 11 lines land in its context.
error[core-isolated]: core imports the app layer
 --> src/core/pricing.py:2:1
  |
2 | from app.db import session
  | ^^^^^^^^
  |
  = why: Core runs in tests without a database; importing app/ drags one in.
  = fix: Take a port from core/ports.py as an argument; app/ passes the real one in.
  = more: necro --explain core-isolated

necro: 1 error (core-isolated ×1)
It wants the bigger picture, so it runs the command it was handed and pulls 22 more.
$ necro --explain core-isolated
core-isolated: core imports the app layer

Why: Core runs in tests without a database; importing app/ drags one in.

Fix: Take a port from core/ports.py as an argument; app/ passes the real one in.

Core is the inner layer: app/ may import core, never the reverse.
Exceptions: none. Shared types move into core.

Bad:
    from app.db import session

    def price(order):
        return session.rates(order.region) * order.total

Good:
    from core.ports import Rates

    def price(order, rates: Rates):
        return rates.for_region(order.region) * order.total

Command: necro grep '^\s*(from|import)\s+app\b' -- 'src/core/*.py'

Re-steered, it takes rates: Rates as an argument, and the commit passes.

What necro is, and isn't

  • An organizer, not a parser. A rule's command is anything that prints one path[:line[:col]] per violation: necro grep for a pattern, a short script for more, or a tool you already run. necro owns the wording, allows and output, so rules work in any language.
  • A replacement for the lint script you'd write anyway. Repos that work with agents tend to grow a lint_style.py that greps for house rules and prints one-line errors. necro keeps those rules as config and adds the why, the fix and --explain.
  • Exceptions with reasons. necro-allow <rule>: <reason> in a comment on the line or the one above. An allow without a reason, or one that suppresses nothing, fails the run.
  • Packs for common languages. include: [necro:rust] adds Rust rules that default clippy leaves off, like no unwrap or expect outside tests, and necro:rust-style adds doc and naming conventions; necro:gdscript and necro:gdscript-style do the same for Godot, with gdtoolkit from the necronomicon[gdscript] extra and the project's own Godot for type errors and warnings; necro:python runs ruff and ty with the repo's own configuration, plus the checks ruff's defaults leave off (raise … from, is None, star imports, blanket noqa, f-strings in logging, annotations), with both from necronomicon[python], and necro:python-style adds docstrings, pathlib and a complexity limit; necro:agent-files keeps AGENTS.md, CLAUDE.md and skills where every coding agent finds them. Packs are versioned with necro; disable: turns one off, override: changes the paths it judges or its parameters, and necro --list shows what's on.
  • Fixes, when a rule knows one. necro grep --replace fixes a pattern in place, and autofix: names any other fixing command (a formatter, a script). necro --fix applies them, then says what it changed and which hits it couldn't fix.
  • A ratchet for rollout. Grandfather existing hits in a committed snapshot so new ones fail alone; refresh it deliberately as debt gets fixed. See Baseline.

Install

uv tool install necronomicon   # PyPI wheel around the necro binary, no Rust needed
pip install necronomicon       # the same wheel, into the current environment
cargo install necronomicon     # from crates.io, built from source

As a hook for prek or pre-commit, which installs the wheel into the hook's own environment:

- repo: local
  hooks:
    - id: necro
      name: necro
      entry: necro --fix
      language: python
      additional_dependencies: ['necronomicon']
      # The published hook declares pre-commit 3.0.0 as its floor.
      always_run: true
      require_serial: true

For necro:gdscript, install necronomicon[gdscript] instead, which pins gdtoolkit beside necro; its compile and warnings rules also need the Godot version project.godot names, as godot on PATH or $GODOT. For necro:python, necronomicon[python], which pins ruff and ty.

The runner passes the changed files, so a commit runs only the rules that concern them, and --fix applies the fixes rules carry, failing the commit until you re-stage, as a formatter does; in CI, prek run --from-ref origin/main --to-ref HEAD (or pre-commit run, the same) does it for a branch — that from-ref/to-ref form is the standard adopter pattern, and this repo dogfoods it through make check (every hook on every file) plus a full make necro. necro with no files checks everything.

The hook floats to the latest necronomicon on each fresh hook environment, which is how rule fixes reach you without a bump on your side — but any 0.x may break the format, so a breaking release would break your hook too. To pin instead, name the minor you last upgraded to: additional_dependencies: ['necronomicon==0.<minor>.*'].

As skill-only plugins (discovery and easy install; the binary above still runs the checks, no hooks or binaries ride along):

  • Claude Code: /plugin marketplace add WahahaYes/necronomicon, then /plugin install necronomicon@necronomicon.
  • Codex: codex plugin marketplace add WahahaYes/necronomicon, then install the necronomicon plugin (listing: .agents/plugins/marketplace.json).
  • OpenCode: no plugin file needed, .agents/skills is already a read path: npx skills add WahahaYes/necronomicon --skill necro-adopt -a opencode.

Skills for agents

npx skills add WahahaYes/necronomicon --skill necro-adopt gives a coding agent a skill for setting necro up in a repo. Its last step, necro skills install, adds two skills versioned with your necro: necro, for working with its hits, and necro-rules, for writing rules and keeping AGENTS.md in step. They go in .agents/skills, linked from .claude/skills; after an upgrade, necro --fix rewrites them. Pass -a <harness> (e.g. -a opencode) to write to one harness's skill dir explicitly; without it the tool detects the harness.

More

Pre-release (version 0): any 0.x may break the format. Licensed under Apache-2.0.

Metadata

Release files for necronomicon 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for necronomicon 0.6.0
File Size Uploaded Provenance Actions
necronomicon-0.6.0.tar.gz 117.5 kB With provenance Details for necronomicon-0.6.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for necronomicon 0.6.0
File Actions
necronomicon-0.6.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for necronomicon-0.6.0-py3-none-win_amd64.whl
necronomicon-0.6.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for necronomicon-0.6.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
necronomicon-0.6.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for necronomicon-0.6.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
necronomicon-0.6.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for necronomicon-0.6.0-py3-none-macosx_11_0_arm64.whl
necronomicon-0.6.0-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details for necronomicon-0.6.0-py3-none-macosx_10_12_x86_64.whl

Total release size: 8.6 MB

Release files / necronomicon-0.6.0.tar.gz

Download URL necronomicon-0.6.0.tar.gz
Size 117.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8bba5f34a708f47ea06fdbe910b408c232078421fc8789537f435e73e1b96f2e
BLAKE2b-256 checksum
How to use checksums
983124d242e413f67b0767f26b47e23de75667b19a96409d1517e987dcdc64e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Release files / necronomicon-0.6.0-py3-none-win_amd64.whl

Download URL necronomicon-0.6.0-py3-none-win_amd64.whl
Size 1.7 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
2fd99fa22030013ceec1e50981786c026a1bf74c92913fb1b96afaa14eeab675
BLAKE2b-256 checksum
How to use checksums
6776ddf754e3101d33e574014fc7cd817e9316d61505755fecb25ef0ba160f6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Release files / necronomicon-0.6.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL necronomicon-0.6.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 1.8 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
b619d8751950254814ba4c0b34e968c6223626791db806f0885763305a5029cf
BLAKE2b-256 checksum
How to use checksums
517c215be1c8a4c32c928115240abf1787dae112fa9342c20ffa8a3337bf4920
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Release files / necronomicon-0.6.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL necronomicon-0.6.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 1.7 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
23ab5d62f5618af6b87f74ee39ba45ecf287772f0f06e215f1910b69e266660e
BLAKE2b-256 checksum
How to use checksums
52bbd09ce52fe47aba9f16e466b6be90d1982001b30b6d707d8634dbb02e9445
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Release files / necronomicon-0.6.0-py3-none-macosx_11_0_arm64.whl

Download URL necronomicon-0.6.0-py3-none-macosx_11_0_arm64.whl
Size 1.6 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d8f0bd1bb0f33d9c95edcdbb36bca062eb7f18d729099a4f6fbff41e652f5e42
BLAKE2b-256 checksum
How to use checksums
60243aadc903c1ff2b21a24e8d4c849d2b217fb5274a1e1082158a82830bebe8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Release files / necronomicon-0.6.0-py3-none-macosx_10_12_x86_64.whl

Download URL necronomicon-0.6.0-py3-none-macosx_10_12_x86_64.whl
Size 1.7 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
c0c33be9cfc57357781df1ca203819c71950a522d6773afebbdb64bae406e9c6
BLAKE2b-256 checksum
How to use checksums
9d735d31eacb2f9a99e9aaf083a29e7023526ddee89a263832014cabe2fe656c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Security for necronomicon 0.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for necronomicon-0.6.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page