MarkdownView is an iOS component that displays Markdown as styled HTML inside an application. It is for Swift developers building UIKit or SwiftUI apps that need rendered Markdown with features such as code highlighting, links, themes, and custom styling.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/keitaoouchi/markdownview/agents-mdgit clone --depth 1 https://github.com/keitaoouchi/MarkdownViewWrote 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.
[](https://agentmods.dev/instructions/keitaoouchi/markdownview/agents-md)<a href="https://agentmods.dev/instructions/keitaoouchi/markdownview/agents-md"><img src="https://agentmods.dev/badge/instructions/keitaoouchi/markdownview/agents-md.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00722 | $0.00722 |
| Opus 5 | $0.00361 | $0.00361 |
| Sonnet 5 | $0.00144 | $0.00144 |
| Haiku 4.5 | $0.00072 | $0.00072 |
Grade A, and why
MarkdownView AGENTS.md 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 6d 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.
How it starts
The opening of the file, as written. The whole thing — 68 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS
Purpose
- This document is a technical map for quickly understanding which components render Markdown and how they relate to each other.
- It is written at a high level of abstraction, avoiding implementation details, to remain resilient to change.
Technical Components
- UIKit Layer
- MarkdownView (UIView)
- Internal: WKWebView
- Role: Loads web assets (HTML/CSS/JS) and renders Markdown
- Input: Markdown string, options (CSS/Plugins/Stylesheets, styled flag)
- Output/Events: Render completion (height notification), link tap events
- MarkdownView (UIView)
- Web Layer (Bundled Assets)
- HTML: styled.html / non_styled.html
- Role: Base HTML for rendering (toggles between styled and unstyled)
- JS: main-core.js (core bundle, 15 languages, inlined into HTML), main-extended.js (97 additional languages, lazy-loaded), main.js (full bundle for tests)
- Role: Markdown-to-HTML conversion using markdown-it and highlight.js, provides the window.renderMarkdown API, measures height and notifies native side
- CSS: main-core.css (inlined into HTML at build time)
- Role: Default styles (applied via styled.html)
- HTML: styled.html / non_styled.html
- SwiftUI Layer
- MarkdownUI (UIViewRepresentable)
- Role: Bridge that makes MarkdownView usable from SwiftUI
- I/O: Passes SwiftUI data (Markdown string) to the UIKit side; receives events (link taps, render completion) via closures
- MarkdownUI (UIViewRepresentable)
Relationships (Data/Event Flow Overview)
- Initialization / Configuration
- MarkdownView creates a WKWebView and configures the UserContentController
- Loads HTML (styled / non-styled) and web assets (JS/CSS) from the bundle
- Markdown Delivery
- Native code (Swift/SwiftUI) passes a Markdown string to MarkdownView
- MarkdownView forwards the string to the JS entry point (
window.renderMarkdown) as a payload
- Web-Side Rendering
- main.js converts Markdown to HTML using markdown-it and highlight.js
- After DOM update, measures the document height
- Bidirectional Events
- Web → Native
- Notifies height changes via messages (intrinsic size update, render completion event)
- Link taps are delegated to native for handling via WKNavigationDelegate
- Native → Web
- Additional CSS / plugins / external stylesheets can be injected as UserScripts
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.
- 6d ago First seen · 68 lines · 722 tokens per session scan A 35da9e716c2a
MarkdownView AGENTS.md is an instructions file published in the GitHub repository keitaoouchi/MarkdownView (2,177 stars, last pushed 1mo ago), licensed MIT. It adds 722 tokens to every session, about $0.0036 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-30.
Other instructions, from other repositories
swift-architecture-skill CLAUDE.md
Instructions for efremidze/swift-architecture-skill, covering swift architecture skill, project structure, how the skill works and key conventions.
swift-architecture-skill AGENTS.md
Instructions for efremidze/swift-architecture-skill, covering agents guidelines for swift architecture skill, working with this repository, 1. understanding the skill, 2. modifying architecture playbooks and 3. testing and validation.
swift-kmp-skill AGENTS.md
Instructions for sorunokoe/swift-kmp-skill, covering agents.md — swift-kmp, what this repository is, repository structure, how to apply this skill and skill loading order.
xtool CLAUDE.md
Instructions for 2389-research/xtool, covering xtool plugin, skills included, using-xtool (main skill), key patterns and xtool is not xcodegen.
apple-dev-skills AGENTS.md
Instructions for gaelic-ghost/apple-dev-skills, covering agents.md, scope, apple rules, install guidance and validation.
uikit-expert-skill CLAUDE.md
Instructions for ivan-magda/uikit-expert-skill, a project described as: Agent skill for writing correct, modern UIKit code in Swift. Covers lifecycle, memory, concurrency, collection views, and iOS 13-26 APIs.