Skip to content
Back to skills

Architecture And Code

ASecurity

Architecture and code rules: existing layer and module boundaries, where business logic lives, reuse, named exports without barrel files, a feature flag for every new feature or domain, error handling, structured logging, reversible migrations, N+1 queries, translation files, UTC time, money amounts, dependency choice, model aliases in Claude Code configuration, Node.js and pnpm. Load when writing code, adding dependencies, or configuring Claude Code.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added December 2, 2026
developmentjavascripttypescriptjavashellnodeapidatabaseci/cd

Works with

  • claude code
  • api

Security analysis

A100/100

Scanned December 2, 2026

npx -y skills add the-up/ai --skill architecture-and-code --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Architecture And Code?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Architecture And Code
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/the-up-architecture-and-code/badge)](https://www.skillsdirectory.com/skills/the-up-architecture-and-code)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: architecture-and-code
description: "Architecture and code rules: existing layer and module boundaries, where business logic lives, reuse, named exports without barrel files, a feature flag for every new feature or domain, error handling, structured logging, reversible migrations, N+1 queries, translation files, UTC time, money amounts, dependency choice, model aliases in Claude Code configuration, Node.js and pnpm. Load when writing code, adding dependencies, or configuring Claude Code."
---

# Architecture and Code

- Follow the existing architecture and its domain, module, layer, and component boundaries. MVC and DDD aren't alternatives to each other; if the project uses both, respect the boundaries of both.
- Keep business rules in the project's business logic layer; don't move them into controllers or views.
- Before building a new structure, evaluate the existing components, services, utilities, and domain models; reuse them when they fit. Write new code to be reusable.
- Reduce duplication; don't add abstractions or layers for hypothetical needs.
- In JavaScript and TypeScript projects without a convention of their own, use named exports and import each module from its own file, not through barrel files that re-export a folder.
- Keep the existing technology and UI standards.
- Build each new feature or domain behind its own feature flag, so that the system stays healthy with the flag off, as the [Feature Flags](../feature-flags/SKILL.md) rules describe.
- Handle error cases and backward compatibility; don't swallow errors silently.
- Record errors and important events with structured logs that can be correlated by request ID.
- Make database changes with reversible, backward-compatible migrations.
- Avoid N+1 queries and unnecessary network or database calls.
- In multilingual projects, don't hard-code user-facing text; keep it in translation files.
- Store time in UTC and display it in the user's time zone; store money amounts as integer minor units or as decimals, not as floats.
- When adding a dependency or tool, choose the option that is compatible with the project and its license, the latest stable release, not deprecated, actively maintained, and widely used. Commit the lock file; install from the lock file in CI.
- In Claude Code subagent definitions and in the commands and scripts that start Claude Code, select the model with an alias such as `opus`, `sonnet`, `haiku`, or `fable`, or with `inherit` in a subagent, not with a full model ID such as `claude-opus-5-5`, so that each new model arrives without an update. Pin a full model ID only where a task needs one fixed model. An application's Claude API calls are different: they name an exact model ID, and moving them to a new model is planned work.
- In Node.js projects, recommend the current Node.js LTS release as the runtime and pnpm instead of npm as the package manager in every environment, including local development (Windows, Linux, and macOS), CI/CD, and prod. Pin the Node.js and pnpm versions with the `engines` and `packageManager` fields, and use the same versions in every environment. Write scripts and setup steps to be cross-platform; don't tie them to one operating system or shell. If the project uses another package manager, follow it and propose moving to pnpm as separate work. If that's approved, install pnpm in every environment with the official method.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.