myscript/iinkts/code-quality-principles

Claude Code and agent skill by myscript/iinkts

Trust tier 2
  • community
LLM review pending
Source check pending

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

iinkTS code quality checklist — centralization, DRY, short functions, mandatory tests. Invoke before commit, during refactor, code review, or when creating a new file.

Install

npx vskill@latest install myscript/iinkts/code-quality-principles

SKILL.md

Code Quality Principles

Centralization

One source of truth per concept. src/utils/ for cross-cutting utilities, Abstract*/Base* classes for shared behavior. Before writing a utility function → grep src/utils/ first.

DRY

  • 2 occurrences of the same logic → extract a function
  • 3 occurrences of the same pattern → extract an abstraction
  • Magic constant → extract (const NORMALIZATION_FACTOR = 1000)

Short functions

  • Max 20 lines (ideal 10)
  • One abstraction level per function
  • Early return for failure cases
  • Naming: is*/has*/can* (boolean), get*/find* (value), set*/update* (mutation)
typescript
// bad: mixes validation + normalization + transformation + rendering + side-effect
function processAndRenderStroke(stroke, canvas, options) { /* 30+ lines, 4 levels */ }
// good: each function one level
function isValidStroke(stroke) { return !!stroke?.pointerType && stroke.x.length > 0 }
function normalizeStroke(stroke) { return { ...stroke, x: normalizeArray(stroke.x) } }
function processStroke(stroke) { return isValidStroke(stroke) ? normalizeStroke(stroke) : null }

Unit tests (mandatory)

  • Mirror architecture: test/unit/ mirrors src/
  • Coverage ≥75% (branches/functions/lines/statements)
  • Naming {ClassName}.test.ts
  • Minimum per function: nominal case, error case, edge case (null/undefined/empty/zero)

Refactoring patterns

  • Extract function: repeated condition → named function (isValidData)
  • Extract constant: magic number → named const
  • Replace conditional with polymorphism: if/else if on a type → interface + implementations

Checklist before commit

  • [ ] No duplication
  • [ ] Functions ≤20 lines, one abstraction level
  • [ ] Explicit names (no comment needed)
  • [ ] Early returns for failure cases
  • [ ] Unit tests present, yarn test:unit --coverage ≥75%
  • [ ] yarn typecheck clean

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

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

Source

Popularity

Repository stars
99
Repository forks
16
7-day trend score
0

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

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/myscript/iinkts/code-quality-principles/badge)](https://verified-skill.com/skills/myscript/iinkts/code-quality-principles)

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