agentleFS
monishwar007monishwar007/clean-code/skills/senior-engineer/SKILL.md

senior-engineer

Skill0 starsChanged 3 months agoMITView on GitHub

Transform junior-level code into senior-engineer quality software across Java/Spring Boot, Python, C, and JavaScript/TypeScript. Applies SOLID, TDD, clean code, design patterns, clean architecture, SQL/database design, API design, and concurrency — adapted per language, including OOP fundamentals in Java/Python/TS and their disciplined procedural equivalents in C. Use when writing, refactoring, reviewing, testing, or architecting any code in these languages.

5 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions5 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 5

    1. Jaan-Mustafa/10x-Team★ 11same name
    2. pranav8494/team-of-agents★ 7same name
    3. Kin9Zeus/senior-engineer-skills★ 3same name
    4. fthsrbst/mnema★ 2same name
    5. atpaawej/skills★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository3 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 7 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before applying anything, determine which language(s) are in play:

    line 27
  2. Distinctive:

    If the language is ambiguous, ask once or infer from the file extension of the file being edited.

    line 37
  3. Very specific:

    Don't ask if the answer is inferable from an open file, an existing pom.xml/requirements.txt/Makefile, or prior messages in the …

    line 45
  4. Distinctive:

    When the two genuinely conflict and it's not obvious which wins, surface the tradeoff to the user instead of silently picking one (per …

    line 67
  5. Distinctive:

    No comments that explain *what* the code does — rename instead.

    line 126
  6. Very specific:

    No God classes/functions/modules.

    line 129
  7. Distinctive:

    No public mutable state crossing a layer boundary.

    line 131
  8. Distinctive:

    When asked to write or refactor code, produce:

    line 150
  9. Distinctive:

    Do not narrate the skill mechanics to the user — apply it silently and produce senior-engineer-quality output.

    line 157

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Senior Engineer Skill (Java/Spring Boot · Python · C · JS/TS · OOP)

When to use this skill

  • Writing any code: features, fixes, utilities, endpoints, modules
  • Refactoring existing code
  • Planning or reviewing architecture
  • Reviewing code quality / doing a code review pass
  • Debugging issues that stem from design, not just logic
  • Creating or extending tests
  • Making a design decision (pattern choice, ownership model, API shape)

Step 0 — Detect the language context

Before applying anything, determine which language(s) are in play:

SignalLanguagePrimary reference
.java, pom.xml, build.gradle, @SpringBootApplicationJava / Spring Bootreferences/java-spring-boot.md<!--LANG:java-->
.py, requirements.txt, pyproject.tomlPythonreferences/python.md<!--LANG:python-->
.c, .h, Makefile, CMakeLists.txtCreferences/c-programming.md<!--LANG:c-->
.js, .ts, .jsx, .tsx, package.jsonJavaScript/TypeScriptreferences/javascript-typescript.md<!--LANG:javascript-->
Mixed / cross-serviceAll applicableLoad each relevant reference

If the language is ambiguous, ask once or infer from the file extension of the file being edited. Default to Java/Spring Boot only if the user's history or project clearly signals it.

Example elicitation (only when truly ambiguous — e.g. a fresh repo with no code yet and a request like "build the order service"):

"Which stack should I use — Java/Spring Boot, Python, or C?"

Don't ask if the answer is inferable from an open file, an existing pom.xml/requirements.txt/Makefile, or prior messages in the conversation.

Precedence: this skill vs. .claude/CLAUDE.md

.claude/CLAUDE.md (think-before-coding, simplicity-first, surgical changes, goal-driven execution) is the outer behavioral layer and always applies. This skill's language/design guidance operates inside those constraints, not instead of them:

  • Simplicity First (CLAUDE.md) wins over speculative pattern use in design-patterns.md — don't introduce a Strategy pattern or value object for a single use, even if this skill shows the pattern.
  • TDD (this skill) is not "extra scope" — writing a test first is part of solving the task correctly, not a speculative addition, so it is not overridden by Simplicity First.
  • Surgical Changes (CLAUDE.md) wins over "refactor smells you notice" — flag a code smell you notice outside the requested change, don't fix it unasked, even though code-smells.md says to fix smells during refactors. That instruction applies only within the code you were asked to touch.
  • When the two genuinely conflict and it's not obvious which wins, surface the tradeoff to the user instead of silently picking one (per CLAUDE.md §1).

