Agent skill

Add Task

by microbus-io in microbus-io/fabric

TRIGGER when user asks to add a workflow step, agent step, agentic task, task endpoint, or workflow phase.

Apache-2.0Auto-check passedBackend & APIs

Install Add Task

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

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

GitHub CLI
$ gh skill install microbus-io/fabric add-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/microbus/add-task .claude/skills/add-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-task
GitHub stars
172
Token cost
~3.3k tokens
SKILL.md length
1,715 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 workflow step, agent step, agentic task, task endpoint, or workflow phase.

  • Works in 11 steps: Read Local CLAUDE.md File → Determine the Signature → Determine the Route → …
  • User asks to add a workflow step
  • Calls go
  • Tasks that involve Agent instruction files

What it does

Add Task is an agent skill from microbus-io/fabric. TRIGGER when user asks to add a workflow step, agent step, agentic task, task endpoint, or workflow phase. "Agent step" and "workflow step" are interchangeable - a task is a single step of a workflow / agent, whether or not the surrounding workflow calls an LLM.

Its SKILL.md is about 3.3k 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 Agent instruction files 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.

When your agent uses it

  • User asks to add a workflow step
  • Tasks that involve Agent instruction files
  • Tasks that involve Microservices

Example prompts

  • “Agent step”
  • “workflow step”
  • “/add-task”

Workflow steps

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

  1. Read Local CLAUDE.md File
  2. Determine the Signature
  3. Determine the Route
  4. Determine a Description
  5. Determine the Required Claims
  6. Define Complex Types
  7. Declare the Task in definition.go
  8. Generate the Boilerplate
  9. Implement the Logic in service.go
  10. Test the Task
  11. 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

    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 Task loads about 3.3k tokens when it runs. Until then it costs about 68 tokens; SKILL.md has 1,715 words of instructions outside code blocks.

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

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). 1,715 words, ~3,324 tokens.

