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 skills add troyjthomas/ios-agent-skills --skill pixel-and-stroke-geometrygit clone --depth 1 https://github.com/troyjthomas/ios-agent-skillsWrote 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/skills/troyjthomas/ios-agent-skills/pixel-and-stroke-geometry)<a href="https://agentmods.dev/skills/troyjthomas/ios-agent-skills/pixel-and-stroke-geometry"><img src="https://agentmods.dev/badge/skills/troyjthomas/ios-agent-skills/pixel-and-stroke-geometry/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.
<a href="https://agentmods.dev/skills/troyjthomas/ios-agent-skills/pixel-and-stroke-geometry"><img src="https://agentmods.dev/badge/skills/troyjthomas/ios-agent-skills/pixel-and-stroke-geometry.svg" alt="Reviewed on agentmods" width="80" 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.00104 | $0.02086 |
| Opus 5 | $0.00052 | $0.01043 |
| Sonnet 5 | $0.00021 | $0.00417 |
| Haiku 4.5 | $0.00010 | $0.00209 |
Grade A, and why
pixel-and-stroke-geometry 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 11d 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 — 172 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Pixel and Stroke Geometry
If your app draws on a grid, canvas, or any pixel-aligned surface, the rendering rules below are non-obvious and produce a class of bugs that are otherwise mysterious. This skill covers the rules and the recipes that prevent the bugs.
When to Use
- Building a pattern editor, illustration tool, or any pixel-grid drawing app
- Implementing selection rectangles, marching ants, or grid overlays
- Drawing custom gauges, dials, charts, or progress rings
- Stroking paths in
SwiftUI.Canvasor asShapeoverlays - Diagnosing "phantom pixel flicker" or "selection edge looks wrong" bugs
If your app is purely text-and-form-based, you can skip this skill.
The One Rule That Causes 80 % of Stroke Bugs
SwiftUI's .stroke(lineWidth: N) paints CENTERED on the path. A 2pt stroke covers 1pt INSIDE the path and 1pt OUTSIDE.
For Rectangle().path(in: rect).stroke(lineWidth: 2):
- Inside the rect: 1pt of stroke covers the rect's edge cells
- Outside the rect: 1pt of stroke extends past the rect's edge
This is correct rendering — exactly what CGPath does — but it's almost never what you want when you draw a border around a region.
Outset vs Inset — Which to Use
You have three choices for where the stroke sits relative to the rect's logical boundary:
| You Want | Recipe |
|---|---|
| Stroke entirely OUTSIDE the rect | rect.insetBy(dx: -lineWidth/2, dy: -lineWidth/2) then stroke |
| Stroke entirely INSIDE the rect | rect.insetBy(dx: lineWidth/2, dy: lineWidth/2) then stroke |
| Stroke centered on the rect's edge (default) | No inset — .stroke(lineWidth: N) |
The most common case for app developers: a selection border that should NOT visually overlap the cells inside the selection. That's "stroke entirely outside" — insetBy(dx: -lineWidth/2, dy: -lineWidth/2) to outset before stroking.
let strokeWidth: CGFloat = 2
let strokeRect = cellRect.insetBy(
dx: -strokeWidth / 2,
dy: -strokeWidth / 2
)
Rectangle()
.path(in: strokeRect)
.stroke(Color.white, lineWidth: strokeWidth)
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.
- 11d ago First seen · 172 lines · 104 tokens per session scan A 1568685832db
pixel-and-stroke-geometry is a skill published in the GitHub repository troyjthomas/ios-agent-skills (2 stars, last pushed 3mo ago), licensed MIT. It adds 104 tokens to every session and 2,086 once invoked, about $0.0005 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.
Other skills, from other repositories
ios-accessibility
Build and audit SwiftUI, UIKit, and AppKit accessibility for VoiceOver, Voice Control, Switch Control, Full Keyboard Access, Dynamic Type, focus restoration, labels/traits/actions, traversal, custom rotors, NSAccessibility, XCTest checks, adaptive system preferences, and App Store accessibility declarations. Use when…
pencilkit
Add Apple Pencil drawing with PKCanvasView, PKToolPicker, PKDrawing serialization/export, stroke inspection, and PencilKit/PaperKit handoffs. Use when building drawing apps, annotation features, handwriting capture, signature fields, content-version-safe ink workflows, or Apple Pencil-powered experiences on…
swiftui-liquid-glass
Implement, review, or improve SwiftUI Liquid Glass effects for iOS 26+. Covers glassEffect modifier, GlassEffectContainer, glass button styles, glass toolbar/tab bar, static status badges vs interactive controls, morphing transitions, tinting, interactive glass, ToolbarSpacer, scrollEdgeEffectStyle…
swift-accessibility-skill
Apply platform accessibility best practices to SwiftUI, UIKit, and AppKit code. Essential companion to any SwiftUI, UIKit, or AppKit skill — always use together. Use whenever writing, editing, or reviewing ANY SwiftUI views, UIKit view controllers, AppKit views/window controllers, or platform UI — even when the user…
swiftui-design-principles
Design principles for building polished, native-feeling SwiftUI apps and widgets. Use this skill when creating or modifying SwiftUI views, iOS widgets (WidgetKit), or any native Apple UI. Ensures proper spacing, typography, colors, and widget implementations that look and feel like quality apps rather than…
figma-to-swiftui
Translate Figma designs into production-ready SwiftUI code with 1:1 visual fidelity using the Figma MCP workflow. Trigger when the user provides Figma URLs or node IDs and wants iOS/SwiftUI implementation, asks to implement a design or component from Figma for an iOS app, or references Figma selections in the context…