Design and code checks for modularity, size, nesting, naming, I/O boundaries, errors, and red-green-refactor. Load before planning a change and before any code edit, however small, in any language.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Engineering Fundamentals?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ku5ic-engineering-fundamentals)
---
name: engineering-fundamentals
description: Design and code checks for modularity, size, nesting, naming, I/O boundaries, errors, and red-green-refactor. Load before planning a change and before any code edit, however small, in any language.
---
# Engineering fundamentals
Concrete checks that turn the principles in `skills/kit-rules/reference/change.md` into questions with observable answers. KISS, YAGNI, DRY, and each letter of SOLID, with the test for each, are in its section 8; this skill applies them and never restates them. Apply only what fits, and don't pad findings to fill sections.
## Every function or file you write or review
- Run each test in `change.md` section 8 on what you wrote. A breach is a finding named by its principle, the test it fails, and its cost.
- A function whose name needs an "and" does two jobs. Split it.
- A name says what, not how: "validate payment batch", never "process items".
- One term names one concept across the codebase. A second word for the same thing reads as a second thing.
- A literal beyond `0`, `1`, `-1`, `""`, or an obvious enum gets a named constant, with a comment only when its origin isn't obvious (`change.md` section 5).
- Two stores of the same data kept in sync are one too many. Keep one source of truth.
- Size and coupling are the numbers in [reference/metric-thresholds.md](reference/metric-thresholds.md), and no others.
## Adding behavior or fixing a bug
Red-green-refactor, one behavior per turn, each turn ending with every test green. It applies to new behavior and bug fixes with a test seam. A pure refactor has no red step, since the existing tests guard it (`change.md` section 6).
<!-- chat: skip -->
A change no test can reach gets the runtime pass instead (`skills/kit-rules/reference/verify.md` section 2).
<!-- chat: end -->
1. Red. Write the smallest test for the next behavior and run it. It fails on its assertion; a failure from setup, an import, or a compile error proves nothing yet. A test that passes before the change tests something else. For a bug fix, the red test is the reproduction.
2. Green. Write the least code that makes it pass, sized per `change.md` section 1, and run it with its neighbors. No cleanup yet.
3. Refactor. Required, since first green is never done. Re-read what green added against `change.md` sections 4, 8, 9, and 10, then improve its shape with every test green and the tests unchanged, running them after each move. End by naming what the pass changed, or why nothing needed to.
4. Then the next behavior.
In review, a bug fix whose test passes against the code before the fix is a `warning`.
<!-- chat: skip -->
How to design the test itself is `test-patterns`.
<!-- chat: end -->
## Lookups
Before the step a row names, read its file.
| Before | Read |
| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
| Planning non-trivial work from a request or a ticket | [reference/requirements-clarity.md](reference/requirements-clarity.md) |
| Planning a change or reviewing a design | [reference/design-integrity.md](reference/design-integrity.md) |
| Judging whether a function, file, or module is too big | [reference/metric-thresholds.md](reference/metric-thresholds.md) |
| Restructuring code that grew, spread, or repeats | [reference/design-patterns.md](reference/design-patterns.md) |
| Writing code that takes outside input, calls a network, file, or process, waits on a lock, changes shared state, or handles an error | [reference/boundaries.md](reference/boundaries.md) |
| Reviewing whether a change is right | [reference/verification-and-validation.md](reference/verification-and-validation.md) |