Agent skill

Add Microservice

by microbus-io in microbus-io/fabric

TRIGGER when user asks to create, scaffold, or initialize a new microservice.

Apache-2.0Auto-check passedBackend & APIs

Install Add Microservice

skills CLI
$ npx skills add microbus-io/fabric --skill add-microservice -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install microbus-io/fabric add-microservice --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ 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-microservice .claude/skills/add-microservice && rm -rf skills-src

Use ~/.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/

Facts

Skill name
add-microservice
GitHub stars
172
Token cost
~1.9k tokens
SKILL.md length
879 words
Files
4
Skills in repo
32
Repo updated
First seen
Licence
Apache-2.0

At a glance

TRIGGER when user asks to create, scaffold, or initialize a new microservice.

  • Works in 10 steps: Determine the Name and Description → Create a Directory Structure → Prepare Coding Agent Files → …
  • User asks to create
  • Runs Go scripts from its folder; calls go
  • Initialize a new microservice

What it does

Add Microservice is an agent skill from microbus-io/fabric. TRIGGER when user asks to create, scaffold, or initialize a new microservice.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files.

It sits in Backend & APIs, covering 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.

When your agent uses it

  • User asks to create
  • Initialize a new microservice

Example prompts

  • “/add-microservice”

Workflow steps

10 steps, taken from the step headings in SKILL.md.

  1. Determine the Name and Description
  2. Create a Directory Structure
  3. Prepare Coding Agent Files
  4. Prepare definition.go
  5. Prepare embed.go
  6. Prepare service.go
  7. Prepare service_test.go
  8. Generate the Boilerplate
  9. Add to Main App
  10. Propose Features

What it can do on your machine

Read from SKILL.md and the folder at commit fb98098. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    Ships script files (Go), which the agent can run.

    Shell commands in SKILL.md call:

    • go

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Add Microservice loads about 1.9k tokens when it runs. Until then it costs about 24 tokens; SKILL.md has 879 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~24
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from microbus-io/fabric at commit fb98098, republished under its Apache-2.0 licence (© microbus-io). 879 words, ~1,900 tokens.

Download SKILL.mdSave it as .claude/skills/add-microservice/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
add-microservice
description
TRIGGER when user asks to create, scaffold, or initialize a new microservice.

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 microservice's hand-written source is myserviceapi/definition.go (the API spec) and service.go (the handler logic), plus the resource and test files. Run cmd/genservice to produce the rest.

Workflow

Copy this checklist and track your progress:

Creating a new microservice:
- [ ] Step 1: Determine the name and description
- [ ] Step 2: Create a directory structure
- [ ] Step 3: Prepare coding agent files
- [ ] Step 4: Prepare definition.go
- [ ] Step 5: Prepare embed.go
- [ ] Step 6: Prepare service.go
- [ ] Step 7: Prepare service_test.go
- [ ] Step 8: Generate the boilerplate
- [ ] Step 9: Add to main app
- [ ] Step 10: Propose features
Step 1: Determine the Name and Description

Determine the name of the microservice. Use only letters a through z and A through Z. The templates in this skill use myservice, myserviceapi, MyService and TestMyService as placeholders that are based on the name of the microservice.

Follow the name-microservice skill to choose a name and hostname that fit the project's domain hierarchy. The name describes what the microservice does and becomes the leading segment of the hostname, which the Hostname constant is set to in Step 4.

Determine a Go-style description for the microservice in the form MyService is X.

Step 2: Create a Directory Structure

Each microservice must be placed in a separate directory. Create a new directory for the new microservice. Use the name of the microservice in lowercase as the name of the new directory name.

In smaller projects, place the new directory under the root directory of the project. In larger projects, consider using a nested directory structure to group similar microservices together.

shell
mkdir -p myservice

Create two subdirectories.

  • The first should be a concatenation of the microservice directory and the suffix api
  • The second subdirectory should be named resources
shell
mkdir -p myservice/myserviceapi
mkdir -p myservice/resources

The directory structure should look like this.

myproject/
└── myservice/
    ├── myserviceapi/
    └── resources/

IMPORTANT: File names in the following steps are relative to the new myservice directory, unless indicated otherwise.

The hand-written file preparation steps (4-7) can be performed in parallel; the generator step (8) must follow them.

Step 3: Prepare Coding Agent Files

Create CLAUDE.md with the hostname as an H1 heading:

md
# my.service.hostname

**CRITICAL**: This directory is a Microbus microservice. Before performing any task, check for pertinent skills in `.claude/skills/` and its subdirectories. Follow the workflow of the most relevant skill.

