Global Coding Style

Apply consistent naming, formatting, and DRY refactoring across code files.

Updated Mar 13, 2023
One-click install
npx skills add https://github.com/pdovhomilja/dovhomilja-cz --skill global-coding-style-pdovhomilja
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Global Coding Style
Source: https://github.com/pdovhomilja/dovhomilja-cz/tree/main/.claude/skills/global-coding-style
Command: npx skills add https://github.com/pdovhomilja/dovhomilja-cz --skill global-coding-style-pdovhomilja

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill ensures all code adheres to established naming conventions, formatting rules, and the DRY principle, enhancing readability, maintainability, and consistency across the entire codebase, regardless of the programming language.

Core Features & Use Cases

  • Consistent Formatting: Apply project-wide indentation, line breaks, and consistent code structure.
  • Descriptive Naming: Choose clear, descriptive names for variables, functions, and classes that reveal intent.
  • DRY Principle: Extract common logic into reusable functions to avoid duplication and promote maintainability.
  • Use Case: When refactoring a utility file, this skill guides the AI to rename variables for clarity, break down a large function into smaller, focused ones, remove dead code, and ensure consistent formatting using the project's linter rules.

Quick Start

Refactor the 'calculateDiscount' function to improve readability, ensure consistent naming, and extract any duplicated logic into a reusable helper function.

Frequently Asked Questions about Global Coding Style

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

FAQPage Schema
How do I apply consistent coding style across multiple programming languages?

Consistent coding style applies across all languages—TypeScript, JavaScript, Python, Ruby, Java, Go, and others—by enforcing unified naming conventions, formatting rules, and indentation standards project-wide. This approach standardizes variable and function names, removes dead code and unused imports, and ensures every file follows the same structural patterns regardless of language.

What's the best way to refactor code for readability and maintainability?

Refactor code by applying descriptive naming to variables and functions, breaking large functions into smaller focused ones, extracting duplicated logic into reusable helpers, and enforcing consistent formatting with linter rules. This process improves readability, eliminates redundancy, and ensures the codebase adheres to DRY principles.

How do I enforce the DRY principle across my codebase?

The DRY principle is enforced by identifying duplicated logic, extracting common patterns into reusable functions, and maintaining consistent naming and formatting across all files. This reduces code duplication, simplifies maintenance, and prevents inconsistencies that breed bugs.

Can I use coding style rules with my existing linters and formatters?

Yes, coding style enforcement integrates with your project's linter and formatter configurations. Configure your existing tools to apply global naming conventions, indentation standards, and formatting rules, then apply them consistently across all file types and languages in your codebase.

Do I need dead code removal as a separate step from style enforcement?

Dead code removal is part of style enforcement. Applying global coding standards includes removing unused imports, eliminating unreachable code, and cleaning out unused variables and functions, which streamlines the codebase and reduces technical debt alongside formatting improvements.

What happens when I refactor a large utility file for consistency?

Refactoring a utility file applies descriptive naming to unclear variables, breaks monolithic functions into smaller, focused ones, extracts shared logic into helpers, removes dead code, and ensures consistent formatting. The result is a cleaner, more maintainable file that adheres to project standards.