Borrowing it
Nothing to install: this file belongs to st0012/cctop. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/st0012/cctop/master/.agents/skills/swiftui-debugging/SKILL.mdgit clone --depth 1 https://github.com/st0012/cctopWrote 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/st0012/cctop/swiftui-debugging)<a href="https://agentmods.dev/skills/st0012/cctop/swiftui-debugging"><img src="https://agentmods.dev/badge/skills/st0012/cctop/swiftui-debugging/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/st0012/cctop/swiftui-debugging"><img src="https://agentmods.dev/badge/skills/st0012/cctop/swiftui-debugging.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00058 | $0.01886 |
| Opus 5.5 | $0.00023 | $0.00754 |
| Sonnet 5.5 | $0.00012 | $0.00377 |
| Haiku 4.5 | $0.00006 | $0.00189 |
Grade A, and why
swiftui-debugging 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 1mo 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 — 204 lines — stays where its author put it; the contents beside it link to each section on GitHub.
SwiftUI Debugging
Overview
Systematic approaches for debugging SwiftUI issues in macOS apps. Covers view updates, state ownership, performance, layout, and macOS-specific quirks with NSHostingView and NSPanel.
Logging in macOS Apps
print() and NSLog() are invisible when launching macOS apps from CLI or Finder (menubar-only apps have no console). Always use file-based logging:
func debugLog(_ message: String) {
let entry = "\(Date()) \(message)\n"
let url = URL(fileURLWithPath: "/tmp/debug.log")
if let handle = try? FileHandle(forWritingTo: url) {
handle.seekToEndOfFile()
handle.write(entry.data(using: .utf8)!)
handle.closeFile()
} else {
try? entry.write(to: url, atomically: true, encoding: .utf8)
}
}
Remove all debug logging before committing. Use grep -r "debugLog" --include="*.swift" to verify.
View Not Updating
Symptom
View shows stale data after a confirmed state change. Common with hostingView.rootView = NewView(...) not propagating to children, or theme/color changes not reflecting.
Root Cause: SwiftUI Diffing
SwiftUI skips re-evaluating a child view's body if the child's struct inputs haven't changed — even if the child reads from a singleton or computed property that did change.
Parent: rootView = MyView(counts: same)
→ SwiftUI: "counts didn't change, skip child body"
→ Child: never re-reads StatusColors.working
→ Result: stale colors
Diagnosis
- Log at the data source (model/manager) and at the view's body — confirm data changed but body wasn't called
- Check if the view reads external state (singletons, managers) not passed through its struct inputs
- Use
Self._printChanges()at the top ofbodyto see what SwiftUI thinks triggered (or didn't trigger) a re-evaluation
Fixes
| Root Cause | Fix |
|---|---|
| Child reads external state not in its inputs | Pass a changing value and add .id(value) to force recreation |
@State destroyed by .id() changes |
Extract into @StateObject owned by parent above the .id() boundary |
NSColor(name:) dynamic colors cached |
Use .id() to force re-resolution |
@Published changed but view doesn't update |
Verify view uses @ObservedObject, not a plain property |
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.
- 1mo ago First seen · 204 lines · 58 tokens per session scan A 9bf78e7e72f5
swiftui-debugging is a skill published in the GitHub repository st0012/cctop (159 stars, last pushed 22d ago), licensed MIT. It adds 58 tokens to every session and 1,886 once invoked, about $0.0002 per session on Opus 5.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 skills, from other repositories
todos
Use when the user asks for a shared plan, a task needs at least three substantive execution steps, or a loose TODO is pending. Without an explicit plan request, not for one-shot answers or checks, or one- to two-step work that is not already in the list.
burrow-system-tools
Diagnose and fix the user's Mac with Burrow's local MCP tools (burrowdoctor, burrowsnapshot, burrowtopprocesses, burrowprocessusage, burrowports, burrowanalyze, burrowdiskforecast, burrowdupes, burrowanomalies, burrowagentaudit, burrowclean, …). Use whenever the Mac is slow, hot, loud, low on disk, draining battery…
agf
Find local coding-agent sessions, inspect bounded metadata or summaries, and prepare a read-only resume plan with AGF. Use for finding prior work across agent CLIs, not for executing agents, deleting sessions, or reading full transcripts.
cheese
Route an idea, path, pull request, issue, failure, question, or bare /cheese to the correct workflow skill. Use this skill for /cheese, routing requests, help requests, or opening messages without a named workflow skill.
pdlc-lint
A code-quality checker that runs static analysis, style checks, type checks, and other project-configured tools. It supports checking, safely fixing eligible problems, and setting up a lint toolchain.
pdlc-perf
A workflow for finding and improving performance problems in a specified backend service or frontend application. It examines areas such as database queries, caching, response times, loading, rendering, and network use, then records its findings in a report.