Install Sosumi AI Agent Skill
mainTo allow AI coding assistants to use Sosumi consistently, you can install its hosted skill file. Spec-compliant clients can install it using the following command:
npx skills add https://sosumi.airepository·main·Indexed 19 days ago
https://github.com/nshipster/sosumi.aiA service that converts JavaScript-rendered Apple Developer documentation, Human Interface Guidelines (HIG), and WWDC video transcripts into AI-readable Markdown. It provides an HTTP API, a CLI (@nshipster/sosumi), and an MCP server for AI agents to search and fetch Apple documentation and external Swift-DocC pages.
To allow AI coding assistants to use Sosumi consistently, you can install its hosted skill file. Spec-compliant clients can install it using the following command:
npx skills add https://sosumi.aiSosumi is built with Hono, making it compatible with various runtimes (e.g., Cloudflare Workers).
Prerequisites:
Quick Start Setup:
git clone https://github.com/nshipster/sosumi.ai.git && cd sosumi.ainpm installnpm run devConfiguration for External Hosts: When self-hosting, you can control access to external Swift-DocC hosts using these environment variables:
EXTERNAL_DOC_HOST_ALLOWLIST: A newline-delimited list of permitted hosts.EXTERNAL_DOC_HOST_BLOCKLIST: A newline-delimited list of denied hosts.git clone https://github.com/nshipster/sosumi.ai.git
cd sosumi.ai
npm install
npm run devSosumi allows you to fetch Apple documentation (API references, Human Interface Guidelines, WWDC transcripts, and external Swift-DocC) in Markdown format by replacing the developer.apple.com host with sosumi.ai in the URL.
developer.apple.com URL, replace the host with sosumi.ai and keep the same path.Original: https://developer.apple.com/documentation/swift/array
AI-readable: https://sosumi.ai/documentation/swift/arraySosumi converts JavaScript-rendered Apple Developer documentation into Markdown by proxying requests. You can access any Apple Developer documentation, Human Interface Guidelines (HIG), or WWDC video transcripts by replacing developer.apple.com with sosumi.ai in the URL.
For external Swift-DocC pages, use the /external/ prefix followed by the absolute HTTPS URL.
Supported URL patterns:
https://developer.apple.com/ with https://sosumi.ai/.https://developer.apple.com/videos/play/ with https://sosumi.ai/videos/play/.https://sosumi.ai/external/<original_url>.// Original Apple Doc
https://developer.apple.com/documentation/swift/array
// Sosumi AI-readable Markdown
https://sosumi.ai/documentation/swift/array
// Original WWDC Video
https://developer.apple.com/videos/play/wwdc2021/10133/
// Sosumi AI-readable Video Transcript
https://sosumi.ai/videos/play/wwdc2021/10133
// External Swift-DocC
https://apple.github.io/swift-argument-parser/documentation/argumentparser
// Sosumi AI-readable External Doc
https://sosumi.ai/external/https://apple.github.io/swift-argument-parser/documentation/argumentparserSosumi provides an MCP server that supports Streamable HTTP and Server-Sent Events (SSE) transport. If your client supports these, connect directly to https://sosumi.ai/mcp.
For clients that require stdio transport, use mcp-remote to proxy the connection.
Available MCP Tools:
searchAppleDocumentation(query: string): Searches Apple Developer documentation. Returns structured results (titles, URLs, descriptions, etc.).fetchAppleDocumentation(path: string): Fetches Apple documentation or HIG by path (e.g., /documentation/swift). Returns Markdown.fetchAppleVideoTranscript(path: string): Fetches WWDC video transcripts by path (e.g., /videos/play/wwdc2021/10133). Returns Markdown.fetchExternalDocumentation(url: string): Fetches external Swift-DocC documentation by absolute HTTPS URL. Returns Markdown.{
"mcpServers": {
"sosumi": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://sosumi.ai/mcp"]
}
}
}robots.txt or X-Robots-Tag directives.When Sosumi is configured as an MCP server (at https://sosumi.ai/mcp), you can use the following tools:
| Tool | Parameters | Use |
|---|---|---|
searchAppleDocumentation | query: string | Search Apple documentation and return structured results |
fetchAppleDocumentation | path: string | Fetch Apple docs or HIG content by path as Markdown |
fetchAppleVideoTranscript | path: string | Fetch Apple video transcript by /videos/play/... path |
fetchExternalDocumentation | url: string | Fetch external Swift-DocC page by absolute HTTPS URL |
The /external/* endpoint allows the service to fetch and convert DocC-based documentation from external hosts into Markdown.
Security & Controls: Access to external hosts is governed by the following environment variables:
EXTERNAL_DOC_HOST_ALLOWLIST: A list of permitted hostnames.EXTERNAL_DOC_HOST_BLOCKLIST: A list of forbidden hostnames.If an external host is not allowed, the service returns an ExternalAccessError (403/404).
Sosumi uses specific URL patterns to access different types of Apple-related content as Markdown:
Pattern: https://sosumi.ai/documentation/{framework}/{symbol}
https://sosumi.ai/documentation/swift/arrayhttps://sosumi.ai/documentation/swiftui/viewPattern: https://sosumi.ai/design/human-interface-guidelines/{topic}
https://sosumi.ai/design/human-interface-guidelineshttps://sosumi.ai/design/human-interface-guidelines/foundations/colorPattern: https://sosumi.ai/videos/play/{collection}/{id}
https://sosumi.ai/videos/play/wwdc2021/10133https://sosumi.ai/videos/play/meet-with-apple/208Pattern: https://sosumi.ai/external/{full-https-url}
https://sosumi.ai/external/https://apple.github.io/swift-argument-parser/documentation/argumentparser/https://sosumi.ai/external/https://swiftpackageindex.com/pointfreeco/swift-composable-architecture/1.23.1/documentation/composablearchitectureIf the Sosumi CLI is installed on your PATH, you can use the following commands for preflight checks:
sosumi --version: Confirms the CLI is installed.sosumi --help: Shows top-level usage.sosumi <command> --help: Shows the manual for a specific command.sosumi --version
sosumi --help
sosumi <command> --helpThe Sosumi CLI allows you to fetch documentation or search Apple docs directly from your terminal.
Installation:
npm i -g @nshipster/sosumiCommon Commands:
sosumi fetch <path_or_url>: Fetches content as Markdown. Supports paths (e.g., /documentation/swift/array) or full URLs.sosumi search <query>: Searches Apple documentation.sosumi serve: Starts a local server.sosumi serve --port <port>: Starts a local server on a specific port.Output Formats:
By default, output is plain text/Markdown. Use the --json flag for machine-readable output in scripts.
# Fetch via npx
npx @nshipster/sosumi fetch https://developer.apple.com/documentation/swift/array
# Fetch via installed CLI
sosumi fetch /documentation/swift/array
# Search with JSON output
sosumi search "SwiftData" --jsonUse fetchVideoTranscriptHtml to retrieve the raw HTML content of an Apple Developer video page. This function handles setting appropriate headers (including a random User-Agent) and checking response status.
Parameters:
sourceUrl: The URL of the video page to fetch.Returns: A Promise<string> containing the raw HTML text.
Errors:
TranscriptNotFoundError if the response status is 404.Error for other non-OK HTTP status codes.import { fetchVideoTranscriptHtml, TranscriptNotFoundError } from './src/lib/video/index';
try {
const html = await fetchVideoTranscriptHtml('https://developer.apple.com/videos/play/wwdc24/sessions/12345/');
console.log(html);
} catch (error) {
if (error instanceof TranscriptNotFoundError) {
// Handle 404
}
}