agentleFS
aws-solutionsaws-solutions/konductor/skills/backend-review/SKILL.md

backend-review

Skill11 starsChanged 50 days agoApache-2.0View on GitHub

Reviews backend code changes for architectural pattern compliance, type safety, DynamoDB correctness, and test quality. Use after implementing backend changes to catch issues before code review. Produces CRITICAL/IMPORTANT/SUGGESTION findings.

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 2

    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:

    Use this skill when:

    line 16
  2. Distinctive:

    Test passes only due to test order dependency

    line 78

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

Backend Review

Overview

Reviews backend code with a critical eye across architectural patterns, type safety, DynamoDB operations, error handling, observability, and test coverage. Provides direct, unbiased assessment — calls out over-engineering, KISS/YAGNI/DRY violations, and unnecessary complexity.

Usage

Use this skill when:

  • Reviewing backend changes before submitting a code review
  • Validating that a fix follows established architectural patterns
  • Checking DynamoDB operations for atomicity and efficiency
  • Assessing test coverage and quality

Core Concepts

Review Focus Areas

Architectural pattern compliance (layer separation), dead code detection (unused exports after refactoring), type safety (no any, null checks before assertions), DynamoDB correctness (atomicity, conditional writes, no extra queries), error handling (specific catches, structured logging), and test quality (fixture factories, order-independent assertions).

Review Checklist

Architectural Patterns

  • Handlers delegate to business facade — no direct business logic in handlers
  • Services created via factory — no direct instantiation
  • Data access through repository interfaces — no direct database calls
  • Proper layer separation maintained

Dead Code

  • Deleted or replaced functions have no remaining callers
  • No unused imports after refactoring
  • Documentation referencing deleted code is updated

Type Safety

  • No any types in production code
  • Null checks present before non-null assertions
  • Proper error types (not generic Error)
  • TypeScript utility types used correctly (Partial, Pick, Omit)

DynamoDB Operations

  • Multi-item updates use transactions (atomic)
  • No extra queries — write return values used where available
  • Conditional writes used to prevent race conditions
  • Key design follows single-table patterns

Error Handling

  • Specific error catching (not catch-all)
  • Proper error propagation
  • Structured logging with context and correlation IDs

Testing

  • Shared fixture factories used (not inline test data)
  • Order-independent assertions (toContainEqual)
  • Edge cases covered (null, empty arrays, boundaries)
  • New code has test coverage

Quality Gate

CRITICAL (blocks approval):

  • Race condition risk (non-atomic multi-item update without transaction)
  • Direct database connection bypassing repository layer
  • Missing null check before non-null assertion that will throw at runtime
  • Test passes only due to test order dependency

IMPORTANT (should fix):

  • any type in production code
  • Extra query when write return value could be used
  • Catch-all error handler masking specific errors
  • Inline test data instead of fixture factory
  • Over-engineered solution for a simple problem (call this out directly)

SUGGESTION:

  • Could add structured log fields for better observability
  • Could strengthen test assertions to check actual values not just existence
  • Could extract repeated logic into shared utility

Present findings as: CRITICAL → IMPORTANT → SUGGESTION. Ask: "Fix these issues? [y/n]" — unless scope_confirmed is true, in which case report all the findings and leave fixing to the caller, without asking.

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.