Nodejs Backend Patterns
ever-works/ever-works
Build production-ready Node.js backend services with Express/Fastify, implementing middleware patterns, error handling, authentication, database integration, and API design best practices.
TRIGGER when user asks to add, create, or modify an API endpoint, function, or RPC, or a route that accepts typed arguments and returns typed results.
$ npx skills add microbus-io/fabric --skill add-function -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install microbus-io/fabric add-function --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/microbus-io/fabric.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/microbus/add-function .claude/skills/add-function && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "add-function" agent skill from https://github.com/microbus-io/fabric/tree/main/.claude/skills/microbus/add-function into .claude/skills/add-function/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-function", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/microbus-io/fabric/tree/main/.claude/skills/microbus/add-functionType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add microbus-io/fabric --skill add-function -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install microbus-io/fabric add-function --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microbus-io/fabric.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/microbus/add-function .agents/skills/add-function && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "add-function" agent skill from https://github.com/microbus-io/fabric/tree/main/.claude/skills/microbus/add-function into .agents/skills/add-function/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-function", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add microbus-io/fabric --skill add-function -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install microbus-io/fabric add-function --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microbus-io/fabric.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/microbus/add-function .cursor/skills/add-function && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "add-function" agent skill from https://github.com/microbus-io/fabric/tree/main/.claude/skills/microbus/add-function into .cursor/skills/add-function/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-function", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/microbus-io/fabric.git --path .claude/skills/microbus/add-function--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add microbus-io/fabric --skill add-function -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install microbus-io/fabric add-function --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microbus-io/fabric.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/microbus/add-function .gemini/skills/add-function && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "add-function" agent skill from https://github.com/microbus-io/fabric/tree/main/.claude/skills/microbus/add-function into .gemini/skills/add-function/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-function", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install microbus-io/fabric add-functionInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add microbus-io/fabric --skill add-function -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/microbus-io/fabric.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/microbus/add-function .github/skills/add-function && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "add-function" agent skill from https://github.com/microbus-io/fabric/tree/main/.claude/skills/microbus/add-function into .github/skills/add-function/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-function", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add microbus-io/fabric --skill add-function -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install microbus-io/fabric add-function --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microbus-io/fabric.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/microbus/add-function .opencode/skills/add-function && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "add-function" agent skill from https://github.com/microbus-io/fabric/tree/main/.claude/skills/microbus/add-function into .opencode/skills/add-function/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-function", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
add-functionTRIGGER when user asks to add, create, or modify an API endpoint, function, or RPC, or a route that accepts typed arguments and returns typed results.
Add Function is an agent skill from microbus-io/fabric. TRIGGER when user asks to add, create, or modify an API endpoint, function, or RPC, or a route that accepts typed arguments and returns typed results.
Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Backend & APIs, covering REST APIs and Microservices. The repository describes itself as: Microbus is the only fabric where every agentic workflow runs on a true microservice substrate - giving your workflows security, scale, observability, and prompt-driven authoring. The licence is Apache-2.0.
11 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit fb98098. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
goFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Add Function loads about 2.4k tokens when it runs. Until then it costs about 41 tokens; SKILL.md has 1,155 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from microbus-io/fabric at commit fb98098, republished under its Apache-2.0 licence (© microbus-io). 1,155 words, ~2,389 tokens.
.claude/skills/add-function/SKILL.md (or your agent's skills folder).CRITICAL: Do NOT explore or analyze other microservices unless explicitly instructed to do so. The instructions in this skill are self-contained to this microservice.
CRITICAL: A functional endpoint is declared as a define.Function var in myserviceapi/definition.go and implemented as a handler in service.go. Add the declaration and run cmd/genservice.
CRITICAL: Keep the // MARKER: MyFunction comment on the define.Function var and on its In/Out structs. They are waypoints for future edits.
Copy this checklist and track your progress:
Creating or modifying a functional endpoint:
- [ ] Step 1: Read local CLAUDE.md file
- [ ] Step 2: Determine the signature
- [ ] Step 3: Determine the method and route
- [ ] Step 4: Determine a description
- [ ] Step 5: Determine the required claims
- [ ] Step 6: Define complex types
- [ ] Step 7: Declare the endpoint in definition.go
- [ ] Step 8: Generate the boilerplate
- [ ] Step 9: Implement the logic in service.go
- [ ] Step 10: Test the function
- [ ] Step 11: HousekeepingCLAUDE.md FileRead the local CLAUDE.md file in the microservice's directory. It contains microservice-specific instructions that should take precedence over global instructions.
Determine the Go signature of the functional endpoint.
func MyFunction(ctx context.Context, input1 string, input2 ThirdPartyStruct) (output1 map[string]MyStruct, err error)Constraints:
ctx context.Contexterr errormap[string]anyMyStruct or *MyStructt or svchttpStatusCode must be of type inthttpResponseBody is present, no other return argument other than httpStatusCode and error can be presenthttpRequestBody, httpResponseBody and httpStatusCode are documented in the rules file under "Magic HTTP Arguments"The method of the endpoint determines the HTTP method with which it will be addressable. Unless there's a reason to use a specific method, like for a REST API, use ANY to accept requests with any method.
The route of the endpoint is resolved relative to the hostname of the microservice to determine how it is addressed. The common approach is to use the name of the endpoint in kebab-case as its route, e.g. /my-function.
To set a port other than the default 443, prefix the route with the port, e.g. :1234/my-function.
Encase path arguments with {} , e.g. /section/{section}/page/{page...}.
Prefix the route with // to set a hostname other than that of this microservice, e.g. //another.host.name:1234/on-something
Describe the endpoint starting with its name, in Go doc style: MyFunction does X. This becomes the godoc comment on the define.Function var.
Describe what the endpoint does and the effect it produces, not who is expected to call it. "Charges the card and returns a receipt id" is good; "called by the LLM as a tool" or "used by the checkout page" is not.
Do not write per-argument descriptions in the godoc. Put them in jsonschema_description:"..." tags on the In/Out struct fields (Step 7).
Determine if the endpoint should be restricted to authorized actors only. Compose a boolean expression over the JWT claims associated with the request that if not met will cause the request to be denied. For example: roles.manager && level>2. Default to closed: in a standard ingress configuration an empty requiredClaims on a :443 endpoint (or any port the operator added to AllowedInternalPorts) is reachable by the entire internet. Leave it empty only for an intentionally public endpoint; if the endpoint wields a stored secret or a privileged side effect, it must be gated by requiredClaims and/or an internal port. See the Ports and Authentication sections of .claude/rules/microbus.md.
Identify the struct types in the signature and define each in the myserviceapi directory following the
add-type skill: one file per type, camelCase json tags with omitzero, jsonschema_description tags,
optional dv8 validation tags, and an optional pure Validate method for cross-field invariants. A type
owned by another microservice is aliased rather than redefined. Skip this step if there are no complex types.
definition.goAppend the define.Function var and its In/Out structs to myserviceapi/definition.go.
/*
MyFunction does X.
*/
var MyFunction = define.Function{ // MARKER: MyFunction
Host: Hostname, Method: "ANY", Route: "/my-function",
In: MyFunctionIn{}, Out: MyFunctionOut{},
}
// MyFunctionIn are the input arguments of MyFunction.
type MyFunctionIn struct { // MARKER: MyFunction
Input1 string `json:"input1,omitzero" jsonschema_description:"Input1 is X"`
Input2 ThirdPartyStruct `json:"input2,omitzero" jsonschema_description:"Input2 is X"`
}
// MyFunctionOut are the output arguments of MyFunction.
type MyFunctionOut struct { // MARKER: MyFunction
Output1 map[string]MyStruct `json:"output1,omitzero" jsonschema_description:"Output1 is X"`
}Host is always Hostname. Method and Route come from Step 3. Set In and Out to the In/Out struct literals (MyFunctionIn{}, MyFunctionOut{})ctx; the Out struct holds the output arguments excluding err. Use PascalCase field names and camelCase json tags with omitzerodv8 validation tags (see the add-type skill); they are enforced automatically after decoding, rejecting an invalid payload with 400 Bad Request before the handler runs. Tags on Out struct fields are inerthttpRequestBody, httpResponseBody, httpStatusCode), set the field's json tag to -. A jsonschema_description tag still applies to a body field (HTTPRequestBody/HTTPResponseBody) and describes the whole body payload in the OpenAPI doc, e.g. `json:"-" jsonschema_description:"The object to create"`time.Time field needs "time"), add that import to definition.goRequiredClaims: "roles.manager && level>2" for the claims from Step 5 (omit when public)TimeBudget: 30 * time.Second to cap the handler's duration (omit for the default; add the time import if used)LoadBalancing: define.None to multicast to all replicas, or LoadBalancing: "my-queue" for a named queue; omit for the default hostname queue (load-balanced among peers)From the microservice's directory, run the generator. It regenerates myserviceapi/client.go, intermediate.go, mock.go, mock_test.go, and manifest.yaml from the updated definition.go. It also scaffolds a placeholder handler in service.go and a placeholder test in service_test.go for any new feature that lacks one, each ready for you to fill in.
go run github.com/microbus-io/fabric/cmd/genservice .Then verify the microservice compiles with go vet ./... from the project root.
service.goThe previous step generated a placeholder handler func (svc *Service) MyFunction(...) in service.go, with the signature and godoc projected from definition.go, tagged // MARKER: MyFunction and holding a // TODO: Implement MyFunction body. Replace that body with the handler's logic. Leave the generated signature and godoc as they are: they are the contract from definition.go, so if the signature is wrong, fix definition.go and regenerate rather than editing service.go. Complex types refer to their definition in myserviceapi. Add imports for any packages the body references that are not already imported (e.g. "time" for a time.Time value).
Skip this step if instructed to be "quick" or to skip tests.
The boilerplate generator created a placeholder test function TestMyService_MyFunction in service_test.go, tagged with a // MARKER: MyFunction comment and a HINT block. Add one or more test cases at the bottom of that function, following the pattern shown in its HINT comment. Do not remove the HINT comment.
If the feature or microservice cannot or should not be tested - for example, it starts a daemon or requires a
resource unavailable in the test environment - do not delete the generated test. The generator keys on the test
function's name and would scaffold it again on the next regeneration. Instead, replace the entire body of the
test with a t.Skip("reason") explaining why.
Follow the housekeeping skill.
© microbus-io, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .claude/skills/microbus/add-function of microbus-io/fabric.
Open the folder on GitHubat commit fb98098
Add Function next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Add Function this skillmicrobus-io/fabric | 172 | — | ~2.4k | Automated safety check: Pass | Apache-2.0 | |
| Nodejs Backend Patternsever-works/ever-works | 158 | 18 repos | ~4k | Automated safety check: Pass | AGPL-3.0 | |
| Dr Jskilljdubois/dr-jskill | 342 | — | ~4.6k | Automated safety check: Notes | Apache-2.0 | |
| Hybrid Cloud Test Gengetsentry/sentry | 46k | — | ~2.6k | Automated safety check: Pass | Custom licence | |
| API Gatewayitsmostafa/aws-agent-skills | 1.2k | 1 repos | ~2.2k | Automated safety check: Pass | MIT | |
| Vss Deploy Detection Tracking 2DNVIDIA/skills | 3.5k | 1 repos | ~4.5k | Automated safety check: Pass | Apache-2.0 |
ever-works/ever-works
Build production-ready Node.js backend services with Express/Fastify, implementing middleware patterns, error handling, authentication, database integration, and API design best practices.
jdubois/dr-jskill
Creates Java + Spring Boot projects: Web applications, full-stack apps with Vue.js or Angular or React or vanilla JS, PostgreSQL, REST APIs, and Docker.
getsentry/sentry
Generate hybrid cloud tests for the Sentry codebase. An agent skill from getsentry/sentry.
itsmostafa/aws-agent-skills
AWS API Gateway for REST and HTTP API management. An agent skill from itsmostafa/aws-agent-skills.
NVIDIA/skills
A skill your agent uses when the user wants to deploy, run, debug, tear down, or call the REST API of the RTVI-CV 2D detection / tracking microservice.
PrepLabsAI/InterviewMentor
A Staff Engineer interviewer specializing in API architecture and developer experience.
microbus-io/fabric
TRIGGER when user asks to add or modify a configuration property or setting, or to make a value configurable.
microbus-io/fabric
TRIGGER when user asks to listen for, subscribe to, or handle an event emitted by another microservice.
microbus-io/fabric
TRIGGER when user asks to add or modify a metric, counter, gauge, or histogram, or to track/measure an operation.
microbus-io/fabric
TRIGGER when user asks to fire, emit, or publish an event that other microservices can subscribe to.
microbus-io/fabric
TRIGGER when user asks to add a Python-backed function endpoint to an existing Python-backed microservice.
microbus-io/fabric
TRIGGER when user asks to create a microservice that calls Python, runs ML inference, or uses Python libraries (PyTorch, pandas, sentence-transformers, numpy) for its core compute.
Categories
TRIGGER when user asks to add, create, or modify an API endpoint, function, or RPC, or a route that accepts typed arguments and returns typed results. Add Function is an agent skill from microbus-io/fabric. TRIGGER when user asks to add, create, or modify an API endpoint, function, or RPC, or a route that accepts typed arguments and returns typed results.
Add Function fits situations like: user asks to add; modify an API endpoint; A route that accepts typed arguments and returns typed results.
Run `npx skills add microbus-io/fabric --skill add-function -a claude-code`. Or copy the skill folder (.claude/skills/microbus/add-function in microbus-io/fabric) into .claude/skills/add-function in your project. Claude Code loads it when a task matches its description.
Run `npx skills add microbus-io/fabric --skill add-function -a codex`. Or copy the skill folder (.claude/skills/microbus/add-function in microbus-io/fabric) into .agents/skills/add-function in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add microbus-io/fabric --skill add-function -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-function, .gemini/skills/add-function, .github/skills/add-function and .opencode/skills/add-function in your project.
Going by SKILL.md and its folder, Add Function needs the command-line tools its instructions call (go).
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Add Function is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.4k tokens (SKILL.md is roughly 9.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Add Function: Nodejs Backend Patterns (ever-works/ever-works, 158 stars), Dr Jskill (jdubois/dr-jskill, 342 stars), Hybrid Cloud Test Gen (getsentry/sentry, 46k stars) and API Gateway (itsmostafa/aws-agent-skills, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
microbus-io (a GitHub organization) maintains it in microbus-io/fabric, which has 172 GitHub stars. The repository holds 32 skills in this directory. The repository was last updated on September 28, 2026.
Source: microbus-io/fabric on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.