Awesome-omni-skill code-quality
Node.js code quality standards for the serverless function runtime. Use when writing, reviewing, or refactoring JavaScript/TypeScript code.
install
source · Clone the upstream repo
git clone https://github.com/diegosouzapw/awesome-omni-skill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/development/code-quality-andreacadonna" ~/.claude/skills/diegosouzapw-awesome-omni-skill-code-quality && rm -rf "$T"
manifest:
skills/development/code-quality-andreacadonna/SKILL.mdsource content
Code Quality — Skill
Purpose
Maintain consistent, spec-compliant code throughout the serverless function runtime implementation.
When to Use
- Writing new source files
- Reviewing or refactoring existing code
- Making implementation decisions about structure or patterns
Language and Runtime Conventions
- Node.js with modern JavaScript or TypeScript. Use ES modules (
/import
).export - Web-standard
/Request
for the handler contract. Use the globalResponse
andRequest
objects (Node.js 18+ built-in) or a minimal polyfill.Response - Minimal dependencies. Do not add frameworks or libraries unless strictly required by the spec. Prefer Node.js built-ins.
- No TypeScript compilation complexity. If using TypeScript, keep the build step simple. Plain JavaScript is acceptable.
Code Structure Conventions
- One module, one responsibility. Each file should have a clear, single purpose.
- Named exports for public API. Default exports only for handler method functions.
- Handler functions are named by HTTP method:
,export function GET(request) {}
.export function POST(request) {} - No global mutable state except where explicitly required by the spec (warm module reuse via module-level variables is allowed per REQ-RTG-006).
Error Handling Conventions
- Runtime errors use the spec's JSON format:
.{"errorCode": "<CODE>", "message": "<detail>"} - Error codes are exactly:
,ROUTE_NOT_FOUND
,METHOD_NOT_ALLOWED
,HANDLER_EXCEPTION
,INVALID_HANDLER_RESPONSE
.INVOCATION_TIMEOUT - HTTP status mapping is fixed: 404, 405, 500, 500, 504 respectively.
- Handler exceptions must be caught and mapped to
with the original error message.HANDLER_EXCEPTION - Timeout enforcement uses AbortController or equivalent — do not rely on unref'd timers alone.
Testing Conventions
- E2E tests run via
(REQ-RCV-006).npm test - Tests start the runtime, send HTTP requests, and assert responses. No mocking of the runtime itself.
- Each spec scenario (Section 6) maps to at least one test case.
- Test exit code 0 on success (REQ-RCV-007).
Quality Checklist
- All source files use ES modules
- Handler contract uses Web-standard Request/Response
- No unnecessary dependencies added
- Error responses match spec JSON format exactly
- Timeout enforcement is 3000ms per invocation
- No debug prints or commented-out code in committed files
- Each file has a single, clear responsibility