Skip to main content
rule CX Codex

backend-node — Claude Code rule: what it does, how to install

backend-node is a Claude Code rule for Node.js backend files and hook ingestion logic. It keeps API responses compatible and enforces database transaction safety.

MIT ★ 1,198 updated 2026-10-23

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/rules/backend-node.md
Open on GitHub

What backend-node does

The rule scopes to server/**/*.js and scripts/**/*.js. It mandates backward compatibility for API responses unless you explicitly ask for breaking changes. Route modifications require thorough input validation and structured error formats.

Database interactions must follow prepared-statement patterns established in server/db.js. Hook ingestion routines need to remain non-blocking and deterministic, keeping transaction boundaries intact during event handling. Touching status transitions requires verifying session and agent state machines.

What it helps with

  • preserve backward compatibility for Node.js API responses
  • enforce thorough input validation and structured errors on routes
  • keep hook ingestion deterministic and non-blocking
  • maintain transaction boundaries in event processing logic
  • follow prepared-statement patterns from server/db.js

Example prompts for the agent

  • Add input validation to the new endpoint in server/routes.js
  • Refactor event processing in scripts/worker.js while maintaining transaction safety
  • Update agent status transitions and verify the lifecycle state machine

How to install backend-node

Manually: put the files in place

.claude/rules/backend-node.md

The paths frontmatter field limits the files

Step by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use

Questions about backend-node

How do I install backend-node in Claude Code?

Place the rule file at .claude/rules/backend-node.md inside your repository. Claude Code applies it automatically when editing matching files.

Which paths does the backend-node rule monitor?

The rule scopes specifically to server/**/*.js and scripts/**/*.js.

How does backend-node handle database queries?

It instructs the assistant to use prepared-statement patterns established in server/db.js and preserve transaction integrity.

Source text

backend-node.md · MIT
---
paths:
  - "server/**/*.js"
  - "scripts/**/*.js"
---

# Backend and Hook Rules

- Keep API responses backward-compatible unless a breaking change is explicitly requested.
- Maintain deterministic, non-blocking hook ingestion behavior.
- Preserve transaction boundaries and data integrity in event processing logic.
- For route changes, validate input thoroughly and return structured errors.
- Prefer prepared-statement usage patterns already established in `server/db.js`.
- If touching status transitions, verify session and agent lifecycle state machines still make sense.

© hoangsonww · MIT · hoangsonww/Claude-Code-Agent-Monitor

Similar IDE rules

All IDE rules for Backend and APIs →

From the same set155

The whole set →
platform-status platform-status runs the CCAM diagnostics: hooks, config roots, dashboard version, MCP build state. Reports back without changing anything. CX Codex +1 ★ 1,198repo stars mcp-typescript Sets boundaries for TypeScript MCP servers: sends logs to stderr, keeps input schemas strict, and guards destructive actions. CX Codex +1 ★ 1,198repo stars run-operator run-operator — a subagent for operating Claude Code and Codex processes through CCAM, with a parameter check before each run, message, or stop action. CX Codex ★ 1,198repo stars mcp-reviewer mcp-reviewer reviews MCP server changes: tool schemas, safety gates on destructive calls, error handling and stdio correctness. Useful before you merge work on a server. CX Codex ★ 1,198repo stars report report is a Claude Code command that creates CCAM executive, cost, reliability, or workflow reports. Specify a report type and data scope in the request. CX Codex +1 ★ 1,198repo stars release-guard release-guard is a Claude Code skill that checks a repository before merge or release, comparing documented commands with package.json and architecture notes with current code paths. CX Codex +1 ★ 1,198repo stars repo-onboarding repo-onboarding guides AI coding agents through codebase architecture, layer selection, and test command discovery before editing. CX Codex +1 ★ 1,198repo stars mcp-maintainer The mcp-maintainer skill guides maintenance of the repository’s local MCP server, from checking its API to validating tool changes. Use it when updating MCP tools or investigating runtime issues. CX Codex +1 ★ 1,198repo stars

Project sponsors

Companies that keep this analytics open