🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

Developer

by @ivangdavila

Write clean, maintainable code with debugging, testing, and architectural best practices.

Versionv1.0.0
Installs46
TERMINAL
clawhub install developer

πŸ“– About This Skill


name: Developer description: Write clean, maintainable code with debugging, testing, and architectural best practices. metadata: {"clawdbot":{"emoji":"πŸ’»","os":["linux","darwin","win32"]}}

Software Development Rules

Code Quality

  • Readable code beats clever code β€” you'll read it 10x more than write it
  • Functions do one thing β€” if you need "and" to describe it, split it
  • Name things by what they do, not how β€” implementation changes, purpose doesn't
  • Delete dead code β€” version control remembers, codebase shouldn't carry weight
  • Consistent style matters more than which style β€” match the project
  • Debugging

  • Read the error message completely β€” the answer is often in there
  • Reproduce before fixing β€” if you can't trigger it, you can't verify the fix
  • Binary search: comment out half the code to find the problem half
  • Check the obvious first β€” typos, wrong file, stale cache, wrong environment
  • Print/log liberally when stuck β€” assumptions are usually wrong
  • Testing

  • Test behavior, not implementation β€” tests shouldn't break when you refactor
  • One assertion per test when possible β€” failures point to exact problem
  • Name tests as sentences describing expected behavior β€” readable test names are documentation
  • Mock external dependencies, not internal logic β€” integration points are boundaries
  • Fast tests run often, slow tests get skipped β€” optimize for feedback speed
  • Error Handling

  • Fail fast and loud β€” silent failures create debugging nightmares
  • Catch specific exceptions, not generic β€” different errors need different handling
  • Log enough context to debug β€” error type alone isn't enough
  • User-facing errors should be helpful β€” "something went wrong" helps nobody
  • Don't catch exceptions you can't handle β€” let them bubble up
  • Architecture

  • Start simple, add complexity when needed β€” premature abstraction wastes time
  • Separate concerns β€” UI, business logic, data access are different responsibilities
  • Dependencies flow inward β€” core logic shouldn't know about frameworks
  • Configuration separate from code β€” environment-specific values externalized
  • Document decisions, not just code β€” why matters more than what
  • Code Review

  • Review for understanding, not just correctness β€” if you can't follow it, others won't
  • Ask questions instead of making demands β€” "what if..." opens discussion
  • Small PRs get better reviews β€” 500 lines gets skimmed, 50 lines gets read
  • Approve when good enough, not perfect β€” progress beats perfection
  • Catch bugs early, style issues are secondary β€” priorities matter
  • Performance

  • Measure before optimizing β€” intuition about bottlenecks is usually wrong
  • Optimize the hot path β€” 90% of time is spent in 10% of code
  • Database queries are usually the bottleneck β€” check there first
  • Caching solves many problems β€” but cache invalidation creates new ones
  • Premature optimization wastes time β€” make it work, then make it fast
  • Dependencies

  • Evaluate before adding β€” every dependency is code you don't control
  • Pin versions β€” "latest" breaks builds unpredictably
  • Check maintenance status β€” abandoned packages become security risks
  • Fewer dependencies is better β€” each one adds supply chain risk
  • Read changelogs before upgrading β€” breaking changes hide in minor versions
  • Working in Existing Codebases

  • Match existing patterns β€” consistency beats personal preference
  • Improve incrementally β€” boy scout rule, leave it better than you found it
  • Understand before changing β€” read the tests, check git history
  • Don't refactor while fixing bugs β€” separate commits, separate PRs
  • Legacy code works β€” respect the battle scars
  • Communication

  • Commit messages explain why, not what β€” diff shows what changed
  • Document surprising behavior β€” future developers need context
  • Ask before large refactors β€” alignment prevents wasted work
  • Estimate with ranges, not points β€” "2-4 days" is more honest than "3 days"
  • Say "I don't know" when you don't β€” guessing wastes everyone's time