coding-principles

coding-principles is a skill for Claude Code from shinpr/claude-code-workflows. It costs 34 tokens per session (1,909 once invoked), scanned A, original, MIT.

A set of general coding guidelines for making software easier to read, change, and maintain.

In plain words
What is it for?
Use it when adding features, refactoring existing code, or reviewing code quality.
Why use it?
It helps prevent unnecessary complexity, unclear code, and unused parts from making future work harder.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the dev-skills plugin — 9 skills shipped together

Good fit Use it when adding features, refactoring existing code, or reviewing code quality.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/shinpr/claude-code-workflows/coding-principles
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add shinpr/claude-code-workflows --skill coding-principles
Clone the repo
git clone --depth 1 https://github.com/shinpr/claude-code-workflows

Made for: Claude Code.

Or install dev-skills, the plugin that ships this one along with the rest of its 9 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for coding-principles

README.md
[![agentmods](https://agentmods.dev/badge/skills/shinpr/claude-code-workflows/coding-principles/github.svg)](https://agentmods.dev/skills/shinpr/claude-code-workflows/coding-principles)
Your own site
<a href="https://agentmods.dev/skills/shinpr/claude-code-workflows/coding-principles"><img src="https://agentmods.dev/badge/skills/shinpr/claude-code-workflows/coding-principles/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for coding-principles

Your own site · 80×15
<a href="https://agentmods.dev/skills/shinpr/claude-code-workflows/coding-principles"><img src="https://agentmods.dev/badge/skills/shinpr/claude-code-workflows/coding-principles.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,909 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00034 $0.01909
Opus 5.5 $0.00014 $0.00764
Sonnet 5.5 $0.00007 $0.00382
Haiku 4.5 $0.00003 $0.00191

Measured 6d ago against content hash d1c003ace7c4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

coding-principles scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

dev-skills/skills/coding-principles/SKILL.md · 146 lines

How it starts

The opening of the file, as written. The whole thing — 146 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Language-Agnostic Coding Principles

Core Philosophy

  1. Final State over Effort: Minimize the complexity and size of what remains after the change — code, tests, concepts, and what a later change must know — not the work spent reaching it. The product keeps changing after this session and a future agent maintains whatever is left, so take on the larger change now when it leaves less behind. Do not choose a route because it needs fewer steps, edits, or tokens; effort only breaks a tie between results of equal final complexity.
  2. Design Convergence: Deliver the current required outcome with the least design surface in the final code. Selecting persistent state, public or cross-boundary contracts, behavioral modes, reusable abstractions, or component splits carries enough surface to justify the full convergence process first.
  3. Structure for Local Edits: The next change here will be made by an agent that reads only the code around it, so what a change must agree with belongs where that agent cannot miss it: a single definition, a type, an exhaustive branch, or a check that fails. For the code a change adds or extends, shape state so only valid combinations can be expressed, advance each state through its existing owner, and when a compiler, type, or lint check fails on the new code, change the structure so the check passes, suppressing it only when no such change exists.
  4. Explicit over Implicit: Make intentions clear through code structure and naming
  5. Delete over Comment: Remove unused code instead of commenting it out

Code Quality

Continuous Improvement

  • Refactor related code inside the accepted outcome and governing boundaries when it reduces the change's risk or maintenance cost
  • Improve code structure incrementally
  • Keep the codebase lean and focused
  • Delete code proven obsolete by the requested change after checking its callers

Readability

  • Use meaningful, descriptive names drawn from the problem domain
  • Use full words in names; abbreviations are acceptable only when widely recognized in the domain
  • Use descriptive names; single-letter names are acceptable only for loop counters or well-known conventions (i, j, x, y)
  • Extract magic numbers and strings into named constants. Take each value from an existing requirement, contract, measurement, or repository value for the same purpose; when none of these determines it, mark the constant as an assumed value in a comment
  • Keep code self-documenting where possible

Read the full file on GitHub · 146 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago Changed · -25 lines d1c003ace7c4
  2. 7d ago Changed · +1 lines 14e7dff33659
  3. 19d ago Changed · +6 lines 5b24edb2db76
  4. 1mo ago Changed · -6 lines c9824dcf3345
  5. 2mo ago Changed · +1 lines 9c763aaf131c
  6. 3mo ago First seen · 169 lines · 34 tokens per session scan A 70a48db26609

Subscribe to this mod's changes

coding-principles is a skill published in the GitHub repository shinpr/claude-code-workflows (725 stars, last pushed today), licensed MIT. It adds 34 tokens to every session and 1,909 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

coding-principles compared with skills from other repositories

coding-principles next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
coding-principlesshinpr/claude-code-workflowsSkill725todayMITA34Claude Code
handoffreidemeister94/development-skillsSkill1218d agoMITA22Claude Code
releasehyhmrright/brooks-lintSkill1.6ktodayMITA135Claude Code, Codex
new-skillhyhmrright/brooks-lintSkill1.6ktodayMITA145Claude Code, Codex
brooks-sweephyhmrright/brooks-lintSkill1.6ktodayMITA178Claude Code
brooks-testhyhmrright/brooks-lintSkill1.6ktodayMITA161Claude Code
spike-consumer-adversarialtestdouble/hanSkill36218d agoMITA0Claude Code