Agent skill

Software Heritage API

by wentorai in wentorai/research-plugins

Archive and retrieve source code history via Software Heritage API

MITAuto-check passed

Install Software Heritage API

skills CLI
$ npx skills add wentorai/research-plugins --skill software-heritage-api -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install wentorai/research-plugins software-heritage-api --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/wentorai/research-plugins.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/domains/cs/software-heritage-api .claude/skills/software-heritage-api && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
software-heritage-api
GitHub stars
298
Used in
1 other repo
Token cost
~1.4k tokens
SKILL.md length
160 words
Files
1
Skills in repo
428
Repo updated
First seen
Licence
MIT

At a glance

Archive and retrieve source code history via Software Heritage API

  • Works in 5 steps: Code citation: Cite specific code… → Reproducibility: Archive the exact code… → Provenance tracking: Trace code… → …
  • SKILL.md covers Overview, API Endpoints, SWHID Format and Python Usage, plus 3 more sections
  • Calls curl; reaches archive.softwareheritage.org and github.com

What it does

Software Heritage API is an agent skill from wentorai/research-plugins. Archive and retrieve source code history via Software Heritage API

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: 350+ academic research skills, MCP configs, and plugins for Research-Claw and AI agents. The licence is MIT.

Example prompts

  • “/software-heritage-api”

Requirements

  • Python 3

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Code citation: Cite specific code versions in papers using SWHIDs
  2. Reproducibility: Archive the exact code used in experiments
  3. Provenance tracking: Trace code evolution and authorship
  4. Software archaeology: Study historical codebases
  5. Compliance: Ensure open-source license compliance through archival

What it can do on your machine

Read from SKILL.md and the folder at commit bf44b3c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • archive.softwareheritage.org
    • github.com

    Also links to:

    • softwareheritage.org
    • docs.softwareheritage.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Software Heritage API loads about 1.4k tokens when it runs. Until then it costs about 22 tokens; SKILL.md has 160 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~22
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from wentorai/research-plugins at commit bf44b3c, republished under its MIT licence (© wentorai). 160 words, ~1,441 tokens.

