Agent skill

Add Python Task

by microbus-io in microbus-io/fabric

TRIGGER when user asks to add a Python-backed workflow task to an existing Python-backed microservice.

Apache-2.0Auto-check passedBackend & APIs

Install Add Python Task

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

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

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

At a glance

TRIGGER when user asks to add a Python-backed workflow task to an existing Python-backed microservice.

  • Works in 6 steps: Verify the Microservice Is Python-Backed → Determine the Task Signature → Run add-task with Manual + Tags("python") → …
  • User asks to add a Python-backed workflow task to an existing Python-backed microservice
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Tasks that involve Microservices

What it does

Add Python Task is an agent skill from microbus-io/fabric. TRIGGER when user asks to add a Python-backed workflow task to an existing Python-backed microservice.

Its SKILL.md is about 1.5k 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 Microservices. It works with Python. 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 add a Python-backed workflow task to an existing Python-backed microservice
  • Tasks that involve Microservices

Example prompts

  • “/add-python-task”

Requirements

  • Python 3

Workflow steps

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

  1. Verify the Microservice Is Python-Backed
  2. Determine the Task Signature
  3. Run add-task with Manual + Tags("python")
  4. Replace the Task Body with the Call+Await Durability Pattern
  5. Add the Python Function to service.py
  6. 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

    No scripts in the folder and no shell commands in SKILL.md (its code samples are go and python).

    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 Task loads about 1.5k tokens when it runs. Until then it costs about 30 tokens; SKILL.md has 574 words of instructions outside code blocks.

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

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). 574 words, ~1,541 tokens.

