.stencila/skills/workflow-review/SKILL.md
Critically review a Stencila workflow and suggest improvements. Use when asked to review, audit, critique, evaluate, or improve a workflow directory or WORKFLOW.md file. Covers frontmatter validation, DOT pipeline quality, workflow structure, agent selection quality, discovery metadata, ephemeral workflow conventions, workflow composition, and adherence to Stencila workflow patterns.
npx skillsauth add stencila/stencila workflow-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Review an existing Stencila workflow for quality, correctness, and completeness. Produce a structured report with specific, actionable suggestions. The review covers frontmatter fields, DOT pipeline structure, workflow design quality, branching and approval logic, agent references and agent-fit quality, discovery metadata, ephemeral workflow conventions, and adherence to the workflow patterns used in this workspace.
WORKFLOW.md file path.stencila/workflows/<name>/WORKFLOW.md walking up from the current directory; if given a path, use it directlyWORKFLOW.md file and inspect the workflow directory for supporting files such as .gitignore, scripts/, references/, and assets/WORKFLOW.md exist and that existing supporting files are meaningfully referenced where appropriate; for large files, verify existence and relevance without reproducing their full contents in the review.stencila/workflows/ or related workflow skills when availableagent attributes or agent fit is unclear, use list_agents to compare referenced agents against available agents and their metadata rather than guessing from names aloneworkflow="name" or the choice of nested workflows seems questionable, use list_workflows to compare referenced child workflows against available workflows and their metadata rather than guessing from names alone.gitignore sentinel file with exactly *; if the sentinel is missing or has different contents, treat that as a failure. If the workflow only seems temporary from context, treat a missing sentinel as a warning unless the workflow clearly claims ephemeral statusstencila workflows validate <workflow-dir> or stencila workflows validate <workflow-file>; use name-based validation only when the name is clearly resolved^[a-z0-9]([a-z0-9-]{0,62}[a-z0-9])?$)thing-process or thing-process-approach; flag names that overfit the exact graph shape or enumerate too many stepsTODO, <placeholder>)description. Flag generic goals that merely restate the workflow's purpose (e.g., "Produce an acceptable X for the requested purpose") — they provide no runtime value and clutter the user interface. Recommend replacing them with goal-hint or removing them entirelylicense, compatibility, metadata — check for correctness if present (e.g., compatibility under 500 characters)When reviewing names, apply these conventions:
thing-process for the default case, for example code-review or blog-generationthing-process-approach when different workflows for the same process need different tradeoff signals, for example code-generation-iterative or agent-creation-guidedapproach as a broad strategy or cost/quality tradeoff, not as a literal summary of the graphcreate-review-refine-test-deploy, unless there is a strong workspace-specific reason for that styledot fenced code block; flag workflows that jump straight into the DOT block without any introductory prosedot fenced code block in the body contains a valid-looking directed graph such as digraph name { ... }agent attributes, conditions, and labels are attached to the correct nodes or edgesStart -> ... entry edge near the top, then colocate each node definition with its outgoing edge or edges where practicaldot block is relied on for execution; additional DOT blocks, if any, are treated as documentation and should not create ambiguityworkflow="name", treat it as a composed child workflow node and check that the composition boundary is clear and justified; this attribute is normalized to workflow-handler semantics rather than acting like a normal LLM, shell, or branch nodeFanOut… node ID prefix (static fan-out), check that it has multiple outgoing edges (a fan-out with a single branch is unnecessary) and that the branches converge at a downstream node (either an explicit FanIn… prefix / shape=tripleoctagon node or a structural convergence); flag fan-out nodes with no plausible fan-in pointfan-out="key" (dynamic fan-out), check that it has exactly one outgoing edge (the runtime creates parallel instances from the stored list), that a fan-in node (FanIn… prefix or shape=tripleoctagon) is reachable downstream, and that the context key is plausibly populated by an upstream node — either a shell node with store or an agent node with context-writable=true that writes a JSON array via workflow_set_context; flag nested dynamic fan-out (dynamic fan-out inside another dynamic fan-out's template subgraph) as an errorask attribute) is used appropriately for approval, oversight, or trust-boundary decisionsinterview-ref are used appropriately — combining a routing decision with structured feedback in a single review pause, not overloading a single interview with unrelated questions that would be clearer as separate human nodesshow-if, check that the referenced store key belongs to an earlier question and the condition syntax is valid ("store_key == value" or "store_key != value"); flag show-if conditions that reference a store key from the same or a later questionfinish-if, check that it is on a yes-no, confirm, or single-select question — finish-if is not supported on freeform or multi-select questions; verify that the early exit value makes sense for the interview flow and that questions after the gate are ones the user would genuinely want to skipFanOut… node ID prefix or the underlying shape=component), check that: all branches are genuinely independent and do not depend on each other's output; branches reconverge at a clear fan-in point (either an explicit FanIn… prefix / shape=tripleoctagon node or a structural convergence where all branches share a common downstream node); join_policy, error_policy, and max_parallel are appropriate for the task; and the fan-out is not used where a simple sequential pipeline would be clearerFanOut… node ID prefix / shape=component) where the number of branches is fixed in the DOT graph; if the list is determined at runtime (e.g., produced by a shell node with store), use dynamic fan-out (fan-out attribute) which creates parallel instances from a variable-length list; if items have dependencies on each other's output, a sequential loop is still the correct choicelist_agents to confirm availability and metadata fit when uncertain. Forward-referencing agents that do not yet exist is valid in top-down design — the runtime falls back to a default agent, so flag missing agents as informational dependencies rather than errorsdescription should match the task, keywords should overlap domain terms, when-to-use should provide positive signals, and when-not-to-use should not conflict with the node's roleagent.* overrides where simpler inline attributes would be cleareragent attributes may be valid, but note when explicit agent selection would materially improve clarity or controlworkflow="name" nodes: check that the child workflow name is plausible (use list_workflows to compare alternatives when composition matters); check that the child goal is passed clearly via goal="..." or a sensible default from prompt/label; and flag missing child workflows as outstanding dependencies in top-down designs rather than errorspersist, check that the workflow uses it for the right reason: prefer persist when a node should keep its own conversational context but threads do not need to be shared across nodes. If the apparent intent is a shared multi-node conversation, warn that persist alone auto-generates different thread-id values per node and therefore does not create cross-node session sharingthread-id with fidelity="full" or graph-level defaults (default-fidelity="full", default-thread-id="...") instead of repeated persist attributesthread-id across different agents or across parallel branches, because shared threads should remain on one agent and one sequential pathprompt-ref, shell-ref, ask-ref, or interview-ref, referenced ids exist in code blocks or code chunks in the same WORKFLOW.md, are unique, and are used where they improve readability, typically for long or multiline content rather than short single-line valuesgoal is present, prompts should use $goal consistently. If goal is absent but prompts reference $goal, check that goal-hint is set (the user's response becomes $goal at runtime)interview-ref, check that the referenced YAML block is valid interview spec YAML (has a questions array with at least one entry, each question has question text and a recognized type)store keys — a freeform question without store collects an answer that is never stored, which is almost certainly a mistakesingle-select) has option labels matching the outgoing edge labels from the human nodeshow-if conditions reference valid store keys from earlier questions and use the correct syntax; flag conditions that would always be true, always be false, or reference non-existent keysfinish-if is only used on supported question types (yes-no, confirm, single-select) and that the early-exit value is a valid answer for that question type (e.g., "yes" or "no" for yes-no, an option label for single-select)interview-ref used for a single simple question where ask or ask-ref would be simplerstore="key", check that the stored key is referenced downstream — either in a fan-out attribute, a $KEY expansion in a prompt or shell command, or an edge condition; flag store on shell nodes without downstream consumers as a warning (storing data nobody reads)store-as="json", check that the shell command plausibly produces valid JSON output (e.g., uses jq, prints a JSON literal, or wraps output in JSON structure); flag store-as="json" on commands whose output is unlikely to be valid JSONfan-out="key", verify that an upstream node populates that key — either a shell node with store="key" (ideally with store-as="json") or an agent node with context-writable=true that calls workflow_set_context to write a JSON array (e.g., fan-out="items"); flag fan-out keys with no plausible upstream producer.gitignore file with exactly *ephemeral: true or other non-standard markers to indicate temporary statusdescription, keywords, when-to-use, and when-not-to-use work together — they should be complementary, not redundantlist_workflows when needed to compare alternativesTODO, <placeholder>, empty sections)scripts/, references/, or assets/ point to files that actually existprompt-ref, shell-ref, ask-ref, and interview-ref point to ids that actually exist in the same fileworkflow="name" point to workflows that exist when the review scope allows that to be checked; if child workflows do not yet exist, note them as outstanding dependencies for top-down designs rather than treating them as errorsStructure the review as follows:
One to three sentences giving an overall assessment and the most important finding.
For each checklist area, report one of:
Include a brief explanation for warnings and failures.
A numbered list of specific, actionable improvements ordered by priority (most impactful first). Each suggestion should explain what to change and why.
When the workflow references agents or child workflows that do not yet exist, include a section listing these as dependencies to be created. This is expected in top-down workflow design and should be presented as an informational inventory, not as errors.
Use heading level 3 (###) for each section in your output.
Input: "Review the code-review workflow"
Process:
.stencila/workflows/code-review/WORKFLOW.md.gitignore and any supporting filesname is code-review, matches the directory, valid kebab-case, and follows the recommended thing-process convention; description and goal are specificdot block: it defines a directed graph with a clear path through design, build, test, and reviewstencila workflows validate .stencila/workflows/code-review if applying fixesOutput (use ### headings in the report):
Summary
The code-review workflow is well-structured and easy to follow, with a sensible test-and-review gate before completion. One small improvement would make its intent even clearer.
Findings
| Area | Status | Notes | |------|--------|-------| | Frontmatter | ✅ Pass | Name, description, and goal are valid and specific; the name follows the
thing-processconvention | | DOT pipeline structure | ✅ Pass | First code block is a clear directed graph with readable nodes and branches | | Workflow design quality | ✅ Pass | The test and review gates provide meaningful evaluation steps | | Agents and prompts | ⚠️ Warning | Some nodes rely on generic prompts and could be more specific | | Ephemeral conventions | ✅ Pass | Workflow is permanent and does not use non-standard temporary markers | | Completeness and clarity | ✅ Pass | No placeholders; documentation matches the graph | | Consistency | ✅ Pass | Formatting and terminology are consistent |Suggestions
- Make the
Testnode prompt more specific about what to validate and how to report failure, so the revision loop gets more actionable feedback
Input: "Review the temporary note-summary workflow"
Process:
.stencila/workflows/note-summary/WORKFLOW.md.gitignore containing exactly *, indicating an ephemeral workflowdot blockOutput (use ### headings in the report):
Summary
The note-summary workflow is a good minimal ephemeral workflow. Its temporary status is correctly indicated by the
.gitignoresentinel rather than custom frontmatter.Findings
| Area | Status | Notes | |------|--------|-------| | Frontmatter | ✅ Pass | Required fields are present and specific | | DOT pipeline structure | ✅ Pass | Simple linear graph is appropriate for the task | | Workflow design quality | ✅ Pass | Minimal but sufficient for a one-step summary workflow | | Agents and prompts | ✅ Pass | Prompt is concise and aligned with the goal | | Ephemeral conventions | ✅ Pass |
.gitignoresentinel contains exactly*| | Completeness and clarity | ✅ Pass | No placeholders or contradictory documentation | | Consistency | ✅ Pass | Matches workspace workflow conventions |Suggestions
- Optionally add one sentence of Markdown documentation for human readers describing when to save versus discard this temporary workflow
Input: "Review the deploy-helper workflow"
Process:
.stencila/workflows/deploy-helper/WORKFLOW.mdephemeral: true; the first code block is Markdown or plain text instead of dot; the graph has a Review -> Review self-loop with no feedback node, prompts are vague, and the name is generic rather than process-oriented.gitignore sentinel fileOutput (use ### headings in the report):
Summary
The deploy-helper workflow has several structural problems: it does not encode its executable pipeline in the required first
dotblock, uses a non-standard ephemeral marker, and includes an unhelpful revision loop.Findings
| Area | Status | Notes | |------|--------|-------| | Frontmatter | ⚠️ Warning |
ephemeral: trueis a non-standard field; temporary status should be represented by the.gitignoresentinel instead, anddeploy-helperdoes not clearly follow the recommendedthing-process[-approach]naming convention | | DOT pipeline structure | ❌ Fail | The first executable block is not adotgraph, so the workflow is incomplete for execution | | Workflow design quality | ❌ Fail |Review -> Reviewis a vague self-loop with no improving feedback path | | Agents and prompts | ⚠️ Warning | Prompts are too generic to guide meaningful execution | | Ephemeral conventions | ❌ Fail | Workflow appears intended to be temporary, but the required.gitignoresentinel is missing | | Completeness and clarity | ⚠️ Warning | The prose explains intent, but the executable structure is incomplete | | Consistency | ⚠️ Warning | Frontmatter, directory state, and body conventions do not align with workspace style |Suggestions
- Move the executable pipeline into the first fenced
dotblock so the workflow can be validated and run- Remove
ephemeral: truefrom frontmatter and, if the workflow is truly temporary, add a.gitignorefile containing exactly*- Rename the workflow to something more process-oriented, such as
deployment-preparationordeployment-check-guided, so the name communicates its end-to-end purpose rather than acting as a vague helper label- Replace the
Review -> Reviewself-loop with a feedback path to a revisable node such asBuildorDraft, so the loop can improve output quality- Rewrite node prompts to describe each step's local task and expected output more concretely
Input: "Review the paper-draft workflow with references"
Process:
.stencila/workflows/paper-draft/WORKFLOW.mdreferences/brief.md and assets/template.md.stencila/workflows/Output (use ### headings in the report):
Summary
The paper-draft workflow is well-documented and makes sensible use of supporting reference files. One improvement would make its supporting materials easier to understand and maintain.
Findings
| Area | Status | Notes | |------|--------|-------| | Frontmatter | ✅ Pass | Name, description, and goal are specific and aligned with the workflow | | DOT pipeline structure | ✅ Pass | The first
dotblock defines a clear research-to-draft pipeline | | Workflow design quality | ✅ Pass | Each stage has a distinct role and visible output | | Agents and prompts | ✅ Pass | Agent references look plausible, though existence is not fully verified in this review | | Ephemeral conventions | ✅ Pass | Workflow is permanent and does not use temporary markers | | Completeness and clarity | ⚠️ Warning | Supporting files exist and are referenced, but the documentation could explain more clearly howtemplate.mdinfluences the draft step | | Consistency | ✅ Pass | The workflow matches the style of other documentation-heavy workflows in the workspace |Suggestions
- Add one sentence near the workflow documentation explaining when
assets/template.mdis used, so future reviewers and editors can understand its role without opening every supporting file
.stencila/workflows/ directories directly; mention stencila workflows list only if that command is available in the current environment.dot block: Flag this as a failure for an executable workflow. The first dot block is the executable pipeline source of truth.dot block as executable. If later DOT blocks could confuse the intended pipeline, flag that as a warning.list_agents when agent selection matters so you can assess availability and metadata fit. If agents do not exist, distinguish between two cases: (a) the workflow appears to be designed top-down with intentionally planned agents — list them as outstanding dependencies to create, not as errors; (b) the names look like accidental placeholders or typos — flag them as warnings. The runtime accepts unresolved agent references (logging a warning and falling back to a default agent), so missing agents never block validation or execution.list_workflows when workflow composition matters so you can assess availability and metadata fit. As with agents, distinguish intentional top-down forward references from accidental placeholders. List planned but not-yet-created child workflows as outstanding dependencies rather than flagging them as errors..gitignore sentinel, flag that as a warning or failure depending on how strongly the workflow claims to be ephemeral.scripts/, references/, or assets/, check that they exist and are referenced where appropriate, but do not reproduce their full contents in the report.WORKFLOW.md path before reporting completion; use name-based validation only when the name is unambiguous.When applying suggested improvements, validate the workflow before reporting completion:
# By directory path
stencila workflows validate .stencila/workflows/<workflow-name>
# By WORKFLOW.md path
stencila workflows validate .stencila/workflows/<workflow-name>/WORKFLOW.md
# By workflow name
stencila workflows validate <workflow-name>
Validation should pass before you report the changes as complete.
documentation
An agent skill providing instructions for AI agents.
development
Create a new Stencila workflow. Use when asked to create, write, scaffold, or set up a workflow directory or WORKFLOW.md file. Covers workflow discovery, duplicate-name checks, ephemeral workflows, WORKFLOW.md frontmatter, DOT pipeline authoring, goals, agents, branching, composition, and validation.
development
Critically review an existing or proposed Stencila theme artifact for correctness, token usage, target coverage, cross-target portability, dark-mode handling, maintainability, and approval readiness. Use when asked to review, critique, assess, audit, or validate a theme.css file, theme patch, theme plan, site theme, document theme, plot theme, print or PDF theme, check design tokens, assess DOCX or email behavior, review dark mode support, or validate with stencila themes validate.
development
Create, update, or plan a Stencila theme for documents or published sites. Use when asked to choose a theme direction, write or patch theme.css, recommend semantic or module token families, customize site navigation or branding, tune PDF and print page tokens, align web, Python, and R plots with a Stencila design system, list available builtin tokens with `stencila themes tokens`, or validate a theme file with `stencila themes validate`.