Download SKILL.mdSave it as .claude/skills/add-task/SKILL.md (or your agent's skills folder).
name
add-task
description
TRIGGER when user asks to add a workflow step, agent step, agentic task, task endpoint, or workflow phase. "Agent step" and "workflow step" are interchangeable - a task is a single step of a workflow / agent, whether or not the surrounding workflow calls an LLM.

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 task is declared as a define.Task var in myserviceapi/definition.go and implemented as a handler in service.go. Add the declaration and run cmd/genservice.

CRITICAL: Keep the // MARKER: MyTask comment on the define.Task var and on its In/Out structs.

IMPORTANT: Read .claude/rules/workflows.txt for workflow and task conventions before proceeding.

Workflow

Copy this checklist and track your progress:

Creating or modifying a task endpoint:
- [ ] Step 1: Read local CLAUDE.md file
- [ ] Step 2: Determine the signature
- [ ] Step 3: Determine the route
- [ ] Step 4: Determine a description
- [ ] Step 5: Determine the required claims
- [ ] Step 6: Define complex types
- [ ] Step 7: Declare the task in definition.go
- [ ] Step 8: Generate the boilerplate
- [ ] Step 9: Implement the logic in service.go
- [ ] Step 10: Test the task
- [ ] Step 11: Housekeeping
Step 1: Read Local CLAUDE.md File

Read the local CLAUDE.md file in the microservice's directory. It contains microservice-specific instructions that should take precedence over global instructions.

Ensure the local CLAUDE.md advertises that this microservice implements agentic workflows. The Agent Instructions block holds one short paragraph per instruction so multiple instructions (workflows, SQL, auth) can coexist as separate paragraphs. The paragraph to add is:

markdown
This microservice implements agentic workflows. See `.claude/rules/workflows.txt` for the conventions.

How to apply:

  • If the file does not exist, create it with the hostname as an H1 heading, then add an ## Agent Instructions section containing the paragraph above.
  • If the file exists and already has an ## Agent Instructions section, append the paragraph (separated by a blank line) after the existing instructions; skip if a workflows-related paragraph is already present.
  • If the file exists but has no ## Agent Instructions section, insert one as the first section after the H1 hostname heading and add the paragraph.
Step 2: Determine the Signature

Determine the Go signature of the task endpoint. A task always receives ctx context.Context and flow *workflow.Flow as its first two arguments, followed by state fields it reads as input. It returns state fields it writes as output, plus err error.

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

Constraints:

  • The first argument must be ctx context.Context
  • The second argument must be flow *workflow.Flow
  • The function must return an err error
  • All input arguments (after flow) represent state fields read from the workflow state
  • All output arguments (except err) represent state fields written to the workflow state
  • To read and modify the same state field, use the Out suffix on the return value - the generator strips Out to map back to the same state key (e.g. input counter int and output counterOut int both map to state key "counter")
  • Complex types (structs) are allowed by value or by reference
  • All arguments must be serializable into JSON
  • Arguments must not be named t or svc
  • Argument names must start with a lowercase letter
  • The function name must start with an uppercase letter

Naming for fan-in: argument names carry no execution semantics. A fan-in field's reducer is set explicitly at graph-build time with graph.SetReducer(field, reducer); without one, the default is Replace (last write wins). Pick names that describe what the field is (e.g. failures, messages, score), not the merge strategy. Tasks writing to a reducer-managed field must produce only the delta for this branch, not the full accumulated value - otherwise fan-in produces duplicates. For example, a VerifyEmployment task running once per employer with graph.SetReducer("failures", workflow.ReducerAdd) should return failuresOut: 0 or 1 (its own count), not the running total.

Prefer typed input/output arguments over flow.Get / flow.Set. Inputs and outputs are auto-bound to state by name; the signature is the task's state contract, mocks get typed handlers, and a reader sees what the task reads and produces without scanning the body. Reserve flow.Get / flow.Set for keys whose names are dynamic or for internal types not in the API package. See the Best Practices section of .claude/rules/workflows.txt for the rationale.

forEach branches see auto-injected per-element fields. When the task runs as the target of AddTransitionForEach(..., "items", "item"), the branch's state contains item (the element), itemIndex (0-based position), and itemCount (cohort size). Take any of them as a typed argument by name - no lookup code needed.

Step 3: Determine the Route

The route of the task endpoint is resolved relative to the hostname of the microservice. Tasks use the dedicated port :428 to prevent external access. Use the name of the task in kebab-case as its route, e.g. :428/my-task.

Step 4: Determine a Description

Describe the task starting with its name, in Go doc style: MyTask does X. This becomes the godoc comment on the define.Task var.

Describe what the task does and the effect it produces, not who or what is expected to invoke it. "Computes the credit score from the applicant's history" is good; "called by the credit-review workflow" or "used by the LLM as a tool" is not.

Step 5: Determine the Required Claims

Determine if the task 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. Leave empty if the task should be accessible by all.

Step 6: Define Complex Types

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.

A task's inputs are read from the workflow's shared state, which is populated by the workflow's caller, by LLMs, and by tasks possibly hosted in other microservices. dv8 tags on the task's In struct are enforced when the state is parsed; a violation fails the flow at this step rather than propagating invalid state.

Step 7: Declare the Task in definition.go

Append the define.Task var and its In/Out structs to myserviceapi/definition.go. Tasks always use the POST method.

go
/*
MyTask does X.
*/
var MyTask = define.Task{ // MARKER: MyTask
	Host: Hostname, Method: "POST", Route: ":428/my-task",
	In: MyTaskIn{}, Out: MyTaskOut{},
}

// MyTaskIn are the input arguments of MyTask.
type MyTaskIn struct { // MARKER: MyTask
	Input1 string  `json:"input1,omitzero"`
	Input2 float64 `json:"input2,omitzero"`
}

// MyTaskOut are the output arguments of MyTask.
type MyTaskOut struct { // MARKER: MyTask
	Output1 bool `json:"output1,omitzero"`
}
  • Host is always Hostname. Method is always POST. Route comes from Step 3
  • The In struct holds the input arguments excluding ctx and flow; the Out struct holds the output arguments excluding err
  • For an output field with the Out suffix, strip the suffix from the JSON tag so it maps to the same state key as the input (e.g. CounterOut int with json:"counter,omitzero")
  • If an In/Out field's type comes from another package (e.g. a time.Time field needs "time"), add that import to definition.go
  • Add the gating fields only when needed:
    • RequiredClaims: "roles.manager && level>2" for the claims from Step 5 (omit when open)
    • TimeBudget: 5 * time.Minute if the task has a known runtime ceiling shorter than the foreman default (2m, hard ceiling 15m); add the "time" import. For work that does not fit within 15m, use the Interrupt-and-Resume or Polling-with-Retry patterns from .claude/rules/workflows.txt
Show full SKILL.md (643 more words)Show less
Step 8: Generate the Boilerplate

From the microservice's directory, run the generator. It regenerates myserviceapi/client.go (the Executor and Subgraph methods), intermediate.go (the marshaler, ToDo entry, and subscription), 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.

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

Then, from the project root, bring the module's dependencies up to date and verify the microservice compiles:

shell
go mod tidy
go vet ./...

Run go mod tidy first: a task that introduces a new import (a downstream client, or the foreman for subflows and workflow tests) can pull transitive dependencies that are not yet in go.sum, which makes go vet fail with missing go.sum entry until the module is tidied.

Step 9: Implement the Logic in service.go

The previous step generated a placeholder task func (svc *Service) MyTask(ctx context.Context, flow *workflow.Flow, ...) in service.go, with the signature and godoc projected from definition.go, tagged // MARKER: MyTask and holding a // TODO body. Fill in that body; leave the generated signature and godoc as they are. Complex types refer to their definition in myserviceapi.

The task receives state fields as input arguments and returns state fields as output. It also has access to flow for control operations (flow.Goto(), flow.Interrupt(), flow.Subgraph(), flow.Retry(), flow.Sleep()) and for field-based state access (flow.GetString(), flow.Set()) when needed. Interrupt and Subgraph both park the step and return (data, yield, err); the task must return nil when yield is true and may read data / branch on err once it resolves (see "Subgraphs and Interrupts" in .claude/rules/workflows.txt).

To invoke another microservice's workflow as an isolated child flow (a subgraph) from inside this task body, use that microservice's generated Subgraph client (only the explicit inputs cross in, only the explicit outputs cross back). Do not use its Executor from a task body - the Executor is test-only.

go
output1, yield, err := otherapi.NewSubgraph(flow).OtherWorkflow(ctx, input1, input2)
if yield || err != nil {
	return err
}
// use output1

Idempotency. Tasks may be replayed: flow.Retry, worker-death recovery, and Subgraph re-entry all re-run the task body from the top. A task that fires an external side effect (charge a card, send an email, write to a non-transactional store) must carry its own dedupe key or check first whether the effect has already happened. The framework does not deduplicate side effects for you. Pure computation over state needs no special treatment.

State hygiene. If this task consumes large intermediates (LLM response, parsed payload, raw API body, image bytes) that downstream tasks do not need, drop them before returning. Two primitives compose for any cleanup pattern:

  • flow.Del(names...) - drop the listed fields.
  • flow.Clear() - drop every field; typical in a task that is about to build a fresh subgraph input from scratch.

To rename a field across a contract boundary, read it off flow.Snapshot() (a decoded copy that survives the clear), then flow.Clear() and flow.Set it under its new name.

Each records JSON null in the step's changes for dropped fields, so the cleanup is preserved in the audit trail; downstream merged state is absent the field (Replace reducer) or sees no contribution (Add/Append/Union/Merge/And/Or/Concat short-circuit to their identity when a branch's value is JSON null).

