new-rule

Guide phase-based creation of Claude Code rules, permissions, and hook scripts.

2|1|Updated Mar 24, 2026
One-click install
npx skills add https://github.com/enbiyagoral/.claude --skill new-rule
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: new-rule
Source: https://github.com/enbiyagoral/.claude/tree/main/.claude/skills/new-rule
Command: npx skills add https://github.com/enbiyagoral/.claude --skill new-rule

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps teams create and enforce Claude Code rules and controls to ensure consistent AI behavior across projects. It guides from idea to implementation, including rule file definitions, permission scopes, and hook-script considerations.

Core Features & Use Cases

  • Focused rule files govern Claude Code reasoning and behavior across surfaces (rules, permissions, hooks).
  • Phase-driven workflow guiding requirements gathering, state checks, surface selection, and the creation of consistent controls.
  • Use cases include standardizing policy enforcement in code reviews, CI pipelines, and developer tooling.

Quick Start

Ask Claude to start a new-rule workflow and follow the guided phases to create a rule.

Frequently Asked Questions about new-rule

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

FAQPage Schema
How do I create consistent Claude Code rules and permissions?

Claude Code rules require structured rule files with proper frontmatter, defined permission scopes, and hook scripts. A phase-driven workflow guides you through requirements gathering, state checks, and surface selection to ensure consistent enforcement across projects.

What are hook scripts used for in Claude Code enforcement?

Hook scripts in Claude Code enforce specific behaviors by executing checks during code reviews, CI pipelines, and developer tooling. They work alongside rule files and permissions to standardize policy enforcement and govern AI reasoning across different project surfaces.

Does Claude Code rule creation require conflict checks for permissions?

Yes, Claude Code rule creation involves conflict checks to ensure permission scopes do not contradict each other. The workflow verifies rule file frontmatter structure and validates that enforcement decisions remain consistent across surfaces before implementation.

What is the best way to standardize AI behavior across multiple Claude Code projects?

The best way to standardize AI behavior is by creating focused Claude Code rule files that govern reasoning across surfaces, combined with permission scopes and hook scripts. A phase-driven workflow ensures consistent policy enforcement from requirements gathering through implementation.

Can I use Claude Code rules for CI pipeline policy enforcement?

Yes, Claude Code rules can be applied to CI pipeline policy enforcement. The rule files and hook scripts integrate with developer tooling and CI pipelines to standardize AI behavior and enforce consistent controls across automated workflows.

When do I need to update Claude Code rule files and permissions?

You need to update Claude Code rule files and permissions when project requirements change or when conflict checks reveal inconsistencies. The phase-driven workflow supports maintenance by re-evaluating state checks, surface selection, and enforcement decisions.