Create PROMPTS.md with the prompt used to create this microservice. Rephrase the language to include context that was not made explicit in the original prompt. The intent is to maintain an auditable trail of the prompts, and to allow a future agent to reproduce the functionality of the microservice from these prompts.

Save the prompt as follows.

md
## Prompt title

Prompt comes here...
Step 4: Prepare definition.go

Create myserviceapi/definition.go with the content of the template definition.go located in the directory of this skill. This is the single source of truth for the microservice's API: the add-feature skills append define.* vars (and their In/Out structs) here, and cmd/genservice projects everything else from it.

  • The Hostname constant holds the hostname in which this microservice will be addressable. Set it to the hostname chosen via the name-microservice skill in Step 1 (e.g. myservice.path.some.myproject)
  • Name is the decorative PascalCase name of the microservice (it cannot be derived from the lowercase directory)
  • Version is a generation counter bumped on each regeneration (not a semantic version); leave it at 1 for a new microservice
  • Description is the Go-style description from Step 1
  • The define import is pre-added with a var _ = define.None guard so the file compiles before any feature exists and the add-feature skills can append a define.* var without managing imports. Leave the guard in place
Step 5: Prepare embed.go

Create resources/embed.go with the following content verbatim.

go
package resources

import "embed"

//go:embed *
var FS embed.FS
Show full SKILL.md (347 more words)Show less
Step 6: Prepare service.go

Create service.go with the content of the template service.go located in the directory of this skill.

  • Match the package name to the directory name
  • Set the comment of the type definition of Service to describe this particular microservice. The provided value is a template. Do not copy it verbatim
Step 7: Prepare service_test.go

Create service_test.go with the content of the template service_test.go located in the directory of this skill.

  • Match the package name to the directory name
  • The imports are pre-declared for convenience now, before adding test code later
Step 8: Generate the Boilerplate

From the microservice's directory, run the generator. It reads myserviceapi/definition.go and writes myserviceapi/client.go, intermediate.go, mock.go, mock_test.go, and manifest.yaml.

shell
go run github.com/microbus-io/fabric/cmd/genservice .

Then verify the microservice compiles with go vet ./... from the project root (not go build, which conflicts with the main/ directory name).

Step 9: Add to Main App

Find main/main.go relative to the project root. Add the new microservice to the app in the main function. Add the appropriate import statement at the top of the file.

go
import (
	// ...
	"github.com/mycompany/myproject/myservice"
)

func main() {
	// ...
	app.Add(
		// HINT: Add solution microservices here
		myservice.NewService(),
	)
	// ...
}
Step 10: Propose Features

Ask the user if they'd like you to propose a design for the microservice. If the user declines, skip the remainder of this step.

Use the context provided by the user and propose a set of features for this microservice for each of the following categories. You may engage the user and ask for additional information if required.

  • Configuration properties - runtime settings (strings, durations, booleans, etc.) read via the connector
  • Functional endpoints (RPCs) - typed request/response functions with input/output structs, marshaling, and client stubs
  • Web handler endpoints - raw http.ResponseWriter/http.Request handlers for serving HTML, files, or custom HTTP responses
  • Outbound events - messages this microservice fires for others to consume
  • Inbound event sinks - handlers that react to events emitted by other microservices
  • Tickers - recurring operations on a schedule
  • Metrics - counters, gauges, and histograms for observability

Append the proposed design to CLAUDE.md under the following heading, then show it to the user. Ask the user if they'd like you to implement any of the features. Do not implement without explicit approval from the user.

md
## Agent Design Proposal

*This section is the original pre-development proposal. It reflects the intended design at the time of creation and may not match the current implementation.*

© 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

Files

SKILL.md and 3 other files in .claude/skills/microbus/add-microservice of microbus-io/fabric.

  • SKILL.md
  • definition.go
  • service.go
  • service_test.go

Open the folder on GitHubat commit fb98098

Compare with similar skills

Add Microservice 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.

Add Microservice compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Add Microservice this skillmicrobus-io/fabric172—~1.9kAutomated safety check: PassApache-2.0
Node Backend Development Guidelinesdiet103/claude-code-infrastructure-showcase10k2 repos~2kAutomated safety check: PassMIT
Nodejs Backend Patternsever-works/ever-works15818 repos~4kAutomated safety check: PassAGPL-3.0
AWS Serverless Edazxkane/aws-skills3674 repos~3.2kAutomated safety check: PassMIT
Golang Proantoniopaya22/go-rest-template1723 repos~1.2kAutomated safety check: PassMIT
Dr Jskilljdubois/dr-jskill342—~4.6kAutomated safety check: NotesApache-2.0

