Agent skill

smith-principles

Fundamental coding principles (DRY, KISS, YAGNI, SOLID, HHH). Use when starting any development task, evaluating implementation approaches, or reviewing code quality. Always active as foundation for all development decisions.

Stars 1
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/tianjianjiang/smith/tree/main/smith-principles

SKILL.md

Fundamental Coding Principles

  • Load if: Always active (foundation for all development)
  • Prerequisites: None

CRITICAL (Primacy Zone)

  • MUST apply DRY before adding features
  • MUST apply KISS to choose simplest solution
  • MUST apply YAGNI to defer unneeded implementation
  • Violating Single Responsibility (one reason to change)
  • Creating tight coupling (depend on abstractions instead)
  • Duplicating code that could be abstracted

Core Principles

  • DRY (Don't Repeat Yourself): Single source of truth
  • KISS (Keep It Simple, Stupid): Simplest solution that works
  • YAGNI (You Aren't Gonna Need It): Don't implement until needed
  • SINE (Simple Is Not Easy): Simplicity requires deliberate effort
  • MECE (Mutually Exclusive, Collectively Exhaustive): Complete coverage without overlap
  • Occam's Razor: Prefer solutions with fewest assumptions

SOLID Principles

  • S (Single Responsibility): One reason to change per class/module
  • O (Open/Closed): Open for extension, closed for modification
  • L (Liskov Substitution): Subtypes substitutable for base types
  • I (Interface Segregation): Many specific interfaces over one general
  • D (Dependency Inversion): Depend on abstractions, not concretions

HHH (AI Behavior)

  • H (Helpful): Provide useful, actionable assistance
  • H (Honest): Be truthful, acknowledge uncertainty
  • H (Harmless): Avoid destructive operations without confirmation
  • @smith-standards/SKILL.md - Universal coding standards
  • @smith-guidance/SKILL.md - AI agent behavior (HHH framework)

ACTION (Recency Zone)

Before implementing:

  1. Check for existing abstractions (DRY)
  2. Choose simplest approach (KISS)
  3. Confirm feature is needed now (YAGNI)
  4. Verify single responsibility (SOLID-S)

Expand your agent's capabilities with these related and highly-rated skills.

tianjianjiang/smith

smith-style

File naming, path standards, and conventional commits. Use when naming files, creating branches, writing commit messages, or setting up new projects. Covers underscore vs hyphen conventions, commit format, and branch naming patterns.

1 0
Explore
tianjianjiang/smith

smith-stacks

Stacked pull request workflows for large features. Use when creating stacked PRs, managing dependent PRs, or rebasing after parent merges. Covers stack creation, merge order, and squash merge handling.

1 0
Explore
tianjianjiang/smith

smith-python

Python development with uv, pytest, ruff, and type hints. Use when writing Python code, running tests, managing Python packages, or working with virtual environments. Covers import organization, type hints, pytest patterns, and environment variables.

1 0
Explore
tianjianjiang/smith

smith-nuxt

Nuxt 3 development patterns including auto-import stubbing for tests, environment variable conventions, and middleware testing. Use when working with Nuxt projects, testing Nuxt components/middleware, or configuring Nuxt environment variables.

1 0
Explore
tianjianjiang/smith

smith-plan

Plan tracking protocol (portable). Progress tracking with checkboxes, iteration workflow, completion/blocker signals. Use when executing multi-step plans, tracking task progress, or working from plan files. IMPORTANT - Always update the plan file after completing tasks.

1 0
Explore
tianjianjiang/smith

smith-analysis

Reasoning frameworks and problem decomposition techniques. Use when planning implementation, evaluating arguments, estimating scope, decomposing complex tasks, or applying first principles thinking.

1 0
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results