When auditing code style use style audit

From DNYoussef/context-cascade · View interactive version

When auditing code style use style audit is an AI agent skill from the GitHub repository DNYoussef/context-cascade. [assert|neutral] Code style and conventions audit with auto-fix capabilities for comprehensive style enforcement [ground:given] [conf:0.95] [state:confirmed]

How to use this skill

Skill file

/============================================================================/

/* WHEN-AUDITING-CODE-STYLE-USE-STYLE-AUDIT SKILL :: VERILINGUA x VERIX EDITION */

/============================================================================/


name: when-auditing-code-style-use-style-audit

version: 1.0.0

description: |

[assert|neutral] Code style and conventions audit with auto-fix capabilities for comprehensive style enforcement [ground:given] [conf:0.95] [state:confirmed]

category: testing-quality

tags:

author: system

cognitive_frame:

primary: evidential

goal_analysis:

first_order: "Execute when-auditing-code-style-use-style-audit workflow"

second_order: "Ensure quality and consistency"

third_order: "Enable systematic testing-quality processes"


/----------------------------------------------------------------------------/

/* S0 META-IDENTITY */

/----------------------------------------------------------------------------/

[define|neutral] SKILL := {

name: "when-auditing-code-style-use-style-audit",

category: "testing-quality",

version: "1.0.0",

layer: L1

} [ground:given] [conf:1.0] [state:confirmed]

/----------------------------------------------------------------------------/

/* S1 COGNITIVE FRAME */

/----------------------------------------------------------------------------/

[define|neutral] COGNITIVE_FRAME := {

frame: "Evidential",

source: "Turkish",

force: "How do you know?"

} [ground:cognitive-science] [conf:0.92] [state:confirmed]

Kanitsal Cerceve (Evidential Frame Activation)

Kaynak dogrulama modu etkin.

/----------------------------------------------------------------------------/

/* S2 TRIGGER CONDITIONS */

/----------------------------------------------------------------------------/

[define|neutral] TRIGGER_POSITIVE := {

keywords: ["when-auditing-code-style-use-style-audit", "testing-quality", "workflow"],

context: "user needs when-auditing-code-style-use-style-audit capability"

} [ground:given] [conf:1.0] [state:confirmed]

/----------------------------------------------------------------------------/

/* S3 CORE CONTENT */

/----------------------------------------------------------------------------/

Code Style Audit with Auto-Fix

Kanitsal Cerceve (Evidential Frame Activation)

Kaynak dogrulama modu etkin.

Purpose

Perform comprehensive code style and conventions audit across the entire codebase with automated fix capabilities. Identifies style violations, enforces naming conventions, validates formatting, and applies automated corrections to ensure consistent code quality.

Core Principles

Phase 1: Scan Codebase

Objective

Identify all style violations, formatting issues, and convention inconsistencies across the codebase.

Agent Configuration

agent: code-analyzer
specialization: style-scanning
tools: ESLint, Prettier, TypeScript

Execution Steps

1. Initialize Style Scan

# Pre-task setup
npx claude-flow@alpha hooks pre-task \
  --agent-id "code-analyzer" \
  --description "Comprehensive code style scanning" \
  --task-type "style-scan"

# Restore session context
npx claude-flow@alpha hooks session-restore \
  --session-id "style-audit-${AUDIT_ID}" \
  --agent-id "code-analyzer"

2. ESLint Comprehensive Scan

# Run ESLint with all rules
npx eslint . \
  --ext .js,.jsx,.ts,.tsx \
  --format json \
  --output-file eslint-report.json \
  --max-warnings 0

# Separate auto-fixable vs manual issues
npx eslint . \
  --ext .js,.jsx,.ts,.tsx \
  --format json \
  --fix-dry-run > eslint-fixable-report.json

3. Prettier Formatting Check

# Check all supported file types
npx prettier --check "**/*.{js,jsx,ts,tsx,json,css,scss,md,yaml,yml}" \
  --list-different > prettier-violations.txt

# Check configuration consistency
npx prettier --find-config-path . > prettier-config-check.txt

4. TypeScript Style Validation

# Strict type checking
npx tsc --noEmit --strict --pretty false 2> typescript-strict-errors.txt

# Check for any types
grep -r ": any" src/ --include="*.ts" --include="*.tsx" > any-types.txt

# Check for implicit any
npx tsc --noImplicitAny --noEmit 2> implicit-any-errors.txt

5. Naming Convention Analysis

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.