engineering-craft

engineering-craft is a skill for Claude Code, Codex from tmj-90/gaffer. It costs 120 tokens per session (1,295 once invoked), scanned A, original, Apache-2.0.

A code-quality guide for delivering maintainable software. It emphasizes small focused units, clear boundaries, honest names, explicit error handling, reuse only where repetition is real, and tests for important logic.

In plain words
What is it for?
Use it when implementing tickets, deciding whether to extract shared code, structuring application layers, handling failures, and checking production code before delivery.
Why use it?
It helps keep changes understandable and safe to modify without adding speculative abstractions or unnecessary code. The guide is intended for use during implementation and review.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/tmj-90/gaffer/engineering-craft
Any agent
npx skills add tmj-90/gaffer --skill engineering-craft
Clone the repo
git clone --depth 1 https://github.com/tmj-90/gaffer

Made for: Claude Code, Codex.

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 engineering-craft

README.md
[![agentmods](https://agentmods.dev/badge/skills/tmj-90/gaffer/engineering-craft.svg)](https://agentmods.dev/skills/tmj-90/gaffer/engineering-craft)
Your own site
<a href="https://agentmods.dev/skills/tmj-90/gaffer/engineering-craft"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/engineering-craft.svg" alt="Measured on agentmods" height="20"></a>
Per session 120 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,295 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00120 $0.01295
Opus 5 $0.00060 $0.00647
Sonnet 5 $0.00024 $0.00259
Haiku 4.5 $0.00012 $0.00129

Measured 3d ago against content hash b310c31a6c54, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

engineering-craft 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 3d 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.

runner/skills/engineering-craft/SKILL.md · 82 lines

How it starts

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

Engineering craft — code the maintainers would approve

The counterpart to minimalism. Minimalism asks "is this the least code that works?"; craft asks "is the code that remains well-structured, honest, and safe to change?" The target is the intersection: the smallest change that a careful reviewer would approve without asking you to redo it. This is a lens, not a stage — apply it while you implement, and confirm it in self-review before submitting.

Craft is never a licence to add code. When craft and minimalism seem to disagree, they don't: the rule below (real repetition, not speculative) resolves it every time.

The craft bar (hold all of these)

  1. Reuse only real repetition — never speculative abstraction. DRY applies to duplication that already exists (the same logic in two places you can see). Do NOT introduce a base class, generic, config system, or "flexible" helper for a second caller that doesn't exist yet — that's the over-engineering minimalism forbids. Rule of thumb: extract on the third occurrence, inline the first two. When you do extract, give the shared unit one clear responsibility.
  2. Boundaries at the edges. Keep transport (HTTP/CLI), business logic, and persistence (DB/filesystem) separable — don't put a SQL query or a fetch in the middle of domain logic. Depend on the seam the repo already uses; don't invent a new layering the codebase doesn't have.
  3. Handle errors explicitly — no silent failures. No empty catch blocks, no swallowed rejections, no ignored return codes. Either handle the error meaningfully or propagate it with context. A user-facing surface gets a clear message; a server path logs the detail. Never catch {} to make a test pass.
  4. Validate at the boundary. Untrusted input (request bodies, CLI args, external API responses, file contents) is checked before use — fail fast with a clear message. Use the repo's existing validation approach (e.g. schema/zod) rather than ad-hoc checks if one exists.
  5. Small, focused units. A function does one thing (aim < ~50 lines); a file stays cohesive. If a function has grown a second responsibility or four levels of nesting, split it or use early returns — but only when it genuinely helps clarity, not to hit a number.
  6. Honest names. Names say what the thing is/does. Booleans read as is/has/should/can. No data2, tmp, helper, doStuff. A good name removes the need for a comment.
  7. Don't mutate what you don't own. Prefer returning new values over mutating shared inputs/state; treat function arguments as read-only unless mutation is the point. Respect the language's idiom — this is immutability where idiomatic (a Go pointer receiver or an in-place sort in hot code is fine); it is not a mandate to copy everything.
  8. Composition over inheritance. Reach for a function, a small object, or a passed-in dependency before a class hierarchy.
  9. Tests are part of the change. Cover the real logic you added — happy path, the boundaries, and the error cases — not just the line that's easiest to assert. Test code is a guarantee, not bloat (minimalism agrees). Use add-unit-test / add-integration-test for the mechanics.
  10. Match the repo, don't reform it. Follow the prevailing conventions, patterns, and style of the code around you. Craft means your addition is indistinguishable from well-written existing code — not that you impose a cleaner paradigm the repo doesn't use. A repo-wide refactor is a separate ticket.

Read the full file on GitHub · 82 lines

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. 3d ago First seen · 82 lines · 120 tokens per session scan A b310c31a6c54

Subscribe to this mod's changes

engineering-craft is a skill published in the GitHub repository tmj-90/gaffer (2 stars, last pushed 3d ago), licensed Apache-2.0. It adds 120 tokens to every session and 1,295 once invoked, about $0.0006 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-08-31.