coding-standard-writer

Generate a project-specific coding standards document from source patterns.

3|1|Updated Apr 12, 2026
One-click install
npx skills add https://github.com/Cogni-AI-OU/cogni-ai-agent-skills --skill coding-standard-writer
Or copy as Structured Prompt for Agentā–¼
Please help me install this Agent Skill.
Skill: coding-standard-writer
Source: https://github.com/Cogni-AI-OU/cogni-ai-agent-skills/tree/main/coding-standard-writer
Command: npx skills add https://github.com/Cogni-AI-OU/cogni-ai-agent-skills --skill coding-standard-writer

SYSTEM DOCUMENTATION & REQUIREMENTS

šŸ’” This Skill includes references (resource) components.

What problem does it solve?

coding-standard-writer helps teams avoid inconsistent, opinion-based coding rules by deriving a coding standards document directly from the existing codebase.

Core Features & Use Cases

  • Empirical majority inference: Detects indentation, naming conventions, comment styles, string quoting, and nesting patterns from provided files or folders.
  • Inconsistency reporting (and optional fixes): Highlights formatting inconsistencies and only fixes them when explicitly requested, with an emphasis on validation via project tooling.
  • Template-based document output: Produces a minimal or verbose style guide and writes it to a new file or inserts it into the appropriate section of README-style documentation.

Quick Start

Use coding-standard-writer to create a STYLE.md by inferring conventions from the ./src folder.

Frequently Asked Questions about coding-standard-writer

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

FAQPage Schema
How do I generate a coding style guide from an existing codebase?ā–¼

To generate a coding style guide, you can analyze your source files to empirically infer dominant syntax and formatting patterns, then output a STYLE.md or CONTRIBUTING.md document reflecting those majority-rule conventions.

Can I automatically fix formatting inconsistencies when generating coding standards?ā–¼

You can optionally apply non-destructive fixes for formatting inconsistencies detected during code analysis, but the tool only modifies code when explicitly requested and emphasizes validation via project linting tooling.

What is the best way to document repository conventions across multiple programming languages?ā–¼

Documenting repository conventions across multiple languages involves analyzing provided files or folders to infer dominant patterns, reconciling inconsistencies, and generating a unified style guide that reports conflicts across all detected languages.

How does empirical code analysis detect existing coding conventions?ā–¼

Empirical code analysis detects existing coding conventions by scanning source contents to identify dominant indentation, naming styles, comment formats, string quoting, and nesting patterns through majority-rule selection from the provided files.

When should I not use an automated tool to create a coding standards document?ā–¼

You should avoid using an automated tool to create a coding standards document when your codebase lacks a dominant, consistent formatting pattern, as the tool relies on majority-rule inference and will only report unresolved conflicts rather than enforcing arbitrary rules.

Does coding-standard-writer work with existing README documentation?ā–¼

Yes, it can insert the generated coding standards content directly into the appropriate section of existing README-style documentation, or write the conventions to a new STYLE.md or STYLEGUIDE.md file.