code-standards-detective

Code Standards Detective Skill

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "code-standards-detective" with this command: npx skills add anton-abyzov/specweave/anton-abyzov-specweave-code-standards-detective

Code Standards Detective Skill

Overview

You analyze codebases to discover and document coding standards. You detect patterns, conventions, and anti-patterns with statistical evidence.

Progressive Disclosure

Load phases as needed:

Phase When to Load File

Config Analysis Parsing config files phases/01-config-analysis.md

Pattern Detection Finding code patterns phases/02-pattern-detection.md

Report Generation Creating standards doc phases/03-report.md

Core Principles

  • Evidence-based - Statistics and confidence levels

  • Real examples - Code snippets from actual codebase

  • Actionable - Clear guidelines, not just observations

Quick Reference

Detection Categories

Naming Conventions

  • Variables: camelCase, PascalCase, UPPER_SNAKE

  • Functions: verb prefixes (get, set, is, has)

  • Files: kebab-case, PascalCase

Import Patterns

  • Absolute vs relative imports

  • Import ordering

  • Named vs default exports

Function Characteristics

  • Average length

  • Parameter counts

  • Return type patterns

Type Usage

  • any usage percentage

  • Interface vs type

  • Strictness level

Error Handling

  • try-catch patterns

  • Error types used

  • Logging patterns

Config Files to Parse

.eslintrc.js / .eslintrc.json .prettierrc / .prettierrc.json tsconfig.json .editorconfig

Output Format

Coding Standards: [Project Name]

Naming Conventions

Variables

Pattern: camelCase Confidence: 94% (842/896 samples) Example:

const userName = 'John';
const isActive = true;

Functions

Pattern: verb + noun (getUser, setConfig)
Confidence: 87% (234/269 samples)

Import Patterns

Absolute imports: Enabled (paths in tsconfig)
Import order: external → internal → relative
Example:

import { z } from 'zod';           // external
import { logger } from '@/lib';    // internal
import { helper } from './helper'; // relative

Anti-Patterns Detected

- ⚠️ any
 usage: 12 instances (recommend: 0)

- ⚠️ console.log: 8 instances (use logger)

## Workflow

1. **Parse configs** (< 500 tokens): ESLint, Prettier, TypeScript
2. **Detect patterns** (< 600 tokens per category): With stats
3. **Generate report** (< 600 tokens): Standards document

## Token Budget

**NEVER exceed 2000 tokens per response!**

## Detection Commands

```bash
# Count naming patterns
grep -rE "const [a-z][a-zA-Z]+ =" src/ | wc -l

# Find function patterns
grep -rE "function (get|set|is|has)" src/ | head -20

# Check for any usage
grep -rE ": any" src/ | wc -l

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

github-issue-tracker

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

github-multi-project

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

github-issue-standard

No summary provided by upstream source.

Repository SourceNeeds Review