new-data-connector

new-data-connector is a command for Claude Code from colossus-lab/openarg_backend. It costs 0 tokens per session (571 once invoked), scanned A, original, MIT.

A step-by-step command for adding an open data portal to a system that collects and indexes datasets. It creates an adapter that reads catalog details and downloads files such as CSV, JSON, or Excel.

In plain words
What is it for?
Use it when adding support for a portal's dataset catalog, including pagination, dataset counts, metadata, and file downloads.
Why use it?
It provides a consistent structure for connecting a new portal, reducing the chance of missing required integration points.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

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/colossus-lab/openarg_backend/new-data-connector
Clone the repo
git clone --depth 1 https://github.com/colossus-lab/openarg_backend

Made for: Claude Code.

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 new-data-connector

README.md
[![agentmods](https://agentmods.dev/badge/commands/colossus-lab/openarg_backend/new-data-connector.svg)](https://agentmods.dev/commands/colossus-lab/openarg_backend/new-data-connector)
Your own site
<a href="https://agentmods.dev/commands/colossus-lab/openarg_backend/new-data-connector"><img src="https://agentmods.dev/badge/commands/colossus-lab/openarg_backend/new-data-connector.svg" alt="Measured on agentmods" height="20"></a>
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 571 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.1 $0.00000 $0.00571
Opus 5 $0.00000 $0.00285
Sonnet 5 $0.00000 $0.00114
Haiku 4.5 $0.00000 $0.00057

Measured 6d ago against content hash 64a7a7453672, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

new-data-connector 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 6d 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.

.claude/commands/new-data-connector.md · 64 lines

How it starts

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

Create new data connector: $ARGUMENTS

Add a new open data portal to the scraping/indexing system. Follow these steps:

1. Create the IDataSource adapter

Create src/app/infrastructure/adapters/source/{name}_adapter.py implementing IDataSource:

from src.app.domain.ports.source.data_source import IDataSource
from src.app.domain.entities.dataset import CatalogEntry, DownloadedData

class {Name}Adapter(IDataSource):
    def __init__(self, base_url: str = "https://..."):
        self._base_url = base_url
        self._client = httpx.AsyncClient(timeout=30.0)

    async def fetch_catalog(self, offset: int = 0, limit: int = 100) -> list[CatalogEntry]:
        # Paginate through the portal catalog
        # Return metadata: title, description, organization, tags, columns, download_url, format
        ...

    async def fetch_catalog_count(self) -> int:
        # Total datasets in the portal
        ...

    async def download_dataset(self, entry: CatalogEntry) -> DownloadedData:
        # Download the file (CSV/JSON/XLSX)
        ...

Primary reference: src/app/infrastructure/adapters/source/datos_gob_ar_adapter.py (CKAN), src/app/infrastructure/adapters/source/caba_adapter.py.

2. Register in Dishka

Edit src/app/setup/ioc/provider_registry.py:

  • Add the adapter to DataSourceProvider or create a new one
  • Expose as provider with scope=Scope.APP

3. Add portal configuration

Edit src/app/setup/config/settings.py:

  • Add the base URL for the new portal in ScraperSettings

Edit config/local/config.toml with default values.

4. Wire into the scraper worker

Edit src/app/infrastructure/celery/tasks/scraper_tasks.py:

  • Add the new portal as an option in scrape_catalog(portal: str)
  • The worker should use the adapter to iterate the catalog and save to datasets
  • Dispatch index_dataset_embedding for each inserted dataset

5. Update task routing (if needed)

If the portal needs a dedicated queue, add it in src/app/infrastructure/celery/app.pytask_routes.

Read the full file on GitHub · 64 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. 6d ago First seen · 64 lines · 0 tokens per session scan A 64a7a7453672

Subscribe to this mod's changes

new-data-connector is a command published in the GitHub repository colossus-lab/openarg_backend (144 stars, last pushed 3d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 571 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-30.