Step 1 — Load by task type (don't load everything by default)

Loading all reference docs on every task wastes context and dilutes focus. Match the task to the row below and load only that set, plus the one language-specific file from Step 2. references/checklist.md is cheap enough to load regardless of task type.

Task typeLoad
Write new code (feature/endpoint/function)solid-principles.md, tdd.md, object-design.md, checklist.md
Fix a bugtdd.md (reproduce with a test first), checklist.md
Refactor existing codecode-smells.md, solid-principles.md, complexity.md, checklist.md
Code review / review a diffcode-smells.md, clean-code.md, architecture.md, checklist.md
Design/plan architecturearchitecture.md, object-design.md, design-patterns.md
Write or extend teststdd.md, testing.md
Anything touching OOP design choicesoop-concepts.md in addition to the row above
SQL / persistence worksql-database.md in addition to the row above
Building or reviewing an HTTP APIapi-design.md in addition to the row above
Threads/async/locking involvedconcurrency.md in addition to the row above
Self-check before presenting a diffself-review-prompt.md

Step 2 — Load the language-specific reference

Load exactly one (or more, if cross-language):

  • references/java-spring-boot.md <!--LANG:java-->
  • references/python.md <!--LANG:python-->
  • references/c-programming.md <!--LANG:c-->
  • references/javascript-typescript.md (React/Node.js/Express work) <!--LANG:javascript-->

Step 3 — Apply the workflow

  1. Clarify the requirement in one sentence before writing code.
  2. Write a failing test first (JUnit/Mockito, pytest, or Unity/CMocka per tdd.md). Never write production code without a red test, unless explicitly told to skip TDD for a throwaway script.
  3. Write the minimum code to pass the test.
  4. Refactor against code-smells.md and solid-principles.md — extract value objects, remove primitive obsession, break up anything over the size limits in references/limits.md.
  5. Check architecture boundaries — does this change stay inside its layer/module per architecture.md? Does a controller/route touch a repository directly? Does a C module reach into another module's private struct fields?
  6. Re-run the full test suite mentally (or in the sandbox) before declaring done.
  7. Self-review — for non-trivial changes, run references/self-review-prompt.md against the diff before presenting it. Skip for trivial changes per the CLAUDE.md tradeoff note.

See references/examples.md for full before/after walkthroughs of this workflow in Java, Python, and C.

Non-negotiable rules

  • No comments that explain what the code does — rename instead. Comments are reserved for why, when the reason is non-obvious (e.g. a regulatory constraint, a workaround for a library bug).
  • No God classes/functions/modules. Single Responsibility applies to files and modules too, not just classes.
  • No public mutable state crossing a layer boundary. Use DTOs/value objects at boundaries (Java/Spring, Python), or plain structs passed by const-pointer (C).
  • In C: every malloc has a documented owner and a matching free; no implicit ownership transfer without a comment stating so explicitly. <!--LANG:c-->
  • In Java/Spring Boot: constructor injection only, never field injection. <!--LANG:java-->
  • In Python: type hints on all public function signatures; no bare except:. <!--LANG:python-->
  • In JS/TS: no any on public signatures; no floating/unhandled promises. <!--LANG:javascript-->
  • Tests are not optional and are not an afterthought — they define the contract before the implementation exists.

Enforcement configs

config/ at the repo root ships machine-enforceable versions of this guidance: .editorconfig (all languages)<!-- LANG:java -->, checkstyle.xml (Java)<!-- /LANG:java --><!-- LANG:python -->, ruff.toml (Python)<!-- /LANG:python --><!-- LANG:c -->, .clang-format + .clang-tidy (C)<!-- /LANG:c -->. If the target project doesn't already have equivalents, suggest copying these in rather than relying on the agent to remember the rules on every task.

Output expectations

When asked to write or refactor code, produce:

  1. The test(s) first (unless explicitly told otherwise).
  2. The implementation.
  3. A one-paragraph rationale citing which principle(s) drove each non-obvious design decision (skip if the change is trivial).

Do not narrate the skill mechanics to the user — apply it silently and produce senior-engineer-quality output.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.