Logo van Iri Api

Iri Api

Organisatie
AI-ModCon
iri-api

Use this skill to work with IRI API deployments at NERSC (https://api.iri.nersc.gov) and ALCF (https://api.alcf.anl.gov) via reproducible scripts, including Globus token lifecycle management (status, refresh, interactive login) and OpenAPI-driven endpoint execution for facility/status/account/compute/filesystem/task workflows. Trigger this skill when the task mentions IRI API, openapi.json-driven calls, authenticated endpoint access, job submission/status/cancel, file operations, task polling/cleanup, or running jobs on Perlmutter or Polaris.

Overzicht

UitgeverAI-ModCon
Repositorygenesis-skills
Skillnaamiri-api
Sterren
37
Forks
16
Meegeleverde bestanden
18
LicentieBSD-2-Clause
Links
  • Instructies in Markdown

    Een SKILL.md-bestand dat het model laadt wanneer nodig, zodat het alleen tokens kost als een verzoek er daadwerkelijk bij past.

  • Werkt met elk LLM

    AI-skills zijn gewone Markdown, geen aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • 18 meegeleverde bestanden

    Scripts, sjablonen en referentiemateriaal die het model tijdens het werken kan lezen. Bestanden zijn alleen-lezen en worden nooit uitgevoerd.

  • Open source

    Gepubliceerd door AI-ModCon op GitHub. Lees de broninhoud voordat je de skill installeert.

Installatie

Installeer de AI-skill Iri Api in TypingMind om deze met elke LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map — het leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/AI-ModCon/genesis-skills/tree/main/skills/amsc-skills/iri-api
  4. Schakel de skill in elke chat in waarin je deze beschikbaar wilt hebben.
Plug-ins → Skills → Nieuwe skill → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/AI-ModCon/genesis-skills.git /tmp/genesis-skills
mkdir -p .claude/skills
cp -r /tmp/genesis-skills/skills/amsc-skills/iri-api .claude/skills/iri-api
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Iri Api in een willekeurige chat in TypingMind in en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek erbij past, laadt het model zelf de volledige instructies — je hoeft de skill nooit handmatig aan te roepen en deze kost pas tokens wanneer je de skill daadwerkelijk gebruikt.

Het model laadt Iri Api automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Iri Api niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

IRI API

Use scripted workflows. Prefer the bundled scripts over hand-written curl commands.

Deployments

SiteBase URLAuth scriptReference
NERSC (Perlmutter)https://api.iri.nersc.gov (default)scripts/token_manager.py ensure --facilities nerscreferences/NERSC.md
ALCF (Polaris)https://api.alcf.anl.govscripts/token_manager.py ensure --facilities alcfreferences/ALCF.md

Before doing any work, read the reference file for the relevant site. Do not proceed from memory.

Use the unified token manager for both sites. By default it can manage both NERSC and ALCF tokens together, but when the user is focused on one site, scope it with --facilities nersc or --facilities alcf.

--facility is a global flag on iri_api_call.py and must come before the subcommand:

bash
# Correct
python3 scripts/iri_api_call.py --facility nersc call --operation-id getProjects --ensure-token
python3 scripts/iri_api_call.py --facility alcf call --operation-id launchJob ...

# Wrong
python3 scripts/iri_api_call.py call --facility nersc --operation-id getProjects

--base-url and --openapi-url follow the same rule: they are global flags and must also come before the subcommand.

Quick Start

  1. Check token state:
bash
python3 scripts/token_manager.py status --json
  1. Ensure a usable token for authenticated endpoints:
bash
python3 scripts/token_manager.py ensure --min-ttl 300

If the IRI API still returns 401, force a fresh identity-provider login:

bash
python3 scripts/token_manager.py ensure --force-login --prompt-login --validate-iri
  1. List available operations from OpenAPI:
bash
python3 scripts/iri_api_call.py --facility nersc list-operations
python3 scripts/iri_api_call.py --facility alcf list-operations
  1. Call an endpoint by operationId:
bash
python3 scripts/iri_api_call.py --facility nersc call --operation-id getResources
python3 scripts/iri_api_call.py --facility alcf call --operation-id getResources

Token Management

Use scripts/token_manager.py for all token lifecycle actions.

  • Check token state:
bash
python3 scripts/token_manager.py status --json
python3 scripts/token_manager.py status --facilities nersc --json
python3 scripts/token_manager.py status --facilities alcf --json
  • Ensure usable tokens:
bash
python3 scripts/token_manager.py ensure --min-ttl 300
python3 scripts/token_manager.py ensure --facilities nersc --min-ttl 300
python3 scripts/token_manager.py ensure --facilities alcf --min-ttl 300
  • Refresh or login for selected facilities only:
bash
python3 scripts/token_manager.py ensure --facilities nersc --refresh-only
python3 scripts/token_manager.py ensure --facilities alcf --refresh-only
  • Validate the facility token against the matching API:
bash
python3 scripts/token_manager.py ensure --facilities nersc --validate-iri --validate-facility nersc
python3 scripts/token_manager.py ensure --facilities alcf --validate-iri --validate-facility alcf
  • Print selected facility access tokens:
bash
python3 scripts/token_manager.py ensure --print-token
python3 scripts/token_manager.py ensure --facilities alcf --print-token

Notes:

  • Default token file: ~/.globus/auth_tokens.json
  • The saved file preserves the full Globus token response, including other_tokens.
  • The usable IRI API bearer token is extracted from other_tokens, not the top-level Globus Auth token.
  • Required scopes are enforced by script validation.
  • globus-sdk is required for refresh/login operations.
  • If validation reports empty session_info.authentications, re-run with --force-login --prompt-login and complete the flow in a Chrome incognito window.

Endpoint Execution

Use scripts/iri_api_call.py for all API calls.

Operation Discovery

  • List all operations:
bash
python3 scripts/iri_api_call.py --facility nersc list-operations
python3 scripts/iri_api_call.py --facility alcf list-operations
  • See generated static reference: references/operations.md

Public Endpoints (No Token Required)

Examples:

bash
python3 scripts/iri_api_call.py --facility nersc call --operation-id getFacility
python3 scripts/iri_api_call.py --facility nersc call --operation-id getIncidents
python3 scripts/iri_api_call.py --facility nersc call --operation-id getResource --path-param resource_id=perlmutter

Authenticated Endpoints (Token Required)

Use --ensure-token so calls auto-refresh/login if needed.

  • Account / project context:
bash
python3 scripts/iri_api_call.py --facility nersc call --operation-id getProjects --ensure-token
python3 scripts/iri_api_call.py --facility alcf call --operation-id getProjects --ensure-token
  • Submit compute job (request body from file):
bash
python3 scripts/iri_api_call.py --facility nersc call \
  --operation-id launchJob \
  --path-param resource_id=perlmutter \
  --json-file /path/to/job.json \
  --ensure-token
  • Query one job:
bash
python3 scripts/iri_api_call.py --facility nersc call \
  --operation-id getJob \
  --path-param resource_id=perlmutter \
  --path-param job_id=12345 \
  --ensure-token
  • Cancel job:
bash
python3 scripts/iri_api_call.py --facility nersc call \
  --operation-id cancelJob \
  --path-param resource_id=perlmutter \
  --path-param job_id=12345 \
  --ensure-token
  • Filesystem list/view:
bash
python3 scripts/iri_api_call.py --facility nersc call \
  --operation-id ls \
  --path-param resource_id=perlmutter \
  --query path=/global/cfs/cdirs \
  --ensure-token

python3 scripts/iri_api_call.py --facility nersc call \
  --operation-id view \
  --path-param resource_id=perlmutter \
  --query path=/path/to/file.txt \
  --ensure-token
  • Upload file:
bash
python3 scripts/iri_api_call.py --facility nersc call \
  --operation-id upload \
  --path-param resource_id=perlmutter \
  --query path=/path/on/resource/target.dat \
  --upload-file /local/path/source.dat \
  --ensure-token
  • Poll task state:
bash
python3 scripts/iri_api_call.py --facility nersc call --operation-id getTasks --ensure-token
python3 scripts/iri_api_call.py --facility nersc call --operation-id getTask --path-param task_id=<task_id> --ensure-token

Shared Parameter Rules

  • Prefer --operation-id over manual --method/--path.
  • Provide required path params via repeated --path-param key=value.
  • Provide query params via repeated --query key=value.
  • Use one of:
    • --json-file /path/to/body.json
    • --json-body '{"key":"value"}'
    • --upload-file /path/to/local.file for multipart endpoints
  • For binary or large outputs, use --output-file /path/to/out.bin.
  • Use --facility nersc or --facility alcf on scripts/iri_api_call.py so the API server and bearer token selection stay aligned.

Job Construction Guidance

Before generating a compute job request, check whether the user wants any of the following:

  • A multistep job with multiple srun or mpiexec lines.
  • Additional job-control behavior that is not covered by the API attributes fields.
  • Explicit affinity or binding control beyond the basic resource request.

If any of those are needed, use a pre_launch or post_launch script to carry that logic instead of trying to force it into a single launch line or into unsupported attributes.

Rules for these scripts:

  • Do not include #SBATCH or #PBS directives in pre_launch or post_launch.
  • The scheduler directives belong in the batch script generated by the API server, not inside the pre/post scripts.
  • Put extra srun or mpiexec lines, affinity settings, environment setup, and teardown logic in those scripts as plain shell commands.
  • For NERSC-oriented launch structure and Slurm examples, use https://docs.nersc.gov/jobs/examples/.
  • For ALCF-oriented launch structure and PBS examples, use https://docs.alcf.anl.gov/running-jobs/example-job-scripts/#cpu-mpi-openmp-examples.

Reproducibility and Reference Refresh

Regenerate endpoint reference after OpenAPI updates:

bash
python3 scripts/generate_operation_reference.py \
  --openapi references/openapi.json \
  --output references/operations.md

Regenerate request payload templates:

bash
python3 scripts/generate_examples.py

Use templates from references/examples/:

  • compute-launch-job.json
  • compute-status-filters.json
  • filesystem-mkdir.json
  • filesystem-mv.json
  • filesystem-cp.json
  • filesystem-compress.json
  • filesystem-extract.json
  • filesystem-chmod.json
  • filesystem-chown.json

Example calls using generated templates:

bash
python3 scripts/iri_api_call.py --facility nersc call \
  --operation-id launchJob \
  --path-param resource_id=perlmutter \
  --json-file references/examples/compute-launch-job.json \
  --ensure-token

python3 scripts/iri_api_call.py --facility nersc call \
  --operation-id mkdir \
  --path-param resource_id=perlmutter \
  --json-file references/examples/filesystem-mkdir.json \
  --ensure-token

Useful Endpoint Groups

  • Facility + status (public): infrastructure metadata and incident visibility.
  • Account (auth): user projects and allocation hierarchy.
  • Compute (auth): submit/update/status/cancel jobs.
  • Filesystem (auth): list/read/write/upload/download and file operations.
  • Task (auth): check asynchronous task progress and cleanup.

Meegeleverde bestanden

Het model leest deze bestanden wanneer nodig terwijl de skill geladen is. Ze worden beschikbaar gesteld als leesbare bestanden en worden nooit uitgevoerd.

Veelgestelde vragen

Wat doet de AI-skill Iri Api?

Use this skill to work with IRI API deployments at NERSC (https://api.iri.nersc.gov) and ALCF (https://api.alcf.anl.gov) via reproducible scripts, including Globus token lifecycle management (status, refresh, interactive login) and OpenAPI-driven endpoint execution for facility/status/account/compute/filesystem/task workflows. Trigger this skill when the task mentions IRI API, openapi.json-driven calls, authenticated endpoint access, job submission/status/cancel, file operations, task polling/cleanup, or running jobs on Perlmutter or Polaris.

Waarom Iri Api gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Iri Api bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model, en je kunt midden in een chat van model wisselen zonder dat de skill niet meer werkt. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Iri Api in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/AI-ModCon/genesis-skills/tree/main/skills/amsc-skills/iri-api. TypingMind leest het bestand SKILL.md, bundelt de bijbehorende bestanden en installeert het geheel als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Iri Api gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Iri Api gebruiken?

Zoveel als je wilt. Zolang een model skills ondersteunt, kun je Iri Api ermee gebruiken: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama en meer. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Iri Api gratis?

Ja. Deze skill is door AI-ModCon op GitHub gepubliceerd onder de licentie BSD-2-Clause. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. Deze volgt het open Agent Skills-formaat: een bestand met de naam SKILL.md met een naam en beschrijving, plus eventuele scripts, sjablonen of referentiebestanden die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Toon alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