clean-code

Enforce coding standards and simplification principles across JavaScript, TypeScript, Bash, Python, and Lua.

Updated Mar 30, 2022
One-click install
npx skills add https://github.com/davidsu/dotfiles --skill clean-code-davidsu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-code
Source: https://github.com/davidsu/dotfiles/tree/main/claude/skills/clean-code.ln
Command: npx skills add https://github.com/davidsu/dotfiles --skill clean-code-davidsu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enforces coding standards to ensure all code is simple, readable, and maintainable, preventing technical debt and improving collaboration.

Core Features & Use Cases

  • Coding Standards Enforcement: Provides guidelines for writing clean, understandable code across multiple languages.
  • Simplification Principles: Emphasizes KISS (Keep It Simple, Stupid) and YAGNI (You Ain't Gonna Need It) to reduce complexity.
  • Use Case: When writing a new feature, this Skill ensures the code is not only functional but also easy for other developers to understand and modify in the future, adhering to best practices for naming, structure, and error handling.

Quick Start

Apply the clean-code skill to refactor the provided JavaScript function for simplicity and clarity.

Frequently Asked Questions about clean-code

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

FAQPage Schema
How do I enforce coding standards for multiple programming languages like JavaScript and Python?

To enforce coding standards across JavaScript, TypeScript, Python, Bash, and Lua, apply simplification principles like KISS and YAGNI to ensure code remains clear, maintainable, and readable. This approach prevents technical debt by standardizing naming, structure, and error handling.

What is the best way to refactor code to reduce complexity and improve maintainability?

The best way to refactor code for maintainability is to apply minimal nesting, clear naming, and explicit error handling. By focusing on the YAGNI principle, you eliminate unnecessary complexity and ensure the codebase stays simple and easy to modify for future development.

Does this clean code approach work with Neovim Lua scripts?

Yes, this clean code approach works with Neovim Lua scripts by enforcing explicit error handling and clear naming. It standardizes Lua code alongside JavaScript, TypeScript, Bash, and Python to ensure all configurations are readable and maintainable.

When should I use KISS and YAGNI principles in software engineering?

Use KISS and YAGNI principles in software engineering when writing new features to prevent over-engineering. These simplification principles reduce unnecessary complexity, ensuring your code is functional, easy for collaborators to understand, and free of speculative technical debt.

How do I simplify a JavaScript function for better readability and explicit error handling?

To simplify a JavaScript function for better readability, enforce minimal nesting and explicit error handling. Applying these coding standards reduces structural complexity and makes the logic immediately clear to other developers who need to modify or maintain the code.