Agent skill

Add Python Microservice

by microbus-io in 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.

Apache-2.0Auto-check passedBackend & APIs

Install Add Python Microservice

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

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

GitHub CLI
$ gh skill install microbus-io/fabric add-python-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/python/add-python-microservice .claude/skills/add-python-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-python-microservice
GitHub stars
172
Token cost
~1.1k tokens
SKILL.md length
323 words
Files
4
Skills in repo
33
Repo updated
First seen
Licence
Apache-2.0

At a glance

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.

  • Works in 7 steps: Run add-microservice → Add Python Source Files → Add python.go → …
  • User asks to create a microservice that calls Python
  • Runs Go and Python scripts from its folder
  • Runs ML inference

What it does

Add Python Microservice is an agent skill from 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.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files (for example `service.py`).

It sits in Backend & APIs, covering Microservices and DataFrames. It works with Python, NumPy, pandas and PyTorch. 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 a microservice that calls Python
  • Runs ML inference
  • Uses Python libraries (PyTorch
  • Sentence-transformers

Example prompts

  • “/add-python-microservice”

Requirements

  • Python 3

Workflow steps

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

  1. Run add-microservice
  2. Add Python Source Files
  3. Add python.go
  4. Extend the Service Fields
  5. Add MaxWorkers Config
  6. Wire OnStartup and OnShutdown
  7. Housekeeping

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 and Python), which the agent can run.

    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 Python Microservice loads about 1.1k tokens when it runs. Until then it costs about 51 tokens; SKILL.md has 323 words of instructions outside code blocks.

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

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). 323 words, ~1,086 tokens.

Download SKILL.mdSave it as .claude/skills/add-python-microservice/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
add-python-microservice
description
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.

CRITICAL: Read .claude/rules/python.txt before proceeding.

CRITICAL: Do NOT explore or analyze other microservices unless explicitly instructed to do so.

Workflow

This skill works in two modes:

  • New microservice: starts at Step 1, runs the standard add-microservice scaffold first.
  • Extend existing microservice: skips Step 1; the target package already exists and may have business logic. Every subsequent step is additive (it appends, never overwrites).

Copy this checklist and track your progress:

Adding Python support to a microservice:
- [ ] Step 1: Run add-microservice (skip when extending an existing service)
- [ ] Step 2: Add Python source files
- [ ] Step 3: Add python.go
- [ ] Step 4: Extend the Service fields
- [ ] Step 5: Add MaxWorkers config
- [ ] Step 6: Wire OnStartup and OnShutdown
- [ ] Step 7: Housekeeping
Step 1: Run add-microservice

Skip this step when extending an existing microservice.

Otherwise, run the add-microservice skill, skipping its housekeeping step (housekeeping runs once at the end of this skill instead). When it finishes, return here. The remaining steps assume myservice/ is the microservice directory.

Step 2: Add Python Source Files

Refuse to overwrite if either file already exists. Copy the template files to the microservice's root:

shell
test -e myservice/service.py        || cp .claude/skills/python/add-python-microservice/service.py myservice/service.py
test -e myservice/requirements.txt  || cp .claude/skills/python/add-python-microservice/requirements.txt myservice/requirements.txt
Step 3: Add python.go

Refuse to overwrite if the file already exists:

shell
test -e myservice/python.go || cp .claude/skills/python/add-python-microservice/python.go myservice/python.go

Change package myservice to match the microservice's package name. Leave the rest unchanged.

Step 4: Extend the Service Fields

In service.go, append the venv field to the existing Service struct, preserving any fields already there:

go
type Service struct {
    *Intermediate // IMPORTANT: Do not remove

    // ...existing fields...
    venv *pyvenv.Venv
}

Add these imports to service.go if they're not already there:

go
import (
    // ...
    "github.com/microbus-io/fabric/connector"
    "github.com/microbus-io/pyvenv"
)
Step 5: Add MaxWorkers Config

Run add-config:

  • Name: MaxWorkers
  • Type: int
  • Validation: int [1,]
  • Default: match the workload (e.g. 1 for LLM inference, 4 for I/O, 8 for parallel numpy/pandas)
  • Description: MaxWorkers caps how many calls into the Python venv may run concurrently.
Step 6: Wire OnStartup and OnShutdown

Add the Python lifecycle wiring to the existing OnStartup and OnShutdown bodies. Do not delete any existing code; append the new lines around it.

In OnStartup, add this block (anywhere in the body, but conventionally at the end so any earlier setup is in place before the venv goroutine launches):

go
sources, err := readPythonSources()
if err != nil {
    return errors.Trace(err)
}
svc.venv, err = pyvenv.New(pyvenv.Config{
    Sources:          sources,
    Requirements:     parseRequirements(pythonRequirements),
    MaxWorkers:       svc.MaxWorkers(),
    Logger:           svc,
    LivenessCallback: svc.onVenvLiveness,
})
if err != nil {
    return errors.Trace(err)
}
// Start the venv in the background. Auto-start is gated on deployment; in TESTING the
// venv is left dormant (parallels how tickers don't run in TESTING).
if svc.Deployment() != connector.TESTING {
    // Tests opt-in by calling svc.StartPyVenv(ctx)
    svc.Go(ctx, svc.venv.Start)
}

