# Smart Code Core

> Writes dense, correct code instead of verbose boilerplate. Use for any implementation, refactor, bug fix, or feature request. Prefer 10 lines that leverage the language/stdlib/framework over 100 lines of manual logic.

- Skill: `aresiddharthareddy/smart-code-core` (Agent Skill)
- Install (CLI): `npx skillmds@latest add aresiddharthareddy/smart-code-core`
- Raw SKILL.md: https://api.skillmd.com/api/skills/aresiddharthareddy/smart-code-core/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: aresiddharthareddy (https://skillmd.com/u/aresiddharthareddy)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/aresiddharthareddy/smart-code-core

---


# Smart Code Core

## Prime directive

Same behavior, fewer lines. Correctness and security are non-negotiable; volume is.

## Before writing code

1. State the **smallest** change that satisfies the request.
2. Check what the language, stdlib, or project already provides.
3. Prefer **composition** (call existing functions) over **reimplementation**.

## Density rules

| Prefer | Over |
|--------|------|
| Built-ins (`map`, `filter`, comprehensions, `Array.prototype`, LINQ, itertools) | Manual loops with temp variables |
| Declarative config (one object/schema) | Repeated imperative blocks |
| Early return / guard clauses | Deep nesting |
| Existing project helpers | New utility files |
| Type inference where clear | Redundant type ceremony |
| One well-named function | Three thin wrappers |

## Line budget (heuristic)

- New helper: default **≤15 lines**; justify every line above.
- Bug fix: **touch only** the failing path.
- Feature: **reuse** existing patterns in the nearest file before adding files.

## Anti-patterns (reject these)

- Wrapper functions that only call one other function.
- "Utils" files for one-off logic.
- Copy-paste with tiny variations — parameterize instead.
- Comments restating the code.
- Defensive code for impossible states.
- Abstractions used once.

## Quality gate (run mentally before finishing)

- [ ] Would a senior dev say "that's the obvious way"?
- [ ] Can any block be deleted without changing behavior?
- [ ] Does this match naming and style in the **nearest** existing file?
- [ ] Is the diff the **minimum** needed?

## Pair with

- `token-efficient-exploration` — before editing
- `minimal-diff` — while editing
- `dense-implementation` — for patterns
- `reuse-before-create` — before adding symbols

