name: coding-standards-enforcer
description: A comprehensive skill for enforcing project-specific architecture, styling, security, and quality rules. Use this skill when: (1) Reviewing code for compliance, (2) Generating new components or modules, (3) Refactoring existing code, or (4) Setting up a new project's coding standards.
Coding Standards Enforcer
This skill provides a complete framework for maintaining high code quality and architectural consistency across the project.
Core Workflows
1. Code Review & Auditing
Before approving any code, validte it against the Master Rules.
2. Mandatory Enforcement & Detection
To actively enforce these rules, use the bundled detection scripts. These MUST be run during CI or pre-commit.
- Architecture Audit: Run
scripts/audit/audit_engine.py .
- Scans for forbidden patterns (e.g., hardcoded secrets, relative imports, bad dependencies).
- Configured via
scripts/audit/detectors_config.json.
- Linter Config: Run
scripts/audit/generate_eslint.sh
- Generates a strict
.eslintrc.js that enforces clean code, accessibility, and hooks rules at the IDE level.
3. Feature Implementation
When building new features, consult the relevant domain-specific rules:
4. Project Setup
To initialize these rules in a new repository:
- Run
scripts/init_project_rules.sh to configure the project name and tokens.
- Use
assets/project-config.template.json to customize the strictness and tech stack.
Advanced References
[!NOTE]
Always prefer the "Single Source of Truth" defined in master-rules.json if there is a conflict.