agentleFS
creoaurea-devlabcreoaurea-devlab/agentic-skills/skills/implement/SKILL.md

implement

Skill4 starsChanged 8 months agoMITView on GitHub

Agentic implementation skill that reads a project's structure, detects its tech stack, scores codebase health, and then selects the best strategies and sibling skills to implement the user's request — optimizing for smaller codebases and higher power-to-weight ratio. Use this skill whenever the user asks to: add a feature, refactor code, reduce bundle size, clean up a codebase, implement something new, improve code quality, reduce complexity, or says anything like "make this smaller", "make this better", "implement X", "build X", "clean this up", "reduce bloat", or "refactor". Also trigger when the user pastes code and asks for improvements, or when starting work on an unfamiliar project.

  • Reads credentials

191 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use setup-ts-deep-modules, ask-matt and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • liufeng1976Skill

    setup-ts-deep-modules

    Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.

    Also in 43 projects that use this

  • GoogleSkill

    ask-matt

    Ask which skill or flow fits your situation. A router over the skills in this repo.

    Also in 91 projects that use this

  • RoentekSkill

    loop-me

    Grill me about specs for the workflows I want to build, within this workspace.

    Also in 50 projects that use this

  • AWSSkill

    to-questionnaire

    Turn a decision you can't fully answer into a questionnaire for someone else to fill in.

    Also in 88 projects that use this

  • ryotaroh180105Skill

    claude-handoff

    Hand the current conversation off to a fresh background agent that picks up the work immediately.

    Also in 42 projects that use this

  • GoogleSkill

    to-spec

    Turn the current conversation into a spec and publish it to the project issue tracker — no interview, just synthesis of what you've already discussed.

    Also in 168 projects that use this

  • +3 more from google

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. 0 are common, 14 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 171 edited versions we read keep these.

  • 14

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read first, think second, code last.

    line 16
  2. Distinctive:

    Before writing a single line, build a mental model of what exists.

    line 29
  3. Distinctive:

    Read these files in order of priority (skip what doesn't exist):

    line 33
  4. Distinctive:

    Read the relevant sibling skill when the task matches:

    line 96
  5. Distinctive:

    Before writing code, answer these questions:

    line 111
  6. Distinctive:

    Can I solve this by deleting code?: If yes, do that instead.

    line 113
  7. Distinctive:

    Can I extend an existing module?: Prefer modification over creation.

    line 114
  8. Distinctive:

    Does this need a new dependency?: Only add if it saves >50 LOC and is <5KB gzipped.

    line 115
  9. Distinctive:

    Is the file I'm creating <150 lines?: If not, split by domain concern.

    line 116
  10. Distinctive:

    Am I adding types that TypeScript already infers?: Remove redundant annotations.

    line 117
  11. Distinctive:

    Stop and reconsider if you catch yourself:

    line 131
  12. Distinctive:

    After implementation, check your work:

    line 144
  13. Distinctive:

    When done, report to the user:

    line 154
  14. Distinctive:

    Choosing a heavier tool: when a lighter one exists in the project

    line 177

“Common” is measured: kept by at least 6 in 10 of the 171 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

Implement

Read first, think second, code last. Every implementation starts with understanding what already exists — because the fastest code is the code you delete.

Why This Skill Exists

LLMs default to additive solutions: more files, more abstractions, more dependencies. This skill inverts that instinct. The goal is always: fewer lines, fewer deps, more capability. Every change must justify its weight.


Phase 1 — Read the Project (mandatory, never skip)

Before writing a single line, build a mental model of what exists.

Step 1: Discover structure

Read these files in order of priority (skip what doesn't exist):

  1. Package manifest — package.json, pyproject.toml, Cargo.toml, go.mod
  2. Entry point — src/index.ts, src/main.ts, app/, cmd/
  3. Config files — tsconfig.json, vite.config.*, .env.example
  4. Context files — .context/, CLAUDE.md, AGENTS.md, README.md
  5. Existing skills — check for sibling skill folders in the skills directory

Step 2: Detect tech stack

From the manifest and configs, identify:

  • Language & version (TypeScript 5.x, Python 3.12, etc.)
  • Framework (React, Next.js, Fastify, FastAPI, etc.)
  • State management (Zustand, Redux, Pinia, etc.)
  • Validation (Zod, Pydantic, Valibot, etc.)
  • Build tool (Vite, esbuild, Turbopack, Ruff, etc.)
  • Test framework (Vitest, pytest, Jest, etc.)

Step 3: Score codebase health

Quick heuristics — no tooling needed:

SignalHealthyUnhealthy
Largest file<200 LOC>500 LOC
Dependencies<20 prod deps>50 prod deps
any types0>5
utils/ or helpers/ foldersabsentpresent
Default exports0>3
Dead code signalsclean importsunused imports visible

Record findings mentally. These inform which strategies to apply.


Phase 2 — Choose Strategy

Based on the project analysis, select the approach:

Decision tree

Is this a new feature?
├── Yes → Check if existing module can absorb it (prefer extension over creation)
│         If new module needed → follow spec-driven skill (Spec → Schema → Module)
│         Apply lean-typescript patterns for implementation
│
Is this a refactor/cleanup?
├── Yes → Score health first
│         High bloat → apply lean-typescript debloating references
│         Architectural issues → apply spec-driven 4-pillar restructure
│         Dead code → run Knip or manual dead-export scan
│
Is this a bug fix?
├── Yes → apply debug-loop skill (reproduce → isolate → fix → verify)
│
Is this unclear?
├── Yes → ask the user one clarifying question, then proceed

Sibling skill selection

Read the relevant sibling skill when the task matches:

  • lean-typescript/ — any TypeScript work, anti-bloat, patterns, toolchain
  • spec-driven/ — new modules, API contracts, schema design
  • debug-loop/ — bugs, startup failures, runtime errors
  • roadmap/ — planning, milestones, sprint organization

Load only what's needed. Don't read all skills for every task.


Phase 3 — Implement

The Lean Implementation Checklist

Before writing code, answer these questions:

  1. Can I solve this by deleting code? If yes, do that instead.
  2. Can I extend an existing module? Prefer modification over creation.
  3. Does this need a new dependency? Only add if it saves >50 LOC and is <5KB gzipped.
  4. Is the file I'm creating <150 lines? If not, split by domain concern.
  5. Am I adding types that TypeScript already infers? Remove redundant annotations.
  6. Am I validating data that's already typed? Validate at boundaries only.

Implementation patterns (apply contextually)

  • Functions over classes — unless the domain genuinely needs state + methods together
  • Named exports only — better tree-shaking, better refactoring
  • Feature folders — group by domain, not by technical layer
  • Result types over exceptions — explicit error flow, no hidden control jumps
  • Zod/Pydantic at boundaries — trust internal types, validate external data
  • Pure core, I/O shell — business logic as pure functions, I/O at the edges

What to reject

Stop and reconsider if you catch yourself:

  • Creating a utils.ts or helpers.ts
  • Wrapping every async call in try-catch
  • Adding JSDoc that restates the type signature
  • Building a class hierarchy (Manager → Service → Handler)
  • Adding a config option for something that never changes
  • Writing >20 lines of defensive null-checking inside typed code

Phase 4 — Verify

After implementation, check your work:

  1. Line count delta — did the codebase grow? By how much? Justify every new line.
  2. Dependency delta — did you add deps? Each must pass the <5KB / >50LOC-saved test.
  3. Type safety — run tsc --noEmit or equivalent. Zero errors.
  4. Tests — run existing tests. If you changed behavior, update or add tests.
  5. Build — verify the project builds cleanly.

Completion summary

When done, report to the user:

## Changes
- [what changed, 1-2 sentences]

## Impact
- Files changed: N
- Lines added/removed: +X / -Y (net: ±Z)
- Dependencies added/removed: [list or "none"]

## Verified
- [ ] Types check
- [ ] Tests pass
- [ ] Build succeeds

Anti-patterns

  • Implementing before reading — you will duplicate existing functionality
  • Adding abstractions "for the future" — YAGNI; implement what's needed now
  • Choosing a heavier tool when a lighter one exists in the project
  • Ignoring existing patterns — match the project's style, don't impose your own
  • Skipping verification — unverified changes are unfinished changes

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.