Download SKILL.mdSave it as .claude/skills/software-heritage-api/SKILL.md (or your agent's skills folder).
name
software-heritage-api
description
Archive and retrieve source code history via Software Heritage API

Software Heritage API

Overview

Software Heritage is the universal archive of software source code, preserving 18B+ source files from 280M+ software origins (GitHub, GitLab, Bitbucket, CRAN, PyPI, Debian, etc.). Each artifact receives a persistent SWHID (SoftWare Heritage IDentifier) for reliable citation in research. The API enables code search, provenance tracking, and historical analysis. Free, no authentication for read access.

API Endpoints

Base URL
https://archive.softwareheritage.org/api/1
Search Origins (Repositories)
bash
# Search for repositories
curl "https://archive.softwareheritage.org/api/1/origin/search/scikit-learn/?limit=10"

# Get origin metadata
curl "https://archive.softwareheritage.org/api/1/origin/https://github.com/scikit-learn/scikit-learn/get/"

# List visits (snapshots) of an origin
curl "https://archive.softwareheritage.org/api/1/origin/https://github.com/scikit-learn/scikit-learn/visits/"
Retrieve Content
bash
# Get a specific file by its SHA1 hash
curl "https://archive.softwareheritage.org/api/1/content/sha1:adc83b19e793491b1c6ea0fd8b46cd9f32e592fc/"

# Get raw file content
curl "https://archive.softwareheritage.org/api/1/content/sha1:adc83b19e793491b1c6ea0fd8b46cd9f32e592fc/raw/"

# Get directory listing
curl "https://archive.softwareheritage.org/api/1/directory/{sha1_git}/"
Resolve SWHIDs
bash
# Resolve a SWHID to its object
curl "https://archive.softwareheritage.org/api/1/resolve/swh:1:cnt:adc83b19e793491b1c6ea0fd8b46cd9f32e592fc/"

# Get snapshot
curl "https://archive.softwareheritage.org/api/1/snapshot/{sha1_git}/"

# Get revision (commit)
curl "https://archive.softwareheritage.org/api/1/revision/{sha1_git}/"
Save Code Now
bash
# Request archival of a repository
curl -X POST "https://archive.softwareheritage.org/api/1/origin/save/git/url/https://github.com/user/repo/"

SWHID Format

SoftWare Heritage persistent IDentifiers:

swh:1:{type}:{hash}

Types:
  cnt  → Content (file)
  dir  → Directory
  rev  → Revision (commit)
  rel  → Release (tag)
  snp  → Snapshot

Examples:
  swh:1:cnt:94a9ed024d3859793618152ea559a168bbcbb5e2  (file)
  swh:1:rev:309cf2674ee7a0749978cf8265ab91a60aea0f7d  (commit)
  swh:1:snp:c7c108084bc0bf3d81436bf980b46e98571c7b17  (snapshot)

With qualifiers:
  swh:1:cnt:{hash};origin=https://github.com/user/repo;visit=swh:1:snp:{hash};path=/src/main.py

Python Usage

python
import requests
import time

BASE_URL = "https://archive.softwareheritage.org/api/1"


def search_origins(query: str, limit: int = 10) -> list:
    """Search Software Heritage for archived repositories."""
    resp = requests.get(
        f"{BASE_URL}/origin/search/{query}/",
        params={"limit": limit},
        timeout=30,
    )
    resp.raise_for_status()
    return [
        {
            "url": o.get("url"),
            "has_visits": o.get("has_visits"),
        }
        for o in resp.json()
    ]


def get_origin_visits(origin_url: str) -> list:
    """Get archival snapshots for a repository."""
    resp = requests.get(
        f"{BASE_URL}/origin/{origin_url}/visits/",
        timeout=30,
    )
    resp.raise_for_status()
    return [
        {
            "date": v.get("date"),
            "status": v.get("status"),
            "snapshot": v.get("snapshot"),
            "type": v.get("type"),
        }
        for v in resp.json()
    ]


def get_directory(sha1_git: str) -> list:
    """List files in an archived directory."""
    resp = requests.get(
        f"{BASE_URL}/directory/{sha1_git}/",
        timeout=30,
    )
    resp.raise_for_status()
    return [
        {
            "name": entry.get("name"),
            "type": entry.get("type"),
            "target": entry.get("target"),
        }
        for entry in resp.json()
    ]


def save_code_now(repo_url: str) -> dict:
    """Request Software Heritage to archive a repository."""
    resp = requests.post(
        f"{BASE_URL}/origin/save/git/url/{repo_url}/",
        timeout=30,
    )
    resp.raise_for_status()
    return resp.json()


# Example: find archived ML frameworks
origins = search_origins("pytorch", limit=5)
for o in origins:
    print(f"Archived: {o['url']}")

# Example: get snapshot history
visits = get_origin_visits("https://github.com/pytorch/pytorch")
for v in visits[:5]:
    print(f"[{v['date'][:10]}] {v['status']} — {v['type']}")

# Example: request archival
# result = save_code_now("https://github.com/my-org/my-research-code")
# print(f"Save request: {result['save_request_status']}")

Use Cases

  1. Code citation: Cite specific code versions in papers using SWHIDs
  2. Reproducibility: Archive the exact code used in experiments
  3. Provenance tracking: Trace code evolution and authorship
  4. Software archaeology: Study historical codebases
  5. Compliance: Ensure open-source license compliance through archival

Rate Limits

  • Unauthenticated: 120 requests/hour
  • Authenticated (free token): 1200 requests/hour

References

© wentorai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/domains/cs/software-heritage-api of wentorai/research-plugins.

Open the folder on GitHubat commit bf44b3c

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in wentorai/research-plugins, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Software Heritage API next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Software Heritage API compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Software Heritage API this skillwentorai/research-plugins2981 repos~1.4kAutomated safety check: PassMIT
Iterative Retrievalaffaan-m/ECC274k7 repos~1.6kAutomated safety check: PassMIT
Iterative Retrievalaffaan-m/ECC274k2 repos~1.1kAutomated safety check: PassMIT
Iterative Retrievalaffaan-m/ECC274k2 repos~1.3kAutomated safety check: PassMIT
Iterative Retrievalaffaan-m/ECC274k1 repos~1.1kAutomated safety check: PassMIT
OpenSpec Bulk Change ArchiverFission-AI/OpenSpec71k2 repos~5.6kAutomated safety check: PassMIT

Similar skills

  • Pattern for progressively refining context retrieval to solve the subagent context problem.

    274k GitHub starsUsed in 7 repos~1.6k tokens
    Agent WorkflowsAuto-check passed
  • サブエージェントのコンテキスト問題を解決するために、コンテキスト取得を段階的に洗練するパターン. An agent skill from affaan-m/ECC.

    274k GitHub starsUsed in 2 repos~1.1k tokens
    Auto-check passed
  • 서브에이전트 컨텍스트 문제를 해결하기 위한 점진적 컨텍스트 검색 개선 패턴. An agent skill from affaan-m/ECC.

    274k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check passed
  • 逐步优化上下文检索以解决子代理上下文问题的模式

    274k GitHub starsUsed in 1 repo~1.1k tokens
    Auto-check passed
  • Archives several completed OpenSpec changes in one operation, checking the codebase to resolve spec conflicts rather than archiving blindly.

    71k GitHub starsUsed in 2 repos~5.6k tokens
    DevelopmentAuto-check passed
  • Retrieval Reflex

    garrytan/gbrain

    When/what to retrieve — open the brain page for a salient entity before answering from memory.

    31k GitHub stars~735 tokensUpdated today
    Auto-check passed

More from wentorai/research-plugins

All 428 skills in this repo
  • Abstract Writing Guide

    wentorai/research-plugins

    Craft structured research abstracts that maximize clarity and journal acceptance

    298 GitHub starsUsed in 1 repo~1.7k tokens
    Auto-check passed
  • Academic Citation Manager

    wentorai/research-plugins

    Manage academic citations across BibTeX, APA, MLA, and Chicago formats

    298 GitHub starsUsed in 1 repo~2.7k tokens
    Auto-check passed
  • Academic Paper Summarizer

    wentorai/research-plugins

    Summarize academic papers with structured extraction of key elements

    298 GitHub starsUsed in 1 repo~1.4k tokens
    Auto-check passed
  • Academic Study Methods

    wentorai/research-plugins

    Evidence-based study techniques for academic learning and retention

    298 GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed
  • Academic Tone Guide

    wentorai/research-plugins

    Adjust writing tone and register for academic audiences and venues

    298 GitHub starsUsed in 1 repo~1.9k tokens
    Auto-check passed
  • Academic Translation Guide

    wentorai/research-plugins

    Academic translation, post-editing, and Chinglish correction guide

    298 GitHub starsUsed in 1 repo~1.6k tokens
    Auto-check passed

Questions about Software Heritage API

What does Software Heritage API do?

Archive and retrieve source code history via Software Heritage API. Software Heritage API is an agent skill from wentorai/research-plugins.

How do I install Software Heritage API in Claude Code?

Run `npx skills add wentorai/research-plugins --skill software-heritage-api -a claude-code`. Or copy the skill folder (skills/domains/cs/software-heritage-api in wentorai/research-plugins) into .claude/skills/software-heritage-api in your project. Claude Code loads it when a task matches its description.

How do I install Software Heritage API in Codex?

Run `npx skills add wentorai/research-plugins --skill software-heritage-api -a codex`. Or copy the skill folder (skills/domains/cs/software-heritage-api in wentorai/research-plugins) into .agents/skills/software-heritage-api in your project. Codex loads it when a task matches its description.

Can I use Software Heritage API in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add wentorai/research-plugins --skill software-heritage-api -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/software-heritage-api, .gemini/skills/software-heritage-api, .github/skills/software-heritage-api and .opencode/skills/software-heritage-api in your project.

What does Software Heritage API need to run?

Going by SKILL.md and its folder, Software Heritage API needs the command-line tools its instructions call (curl). Our summary lists: Python 3.

Does Software Heritage API access the network?

SKILL.md names 4 domains. In commands or code: archive.softwareheritage.org and github.com; the agent is likely to contact these when it follows the instructions. As links in the text: softwareheritage.org and docs.softwareheritage.org. This is read from the text; nothing was executed.

Is Software Heritage API safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Software Heritage API use?

Software Heritage API is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Software Heritage API use?

About 1.4k tokens (SKILL.md is roughly 5.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Software Heritage API?

Skills that share tags, products or a category with Software Heritage API: Iterative Retrieval (affaan-m/ECC, 274k stars), Iterative Retrieval (affaan-m/ECC, 274k stars), Iterative Retrieval (affaan-m/ECC, 274k stars) and Iterative Retrieval (affaan-m/ECC, 274k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Software Heritage API?

wentorai (a GitHub user) maintains it in wentorai/research-plugins, which has 298 GitHub stars. The repository holds 428 skills in this directory. The repository was last updated on June 19, 2026.

Source: wentorai/research-plugins on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.