Agent skill
applying-clean-code
General syntax and naming rules to keep the codebase maintainable. Use for all code generation.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/applying-clean-code
SKILL.md
Clean Code Principles
When to use this skill
- Naming variables, functions, and files.
- Deciding on function size and complexity.
Principles
- Self-Documenting Names:
isBookingPending>status === 1. - DRY (Don't Repeat Yourself): If logic is duplicated, move it to a utility or hook.
- KISS (Keep It Simple, Stupid): Avoid over-engineering complex solutions for simple tasks.
- Constants: Use
constoverlet. Use uppercase constants for magic numbers/IDs:const MAX_GUESTS = 20;.
Naming Conventions
- Components: PascalCase (
TourCard.tsx). - Functions/Variables: camelCase (
handleSubmit). - Interfaces: PascalCase (
TourInfo). - Files: kebab-case or PascalCase (stay consistent with project structure).
Instructions
- Avoid Comments: Write code so clear that comments are mostly unnecessary. Only comment the "why," not the "what."
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?