Skip to main content

Declarative agent hooks manager.

Project description

agenthook

Declarative agent hooks manager.

Overview

Lint hook for agentic coding (currently Claude Code only). Runs fix commands sequentially, then check commands in parallel, and blocks the edit on failure.

Requirements

Setup

.claude/settings.json:

{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Edit|MultiEdit|Write",
        "hooks": [
          {
            "type": "command",
            "command": "uvx agenthook",
            "timeout": 45
          }
        ]
      }
    ]
  }
}

See agenthook.example.yml for all available configuration options.

How it works

  1. Claude Code triggers the hook after each file edit (git-ignored files are skipped)
  2. Fix commands run sequentially (formatting, auto-fix)
  3. Check commands run in parallel (linting, type checking)
  4. On failure, the edit is blocked with a report describing the issues

Development

just setup-dev

Tooling

Dependencies

Automated via Renovate. Dependency update PRs are created automatically.

Release

Automated via release-please. Merge the auto-generated Release PR to bump version, update CHANGELOG.md, and create a tag.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agenthook-0.0.2.tar.gz (91.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agenthook-0.0.2-py3-none-any.whl (22.4 kB view details)

Uploaded Python 3

File details

Details for the file agenthook-0.0.2.tar.gz.

File metadata

  • Download URL: agenthook-0.0.2.tar.gz
  • Upload date:
  • Size: 91.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.1 {"installer":{"name":"uv","version":"0.11.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for agenthook-0.0.2.tar.gz
Algorithm Hash digest
SHA256 9dcee5dcd85c22c0f42c8ad522bdcfc051e5077ca28c758c52d6d9f5541434b4
MD5 777fa8d43d4776bcc47f0ad7f80eebbb
BLAKE2b-256 721800b418988095141f1bb5629b2518d12db8a6181473f3faa8faec7ed636ec

See more details on using hashes here.

File details

Details for the file agenthook-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: agenthook-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 22.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.1 {"installer":{"name":"uv","version":"0.11.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for agenthook-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 095633a9816028d8659fc6556584ab19a1161d0c87003053828c54c48d4b6b45
MD5 c70b824f361452ce3823bf21baa51d95
BLAKE2b-256 3a20f6257d0b76a991d0a99b22ae33db7fc696f63f15477805ce8ea8ff98ebc4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page