fetch-data

fetch-data is a command for Claude Code from tommymorgan/claude-plugins. It costs 13 tokens per session (533 once invoked), scanned A, original, MIT.

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 for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the flow plugin — 5 commands, 1 agent shipped together

Good fit Use it to fetch merged GitHub pull requests or data from another configured source, continue from the last fetch, or reload all available data.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/tommymorgan/claude-plugins/fetch-data
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.

Clone the repo
git clone --depth 1 https://github.com/tommymorgan/claude-plugins

Made for: Claude Code.

Or install flow, the plugin that ships this one along with the rest of its 5 commands, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for fetch-data

README.md
[![agentmods](https://agentmods.dev/badge/commands/tommymorgan/claude-plugins/fetch-data/github.svg)](https://agentmods.dev/commands/tommymorgan/claude-plugins/fetch-data)
Your own site
<a href="https://agentmods.dev/commands/tommymorgan/claude-plugins/fetch-data"><img src="https://agentmods.dev/badge/commands/tommymorgan/claude-plugins/fetch-data/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for fetch-data

Your own site · 80×15
<a href="https://agentmods.dev/commands/tommymorgan/claude-plugins/fetch-data"><img src="https://agentmods.dev/badge/commands/tommymorgan/claude-plugins/fetch-data.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00013 $0.00533
Opus 5.5 $0.00005 $0.00213
Sonnet 5.5 $0.00003 $0.00107
Haiku 4.5 $0.00001 $0.00053

Measured 1mo ago against content hash 14ab9a7cd7f0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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 3mo ago), licensed MIT. It adds 13 tokens to every session and 533 once invoked, about $0.0001 per session on Opus 5.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.