mod-sources

Documents Modrinth and CurseForge API endpoints, rate limits, and the Source trait for gcl-core.

Updated Sep 8, 2026
One-click install
npx skills add https://github.com/Sixdd6/grid-craft-launcher --skill mod-sources-sixdd6
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: mod-sources
Source: https://github.com/Sixdd6/grid-craft-launcher/tree/main/.claude/skills/mod-sources
Command: npx skills add https://github.com/Sixdd6/grid-craft-launcher --skill mod-sources-sixdd6

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Working on the gcl-core sources/ module requires precise knowledge of two different mod hosting APIs — Modrinth and CurseForge — whose endpoints, response envelopes, class ids, loader ids, and edge cases (null download URLs, fingerprints, modpack handling) are easy to get wrong without a single authoritative reference. ## Core Features & Use Cases - API Reference: Documents every Modrinth and CurseForge endpoint used by the launcher, including headers, rate limits, facets, class ids, loader ids, and batch/fingerprint calls. - Source Trait Contract: Defines the Source trait interface, ContentKind install targets, rich text conversion rules, and behaviors like release-first latest-version picking and one-file-per-project install rules. - Edge Case Guidance: Covers null downloadUrl manual-download flows, CurseForge API key resolution, fixture re-recording, and unverified VERIFY items. - Use Case: Before modifying how the launcher searches CurseForge for shaders, consult this Skill to learn that shader class ids are fetched at runtime and cached in a OnceCell, and that a missing class yields Error::UnsupportedKind. ## Quick Start Ask the assistant to explain how to add a new content kind or fix a search bug in gcl-core sources/ using the mod-sources reference.

Frequently Asked Questions about mod-sources

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search Modrinth and CurseForge for mods in gcl-core?▼

Use the Source trait's search method with a SearchQuery. Modrinth sends GET /search with JSON facets (outer array AND, inner OR); CurseForge sends classId-based queries against api.curseforge.com with an x-api-key header and game id 432.

How does CurseForge API key resolution work in this launcher?▼

Config::curseforge_api_key reads the CURSEFORGE_API_KEY environment variable first, then a GCL_CURSEFORGE_API_KEY compiled in with option_env!. Tests use the Launcher::with_curseforge_key seam; config.toml holds no key.

What happens when a CurseForge file has a null downloadUrl?▼

A null downloadUrl means the author opted out of third-party distribution. It surfaces as content::ManualDownload with the file's page URL, and the user drops the file manually, which import_manual verifies by fingerprint or sha1.

Does Modrinth support world projects or fingerprint lookup?▼

No. World is not a Modrinth project type, so search rejects ContentKind::World with Error::UnsupportedKind. Modrinth also has no fingerprint endpoint, so resolve_by_fingerprint returns an empty vector; use its sha1 hash lookup instead.

Why does a CurseForge shader search fail with UnsupportedKind?▼

Shader and data pack class ids are fetched at runtime and optional. If the categories response lacks that class, the field stays None and searching that kind fails with Error::UnsupportedKind regardless of what supported_kinds lists.

How are CurseForge fixtures re-recorded for tests?▼

Put a key in .env and run just record-fixture curseforge <name> '<url>'. The existing fixtures are synthetic because the development machine has no CURSEFORGE_API_KEY; never commit a .env or a fixture carrying a live key.