Quality Verification for Openclaw

A robust quality assurance framework for AI agents providing real-time linting, automated testing gates, and detailed performance metrics.

lanyasheng
v2.4.0
Apr 8, 2026
0
739
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install quality-verification

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install quality-verification using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Quality Verification?

Quality Verification is a specialized suite of Openclaw Skills designed to ensure the technical integrity of code generated by AI agents. It implements a shift-left strategy by executing immediate diagnostics after every file modification, preventing the propagation of syntax or type errors into subsequent development steps. By integrating directly into the agent's workflow, it acts as a continuous quality gate that maintains high standards for codebase health.

Beyond simple linting, this skill provides a rigorous verification layer that intercepts commit commands to run full project test suites. It ensures that an AI agent never commits broken code to the repository. Additionally, it features advanced session monitoring to track performance metrics like token usage and execution time, giving developers deep visibility into the efficiency of their AI-driven workflows.

Quality Verification Use Cases

  • Automatically running tsc or ruff immediately after an agent edits a file to catch type errors.
  • Intercepting git commit commands to force a successful test suite run before allowing changes.
  • Capturing per-turn performance metrics and token consumption for AI session monitoring.
  • Dynamically adjusting verification intensity based on environment profiles like strict or minimal.
  • Preventing broken code from entering the version history through automated quality gates.

How Quality Verification Works

  1. The AI agent performs a file modification using tools like Write or Edit, triggering the PostToolUse hook.
  2. The post-edit-check.sh script identifies the file extension and runs the appropriate diagnostic tool, such as tsc for TypeScript or ruff for Python.
  3. Diagnostic results are injected back into the agent's current context via additionalContext, allowing the agent to fix errors immediately.
  4. When the agent attempts a git commit, the PreToolUse hook intercepts the command to execute the project's test suite (e.g., npm test or pytest).
  5. If tests fail, the commit is denied, and the failure logs are provided to the agent for debugging; if they pass, the commit proceeds.
  6. Throughout the session, UserPromptSubmit and Stop hooks bracket each turn to record timing and token delta data into bracket.json.

Quality Verification Setup

To enable these Openclaw Skills, configure your .claude/settings.json with the following hook definitions:

{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": { "tool_name": "Write|Edit|MultiEdit" },
        "hooks": [
          {
            "type": "command",
            "command": "bash post-edit-check.sh \"$TOOL_INPUT_FILE_PATH\""
          }
        ]
      }
    ],
    "PreToolUse": [
      {
        "matcher": { "tool_name": "Bash", "input_contains": "git commit" },
        "hooks": [
          {
            "type": "command",
            "command": "bash test-before-commit.sh"
          }
        ]
      }
    ]
  }
}

You can also control the intensity via environment variables:

# Enable all quality gates for production-level changes
HARNESS_PROFILE=strict claude -p "Refactor core logic"

# Run with minimal overhead for quick experiments
HARNESS_PROFILE=minimal claude -p "Update documentation"

Quality Verification Data Schema & Taxonomy

The skill manages state and reporting through a clean, atomic filesystem structure:

File Type Description
bracket.json JSON Stores per-turn metrics including timestamps and token increments.
additionalContext String Dynamic injection of linter and test output into the LLM prompt.
*.json (State) JSON Uses atomic move operations (PID + timestamp) to prevent partial writes during concurrent processes.
session_hygiene Cleanup Automatically removes stale locks and orphaned worktrees after 24 hours.

Quality Verification Advanced Features

  • Support for multiple runtime profiles (minimal, standard, strict) via the HARNESS_PROFILE variable.
  • Granular control to disable specific hooks using the HARNESS_DISABLED_HOOKS environment variable.
  • Atomic State Writes using POSIX rename operations to ensure data consistency in multi-process environments.
  • Automated session hygiene that prunes stale recovery files and orphaned git worktrees.
  • Intelligent test command detection that prioritizes package.json, Makefile, pyproject.toml, and Cargo.toml.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*