write-laws

Create and manage laws for enforcing code standards with chp-law.

Updated Apr 25, 2026
One-click install
npx skills add https://github.com/code-highway-patrol/chp --skill write-laws
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-laws
Source: https://github.com/code-highway-patrol/chp/tree/main/.claude-plugin/plugins/chp/skills/write-laws
Command: npx skills add https://github.com/code-highway-patrol/chp --skill write-laws

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires chp-law, and includes scripts (resource) and references (resource) components.

What problem does it solve?

The write-laws skill addresses the challenge of manually enforcing code standards by allowing users to easily create, manage, and refine laws to enforce code standards and best practices within their repositories.

Core Features & Use Cases

  • Law Creation: Build new laws with custom rules and triggers, such as "new law", "create law", "write law", etc.
  • Law Management: Maintain and update existing laws, ensuring they remain effective over time.
  • Automated Enforcement: Enforce laws programmatically through hooks and automated checks.

Quick Start

Use the write-laws skill to create a new law that enforces code standards. Run 'chp-law create my-law --hooks=pre-commit' to start.

Frequently Asked Questions about write-laws

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

FAQPage Schema
How do I create custom rules to enforce code standards in my repository?

To enforce code standards, you can create custom rules by defining new laws with specific triggers. Use the command-line interface to build rules that automatically check repository practices and maintain code quality programmatically.

What are code enforcement laws and how do they work with automated hooks?

Code enforcement laws are custom rules that programmatically validate repository standards. They work by integrating with automated hooks, such as pre-commit, to execute checks and enforce coding best practices automatically during development workflows.

Do I need the chp-law command-line interface to manage code standards?

Yes, the chp-law command-line interface is a required dependency to create and manage code enforcement laws. You need this CLI installed to build custom rules, configure triggers, and execute automated checks within your repositories.

What's the best way to maintain and update existing code enforcement laws?

The best way to maintain code enforcement laws is to use the law management features to update existing rules over time. This ensures your custom triggers and automated checks remain effective and adapt to evolving code standards within your repositories.

Can I use custom triggers to automate code standard enforcement on specific events?

Yes, you can configure custom triggers to automate code standard enforcement. By setting up specific event hooks like pre-commit, the system automatically executes your defined laws to validate repository practices whenever those events occur.