Datalad addurls

From nipreps/skills-comm · View interactive version

Datalad addurls is an AI agent skill from the GitHub repository nipreps/skills-comm. Auto-invoke when the user wants to populate a DataLad dataset from a list of URLs — e.g., bulk-importing files from a manifest (CSV, TSV, or JSON), ingesting data from a remote catalog, or creating a dataset from a URL spreadsheet. Trigger on "add files from URLs", "bulk import from manifest", "crea

How to use this skill

Skill file

Skill: datalad-addurls

Bulk-populate a DataLad dataset by reading a URL manifest and adding each file as an

annexed entry with its download URL registered as the annex remote. DataLad will fetch

content on demand with datalad get.

Steps

  1. Verify DataLad context — check for .datalad/ in the current directory or a

parent:

```bash

ls .datalad/ 2>/dev/null

```

If no dataset is found, ask the user whether to initialize one first with /datalad-init.

  1. Identify the manifest file — read from $ARGUMENTS or conversation context.

The manifest is a file with one row per file to ingest. Supported formats:

If no manifest is provided, ask the user to specify the file path.

  1. Inspect the manifest — read the first few lines:

```bash

head -5 <manifest-file>

```

Identify the column (or JSON key) that contains:

Ask the user to confirm or correct the column names if ambiguous.

  1. Gather parameters — confirm:

message is unhelpful — always ask the user for a meaningful message)

(e.g., --missing-values skip to skip rows with missing URLs)

  1. Construct and show the command:

For CSV/TSV:

```bash

datalad addurls \

-m "<message>" \

[--jobs <N>] \

[--ifexists skip] \

<manifest-file> \

'<url-column>' \

'<filename-column>'

```

For JSON (keys as format strings):

```bash

datalad addurls \

-m "<message>" \

--url-format '{url}' \

--filename-format '{name}' \

--jobs 4 \

<manifest-file>.json \

'{url}' \

'{name}'

```

Display the full command and ask: > "Ready to execute? (yes / edit)"

  1. Execute and report:

content is pointer-only (not yet downloaded) — run datalad get . to fetch everything.

column names, network errors. Suggest checking the manifest format.

  1. Post-ingestion suggestions:

Constraints

content by default — files will be pointer-only until datalad get is run.

initial run creates the commit immediately; downloading happens separately.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.