yanko-belov/code-craft

No description

4 stars0 forksUpdated Jan 22, 2026
npx skills add yanko-belov/code-craft

README

Code Craft

Discipline-enforcing skills that help AI coding agents write better code by following software engineering best practices.

What Are These?

Skills are documents that teach Claude to resist common bad patterns and produce higher quality code. Unlike tutorials, these skills:

  • Resist pressure - Handle "just make it work" or "don't overcomplicate" requests
  • Close loopholes - Address specific rationalizations Claude uses to violate principles
  • Provide correct patterns - Show the right way, not just explain what's wrong

Each skill was developed using TDD for documentation: baseline tests reveal how Claude fails without the skill, then the skill is written to address those specific failures.

Installation

npx add-skill yanko-belov/code-craft

This installs skills to all supported agents (OpenCode, Claude Code, Codex, Cursor, etc.)

Options

# Install specific skills only
npx add-skill yanko-belov/code-craft -s single-responsibility yagni fail-fast

# Install globally (user-level)
npx add-skill yanko-belov/code-craft -g

# Install to specific agents
npx add-skill yanko-belov/code-craft -a opencode claude-code

# List available skills
npx add-skill yanko-belov/code-craft -l

# Install all skills to all agents without prompts
npx add-skill yanko-belov/code-craft --all

Supported Agents

  • OpenCode
  • Claude Code
  • Codex
  • Cursor
  • Antigravity
  • GitHub Copilot
  • Roo Code

Manual Installation

# Clone and symlink
git clone https://github.com/yanko-belov/code-craft.git
cd code-craft
for skill in skills/*/; do
  ln -sf "$(pwd)/$skill" ~/.claude/skills/
done

Skills

SOLID Principles

PrincipleSkillPrevents
SSingle ResponsibilityGod classes, "just add it here"
OOpen/ClosedAdding if/else branches for new features
LLiskov SubstitutionOverride with throw/no-op
IInterface SegregationFat interfaces, forced implementations
DDependency Inversionnew Concrete() inside classes

Core Principles

PrincipleSkillPrevents
DRYDon't Repeat YourselfCopy-paste code, duplicated logic
YAGNIYou Ain't Gonna Need ItOver-engineering, speculative features
KISSKeep It SimpleClever one-liners, unnecessary complexity
CompositionComposition over InheritanceDeep inheritance hierarchies
DemeterLaw of Demetera.b.c.d property chains
Fail FastFail FastSwallowed errors, silent failures

Testing

SkillPrevents
TDDTests as afterthought, untestable code
Test IsolationFlaky tests, shared state between tests
AAA PatternMessy tests, unclear test structure

Security

SkillPrevents
Input ValidationInjection attacks, invalid data
Secrets HandlingHardcoded credentials, exposed secrets
Auth PatternsBroken authentication, insecure sessions

API Design

SkillPrevents
REST ConventionsInconsistent endpoints, poor API design
Error ResponsesUnhelpful errors, leaked internals
IdempotencyDuplicate operations, unsafe retries
API VersioningBreaking changes, version chaos

Performance

SkillPrevents
N+1 PreventionDatabase query explosions
Lazy LoadingLoading everything upfront, slow startup
CachingRepeated expensive operations, cache bugs

Code Quality

SkillPrevents
Separation of ConcernsMixed responsibilities, tangled code
EncapsulationExposed internals, broken abstractions
ImmutabilityMutation bugs, unexpected state changes

Error Handling

SkillPrevents
Exception HierarchiesGeneric errors, poor error handling
[Error Boundaries](./skills/

...

Read full README

Publisher

yanko-belovyanko-belov

Statistics

Stars4
Forks0
Open Issues0
LicenseMIT License
CreatedJan 21, 2026