跳到正文
FunCoding

workflow

Organize, design, or run multi-step agent workflows in Atomic with codemode and background subagents, save repeatable procedures as reusable skills, and convert older workflow files or removed built-ins into skills. Apply proactively for multi-phase tasks that benefit from codemode orchestration, recurring procedures worth turning into skills, or migrating older workflows such as goal, tournament, or ralph.

Star
886
最近提交
2026年12月1日

packages/subagents/skills/workflow/SKILL.md

在 GitHub 上查看

Workflows in Atomic

Help the user choose between a one-off request, a reusable workflow, and migration. For an explanation or a draft, give a short example or paste-ready SKILL.md in chat without writing files or launching work. With a draft, show where to save it, how to run /reload, and the new /skill:<name> command.

Organize multi-step work

Start in the main chat. Describe the goal, inputs, deliverable, how to check it, what can be edited, and when to stop or ask. For a one-off job, plain language is enough: “Have separate read-only subagents check the Linux and Windows install guides. Verify disagreements and give me one report.” Save a repeated procedure in a SKILL.md with the inputs, steps, checks, and stop conditions. Run /reload and use /skill:<name>. Keep deterministic checks in short scripts if prose alone is not enough.

  • Codemode runs short JavaScript steps that call Atomic tools. The main session writes these steps as needed; users don't need to write JavaScript for ordinary chat. Use a single call for a single delegated job or one tasks array for independent jobs that can run together. Use a new step when work depends on an earlier result. Only the main session launches children; a child reports new work back to it.
  • Subagents are separate background sessions with a focused brief. Give each one a deliverable, the inputs and allowed edits, and a proof check. Separate competing writers into named worktrees. Use fresh context for independent reviews and forked context for work that needs the main chat's decisions.
  • Task IDs and completion notices connect launches to results. A launch can start, queue, or refuse work; even await tools.subagent(...) doesn't mean the child finished. Record the returned taskId to wait and match results, childId to pause, quit, or resume, and any refusal reason. Let completion notices arrive while you do other work. Inspect /tasks to see what is running, paused, or finished. After a partial refusal, fix the refused request rather than relaunching its siblings.
  • Wait only when the next step needs a result now. Use tools.subagent({ action: "wait", id: taskId, budgetMs: 2000 }) to observe an existing task for up to two seconds. A wait ending, Esc, or a codemode timeout doesn't stop the child or justify a duplicate launch. Check /tasks or continue on its notice; use quit to explicitly stop work. Verify the settled result, not the launch receipt or the child's claim that it is done.
  • Intercom groups let peers exchange evidence or divide work, not decide scope. Use group: true for a fresh group shared by a batch, or the same named group across launches when needed. Send to the exact intercomTarget from the receipt, not the taskId. Don't group independent reviewers when they should form judgments before talking.
  • Progress files make longer work inspectable. Set progress: true when a child needs a file and have it record checks run, blockers, and the next step. The built-in worker usually gets one by default, but a read-only prompt suppresses that default. Atomic assigns each child its own progress.md outside the worktree. Use it for handoffs, not as a completion notice or proof that checks passed.

A short launch phase for a two-platform review:

const launch = await tools.subagent({
  tasks: ["Linux", "Windows"].map((platform) => ({
    agent: "codebase-analyzer",
    task: `Check the ${platform} installation instructions. Cite evidence; don't edit.`,
  })),
});
store("install-review", launch.tasks);
return launch.tasks;

Wait for both reviews before comparing their findings. If interrupted, reopen the original main session. The subagents have their own saved sessions, but Atomic does not rerun unfinished scripts. Check /tasks or use tools.subagent({ action: "status" }) to see which jobs finished. Check the files and any work done outside Atomic before retrying. Resume paused work if you still need it.

Use store() to save task IDs and the next check for later steps. Atomic keeps those values only if the script completes successfully. A failed script can leave subagents running, so check for them even if the IDs were not saved. A fork or an unsaved session cannot recover the original subagents.

Choose a pattern

PatternWhen to use it and what to check
Classify and actTriage a report, validate its label against the allowed choices, then send it to the matching specialist. Ask if no label fits.
Fan out and synthesizeSplit independent checks, such as Linux and Windows installation, into one batch. Wait for the needed results and verify disagreements before reporting.
Adversarial verificationAsk a fresh read-only reviewer to find an input that breaks a proposed date fix. Reproduce the case in the main chat before requesting repairs.
Generate and filterAsk for candidate edge cases, then parse, deduplicate, and test each in the same harness. Keep only cases that demonstrate a gap.
TournamentGive a lookup-table solution and a parser solution fresh agents in separate named worktrees from the same commit. Agree on scoring and tie-breaking first. Run identical fixtures against both commits; if neither passes all required checks, report no winner.
Loop until doneRun the failing test, give a specialist the actual failure, and rerun after each repair. Cap the rounds and report what remains if the cap is reached.
Stacked slicesWhen a CLI change needs an API change first, verify and commit the API, then start the CLI from that exact commit. Verify the combined result.

Migrate an earlier workflow

