pomterre

Ccguard — Development skill for Claude Code

Development community intermediate

Automated enforcement of net-negative LOC, complexity constraints, and quality standards for Claude code.

How to install Ccguard

This entry records only its repository, not the path inside it, so there is no exact command to give. Open pomterre/ccguard and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Ccguard does

[](https://www.npmjs.com/package/ccguard) [](LICENSE)

Alternatives in Development

  • Mono Color Skill — One-ink editorial print image skill — warm paper, halftone photography, active negative space, and restrained 3k ★
  • Maestro Next — Unified entry for all development intents — classify intent, assess complexity, route to the correct execution 530 ★
  • Simplify — Reduce complexity without changing behavior — code simplification 263 ★

README

🚨 CCGuard

[](https://www.npmjs.com/package/ccguard) [](LICENSE)

**Automated enforcement of net-negative LOC, complexity constraints, and quality standards for Claude code**

📌 **New in v0.1.4**: The [Snapshot Strategy](#snapshot-strategy-recommended-as-of-v014) is now the recommended approach for more robust session-wide LOC tracking.

🔒 **New**: File locking feature to protect critical files from any modifications.


🎯 Overview

**CCGuard** ensures your codebase stays lean by blocking changes that exceed your configured line count threshold during Claude coding sessions. By default, it enforces net-negative changes (no increase allowed), but can be configured with a positive lines buffer for flexibility. It encourages simplicity, thoughtful refactoring, and a cleaner, maintainable codebase.

CCGuard blocking a file edit that would increase total lines of code


CCGuard preventing code bloat during refactoring operations


✅ Key Benefits

  • Flexible Enforcement: Strict net-negative by default, but configurable with positive line buffer
  • Simplicity Focus: Keeps your code concise by limiting unnecessary additions
  • Promotes Refactoring: Encourages rethinking and optimizing existing code
  • Progress Insights: Provides real-time session statistics
  • Easy Control: Simple toggling for flexible enforcement
  • File Protection: Lock critical files to prevent accidental modifications

🛠️ Installation

Ensure you have:

  • Node.js 18+
  • Claude Code

Install CCGuard CLI globally:

npm install -g ccguard

🚀 Quick Start

1️⃣ Configure Claude Code Hooks

CCGuard requires two hooks to be configured in Claude Code:

A. PreToolUse Hook (for LOC enforcement)

...