Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

add-workflow

БесплатноБез исполняемых скриптовНе проверен

TRIGGER when user asks to define a workflow graph, create an agent or agentic workflow, orchestrate tasks, or build a multi-step process. "Agent", "agentic…

microbus-ioот microbus-io★ 173 звезды на GitHub

Об этом скилле

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

CRITICAL: Keep the // MARKER: MyWorkflow comment on the define.Workflow 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 workflow graph:
- [ ] Step 1: Read local CLAUDE.md file
- [ ] Step 2: Determine the signature
- [ ] Step 3: Determine the route
- [ ] Step 4: Determine a description
- [ ] Step 5: Declare the workflow in definition.go
- [ ] Step 6: Generate the boilerplate
- [ ] Step 7: Implement the graph builder in service.go
- [ ] Step 8: Test the workflow
- [ ] Step 9: 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:

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 input and output fields of the workflow. Inputs are the state fields the workflow expects from its caller. Outputs are the state fields the workflow produces as its result. The signature is documentation only - it describes the workflow's expected state contract but does not generate typed code. The actual state is map[string]any.

MyWorkflow(inputField1 string, inputField2 float64) (outputField1 bool, outputField2 int)

Constraints:

  • The name status is reserved
  • All fields must be serializable into JSON
  • Field names must start with a lowercase letter
  • The workflow name must start with an uppercase letter

Step 3: Determine the Route

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

Step 4: Determine a Description

Describe the workflow starting with its name, in Go doc style: MyWorkflow does X. This becomes the godoc comment on the define.Workflow var.

Describe what the workflow does and the outcome it produces, not who is expected to run it. "Underwrites a credit application: gathers identity, employment and credit history, then approves or declines" is good; "called by the customer portal" or "used by the LLM as a tool" is not.

Step 5: Declare the Workflow in definition.go

Append the define.Workflow var and its In/Out structs to myserviceapi/definition.go. Workflows always use the GET method.

/*
MyWorkflow does X.
*/
var MyWorkflow = define.Workflow{ // MARKER: MyWorkflow
	Host: Hostname, Method: "GET", Route: ":428/my-workflow",
	In: MyWorkflowIn{}, Out: MyWorkflowOut{},
}

// MyWorkflowIn are the input arguments of MyWorkflow.
type MyWorkflowIn struct { // MARKER: MyWorkflow
	InputField1 string  `json:"inputField1,omitzero"`
	InputField2 float64 `json:"inputField2,omitzero"`
}

// MyWorkflowOut are the output arguments of MyWorkflow.
type MyWorkflowOut struct { // MARKER: MyWorkflow
	OutputField1 bool `json:"outputField1,omitzero"`
	OutputField2 int  `json:"outputField2,omitzero"`
}
  • Host is always Hostname. Method is always GET. Route comes from Step 3
  • The In/Out structs are documentation (OpenAPI, the runner UI, the generated Executor signature), not runtime contracts; state flows through the graph unfiltered
  • When a workflow both reads and returns the same state field (a read-modify-write field, e.g. a counter it increments), give the Out struct field the Out suffix and strip that suffix from the JSON tag so it maps to the same state key as the input (e.g. CounterOut int with json:"counter,omitzero"),
Полный SKILL.md на GitHub

Установить add-workflow в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл add-workflow?

TRIGGER when user asks to define a workflow graph, create an agent or agentic workflow, orchestrate tasks, or build a multi-step process. "Agent", "agentic workflow", and "workflow" are interchangeable here - an LLM is not required for a workflow to be an agent (rule-based, deterministic, and LLM-driven workflows are all agents).

Как установить скилл add-workflow?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл add-workflow запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить add-workflow с