pi-verify

Pi extension that runs configurable, staged code verification checks.

Packages

Package details

extension

Install pi-verify from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-verify
Package
pi-verify
Version
0.1.1
Published
May 15, 2026
Downloads
55/mo · 17/wk
Author
conte777
License
MIT
Types
extension
Size
69.4 KB
Dependencies
0 dependencies · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./dist/index.js"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-verify

Pi extension that adds one configurable verification tool for staged code checks. It replaces the Claude Code verify and check-di skills with an npm-installable Pi extension.

Install

pi install npm:pi-verify

For project-local installation:

pi install -l npm:pi-verify

During local development in this repository:

npm install
npm run build
pi -e /absolute/path/to/pi-verify

Tool

  • verify_code — detects the project/profile and runs configured conditional stages.

verify_code accepts optional paths. If omitted, it uses git changed/untracked files. Use mode: "all" for full project verification. To run a single configured stage, pass stage, for example "go.di".

Built-in profiles

Go (go.mod)

  1. go test ./... -count=1
  2. go build ./...
  3. go vet ./...

Python (pyproject.toml)

  1. uv run pytest
  2. uv build when [project] or [build-system] exists
  3. uv run ruff check .
  4. uv run mypy . when [tool.mypy] exists

Frontend (package.json)

Uses Bun, pnpm, Yarn, or npm based on the lockfile:

  1. package-manager run test when scripts.test exists
  2. package-manager run build when scripts.build exists
  3. package-manager run lint when scripts.lint exists

Java Maven (pom.xml)

  1. mvn test
  2. mvn checkstyle:check when checkstyle is configured

Configuration

Place config in either:

  • .pi-verify.json
  • .pi/verify.json

User profiles merge with built-ins by id. A stage with the same id overrides built-in fields; a new stage is appended. Set top-level replaceDefaults: true to disable built-ins.

Each stage may define files and condition; the tool picks matching stages automatically and executes them sequentially.

See examples/.pi-verify.json.

Config shape

{
  "version": 1,
  "defaults": {
    "stopOnFailure": true,
    "timeoutMs": 120000,
    "outputMaxLines": 400,
    "outputMaxBytes": 16384
  },
  "profiles": [
    {
      "id": "go",
      "label": "Go",
      "markers": ["go.mod"],
      "files": ["**/*.go", "go.mod", "go.sum"],
      "stages": [
        {
          "id": "test",
          "label": "Go tests",
          "command": "go",
          "args": ["test", "./...", "-count=1"],
          "timeoutMs": 600000
        },
        {
          "id": "build",
          "label": "Go build",
          "command": "go",
          "args": ["build", "./..."],
          "timeoutMs": 600000
        },
        {
          "id": "lint",
          "label": "go vet",
          "command": "go",
          "args": ["vet", "./..."],
          "timeoutMs": 300000
        }
      ]
    }
  ]
}

A stage can use either command + args or run:

{ "id": "lint", "run": "pnpm eslint ." }

Supported stage conditions:

{
  "condition": {
    "exists": ["pyproject.toml"],
    "contains": { "path": "pyproject.toml", "regex": "^\\s*\\[tool\\.mypy\\]", "flags": "m" },
    "command": { "command": "test", "args": ["-f", "some-file"] }
  }
}

Also supported: all, any, and not nested conditions.

Publishing

npm version patch
npm publish

The package manifest contains:

{
  "keywords": ["pi-package"],
  "pi": { "extensions": ["./dist/index.js"] }
}