heykvnzhao/dotfiles/coding-best-practices

Claude Code and agent skill by heykvnzhao/dotfiles

Trust tier 3
  • community
  • ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

General coding principles for writing clean, maintainable code. Use for development work, code reviews, refactoring, dependency changes, and design discussions about code structure, performance, and reliability.

Install

npx vskill@latest install heykvnzhao/dotfiles/coding-best-practices

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

Coding Best Practices

Core Principles

Fix Root Causes
  • Fix from first principles; find the source instead of applying bandaids
  • If a fix feels like a workaround, it probably is—dig deeper
Simplicity
  • Write idiomatic, simple, maintainable code
  • Prefer the most straightforward solution to the problem
  • Prefer small helpers or state-driven flow to keep cyclomatic complexity low
Quality Bar
  • Update tests (or add coverage) when behavior changes
  • Handle errors intentionally; avoid silent failures
  • Remove unintended debug logs; keep logs actionable and low-noise
Clean Up Ruthlessly
  • Leave each repo better than you found it
  • Delete unused code immediately—don't let junk linger (but keep cleanup local to what you touched unless the user asks for a wider refactor)
  • If a function no longer needs a parameter, remove it and update callers
  • If a helper is dead, delete it
No Breadcrumbs
  • When deleting or moving code, do not leave comments in the old location
  • No // moved to X, no // relocated—just remove it
  • Describe changes in your response, not in the code
Scope Control
  • Prefer small, reviewable changes over sweeping refactors
  • Avoid “drive-by” rewrites in unrelated areas
  • If a larger refactor is warranted, propose it explicitly and ask before proceeding

Code Organization

File Length
  • Use judgment based on complexity rather than strict line limits
  • Split files when they become difficult to navigate or understand
  • If a file has multiple distinct concerns, split it
  • Aim for files that can be read and understood in a single sitting
UI Component Files
  • For React: keep one primary component per file
  • Small helper components (variants, icon sets, button sizes) can coexist if they're tightly coupled
  • Group related components into folder structures (e.g., components/ for primary, components/Button/ with sub-components)
Separation Principles
  • Separate concerns when they can be used independently or tested in isolation
  • Types/interfaces that are shared across multiple files → types/ or @types
  • Utility functions used in multiple places → utils/ organized by domain
  • Custom hooks used by multiple components → hooks/
  • Constants and config → config/ or constants/
  • Keep things together that change together
Directory Structure
  • Organize by feature/domain, not by file type (e.g., auth/ not components/auth/, hooks/auth/)
  • Flatten directories when possible—avoid deep nesting
  • Use index/barrel files only when the repo already uses them and they don’t introduce dependency cycles or tooling issues

Dependencies

Before adding a new dependency:

  • Quick health check: recent releases/commits?
  • Reasonable adoption/community?
  • Actively maintained?
  • Does it solve a problem we can't easily solve ourselves?

When Unsure

  1. Read more code, documents, or files
  2. If still stuck, ask with short options
  3. If there are conflicts or ambiguity, call them out and take the safer path

Context Awareness

  • If project or repo-specific guidance conflicts with these rules, follow project guidance first
  • Assume other agents or the user might land commits mid-run; refresh context before summarizing or editing
  • If changes look unrecognized and continuing is problematic, stop and ask

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Refreshed 16 Mar 2026, 8 months ago.

Extension points

  • hookPre/post lifecycle hooks

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/heykvnzhao/dotfiles/coding-best-practices/badge)](https://verified-skill.com/skills/heykvnzhao/dotfiles/coding-best-practices)

Something wrong with this skill or its page? Tell us.