hub

A command-finding helper for the Craft developer toolkit. It loads the toolkit's command list and shows commands grouped by available categories and options.

In plain words
What is it for?
Use it to browse available Craft commands, see how many commands and supporting tools exist, and find commands by category or supported options.
Why use it?
It helps when you know what you want to do but do not know which command to run. It avoids searching through command files or guessing command names.

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/hub
Clone the repo
git clone --depth 1 https://github.com/Data-Wise/craft
Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 7,764 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.00008 $0.07764
Opus 5 $0.00004 $0.03882
Sonnet 5 $0.00002 $0.01553
Haiku 4.5 $0.00001 $0.00776

Measured yesterday against content hash 020d429ac823, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

hub 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 yesterday.

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.

commands/hub.md · 784 lines

How it starts

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

/craft:hub - Command Discovery Hub

You are a command discovery assistant for the craft plugin. Help users find the right command.

When Invoked (/craft:hub)

Step 0: Load Command Data (Auto-Detection)

IMPORTANT: Before displaying the hub, load command data from the discovery engine:

import sys
from pathlib import Path

# Add commands directory to path
plugin_dir = Path.cwd()
sys.path.insert(0, str(plugin_dir))

# Import discovery engine
from commands._discovery import get_command_stats, load_cached_commands

# Get current command statistics
stats = get_command_stats()
commands = load_cached_commands()

# Available data:
# - stats['total']: Total command count (e.g., 47)
# - stats['categories']: Dict of category counts (e.g., {'code': 13, 'ci': 8, ...})
# - stats['with_modes']: Commands supporting modes
# - stats['with_dry_run']: Commands with dry-run support
# - commands: Full list of command objects with metadata

# Count skills, agents, and tests for banner
from pathlib import Path
skill_count = len(list((plugin_dir / 'skills').rglob('SKILL.md'))) if (plugin_dir / 'skills').exists() else 0
agent_count = len(list((plugin_dir / 'agents').glob('*.md'))) if (plugin_dir / 'agents').exists() else 0

# Read test count from CLAUDE.md or .STATUS (extract number from "N tests passing")
import re
test_count = "?"
for source in [plugin_dir / 'CLAUDE.md', plugin_dir / '.STATUS']:
    if source.exists():
        content = source.read_text()
        m = re.search(r'(\d+)\s+tests?\s+pass', content)
        if m:
            test_count = m.group(1)
            break

Use this data to populate the hub display below with accurate, auto-detected counts.

Step 1: Detect Project Context

Detection Rules (check in order):
1. .claude-plugin/plugin.json → Claude Code Plugin
2. DESCRIPTION file → R Package
3. pyproject.toml → Python Package
4. package.json → Node.js Project
5. _quarto.yml → Quarto Project
6. mkdocs.yml → MkDocs Project
7. Otherwise → Generic Project

Read the full file on GitHub · 784 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. yesterday First seen · 784 lines · 8 tokens per session scan A 020d429ac823

Subscribe to this mod's changes

hub is a command published in the GitHub repository Data-Wise/craft (4 stars, last pushed 16d ago), licensed MIT. It adds 8 tokens to every session and 7,764 once invoked, about $0.0000 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.