Step 10: Test the Task

Skip this step if instructed to be "quick" or to skip tests.

The boilerplate generator created a placeholder test function TestMyService_MyTask in service_test.go, tagged with a // MARKER: MyTask 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.

Step 11: 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/microbus/add-task of microbus-io/fabric.

Open the folder on GitHubat commit fb98098

Compare with similar skills

Add 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 Task compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Add Task this skillmicrobus-io/fabric172—~3.3kAutomated safety check: PassApache-2.0
Infer Conventionsanonaddy/anonaddy4.9k5 repos~3.1kAutomated safety check: PassMIT
Java Coding StandardsSnailclimb/AIGuide669—~1kAutomated safety check: PassNone
Deskcomm Doutrinamelgarafael/DeskcommCRM4.5k—~981Automated safety check: PassMIT
Specx Project Structuremaksimzayats/specx202—~1.5kAutomated safety check: PassMIT
QA Find Bugs MCPbex-co/beancount-io295—~3kAutomated safety check: PassMIT

Similar skills

  • Infer Conventions

    anonaddy/anonaddy

    A skill your agent uses to analyze how a Laravel application is actually written and record its conventions as shared rules.

    4.9k GitHub starsUsed in 5 repos~3.1k tokens
    Backend & APIsAuto-check passed
  • Java Coding Standards

    Snailclimb/AIGuide

    Java/Spring Boot 编码规范:用于编写、审查、重构和讲解 Java 代码。适用于 Java 风格、Spring Boot 架构、Controller/Service/Manager/DAO 分层、API 边界、Entity/VO/Form/DTO/BO 设计、MyBatis/MyBatis-Plus 持久化、事务、异常、日志、安全、性能、测试和 Java 代码评审等场景。默认结合…

    669 GitHub stars~1k tokensUpdated 3 mo ago
    Backend & APIsAuto-check passed
  • Deskcomm Doutrina

    melgarafael/DeskcommCRM

    Doutrina de código do DeskcommCRM — multi-tenancy com RLS, tripla de migration, restrição de canal, eixo self-host.

    4.5k GitHub stars~981 tokensUpdated today
    Backend & APIsAuto-check passed
  • Specx Project Structure

    maksimzayats/specx

    Create or reshape a Python FastAPI service repo into the specx clean core/delivery architecture using packaged scoped foundation bases.

    202 GitHub stars~1.5k tokensUpdated 2 mo ago
    Backend & APIsAuto-check passed
  • QA Find Bugs MCP

    bex-co/beancount-io

    Hunt bugs in the Beancount.io remote MCP server by driving the real POST /api-gateway/mcp endpoint with JSON-RPC and real MCP clients, checking transport, discovery, credential boundaries, tool and…

    295 GitHub stars~3k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • AWS Lambda Durable Functions

    awslabs/agent-plugins

    Official

    Build resilient, long-running, multi-step applications with AWS Lambda durable functions with automatic state persistence, retry logic, and orchestration for long-running executions.

    915 GitHub stars~2.3k tokensUpdated 2 days ago
    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

Questions about Add Task

What does Add Task do?

TRIGGER when user asks to add a workflow step, agent step, agentic task, task endpoint, or workflow phase. Add Task is an agent skill from microbus-io/fabric. TRIGGER when user asks to add a workflow step, agent step, agentic task, task endpoint, or workflow phase.

When should I use Add Task?

Add Task fits situations like: user asks to add a workflow step; tasks that involve Agent instruction files; tasks that involve Microservices.

How do I install Add Task in Claude Code?

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

How do I install Add Task in Codex?

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

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

What does Add Task need to run?

Going by SKILL.md and its folder, Add Task needs the command-line tools its instructions call (go).

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

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

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

Skills that share tags, products or a category with Add Task: Infer Conventions (anonaddy/anonaddy, 4.9k stars), Java Coding Standards (Snailclimb/AIGuide, 669 stars), Deskcomm Doutrina (melgarafael/DeskcommCRM, 4.5k stars) and Specx Project Structure (maksimzayats/specx, 202 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Add 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.