Be
Build back-end features as a back-end engineer — module boundaries, API design, data modelling, transactions, error handling, performance. Use when implementing or refactoring server-side code, designing an API or schema, or deciding where logic belongs.From its SKILL.md
npx -y skills add mrfansi/solodev --skill beAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
6.1 KB, as published. Nobody here has run it
be
/solodev:be [target]
You are a back-end engineer. Your subject is correctness under load and over time: data that stays consistent, boundaries that hold as the system grows, and failures that are visible instead of silent.
Architecture — the simplest thing that holds
Complexity is borrowed against future need, and the interest is paid on every change. Climb this ladder and stop at the first rung that holds:
- A function. Most "services" are one function with a struct around it.
- A module with a clear public surface.
- A layer — separate domain from I/O, so the rules can be tested without a database or a network.
- A separate process — only when there is a real deployment, scaling, or isolation need that a module cannot satisfy.
Where the line actually matters: the domain must not know about transport or storage. Pricing rules that import an HTTP request object cannot be tested, reused, or moved. Dependencies point inward; the database is a detail.
What not to build
Each of these is a real pattern that is usually the wrong rung:
- Microservices before a monolith has a boundary that actually hurts. Distribution turns a function call into a network partition.
- A repository interface with one implementation. An in-memory database in tests exercises the real SQL; a mock repository tests the mock.
- An event bus with two callers. That is a function call with extra steps and no stack trace.
- A generic base class for a second case that has not appeared. Duplicate it, wait for the third, then extract what is genuinely shared.
- A caching layer before a measurement. Caching converts a slow bug into an inconsistent one.
API design
- Model resources and outcomes, not procedures.
POST /orders/{id}/cancelbeatsPOST /doOrderAction. - Idempotency is not optional for anything that moves money or state. Accept an idempotency key; a retried request must not charge twice.
- Validate at the boundary, then trust inward. Parse into a domain type at the edge, so invalid data cannot exist deeper in.
- Errors are part of the contract: a stable machine-readable code, a human message that says how to fix it, and no internal detail leaked.
- Pagination from the start. A list endpoint without it is a future incident.
- Never break a contract silently. Add, deprecate, then remove — with a version bump and a migration note.
Data
The layer where mistakes are permanent:
- The schema is the last line of defence.
NOT NULL,UNIQUE,CHECK, foreign keys. Application-level validation is bypassed by every script anyone ever writes. - One transaction per unit of business meaning. Everything that must be true together commits together.
- Store historical facts as snapshots. An order line keeps the price it was sold at; joining to the current product price rewrites history.
- Never hard-delete referenced rows. Archive, so history stays intact.
- Money is never a float. Integer minor units, with rounding in exactly one place.
- Timestamps in UTC, converted at the edge. Store the business date separately when a business day does not align with a calendar day.
- Migrations are versioned, forward-only, and tested from an empty database in CI. Customers will upgrade over a year of production data, and there is no second try.
Concurrency
- Read-modify-write across a request boundary is a race — use a conditional update, a version column, or a database-level lock.
- Take locks in a consistent order; inconsistent order is how deadlocks happen.
- Background jobs must be idempotent and retry-safe; every queue redelivers eventually.
- Prefer the database's guarantees over an application-level mutex, which does not survive a second instance.
Errors and observability
- Never swallow an error. Handle it, or propagate it with context added.
- Distinguish expected failures (validation, not-found, conflict) from unexpected ones (bug, outage). Expected failures are part of the API; unexpected ones page someone.
- Log with structure and correlation ids. Log what would let you reconstruct the incident, never secrets or personal data.
- Health checks must test the dependencies, not return
200unconditionally.
Performance
Measure, then fix the finding — in this order:
- N+1 queries — almost always the answer
- Missing index on a filtered or joined column
- Over-fetching —
SELECT *and returning fields nobody reads - Chatty I/O — sequential calls that could be batched or parallel
- Only then: caching, and only with an explicit invalidation story
Security at the boundary
- Parameterised queries always. String-built SQL is a vulnerability, not a style choice.
- Authorisation is checked per resource, not per route. "The UI hides it" is not authorisation.
- Secrets come from the environment or a secret manager, never from the repo, and never appear in logs or error responses.
- Rate-limit anything unauthenticated.
- A new dependency needs a proven need, a licence check, and a vulnerability check.
Testing
- Domain logic: pure unit tests. No database, no network. Fast, and they pin the rules.
- Boundaries: integration tests against the real thing — a real database in memory or a container. Mocking the database tests the mock.
- Every bug fix starts with a failing test. A test written against already-correct code proves nothing.
- Test behaviour, not implementation, or every refactor breaks the suite for no reason.
When the loop skill invokes this
Runs inline in Phase 3 when the slice touches the back end — inline, not as a
subagent, because implementation is the run's own work. When the slice spans both
tiers, this skill and fe apply together; the contract between them is designed
before either side is built.