workflow-artifacts

workflow-artifacts is a skill for Claude Code, Codex from moberghr/mtk-agent-toolkit. It costs 36 tokens per session (1,917 once invoked), scanned A, original, MIT.

A way to save workflow progress and decisions as files under .mtk/workflows/. The saved records include an event log so work can continue after a restart, crash, or lost chat context.

In plain words
What is it for?
Use it during planning, building, debugging, reviewing, and fixing work, especially when a workflow has multiple phases or must be resumed later.
Why use it?
Important workflow state can disappear from a conversation, making it difficult to resume safely or know which steps were completed.

Skill for Claude CodeCodex

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the mtk plugin — 45 skills, 6 agents, 7 hooks, 1 MCP server shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/moberghr/mtk-agent-toolkit/workflow-artifacts
Any agent
npx skills add moberghr/mtk-agent-toolkit --skill workflow-artifacts
Clone the repo
git clone --depth 1 https://github.com/moberghr/mtk-agent-toolkit

Made for: Claude Code, Codex.

Or install mtk, the plugin that ships this one along with the rest of its 45 skills, 6 agents, 7 hooks, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for workflow-artifacts

README.md
[![agentmods](https://agentmods.dev/badge/skills/moberghr/mtk-agent-toolkit/workflow-artifacts.svg)](https://agentmods.dev/skills/moberghr/mtk-agent-toolkit/workflow-artifacts)
Your own site
<a href="https://agentmods.dev/skills/moberghr/mtk-agent-toolkit/workflow-artifacts"><img src="https://agentmods.dev/badge/skills/moberghr/mtk-agent-toolkit/workflow-artifacts.svg" alt="Measured on agentmods" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,917 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00036 $0.01917
Opus 5 $0.00018 $0.00958
Sonnet 5 $0.00007 $0.00383
Haiku 4.5 $0.00004 $0.00192

Measured 4d ago against content hash 23d9ebe8f7c8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

workflow-artifacts scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/workflow-artifacts/SKILL.md · 120 lines

How it starts

The opening of the file, as written. The whole thing — 120 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Workflow Artifacts

Overview

Orchestration state that lives only in chat is lost on compaction or restart. This skill stores it on disk under .mtk/workflows/{uuid}.json plus an append-only event log, using a small bash helper. Other workflow skills (implement, fix, planning-and-task-breakdown, spec-drift-detection) call this skill at phase boundaries and gate decisions.

When To Use

  • At the start of every BUILD, DEBUG, REVIEW, PLAN, or FIX workflow.
  • At every phase transition inside /mtk implement.
  • Whenever a named orchestration gate is evaluated (see .claude/references/orchestration-gates.md).
  • When resuming after compaction, restart, or handoff — list active workflows before starting fresh work.

When NOT To Use

  • Throwaway exploration where no commit will happen.
  • Single-turn read-only questions ("what does file X do?").
  • Inside subagents — only the orchestrator (main implement loop) writes artifacts. Subagents return structured output; the orchestrator decides what to persist.

Workflow

  1. Resolve helper path once into $WFA. The script ships at scripts/workflow-artifact.sh in this repo and at the same path in target installs, but a plugin-cache install may have it only under $CLAUDE_PLUGIN_ROOT — and that variable is sometimes unset. Resolve it once with the same three-tier idiom spec-driven-development uses for learnings.shMTK_HELPER_ROOT first (a checkout you pin; see CLAUDE.md), then the project copy, then the plugin copy — and call "$WFA" everywhere below instead of a bare path:
    WFA="$([ -n "${MTK_HELPER_ROOT:-}" ] && echo "$MTK_HELPER_ROOT/scripts/workflow-artifact.sh" || ([ -f scripts/workflow-artifact.sh ] && echo scripts/workflow-artifact.sh || echo "${CLAUDE_PLUGIN_ROOT:-.}/scripts/workflow-artifact.sh"))"
    
    Set MTK_HELPER_ROOT=<toolkit checkout> to force the scripts from that clone — the reliable path when dogfooding MTK from a separate checkout with $CLAUDE_PLUGIN_ROOT unset, or to pin one version out of a multi-version plugin cache. State is project-anchored: the script writes .mtk/workflows/ under $CLAUDE_PROJECT_DIR (falling back to the git top-level, then cwd), so when MTK skills live outside the target project (plugin/marketplace install), export CLAUDE_PROJECT_DIR=<project root> or run from the project root — otherwise state lands in the wrong tree.
  2. Init at workflow start. Capture the returned uuid into a session variable MTK_WF_UUID:
    MTK_WF_UUID=$("$WFA" init BUILD --goal "<one-line user goal>")
    
  3. Persist anchors as soon as they exist. When the spec, plan, and todo files are written, record their paths:
    "$WFA" set "$MTK_WF_UUID" \
      results.spec_path=docs/specs/2026-05-07-foo.md \
      results.plan_path=docs/plans/2026-05-07-foo.md \
      results.todo_path=tasks/todo.md
    
  4. Emit phase events. At the start and end of every phase:
    "$WFA" event "$MTK_WF_UUID" phase_started   --data '{"phase":"phase-3"}'
    "$WFA" event "$MTK_WF_UUID" phase_completed --data '{"phase":"phase-3"}'
    
    A phase_started event carrying a phase auto-advances the artifact's phase_cursor to that phase — no separate set phase_cursor= call is needed, and the resume protocol (step 6) can trust phase_cursor rather than replaying the event log.
  5. Record gate decisions. Every named gate (plan_trust_gate, phase_exit_gate, failure_stop_gate, memory_sync_gate, skill_precedence_gate) must be persisted via:
    "$WFA" gate "$MTK_WF_UUID" phase_exit_gate pass --reason "all batch tests green"
    
    fail on any gate is a hard stop — see failure_stop_gate semantics.
  6. Resume protocol. On entry to a workflow with no explicit uuid:
    • Run "$WFA" list.
    • If a single active workflow matches the requested type, offer resume.
    • If multiple, ask via AskUserQuestion which uuid to resume.
    • If none, init a new one.
  7. Close the workflow. At end of phase 7:
    "$WFA" set "$MTK_WF_UUID" status=completed
    "$WFA" event "$MTK_WF_UUID" workflow_completed --data '{"summary":"<short>"}'
    
    On unrecoverable failure, close with the failure pair instead:
    "$WFA" set "$MTK_WF_UUID" status=failed
    "$WFA" event "$MTK_WF_UUID" workflow_failed --data '{"reason":"<short>"}'
    

Read the full file on GitHub · 120 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 120 lines · 36 tokens per session scan A 23d9ebe8f7c8

Subscribe to this mod's changes

workflow-artifacts is a skill published in the GitHub repository moberghr/mtk-agent-toolkit (7 stars, last pushed 10d ago), licensed MIT. It adds 36 tokens to every session and 1,917 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens