subagentswift

.com swift markdown
grounding

Parsing and rendering are two different layers, not one library

It's easy to assume "Swift + Markdown" is a single concern. This repo's own two grounding skills keep it as two, and this site preserves that split rather than merging it into one flat list.

LayerPackageQuestion it answersExample type
Parsinganthropics/swift-markdown (fork of swiftlang/swift-markdown)What is the structure of this markdown text?Document, Heading, MarkupWalker
Renderinganthropics/swift-markdown-ui (fork of gonzalezreal/swift-markdown-ui)How should that structure look on screen, in SwiftUI?Markdown view, MarkdownTheme

Why they're genuinely separable

A markdown-consuming Apple app can use swift-markdown alone — e.g. to walk a Document AST with a custom MarkupWalker and extract citation links (visitLink, checking link.destination?.hasPrefix("csl:")) — with no SwiftUI dependency at all, for something like a server-side or CLI tool. Conversely, an app could theoretically supply its own parser and only use swift-markdown-ui's Markdown(_:) view and MarkdownTheme for presentation. In practice the two compose (swift-markdown-ui depends on swift-markdown under the hood to get its AST), but the API surfaces — and the skills documenting them — stay distinct.

Citation rendering: where the two layers meet

The clearest example of the pipeline end to end, from style-swift-markdown-ui/SKILL.md: a citation like [^csl:huntley2025ralph] is first parsed into a Link AST node (parsing layer), then rendered as a tappable superscript footnote by MarkdownUI's inline link handling under a custom .anthropic theme (rendering layer). style-swift-markdown's own CitationExtractor example — a MarkupWalker that collects every link whose destination starts with csl: — is the parsing-side counterpart: it walks the same AST shape to extract citations programmatically rather than display them.

See the homepage for the live 12-row board, grounded in style-swift-markdown/SKILL.md and style-swift-markdown-ui/SKILL.md.