In OnShutdown, add this block (conventionally at the start, so the venv is released before any downstream resources the service shuts down later):

go
if svc.venv != nil {
    err := svc.venv.Close(ctx)
    if err != nil {
        svc.LogError(ctx, "Closing python venv failed", "error", err)
    }
}
Step 7: Housekeeping

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

Files

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

  • SKILL.md
  • python.go
  • requirements.txt
  • service.py

Open the folder on GitHubat commit fb98098

Compare with similar skills

Add Python 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 Python Microservice compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Add Python Microservice this skillmicrobus-io/fabric172—~1.1kAutomated safety check: PassApache-2.0
Python Executorcortega26/chile-hub1132 repos~1.5kAutomated safety check: PassMIT
Vaex Out-of-Core DataFramesdavila7/claude-code-templates32k12 repos~1.6kAutomated safety check: PassMIT
Candlestick Pattern SignalsHKUDS/Vibe-Trading35k—~468Automated safety check: PassMIT
DaskK-Dense-AI/scientific-agent-skills48k1 repos~4.4kAutomated safety check: NotesBSD-3-Clause
Ta Libagiprolabs/claude-trading-skills410—~2.4kAutomated safety check: NotesMIT

Similar skills

  • Python Executor

    cortega26/chile-hub

    Execute Python code in a safe sandboxed environment via [inference.sh](https://inference.sh).

    113 GitHub starsUsed in 2 repos~1.5k tokens
    Data & AnalyticsAuto-check passed
  • Vaex Out-of-Core DataFrames

    davila7/claude-code-templates

    Processes tabular datasets too large for RAM with Vaex: lazy DataFrames, fast aggregations, big-data plots and ML pipelines over CSV, HDF5, Arrow and Parquet.

    32k GitHub starsUsed in 12 repos~1.6k tokens
    Data & AnalyticsAuto-check passed
  • Candlestick Pattern Signals

    HKUDS/Vibe-Trading

    Detects 15 classic candlestick patterns with vectorized pandas code and combines bullish and bearish scores into a long, short or flat trading signal.

    35k GitHub stars~468 tokensUpdated yesterday
    Business, Finance & HRAuto-check passed
  • Dask

    K-Dense-AI/scientific-agent-skills

    Scales pandas, NumPy, and custom Python research workflows beyond memory or across clusters with Dask.

    48k GitHub starsUsed in 1 repo~4.4k tokens
    Data & AnalyticsAuto-check: notes
  • Ta Lib

    agiprolabs/claude-trading-skills

    C-optimized technical analysis with 150+ functions and 61 candlestick pattern recognition functions via TA-Lib

    410 GitHub stars~2.4k tokensUpdated 1 mo ago
    Data & AnalyticsAuto-check: notes
  • Scikit Learn Machine Learning

    jaechang-hits/SciAgent-Skills

    Classical ML in Python: classification, regression, clustering, dim reduction, evaluation, tuning, preprocessing pipelines.

    370 GitHub starsUsed in 1 repo~4k tokens
    Data & AnalyticsAuto-check passed

More from microbus-io/fabric

All 33 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 9 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 9 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 9 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 9 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 9 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 9 days ago
    Auto-check passed

Categories

Questions about Add Python Microservice

What does Add Python Microservice do?

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. Add Python Microservice is an agent skill from 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.

When should I use Add Python Microservice?

Add Python Microservice fits situations like: user asks to create a microservice that calls Python; runs ML inference; uses Python libraries (PyTorch; sentence-transformers.

How do I install Add Python Microservice in Claude Code?

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

How do I install Add Python Microservice in Codex?

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

Can I use Add Python 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-python-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-python-microservice, .gemini/skills/add-python-microservice, .github/skills/add-python-microservice and .opencode/skills/add-python-microservice in your project.

What does Add Python Microservice need to run?

Going by SKILL.md and its folder, Add Python Microservice needs Go and Python for the scripts in its folder. Our summary lists: Python 3.

Does Add Python 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 Python 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 Python Microservice use?

Add Python 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 Python Microservice use?

About 1.1k tokens (SKILL.md is roughly 4.3k 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 Python Microservice?

Skills that share tags, products or a category with Add Python Microservice: Python Executor (cortega26/chile-hub, 113 stars), Vaex Out-of-Core DataFrames (davila7/claude-code-templates, 32k stars), Candlestick Pattern Signals (HKUDS/Vibe-Trading, 35k stars) and Dask (K-Dense-AI/scientific-agent-skills, 48k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Add Python Microservice?

microbus-io (a GitHub organization) maintains it in microbus-io/fabric, which has 172 GitHub stars. The repository holds 33 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.