auto-enforcer-action

Enforce PR-scoped constraints from HARNESS.md via GitHub Actions and Claude API.

44|6|Updated Mar 30, 2026
One-click install
npx skills add https://github.com/Habitat-Thinking/ai-literacy-superpowers --skill auto-enforcer-action
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: auto-enforcer-action
Source: https://github.com/Habitat-Thinking/ai-literacy-superpowers/tree/main/ai-literacy-superpowers/skills/auto-enforcer-action
Command: npx skills add https://github.com/Habitat-Thinking/ai-literacy-superpowers --skill auto-enforcer-action

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The auto-enforcer closes the enforcement gap between deterministic CI checks and agent-based rules by running all PR-scoped constraints automatically on each pull request, preventing silent skips and surfacing AI findings to reviewers.

Core Features & Use Cases

  • Deterministic enforcement: Executes tool commands for deterministic constraints and fails the CI job when they return non-zero, preventing merges on violations.
  • Agent advisory checks: Sends PR diffs and rule text to the Claude API for agent-evaluated constraints and posts advisory findings as PR comments without blocking merges.
  • Data-driven configuration: Reads constraints from HARNESS.md at runtime so adding or changing rules requires no workflow modifications.
  • Use Case: Automatically check for missing frontmatter and secrets on every PR, failing the job for deterministic issues and posting AI-generated advisories for judgment-based rules.

Quick Start

Copy the ci-auto-enforcer.yml template into .github/workflows/auto-enforcer.yml and add ANTHROPIC_API_KEY as a repository secret to enable automatic PR checks.

Frequently Asked Questions about auto-enforcer-action

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce PR constraints using GitHub Actions?

Enforce PR constraints via GitHub Actions by copying the ci-auto-enforcer.yml template into your repository's workflow directory and adding the ANTHROPIC_API_KEY secret to run deterministic tool checks and agent evaluations on pull requests.

How do deterministic checks and agent advisories work for PR diffs?

Deterministic checks execute tool commands and fail CI on non-zero exits, while agent advisories send PR diffs and rules to the Claude API to post non-blocking AI findings as PR comments for reviewers.

Do I need a HARNESS.md file to enforce pull request checks?

Yes, you need a HARNESS.md file containing PR constraints. The auto-enforcer reads constraints from HARNESS.md at runtime, allowing you to add or change rules without modifying the GitHub Actions workflow.

Can I use Claude API for agent-based evaluation without blocking merges?

Yes, agent-based constraints send PR diffs and rule text to the Claude API and post advisory findings as PR comments without blocking merges, ensuring AI findings surface to reviewers without halting CI.

What's the best way to prevent silent skips of PR-scoped CI checks?

Prevent silent skips by running all PR-scoped constraints automatically on each pull request using the auto-enforcer GitHub Actions workflow, which closes the enforcement gap between deterministic CI and agent-based rules.