swift-docc-github-pages

swift-docc-github-pages is a skill for Claude Code from ivan-magda/claude-superpowers. It costs 37 tokens per session (1,146 once invoked), scanned A, original, MIT.

A setup guide for publishing documentation for a Swift package with Swift DocC on GitHub Pages. Swift DocC generates browsable documentation, while GitHub Pages hosts the published site.

In plain words
What is it for?
It is for choosing the correct documentation build method, creating a GitHub Actions workflow, publishing package documentation, and configuring its GitHub Pages URL.
Why use it?
It helps avoid documentation builds failing because the package targets iOS instead of macOS, including errors such as UIKit not being available.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is cat > ./docs/index.html << 'EOF'.

Part of the swift plugin — 4 skills shipped together

Good fit It is for choosing the correct documentation build method, creating a GitHub Actions workflow, publishing package documentation, and configuring its GitHub Pages URL.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/ivan-magda/claude-superpowers
agentmods
npx agentmods add skills/ivan-magda/claude-superpowers/swift-docc-github-pages

Made for: Claude Code.

Or install swift, the plugin that ships this one along with the rest of its 4 skills.

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 swift-docc-github-pages

README.md
[![agentmods](https://agentmods.dev/badge/skills/ivan-magda/claude-superpowers/swift-docc-github-pages.svg)](https://agentmods.dev/skills/ivan-magda/claude-superpowers/swift-docc-github-pages)
Your own site
<a href="https://agentmods.dev/skills/ivan-magda/claude-superpowers/swift-docc-github-pages"><img src="https://agentmods.dev/badge/skills/ivan-magda/claude-superpowers/swift-docc-github-pages.svg" alt="Measured on agentmods" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,146 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00037 $0.01146
Opus 5 $0.00018 $0.00573
Sonnet 5 $0.00007 $0.00229
Haiku 4.5 $0.00004 $0.00115

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

Security

Grade A, and why

swift-docc-github-pages scanned grade A with 0 findings 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 7d ago.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/swift/skills/swift-docc-github-pages/SKILL.md · 162 lines

How it starts

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

Swift DocC to GitHub Pages

Automate Swift package documentation publishing to GitHub Pages via GitHub Actions.

Which Build Method?

digraph method_choice {
    "Check Package.swift platforms" [shape=box];
    "iOS only?" [shape=diamond];
    "Use xcodebuild docbuild" [shape=box, style=filled, fillcolor=lightblue];
    "Use swift-docc-plugin" [shape=box];

    "Check Package.swift platforms" -> "iOS only?";
    "iOS only?" -> "Use xcodebuild docbuild" [label=".iOS only"];
    "iOS only?" -> "Use swift-docc-plugin" [label="includes .macOS"];
}

Why? swift package generate-documentation builds for macOS. iOS-only packages fail with "no such module 'UIKit'".

Quick Reference

Item Value
Target name From Package.swift: .target(name: "MyLib")
URL format https://USER.github.io/REPO/documentation/targetnamelowercase/
Enable Pages Settings → Pages → Source → "GitHub Actions"

Workflow

Create .github/workflows/docc.yml. Replace TARGET_NAME, TARGET_NAME_LOWERCASE, REPO_NAME.

iOS-only (no Package.swift changes needed):

name: Documentation

on:
  push:
    branches: [main]
  workflow_dispatch:

permissions:
  contents: read
  pages: write
  id-token: write

concurrency:
  group: pages
  cancel-in-progress: true

jobs:
  build:
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v6

      - name: Setup Xcode
        uses: maxim-lobanov/setup-xcode@v1
        with:
          xcode-version: latest-stable

      - name: Build Documentation
        run: |
          xcodebuild docbuild \
            -scheme TARGET_NAME \
            -destination "generic/platform=iOS Simulator" \
            -derivedDataPath .derivedData

          $(xcrun --find docc) process-archive transform-for-static-hosting \
            .derivedData/Build/Products/Debug-iphonesimulator/TARGET_NAME.doccarchive \
            --hosting-base-path REPO_NAME \
            --output-path ./docs

      - name: Add redirect
        run: |
          cat > ./docs/index.html << 'EOF'
          <!DOCTYPE html><html><head>
            <meta http-equiv="refresh" content="0; url=documentation/TARGET_NAME_LOWERCASE/">
          </head></html>
          EOF

      - uses: actions/upload-pages-artifact@v4
        with:
          path: ./docs

  deploy:
    needs: build
    runs-on: ubuntu-latest
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    steps:
      - uses: actions/deploy-pages@v4
        id: deployment

Read the full file on GitHub · 162 lines

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. 7d ago First seen · 162 lines · 37 tokens per session scan A af0344de5daa

Subscribe to this mod's changes

swift-docc-github-pages is a skill published in the GitHub repository ivan-magda/claude-superpowers (6 stars, last pushed 2mo ago), licensed MIT. It adds 37 tokens to every session and 1,146 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. 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

android-development

Android development with Kotlin, Jetpack Compose, and modern Android architecture. Use when building Android apps, implementing Material Design, or following Android best practices.

travisjneuman/.claude · 33 tokens

ios-development

Comprehensive guide for building native Apple platform applications.

travisjneuman/.claude · 43 tokens

kotlin-multiplatform

KMP/CMP shared business logic, Compose Multiplatform, expect/actual, Ktor, SQLDelight, and platform-specific implementations. Use when building cross-platform Kotlin applications for Android, iOS, desktop, or web.

travisjneuman/.claude · 54 tokens

swift-expert

Expert-level Swift development for iOS, macOS with SwiftUI, Combine, and modern Swift 5.9+. Use when the user mentions iOS, macOS, SwiftUI, Combine, async await, or Apple platforms, or when the task involves Modern Swift Features, Basics and Optionals, Functions and Closures, or Structs and Classes.

personamanagmentlayer/pcl · 76 tokens

ios-expert

Expert in iOS development with SwiftUI, UIKit, Combine, and Apple ecosystem integration. Use when the user mentions mobile, Swift, SwiftUI, UIKit, Apple platforms, or Xcode, or when the task involves iOS App Architecture, SwiftUI Fundamentals, UIKit Essentials, or Combine Framework.

personamanagmentlayer/pcl · 64 tokens

bitcoin-libraries-bdk

Bitcoin Dev Kit (BDK): high-level Rust wallet library. Descriptor-based wallets, multiple chain backends (Esplora, Electrum, RPC), PSBT, fee estimation, coin selection. Bindings to Swift / Kotlin / Python / Flutter. USE WHEN: building wallets in Rust or via BDK bindings, integrating descriptor wallets into apps.

claude-dev-suite/claude-dev-suite · 81 tokens