Download SKILL.mdSave it as .claude/skills/add-python-task/SKILL.md (or your agent's skills folder).
name
add-python-task
description
TRIGGER when user asks to add a Python-backed workflow task to an existing Python-backed microservice.

CRITICAL: Read .claude/rules/python.txt and .claude/rules/workflows.txt before proceeding. The former covers the Go-Python bridge; the latter covers task lifecycle, flow state, retries, and OnTimeout/OnError routing.

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.

Workflow

Copy this checklist and track your progress:

Adding a Python-backed workflow task:
- [ ] Step 1: Verify the microservice is Python-backed
- [ ] Step 2: Determine the task signature
- [ ] Step 3: Run add-task with Manual + Tags("python")
- [ ] Step 4: Replace the task body with the Call+Await durability pattern
- [ ] Step 5: Add the Python function to service.py
- [ ] Step 6: Housekeeping
Step 1: Verify the Microservice Is Python-Backed

The microservice must already have python.go and a service.py at its root. If not, run add-python-microservice first (it works both for fresh microservices and for extending an existing one without overwriting business logic).

Step 2: Determine the Task Signature

Determine the Go task signature. Task signatures include flow *workflow.Flow after ctx but before the typed inputs. Outputs that share a name with an input must use the Out suffix on the output side (read-modify-write pattern).

go
func MyTask(ctx context.Context, flow *workflow.Flow, input1 string, input2 int) (output1 float64, err error)

Python sees the inputs as a dict keyed by the field names in MyTaskIn. Python does not see ctx or flow.

Step 3: Run add-task with Manual + Tags("python")

Run the add-task skill, with these overrides applied as you reach each of its steps:

  • Step 7 (Declare the Task in definition.go): add Manual: true and Tags: []string{"python"} to the define.Task var, so the task is registered as a manual subscription tagged python and stays off the bus until the venv liveness callback activates the python-tagged group when Python is ready:

    go
    var MyTask = define.Task{ // MARKER: MyTask
        Host: Hostname, Method: "POST", Route: ":428/my-task",
        Manual: true, Tags: []string{"python"},
        In: MyTaskIn{}, Out: MyTaskOut{},
    }
  • Step 8 (Generate the Boilerplate): run normally. genservice emits the sub.Manual() and sub.Tag("python") wiring into the generated intermediate.go, and scaffolds the task stub in service.go and the test in service_test.go.

  • Step 9 (Implement the Logic in service.go): skip. Step 4 below replaces the generated stub's body.

  • Step 10 (Test the Task): run normally, then add a one-line opt-in HINT immediately after the app.RunInTest(t) line so a future reader can switch the test from mock-only to real-Python without hunting through docs:

    go
    app.RunInTest(t)
    
    // HINT: Uncomment to spin up real Python and exercise actual execution (slow on first run)
    // svc.StartPyVenv(ctx)
  • Step 11 (Housekeeping): skip; housekeeping runs once at the end of this skill instead.

When add-task finishes, return here for Step 4.

Show full SKILL.md (245 more words)Show less
Step 4: Replace the Task Body with the Call+Await Durability Pattern

In service.go, replace the task body that add-task left as a stub with the durable Call+Await pattern. The callID is persisted in flow state under the key pyCallID; if the task is re-entered (via an unlimited flow.Retry gated on a 408 timeout after the step's time budget expires), the existing callID is re-Awaited rather than a fresh call being issued. This lets a Python computation that exceeds the framework's 15-minute hop ceiling survive across task retries.

go
func (svc *Service) MyTask(ctx context.Context, flow *workflow.Flow, input1 string, input2 int) (output1 float64, err error) { // MARKER: MyTask
    if svc.venv == nil || !svc.venv.Ready() {
        return 0, errors.New("venv not ready", http.StatusServiceUnavailable)
    }

    callID := flow.GetString("pyCallID")
    if callID == "" {
        in := myserviceapi.MyTaskIn{
            Input1: input1,
            Input2: input2,
        }
        callID, err = svc.venv.Call(ctx, "my_task", in)
        if err != nil {
            return 0, errors.Trace(err)
        }
        flow.SetString("pyCallID", callID)
    }

    var out myserviceapi.MyTaskOut
    err = svc.venv.Await(ctx, callID, &out)
    if err != nil {
        if errors.StatusCode(err) == http.StatusRequestTimeout && flow.Retry(0, 1.0, 0, 0) {
            return 0, nil
        }
        flow.SetString("pyCallID", "") // clear on terminal error so downstream steps don't see it
        return 0, errors.Trace(err)
    }
    flow.SetString("pyCallID", "") // clear on success so downstream steps don't see it
    return out.Output1, nil
}

How the pattern composes:

  • First entry: pyCallID is empty, the task issues Call, persists the returned callID, then Awaits. If the step time budget allows the call to complete, the result is returned and pyCallID is cleared.
  • Retry entry (after 408 timeout): pyCallID is the previously-issued callID. The Python work has been running this whole time. The task skips Call and goes straight to Await, which either completes immediately (Python finished) or waits up to the next step time budget.
  • Terminal error or completion: pyCallID is cleared so the workflow's later steps don't see the now-consumed callID in flow state.
Step 5: Add the Python Function to service.py

Append a Python function to service.py (at the microservice's root) whose name is the snake_case form of the Go task name, accepting a dict and returning a dict. The docstring is the same description text as the task's godoc on the Go side.

python
def my_task(args):  # MARKER: MyTask
    """MyTask does X."""
    input1 = args["input1"]
    input2 = args["input2"]
    # ... compute ...
    return {"output1": 42.0}
Step 6: 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

Just SKILL.md in .claude/skills/python/add-python-task of microbus-io/fabric.

Open the folder on GitHubat commit fb98098

Compare with similar skills

Add Python Task 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 Task compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Add Python Task this skillmicrobus-io/fabric172—~1.5kAutomated safety check: PassApache-2.0
AWS Serverless Edazxkane/aws-skills3674 repos~3.2kAutomated safety check: PassMIT
Temporal Developerlatitude-dev/latitude-llm4.7k—~1.5kAutomated safety check: PassMIT
K8e Sandboxxiaods/k8e500—~6kAutomated safety check: PassApache-2.0
Temporal Developertemporalio/skill-temporal-developer230—~2.5kAutomated safety check: PassMIT
Intrinsic Core Service Authoringintrinsic-ai/intrinsic-core553—~2.2kAutomated safety check: PassApache-2.0

Similar skills

  • 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
  • Temporal Developer

    latitude-dev/latitude-llm

    This skill should be used when the user asks to "create a Temporal workflow", "write a Temporal activity", "debug stuck workflow", "fix non-determinism error", "Temporal Python", "Temporal…

    4.7k GitHub stars~1.5k tokensUpdated today
    Backend & APIsAuto-check passed
  • K8e Sandbox

    xiaods/k8e

    Run a goal end to end inside an isolated K8E sandbox pod (gVisor / Kata / Firecracker) instead of on the host: exec bash / Python / Node / TypeScript, install packages, move files in and out, reuse…

    500 GitHub stars~6k tokensUpdated 9 days ago
    Backend & APIsAuto-check passed
  • Temporal Developer

    temporalio/skill-temporal-developer

    Official

    Develop, debug, and manage Temporal applications across Python, TypeScript, Go, Java, .NET, Ruby, and Rust.

    230 GitHub stars~2.5k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Intrinsic Core Service Authoring

    intrinsic-ai/intrinsic-core

    Intrinsic Core microservice authoring, ServiceManifest definitions (realspec vs simspec), RuntimeContext port bindings (gRPC port 1 vs HTTP port 7), SIGTERM lifecycle handling, and .binpb sideloading.

    553 GitHub stars~2.2k tokensUpdated today
    Backend & APIsAuto-check passed
  • Fastapi Pro

    davila7/claude-code-templates

    Build high-performance async APIs with FastAPI, SQLAlchemy 2.0, and Pydantic V2.

    32k GitHub starsUsed in 8 repos~1.6k tokens
    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

Works with

Categories

Questions about Add Python Task

What does Add Python Task do?

TRIGGER when user asks to add a Python-backed workflow task to an existing Python-backed microservice. Add Python Task is an agent skill from microbus-io/fabric. TRIGGER when user asks to add a Python-backed workflow task to an existing Python-backed microservice.

When should I use Add Python Task?

Add Python Task fits situations like: user asks to add a Python-backed workflow task to an existing Python-backed microservice; tasks that involve Microservices.

How do I install Add Python Task in Claude Code?

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

How do I install Add Python Task in Codex?

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

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

What does Add Python Task need to run?

SKILL.md names no scripts, command-line tools or credentials: Add Python Task is instructions for the agent only. Our summary lists: Python 3.

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

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

About 1.5k tokens (SKILL.md is roughly 6.2k 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 Task?

Skills that share tags, products or a category with Add Python Task: AWS Serverless Eda (zxkane/aws-skills, 367 stars), Temporal Developer (latitude-dev/latitude-llm, 4.7k stars), K8e Sandbox (xiaods/k8e, 500 stars) and Temporal Developer (temporalio/skill-temporal-developer, 230 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Add Python Task?

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.