Borrowing it
Nothing to install: this file belongs to moberghr/mtk-agent-toolkit. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/moberghr/mtk-agent-toolkit/main/.claude/skills/workflow-artifacts/SKILL.mdgit clone --depth 1 https://github.com/moberghr/mtk-agent-toolkitWrote 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.
[](https://agentmods.dev/skills/moberghr/mtk-agent-toolkit/workflow-artifacts)<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/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<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="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00036 | $0.02810 |
| Opus 5.5 | $0.00014 | $0.01124 |
| Sonnet 5.5 | $0.00007 | $0.00562 |
| Haiku 4.5 | $0.00004 | $0.00281 |
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 8d 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.
How it starts
The opening of the file, as written. The whole thing — 129 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. implement (a BUILD workflow) and setup-audit / setup-bootstrap create workflows; the skills implement composes (incremental- and subagent-implementation, verification, review) write to the active one at phase boundaries and gate decisions. fix and batch-fix do not create a workflow. The helper also accepts DEBUG, REVIEW, PLAN and FIX types, but no shipped skill initialises them today.
When To Use
- At the start of every
/mtk implement(BUILD) run, and ofsetup-audit/setup-bootstrap. - 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
- Resolve helper path once into
$WFA. The script ships atscripts/workflow-artifact.shin this repo and at the same path in target installs, but a plugin install has it only under the plugin root — written${CLAUDE_PLUGIN_ROOT}(braces), which Claude Code substitutes into this text at load time; it is never set in the Bash environment. Resolve it once with the same three-tier idiomspec-driven-developmentuses forlearnings.sh—MTK_HELPER_ROOTfirst (a checkout you pin; seeCLAUDE.md), then the project copy, then the plugin copy — and call"$WFA"everywhere below instead of a bare path:
SetWFA="$([ -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"))"MTK_HELPER_ROOT=<toolkit checkout>to force the scripts from that clone — the reliable path when dogfooding MTK from a separate checkout, 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), exportCLAUDE_PROJECT_DIR=<project root>or run from the project root — otherwise state lands in the wrong tree. - Init at workflow start. Prune expired workflows, capture the returned uuid into a session variable
MTK_WF_UUID, and emit the first phase marker, all in the same call:"$WFA" prune --older-than 30 >/dev/null; MTK_WF_UUID=$("$WFA" init BUILD --goal "<one-line user goal>") && "$WFA" event "$MTK_WF_UUID" phase_started --data '{"phase":"phase-0"}'prunedeletes finished workflows (completed/abandoned) and any workflow not updated for 30 days, with their event logs; it never touches an active workflow updated within the window. Preview with--dry-run. Run it beforeinit, never after, so it cannot touch the workflow being started. A prune failure must not block the init, hence;. Bookkeeping rides along, never alone. Every artifact write below goes in the same Bash call as the action it records — appended with&&to the checkpoint command, the lint, the sidecar write — or several writes go in one"$WFA" batchcall. A standalone"$WFA" set …turn costs a full model round-trip for one line of JSON; a 65-call run spends a quarter of its turns on bookkeeping. Thebatchform takes ordinary subcommand argv without the uuid, separated by a bare--:dotnet build --nologo -v q && "$WFA" batch "$MTK_WF_UUID" \ gate phase_exit_gate pass --reason "batch B2 green" -- \ set results.batches_completed=2 -- \ event agent_returned --data '{"agent":"batch:B2"}'event … --ts <iso8601>replays a timestamp captured elsewhere (a dynamic workflow's per-batch dispatch/return times); tag such events"source":"workflow-replay"in--data. - Persist anchors as soon as they exist. When the spec, plan, and todo files are written, record their paths — in the same call as the next command that runs anyway (the context-pack build, the manifest pre-flight, the EARS lint in extended mode):
bash scripts/build-context-pack.sh "$MTK_WF_UUID" docs/specs/2026-05-07-foo.json && "$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 - Emit phase events. At the start and end of every phase, in one call with the gate that closes it:
A"$WFA" batch "$MTK_WF_UUID" \ gate phase_exit_gate pass --reason "all batch tests green" -- \ event phase_completed --data '{"phase":"phase-3"}' -- \ event phase_started --data '{"phase":"phase-3.5"}'phase_startedevent carrying aphaseauto-advances the artifact'sphase_cursorto that phase — no separateset phase_cursor=call is needed, and the resume protocol (step 7) can trustphase_cursorrather than replaying the event log. - Record gate decisions. Every named gate (
plan_trust_gate,phase_exit_gate,failure_stop_gate,memory_sync_gate) must be persisted via:"$WFA" gate "$MTK_WF_UUID" phase_exit_gate pass --reason "all batch tests green"failon any gate is a hard stop — seefailure_stop_gatesemantics. - Carry a trap list across phases. A trap is a written, specific gotcha a phase learned the hard way (a stale generated contract, an analyzer that fires only under
format, a fixture that silently seeds the wrong state). A 2026-09 six-phase field run found this hand-carried list was the one mechanism that demonstrably worked — the final phase had zero repair cycles — and that it survived only because the driver remembered to paste it. Persist each trap the moment it is learned, riding along in the call that runs anyway (trapis batchable):
At the start of every phase, and in every implementer brief the orchestrator builds, inject the accumulated list:"$WFA" batch "$MTK_WF_UUID" trap add --title "OpenAPI spec goes stale between phases" \ --body "Regenerate the contract from a running API each phase — build/tests miss uncallable routes." \ --phase phase-1 --severity high -- event phase_completed --data '{"phase":"phase-1"}'
Adding a trap whose title already exists refreshes it in place. Traps are orchestrator-owned like every other artifact write: an implementer reports candidate traps in its result ("$WFA" trap list "$MTK_WF_UUID" # paste into the brief's "Known traps" blocktraps[], see.claude/references/subagent-implementer-prompt.md) and the orchestrator records them (S5.2). - 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
AskUserQuestionwhich uuid to resume. - If none, init a new one (
init TASKfor a lightweight one with no other workflow). - To continue a checkpointed workflow,
"$WFA" resume <uuid>prints a read-only RESUME block (drift since the checkpoint,next_command, open questions). "$WFA" checkpoint <uuid> --next … --decision … --verify …re-renders the one canonical note and snapshots the tree; it is batchable as the LAST op (exit 3 =--nextnames a finished unit). Schema:.claude/references/workflow-artifact-schema.md.
- Run
- Close the workflow. At end of phase 7, one call:
On unrecoverable failure, close with the failure pair instead:"$WFA" batch "$MTK_WF_UUID" gate memory_sync_gate pass --reason "lessons captured" -- \ set status=completed -- event workflow_completed --data '{"summary":"<short>"}'"$WFA" batch "$MTK_WF_UUID" set status=failed -- event workflow_failed --data '{"reason":"<short>"}'
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.
- 8d ago Changed · +2 lines 46cba3a9eaf8
- 16d ago Changed · -16 lines 4363dde104db
- 1mo ago Changed · +13 lines 072e67905c91
- 1mo ago Changed · +10 lines 2e80a833b1f6
- 2mo ago First seen · 120 lines · 36 tokens per session scan A 23d9ebe8f7c8
workflow-artifacts is a skill published in the GitHub repository moberghr/mtk-agent-toolkit (9 stars, last pushed 8d ago), licensed MIT. It adds 36 tokens to every session and 2,810 once invoked, about $0.0001 per session on Opus 5.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.
Other skills, from other repositories
local-ai-agents
Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
next-cache-components-adoption
Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…
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.
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…
insight-error-page
Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…