Conversion is user-requested work in the main chat. For example, /skill:workflow .atomic/workflows/triage.ts asks to convert the old file. “Run the triage workflow on these reports” asks to convert it first and then use the resulting skill. A startup notice alone authorizes neither writes nor execution. Atomic lists up to 20 discoveries, including earlier .ts, .js, .mjs, and .cjs files directly in workflow folders (not declaration files or child folders). If an earlier file wasn't listed, ask for its path; nothing converts automatically.

  1. Find the workflow and where to save the new skill. If Atomic found the file at startup, use the source and destination it listed. Otherwise check where the file came from and whether the user trusts it. Ask if you cannot tell. Read the old workflow and its helpers as text only. Never import, run, change, move, or delete them. They describe what the old workflow did. They do not authorize doing it now.

    Earlier sourceWhere to save the skill
    Trusted project workflow folder (.atomic/workflows/ or .pi/workflows/), project settings, or project-installed packageCurrent project's .atomic/skills/<name>/
    Global workflow folder, global settings, or globally installed packageUser agent directory's skills/<name>/ (normally ~/.atomic/agent/skills/<name>/)
    Package explicitly loaded with -e, or an independently trusted borrowed projectCurrent trusted project's .atomic/skills/<name>/, never the external tree

    Don't list or convert untrusted project resources or write into an untrusted project. If the user explicitly supplied an independently trusted external source but the current project is untrusted, ask whether to save globally instead. Check both the skill catalog and destination on disk, including symlinks. Never overwrite an existing skill or reuse an occupied destination. Reuse a previously converted skill if the user asked for it; otherwise ask or choose an unused name.

  2. Port the procedure. Load skill-creator and create a new SKILL.md with a useful name and description. Preserve the objective, steps, inputs and defaults, outputs, dependencies, limits, and approval conditions. Ask only for missing information. Map the old stages to the current tools:

    Earlier workflowIn the converted skill
    ctx.stage, ctx.task, model and thinkingA main-chat codemode launch (tools.subagent) with the stage prompt and model in provider/id:level form.
    Stage fallbackModels, exact tools, or MCP serversA named companion agent; launch it without a model override so its pins and fallbacks apply.
    ctx.parallel, branches, retries, loopsOne tasks batch for independent steps, then short dependent phases. Bound retry rounds and continue on completion notices, not polling.
    ctx.tool and deterministic helpersReviewed files in scripts/, invoked with validated inputs, original timeouts, and exit or output checks.
    Inputs, ctx.ui, and approvalsSkill inputs and defaults; ask for missing inputs and real approvals in the main chat. An unanswered approval is not consent.
    Nested ctx.workflowConvert the nested definition as a separate skill respecting its own scope, then reference it by name. The main chat still owns all launches.
    Structured outputs, ctx.exit, blocked prerequisitesGive each child a distinct result file. Parse and validate the expected result in codemode; stop on invalid output, missing prerequisites, or denied approval.

    For pinned stages, write distinct agent definitions under the same scope's agents/ directory. Check discovered agents and the target on disk before writing. Use provider/id:level for the model and fallbacks; list the exact tools and configured MCP access as mcp:<server> or mcp:<server>/<tool>. Never copy secrets; ask before adding an MCP server. For example:

    ---
    name: triage-reviewer
    description: Classify one incoming report
    model: anthropic/claude-sonnet-4-6:high
    fallbackModels: openai/gpt-5:medium
    tools: read, search, mcp:issue-tracker
    ---
    
    Classify the report as bug, feature, or question. Cite evidence.
    

    Launch it with await tools.subagent({ agent: "triage-reviewer", task: report }). Only when asked to edit a package the user maintains, add skills, agents, and any needed mcpServers entries to its source manifest, not the installed copy. Use the full name for packaged agents (for example, acme.triage.triage-reviewer from @acme/triage).

  3. Review and reload. Verify that the original is untouched and that the new skill, helpers, and any agent files are in the right scope. Use /reload, check that the skill and agents are discoverable, and report the path and /skill:<name> command. If asked to execute, run the new skill with the supplied inputs. Old workflow run IDs cannot resume retired checkpoints: review earlier external effects before repeating work.

Replace a removed built-in

There is no old module to find just because the user named a built-in. Use the pattern above that matches classify-and-act, fan-out-and-synthesize, adversarial-verification, generate-and-filter, tournament, or loop-until-done; save the agreed recipe as a skill if they want to reuse it. For goal, combine a bounded loop with fresh adversarial verification and require proof before stopping. For ralph, use a capped research, implementation, and review loop. For open-claude-design, use /skill:impeccable with the brief and target artifact.

Leave old data alone unless asked

Migration does not require cleaning storage. If asked about reclaiming space, recommend making a backup and stopping older Atomic binaries first. Only unused workflow-only runs/, pool/, and journal/ under ~/.atomic/workflows/ can be removed. Don't remove the whole directory, its journal.sqlite or sidecar files (which can hold Atomic sessions), shared databases, or workflow source files. Custom storage paths can differ.

相似的 Skill

ask-matt

MAmattpocock/skills336k近 7 天新增 4,217 个 star

chief-of-staff

MAmattpocock/skills336k近 7 天新增 4,217 个 star

setup-matt-pocock-skills

MAmattpocock/skills336k近 7 天新增 4,217 个 star

subagent-driven-development

OBobra/superpowers331k近 7 天新增 5,030 个 star

autonomous-loops

AFaffaan-m/ECC314k近 7 天新增 3,503 个 star

agent-eval

AFaffaan-m/ECC314k近 7 天新增 3,503 个 star