programming-principles

programming-principles is a skill for Claude Code, Codex from magnus919/agent-skills. It costs 53 tokens per session (4,035 once invoked), scanned A, original, MIT.

A collection of software design and coding principles drawn from classic engineering books.

In plain words
What is it for?
Use it to assess everyday code, improve architecture and dependencies, model business rules, design APIs, and handle legacy or risky changes.
Why use it?
It gives developers practical guidance for reviewing, refactoring, designing, and implementing code without relying only on personal taste.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions AGENTS.md.

Good fit Use it to assess everyday code, improve architecture and dependencies, model business rules, design APIs, and handle legacy or risky changes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/magnus919/agent-skills/programming-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 magnus919/agent-skills --skill programming-principles
Clone the repo
git clone --depth 1 https://github.com/magnus919/agent-skills

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin programming-principles/plugin install programming-principles after adding the marketplace above.

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 programming-principles

README.md
[![agentmods](https://agentmods.dev/badge/skills/magnus919/agent-skills/programming-principles.svg)](https://agentmods.dev/skills/magnus919/agent-skills/programming-principles)
Your own site
<a href="https://agentmods.dev/skills/magnus919/agent-skills/programming-principles"><img src="https://agentmods.dev/badge/skills/magnus919/agent-skills/programming-principles.svg" alt="Measured on agentmods" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,035 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.00053 $0.04035
Opus 5 $0.00026 $0.02018
Sonnet 5 $0.00011 $0.00807
Haiku 4.5 $0.00005 $0.00404

Measured 4d ago against content hash 0a5f9d1365f1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

programming-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 4d 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.

programming-principles/SKILL.md · 347 lines

How it starts

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

Programming Principles (14 Books)

Principles distilled from the mattpocock/agent-rules-books repo — 14 pre-made AGENTS.md rule sets derived from classic software engineering books. Use this skill directly during code review, refactoring, design, and implementation. For deeper per-book coverage, load the relevant reference file.

Task-to-Book Mapping

When the task involves... Load / apply principles from ──────────────────────────────────────────────────────────────────────── Everyday implementation & code review Clean Code, Code Complete Refactoring existing code Refactoring, WELC Architecture / dependency management Clean Architecture, APoSD Domain modeling / business rules DDD, DDD Distilled, IDDD Enterprise app patterns / layering PoEAA Production reliability / stability Release It! Data consistency / scalability / events DDIA Engineering craft / automation Pragmatic Programmer Designing APIs / module boundaries APoSD Legacy code / risky changes WELC, Refactoring

How to Perform a Code Assessment

For a structured, reproducible workflow that combines book principles with actual repo exploration, see references/code-assessment-workflow.md. It covers: loading the evaluation framework, reading the repo and GitHub context, deduplicating against existing issues/PRs, classifying findings by book + priority, and deciding whether each merits an issue.

Cross-Cutting Principles

Principles synthesized from multiple books, organized by concern.

Naming & Communication

  • One term per concept across the codebase. RENAMING is design work.
  • Names reveal abstraction, not mechanism. Prefer domain vocabulary over technical implementation detail.
  • Functions are verbs, classes/types are nouns, booleans are predicates.
  • A name needing a comment to explain it is the wrong name.
  • Comments exist for rationale, contracts, warnings, and non-obvious constraints — never to narrate code or compensate for bad names.

Read the full file on GitHub · 347 lines

Files

What ships with it

33 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. 4d ago First seen · 347 lines · 53 tokens per session scan A 0a5f9d1365f1

Subscribe to this mod's changes

programming-principles is a skill published in the GitHub repository magnus919/agent-skills (70 stars, last pushed yesterday), licensed MIT. It adds 53 tokens to every session and 4,035 once invoked, about $0.0003 per session on Opus 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-09-03.