Source

yanko-belov/code-craft

32 skills · 1.3K combined installs

Skills from this source

#
Skill
Source
8W Activity
Installs
1
dont-repeat-yourself Use when writing similar code in multiple places. Use when copy-pasting code. Use when making the same change in mult…
yanko-belov/code-craft
95
2
lazy-loading Use when loading all data upfront. Use when initial page load is slow. Use when fetching data that might not be neede…
yanko-belov/code-craft
72
3
keep-it-simple Use when tempted to write clever code. Use when solution feels complex. Use when showing off skills instead of solvin…
yanko-belov/code-craft
65
4
separation-of-concerns Use when component does too many things. Use when mixing data fetching, logic, and presentation. Use when code is har…
yanko-belov/code-craft
60
5
fail-fast Use when handling errors. Use when tempted to catch and swallow exceptions. Use when returning default values to hide…
yanko-belov/code-craft
47
6
race-conditions Use when multiple operations access shared state. Use when order of operations matters. Use when "it works most of th…
yanko-belov/code-craft
47
7
single-responsibility-principle Use when creating or modifying classes, modules, or functions. Use when feeling pressure to add functionality to exis…
yanko-belov/code-craft
44
8
deadlock-prevention Use when acquiring multiple locks. Use when operations wait for each other. Use when system hangs without crashing.
yanko-belov/code-craft
43
9
composition-over-inheritance Use when tempted to use class inheritance. Use when creating class hierarchies. Use when subclass needs only some par…
yanko-belov/code-craft
41
10
aaa-pattern Use when writing tests. Use when test structure is unclear. Use when arrange/act/assert phases are mixed.
yanko-belov/code-craft
40
11
n-plus-one-prevention Use when fetching related data in loops. Use when seeing multiple queries for one request. Use when database is slow …
yanko-belov/code-craft
40
12
input-validation Use when accepting user input. Use when handling request data. Use when trusting external data without validation.
yanko-belov/code-craft
37
13
caching Use when same data is fetched repeatedly. Use when database queries are slow. Use when implementing caching without i…
yanko-belov/code-craft
36
14
error-responses Use when returning errors from APIs. Use when exposing internal errors. Use when error responses lack structure.
yanko-belov/code-craft
36
15
error-boundaries Use when deciding where to catch errors. Use when errors propagate too far or not far enough. Use when designing comp…
yanko-belov/code-craft
35
16
idempotency Use when creating mutation endpoints. Use when trusting frontend to prevent duplicates. Use when payments or critical…
yanko-belov/code-craft
35
17
skill-awareness Always active. Tracks usage of code-craft skills across sessions. Log skill applications to enable analytics and iden…
yanko-belov/code-craft
35
18
rest-conventions Use when designing API endpoints. Use when using wrong HTTP methods. Use when POST is used for reads.
yanko-belov/code-craft
34
19
immutability Use when modifying objects or arrays. Use when tempted to mutate function parameters. Use when state changes cause un…
yanko-belov/code-craft
33
20
you-aint-gonna-need-it Use when tempted to add features "for later". Use when building "production-ready" systems before needed. Use when ad…
yanko-belov/code-craft
33
21
dependency-inversion-principle Use when a class creates its own dependencies. Use when instantiating concrete implementations inside a class. Use wh…
yanko-belov/code-craft
32
22
test-driven-development Use when implementing any new feature or function. Use when asked to "add tests later". Use when writing code before …
yanko-belov/code-craft
32
23
secrets-handling Use when working with API keys, passwords, or credentials. Use when asked to hardcode secrets. Use when secrets might…
yanko-belov/code-craft
31
24
test-isolation Use when writing tests that share state. Use when tests depend on other tests. Use when test order matters.
yanko-belov/code-craft
31
25
auth-patterns Use when implementing authentication. Use when storing passwords. Use when asked to store credentials insecurely.
yanko-belov/code-craft
30
26
exception-hierarchies Use when creating custom exceptions. Use when error handling feels chaotic. Use when catch blocks are too broad or to…
yanko-belov/code-craft
30
27
law-of-demeter Use when accessing nested object properties. Use when chaining method calls. Use when reaching through objects to get…
yanko-belov/code-craft
30
28
open-closed-principle Use when adding new functionality to existing code. Use when tempted to add if/else or switch branches. Use when exte…
yanko-belov/code-craft
30
29
encapsulation Use when exposing internal state. Use when making fields public for convenience. Use when external code modifies obje…
yanko-belov/code-craft
29
30
interface-segregation-principle Use when designing interfaces. Use when implementing interfaces with methods you don't need. Use when forced to imple…
yanko-belov/code-craft
29
31
api-versioning Use when designing or modifying APIs. Use when adding breaking changes. Use when clients depend on API stability.
yanko-belov/code-craft
28
32
liskov-substitution-principle Use when creating subclasses or implementing interfaces. Use when tempted to override methods with exceptions or no-o…
yanko-belov/code-craft
28