spi-docs

spi-docs is a skill for Claude Code from sunghyun-k/claude-swift-plugins. It costs 59 tokens per session (1,127 once invoked), scanned A, original, MIT.

A browser-based reader that converts Swift Package Index DocC pages into Markdown; Swift Package Index is a website hosting documentation for Swift packages, and DocC is Apple's documentation format.

In plain words
What is it for?
Use it when a Swift Package Index documentation URL is provided or when researching the documentation of a Swift package.
Why use it?
It makes package documentation easier to read and follow, including linked topics and related pages, despite the site's browser challenge.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable.

Runs only inside a plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else, and the catalogue could not identify which plugin ships it.

Good fit Use it when a Swift Package Index documentation URL is provided or when researching the documentation of a Swift package.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.

Made for: Claude Code.

Its marketplace also offers this one on its own, as the plugin spi-docs/plugin install spi-docs after adding the marketplace above.

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 spi-docs

README.md
[![agentmods](https://agentmods.dev/badge/skills/sunghyun-k/claude-swift-plugins/spi-docs/github.svg)](https://agentmods.dev/skills/sunghyun-k/claude-swift-plugins/spi-docs)
Your own site
<a href="https://agentmods.dev/skills/sunghyun-k/claude-swift-plugins/spi-docs"><img src="https://agentmods.dev/badge/skills/sunghyun-k/claude-swift-plugins/spi-docs/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for spi-docs

Your own site · 80×15
<a href="https://agentmods.dev/skills/sunghyun-k/claude-swift-plugins/spi-docs"><img src="https://agentmods.dev/badge/skills/sunghyun-k/claude-swift-plugins/spi-docs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,127 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00059 $0.01127
Opus 5 $0.00030 $0.00563
Sonnet 5 $0.00012 $0.00225
Haiku 4.5 $0.00006 $0.00113

Measured 9d ago against content hash 302548aaf83d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

spi-docs scanned grade A with 1 finding 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 9d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (docc2md.js), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

SPI 는 Cloudflare managed challenge("Just a moment…") 뒤에 있어서 `curl`, `requests`, `WebFetch` 같은 순수 HTTP 클라이언트는 **403** 으로 막힙니다. JS 를 실행하는 실제 브라우저 엔진으로 챌린지를 통과한 뒤, **같은 오리진(same-origin) `fetch`** 로 DocC 데이터 JSON 을 받아야 합니다.
plugins/spi-docs/skills/spi-docs/SKILL.md · 74 lines

How it starts

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

Swift Package Index 문서 → 마크다운

swiftpackageindex.com 의 DocC 문서 페이지를 깔끔한 마크다운으로 변환해 읽는 스킬입니다. 변환된 문서의 Topics / See Also 링크는 모두 다시 이 스킬로 열 수 있는 SPI 문서 URL 이라, 링크를 따라가며 문서를 탐색할 수 있습니다.

언제 쓰나

  • https://swiftpackageindex.com/{owner}/{repo}/{ref}/documentation/... 형태의 URL 이 주어졌을 때
  • "이 Swift 패키지 문서 읽어줘", "GRDB 문서 요약해줘" 등 SPI 문서 열람이 필요할 때

왜 브라우저가 필요한가

SPI 는 Cloudflare managed challenge("Just a moment…") 뒤에 있어서 curl, requests, WebFetch 같은 순수 HTTP 클라이언트는 403 으로 막힙니다. JS 를 실행하는 실제 브라우저 엔진으로 챌린지를 통과한 뒤, 같은 오리진(same-origin) fetch 로 DocC 데이터 JSON 을 받아야 합니다. 그래서 이 스킬은 세션의 브라우저 도구를 사용합니다.

  • 우선순위 1: 인앱 브라우저 — mcp__Claude_Browser__* (javascript_tool, preview_start, computer)
  • 대안: Chrome 확장 — mcp__claude-in-chrome__javascript_tool (동일한 JS 를 실행)

둘 다 없으면 이 스킬은 동작하지 않습니다. 그 경우 사용자에게 브라우저 도구가 필요함을 알리세요.

절차

1. Cloudflare 통과 (세션당 1회)

브라우저 탭을 아무 SPI 문서 URL 로 엽니다. 이미 swiftpackageindex.com 이 열려 있으면 건너뜁니다.

preview_start { "url": "<사용자가 준 SPI 문서 URL>" }

여는 직후 "잠시만 기다리십시오…"(Cloudflare) 페이지가 뜰 수 있으니 2~3초 대기 후 진행합니다.

computer { "action": "wait", "duration": 3 }

탭이 실제 문서 제목(예: "GRDB | Documentation")으로 바뀌면 통과된 것입니다.

2. 변환기 주입 (탭당 1회)

${CLAUDE_PLUGIN_ROOT}/skills/spi-docs/docc2md.js 파일을 Read 로 읽어, 그 전체 내용을 그대로 브라우저의 javascript_tooltext 로 실행합니다. 이 스크립트는 window.__spiDocc 를 정의합니다.

탭을 새로고침하거나 다른 오리진으로 이동하면 window.__spiDocc 가 사라지므로 다시 주입합니다. 같은 탭·같은 오리진에 머무는 한 재주입 불필요.

3. 페이지 변환

원하는 SPI 문서 URL 로 convert 를 호출하고, 반환된 마크다운을 사용자에게 출력합니다.

window.__spiDocc.convert("https://swiftpackageindex.com/groue/GRDB.swift/master/documentation/grdb").then(r => r.markdown)

반환값은 { url, title, markdown } 입니다. 보통 .then(r => r.markdown) 로 마크다운만 받으면 됩니다.

4. 참조 링크 따라가기

출력된 마크다운의 ## Topics / ## See Also 링크는 전부 SPI 문서 URL 입니다. 다른 페이지를 읽으려면 그 URL 로 3번(같은 탭이면 주입 없이)만 다시 호출하면 됩니다.

URL 형태 참고

  • 사람용 문서 URL: .../{owner}/{Repo}/{ref}/documentation/... (예: groue/GRDB.swift/master/documentation/grdb)
  • convert 는 내부적으로 데이터 엔드포인트 .../{owner}/{repo-소문자}/{ref}/data/documentation/....json 를 계산해 fetch 합니다. 사용자에게 보이는 문서 URL 을 그대로 넘기면 됩니다.
  • master, main, 태그, 버전 등 어떤 ref 든 동작합니다.

Read the full file on GitHub · 74 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 9d ago First seen · 74 lines · 59 tokens per session scan A 302548aaf83d

Subscribe to this mod's changes

spi-docs is a skill published in the GitHub repository sunghyun-k/claude-swift-plugins (3 stars, last pushed 1mo ago), licensed MIT. It adds 59 tokens to every session and 1,127 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens