smart-workflow

A command that chooses and runs a project workflow based on recent commands, task status, unfinished work, and other stated context.

In plain words
What is it for?
Use it to start a daily standup, plan a sprint, find the next task after completion, analyze expanded work, onboard a new project, or review blocked and unfinished tasks.
Why use it?
It helps decide what work should happen next when the project has several possible activities, such as planning, task follow-up, or dependency resolution.

Command for Claude Code

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 commands/sakrut/ai-code-graph/smart-workflow
Clone the repo
git clone --depth 1 https://github.com/sakrut/ai-code-graph

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 316 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 98% copy Near-identical to another mod 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.00000 $0.00316
Opus 5 $0.00000 $0.00158
Sonnet 5 $0.00000 $0.00063
Haiku 4.5 $0.00000 $0.00032

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

Security

Grade A, and why

smart-workflow 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 2d 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.

Origin

This is a copy

98% identical to smart-workflow — 3 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/commands/tm/smart-workflow.md · 58 lines

What it actually says

Smart Workflow

Arguments: $ARGUMENTS Execute an intelligent workflow based on current project state and recent commands.

This command analyzes:

  1. Recent commands you've run
  2. Current project state
  3. Time of day / day of week
  4. Your working patterns

Arguments: $ARGUMENTS

Intelligent Workflow Selection

Based on context, I'll determine the best workflow:

Context Analysis

  • Previous command executed
  • Current task states
  • Unfinished work from last session
  • Your typical patterns

Smart Execution

If last command was:

  • status → Likely starting work → Run daily standup
  • complete → Task finished → Find next task
  • list pending → Planning → Suggest sprint planning
  • expand → Breaking down work → Show complexity analysis
  • init → New project → Show onboarding workflow

If no recent commands:

  • Morning? → Daily standup workflow
  • Many pending tasks? → Sprint planning
  • Tasks blocked? → Dependency resolution
  • Friday? → Weekly review

Workflow Composition

I'll chain appropriate commands:

  1. Analyze current state
  2. Execute primary workflow
  3. Suggest follow-up actions
  4. Prepare environment for coding

Learning Mode

This command learns from your patterns:

  • Track command sequences
  • Note time preferences
  • Remember common workflows
  • Adapt to your style

Example flows detected:

  • Morning: standup → next → start
  • After lunch: status → continue task
  • End of day: complete → commit → status
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. 2d ago First seen · 58 lines · 0 tokens per session scan A ddfe64fc34e5

Subscribe to this mod's changes

smart-workflow is a command published in the GitHub repository sakrut/ai-code-graph (3 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 316 tokens. A static security scan graded it A with 0 findings. It is 98% identical to smart-workflow, differing in 3 lines, and is treated as a copy.