smart

A group of commands that scores a task from 0 to 10 and routes it to a suitable workflow. Simple tasks run directly, while harder tasks may use a specialized agent or several agents.

In plain words
What is it for?
Use it to route requests such as adding authentication, optimizing database queries, or creating API documentation.
Why use it?
It removes the need to choose the right workflow yourself when a request varies in size, risk, coordination, or uncertainty.

Command

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/data-wise/craft/smart
Clone the repo
git clone --depth 1 https://github.com/Data-Wise/craft
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 4,012 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.00000 $0.04012
Opus 5 $0.00000 $0.02006
Sonnet 5 $0.00000 $0.00802
Haiku 4.5 $0.00000 $0.00401

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

Security

Grade A, and why

smart 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.

docs/commands/smart.md · 567 lines

How it starts

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

Smart Commands

Universal AI-powered commands for intelligent task routing. These commands use complexity scoring (0-10 scale) to automatically route tasks to the most appropriate handler.

/craft:do

Purpose: Universal command that routes tasks to the best workflow automatically using AI-powered complexity analysis.

Usage:

/craft:do "add user authentication"
/craft:do "optimize database queries"
/craft:do "create API documentation"

How it works:

The AI analyzes your request and:

  1. Scores complexity (0-10 scale using 7 factors)
  2. Routes intelligently:
    • Simple (0-3): Direct command execution
    • Medium (4-7): Single specialized agent
    • Complex (8-10): Multi-agent orchestration
  3. Executes the workflow
  4. Reports results with next steps

Complexity Scoring

Tasks are scored on 7 factors (each 0-2 points):

Factor Weight Examples
Scope 0-2 Single file (0) → Multiple services (2)
Dependencies 0-2 None (0) → Cross-project (2)
Risk 0-2 Low (0) → Breaking changes (2)
Coordination 0-2 Solo (0) → Multiple teams (2)
Uncertainty 0-2 Clear (0) → Research needed (2)
Technical Depth 0-2 Simple (0) → Novel algorithms (2)
Time Estimate 0-2 <1 hour (0) → Multiple days (2)

Total Score: 0-14 (normalized to 0-10)

Real-World Examples

Example 1: Simple Task (Score: 2)

/craft:do "lint markdown files"

# Analysis:
# - Scope: Single file type (0)
# - Dependencies: None (0)
# - Risk: None (0)
# - Coordination: Solo (0)
# - Uncertainty: Clear (0)
# - Technical: Simple (1)
# - Time: <5 min (1)
# Total: 2/14 = 1.4 → Score: 2

# Routing: Direct command
# Executes: /folio:docs:lint

Example 2: Medium Task (Score: 6)

/craft:do "add JWT authentication with refresh tokens"

# Analysis:
# - Scope: Multiple files (backend + middleware) (1)
# - Dependencies: New JWT library (1)
# - Risk: Security implications (1)
# - Coordination: Solo but needs review (1)
# - Uncertainty: Standard pattern (0)
# - Technical: Moderate (crypto, tokens) (1)
# - Time: 2-4 hours (1)
# Total: 6/14 = 4.3 → Score: 6

# Routing: Command sequence
# Runs: /craft:arch:plan, /craft:code:test-gen, dev/git skill (create branch) (no agent dispatch)

Read the full file on GitHub · 567 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. 2d ago First seen · 567 lines · 0 tokens per session scan A 3242b3073256

Subscribe to this mod's changes

smart is a command published in the GitHub repository Data-Wise/craft (4 stars, last pushed 16d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 4,012 tokens. 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.