fetch-data

A command that retrieves work-item data from a configured source and updates local flow metrics. Flow metrics measure how work moves through a development process.

In plain words
What is it for?
Use it to fetch merged GitHub pull requests or data from another configured source, continue from the last fetch, or reload all available data.
Why use it?
It keeps project measurements current without manually collecting and processing each work item.

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/tommymorgan/claude-plugins/fetch-data
Clone the repo
git clone --depth 1 https://github.com/tommymorgan/claude-plugins
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 533 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.00013 $0.00533
Opus 5 $0.00006 $0.00267
Sonnet 5 $0.00003 $0.00107
Haiku 4.5 $0.00001 $0.00053

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

Security

Grade A, and why

fetch-data 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.

flow/commands/fetch-data.md · 56 lines

How it starts

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

Flow Fetch Data

Collect flow data from the configured source for the current project.

Steps

  1. Detect git remote and resolve project config:

    git remote get-url origin
    

    Look up config in ~/.tommymorgan/flows/ by matching the remote URL. If no config found, report: "No flow configuration found for remote URL: . Run /flow:setup to configure." and stop. If config file is invalid JSON, report: "Configuration file is invalid: . Run /flow:setup to reconfigure." and stop.

  2. Check authentication for the configured source:

    • GitHub: gh auth status
    • If not authenticated, report the error with remediation steps and stop.
  3. Read existing flow data (if any) from ~/.tommymorgan/flows/<slug>-data.json

  4. Determine the since date:

    • If existing data exists, use the most recent finishedAt timestamp
    • If --all flag provided, ignore existing data and fetch everything
    • If no existing data, fetch all
  5. Fetch work items using the configured adapter:

    • GitHub: For each configured repo, fetch merged PRs via gh api:
      • Get PR list with pagination
      • For each merged PR, fetch commits to get the earliest commit authored date
      • If configured start boundary data is unavailable, fall back to PR created_at and include a warning
      • Calculate Cycle Time: finished - started + 1 (calendar days, UTC)
    • Linear / Git: Not yet implemented — report "Adapter not yet available" and stop
  6. Merge new items with existing data (deduplicate by id + source)

  7. Write updated data to ~/.tommymorgan/flows/<slug>-data.json atomically

  8. Report results:

    Flow data updated.
    - Total items: {count}
    - New items fetched: {new_count}
    - Date range: {earliest_date} to {latest_date}
    - Source: {source} ({repos})
    {warnings if any fallbacks occurred}
    

Arguments

  • --all — Re-fetch all data (ignore incremental)
  • --repo owner/repo — Override configured repo(s)

Read the full file on GitHub · 56 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 · 56 lines · 13 tokens per session scan A 14ab9a7cd7f0

Subscribe to this mod's changes

fetch-data is a command published in the GitHub repository tommymorgan/claude-plugins (4 stars, last pushed 1mo ago), licensed MIT. It adds 13 tokens to every session and 533 once invoked, about $0.0001 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.