Similar skills

  • Node Backend Development Guidelines

    diet103/claude-code-infrastructure-showcase

    Sets layered architecture and coding rules for Node.js, Express and TypeScript microservices, covering routes, controllers, services, repositories, Prisma, Sentry and Zod.

    10k GitHub starsUsed in 2 repos~2k tokens
    Backend & APIsAuto-check passed
  • 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.

    158 GitHub starsUsed in 18 repos~4k tokens
    Backend & APIsAuto-check passed
  • AWS Serverless Eda

    zxkane/aws-skills

    AWS serverless and event-driven architecture expert based on Well-Architected Framework.

    367 GitHub starsUsed in 4 repos~3.2k tokens
    Backend & APIsAuto-check passed
  • Golang Pro

    antoniopaya22/go-rest-template

    Implements concurrent Go patterns using goroutines and channels, designs and builds microservices with gRPC or REST, optimizes Go application performance with pprof, and enforces idiomatic Go with…

    172 GitHub starsUsed in 3 repos~1.2k tokens
    Backend & APIsAuto-check passed
  • Dr Jskill

    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.

    342 GitHub stars~4.6k tokensUpdated 8 days ago
    Backend & APIsAuto-check: notes
  • Hybrid Cloud Test Gen

    getsentry/sentry

    Official

    Generate hybrid cloud tests for the Sentry codebase. An agent skill from getsentry/sentry.

    46k GitHub stars~2.6k tokensUpdated today
    Backend & APIsAuto-check passed

More from microbus-io/fabric

All 32 skills in this repo
  • Add Config

    microbus-io/fabric

    TRIGGER when user asks to add or modify a configuration property or setting, or to make a value configurable.

    172 GitHub stars~2.3k tokensUpdated 10 days ago
    Auto-check passed
  • Add Function

    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.

    172 GitHub stars~2.4k tokensUpdated 10 days ago
    Auto-check passed
  • Add Inbound Event

    microbus-io/fabric

    TRIGGER when user asks to listen for, subscribe to, or handle an event emitted by another microservice.

    172 GitHub stars~1.4k tokensUpdated 10 days ago
    Auto-check passed
  • Add Metric

    microbus-io/fabric

    TRIGGER when user asks to add or modify a metric, counter, gauge, or histogram, or to track/measure an operation.

    172 GitHub stars~1.5k tokensUpdated 10 days ago
    Auto-check passed
  • Add Outbound Event

    microbus-io/fabric

    TRIGGER when user asks to fire, emit, or publish an event that other microservices can subscribe to.

    172 GitHub stars~1.7k tokensUpdated 10 days ago
    Auto-check passed
  • Add Python Function

    microbus-io/fabric

    TRIGGER when user asks to add a Python-backed function endpoint to an existing Python-backed microservice.

    172 GitHub stars~1.3k tokensUpdated 10 days ago
    Auto-check passed

Categories

Questions about Add Microservice

What does Add Microservice do?

TRIGGER when user asks to create, scaffold, or initialize a new microservice. Add Microservice is an agent skill from microbus-io/fabric. TRIGGER when user asks to create, scaffold, or initialize a new microservice.

When should I use Add Microservice?

Add Microservice fits situations like: user asks to create; initialize a new microservice.

How do I install Add Microservice in Claude Code?

Run `npx skills add microbus-io/fabric --skill add-microservice -a claude-code`. Or copy the skill folder (.claude/skills/microbus/add-microservice in microbus-io/fabric) into .claude/skills/add-microservice in your project. Claude Code loads it when a task matches its description.

How do I install Add Microservice in Codex?

Run `npx skills add microbus-io/fabric --skill add-microservice -a codex`. Or copy the skill folder (.claude/skills/microbus/add-microservice in microbus-io/fabric) into .agents/skills/add-microservice in your project. Codex loads it when a task matches its description.

Can I use Add Microservice in Cursor, Gemini CLI or GitHub Copilot?

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-microservice -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-microservice, .gemini/skills/add-microservice, .github/skills/add-microservice and .opencode/skills/add-microservice in your project.

What does Add Microservice need to run?

Going by SKILL.md and its folder, Add Microservice needs Go for the scripts in its folder and the command-line tools its instructions call (go).

Does Add Microservice access the network?

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.

Is Add Microservice safe to install?

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.

What licence does Add Microservice use?

Add Microservice 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.

How many tokens does Add Microservice use?

About 1.9k tokens (SKILL.md is roughly 7.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Add Microservice?

Skills that share tags, products or a category with Add Microservice: Node Backend Development Guidelines (diet103/claude-code-infrastructure-showcase, 10k stars), Nodejs Backend Patterns (ever-works/ever-works, 158 stars), AWS Serverless Eda (zxkane/aws-skills, 367 stars) and Golang Pro (antoniopaya22/go-rest-template, 172 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Add Microservice?

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.