Borrowing it
Nothing to install: this file belongs to DebugSwift/XcodeBazelMCP. 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/DebugSwift/XcodeBazelMCP/main/.agents/skills/swift-agent-debug-log/SKILL.mdgit clone --depth 1 https://github.com/DebugSwift/XcodeBazelMCPWrote 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/debugswift/xcodebazelmcp/swift-agent-debug-log)<a href="https://agentmods.dev/skills/debugswift/xcodebazelmcp/swift-agent-debug-log"><img src="https://agentmods.dev/badge/skills/debugswift/xcodebazelmcp/swift-agent-debug-log/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/debugswift/xcodebazelmcp/swift-agent-debug-log"><img src="https://agentmods.dev/badge/skills/debugswift/xcodebazelmcp/swift-agent-debug-log.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.00058 | $0.01109 |
| Opus 5.5 | $0.00023 | $0.00444 |
| Sonnet 5.5 | $0.00012 | $0.00222 |
| Haiku 4.5 | $0.00006 | $0.00111 |
Grade A, and why
swift-agent-debug-log 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 2mo 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 — 110 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Swift Agent Debug Log (Cursor DEBUG MODE)
XcodeBazelMCP owns runtime (build, launch, read logs). This skill is the protocol (NDJSON schema, hypothesisId, session cleanup).
Log path strategy
| Runtime | Where Swift writes | How the agent reads |
|---|---|---|
| macOS / unit tests | Host path from env | bazel_ios_agent_debug_log_read |
| iOS Simulator | Documents/agent-debug.ndjson (sandbox-safe) |
bazel_ios_agent_debug_log_pull or env if using host mount |
Never hardcode repo paths like Apps/Consumer/.cursor/debug-*.log in app code — the sim sandbox cannot write there.
Environment (preferred for host / tests)
bazel_ios_build_and_run / bazel_ios_agent_debug_repro pass via launchEnv → SIMCTL_CHILD_*:
AGENT_DEBUG_LOG_PATH— absolute host path (e.g.<workspace>/.cursor/debug-{session}.log)AGENT_DEBUG_SESSION_ID— Cursor debug session id
Swift reads ProcessInfo.processInfo.environment and appends one NDJSON object per line.
Simulator fallback
If no host path is writable, append NDJSON to:
FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0]/agent-debug.ndjson
Then pull with bazel_ios_agent_debug_log_pull (destPath optional copy to .cursor/debug-*.log).
Swift instrumentation (minimal)
func agentDebugLog(
location: String,
message: String,
data: [String: Any] = [:],
hypothesisId: String,
runId: String = "pre-fix"
) {
let env = ProcessInfo.processInfo.environment
let sessionId = env["AGENT_DEBUG_SESSION_ID"] ?? ""
let payload: [String: Any] = [
"sessionId": sessionId,
"location": location,
"message": message,
"data": data,
"hypothesisId": hypothesisId,
"runId": runId,
"timestamp": Int(Date().timeIntervalSince1970 * 1000),
]
guard let line = try? JSONSerialization.data(withJSONObject: payload),
let str = String(data: line, encoding: .utf8) else { return }
let row = str + "\n"
if let path = env["AGENT_DEBUG_LOG_PATH"], !path.isEmpty {
if let handle = FileHandle(forWritingAtPath: path) {
handle.seekToEndOfFile(); handle.write(Data(row.utf8)); try? handle.close()
} else {
FileManager.default.createFile(atPath: path, contents: Data(row.utf8))
}
return
}
let doc = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0]
let url = doc.appendingPathComponent("agent-debug.ndjson")
if let handle = try? FileHandle(forWritingTo: url) {
handle.seekToEndOfFile(); handle.write(Data(row.utf8)); try? handle.close()
} else {
try? row.write(to: url, atomically: true, encoding: .utf8)
}
}
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.
- 2mo ago First seen · 110 lines · 58 tokens per session scan A d33b499e4745
swift-agent-debug-log is a skill published in the GitHub repository DebugSwift/XcodeBazelMCP (8 stars, last pushed 3mo ago), licensed MIT. It adds 58 tokens to every session and 1,109 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-31.
Other skills, from other repositories
ipad-layout-audit
Detects hardcoded iPhone-sized widths, missing iPad orientation keys, and absent size-class adaptation that cause layout failures on iPad reviewers' devices under guidelines 2.1 and 2.4.1.
cli-anything-nslogger
CLI harness for NSLogger — parse, filter, export, and monitor NSLogger log files (.rawnsloggerdata / .nsloggerdata).
xcodebuildmcp-cli
Official skill for the XcodeBuildMCP CLI. Use when doing iOS/macOS/watchOS/tvOS/visionOS work (build, test, run, debug, log, UI automation).
argent-metro-debugger
Debug a JS runtime via CDP using argent debugger tools. Primary path is React Native via Metro (iOS / Android / Vega); a subset of the tools (debugger-connect, debugger-status, debugger-evaluate, debugger-log-registry) also drive a Chromium (CDP) app's renderer (an Electron app, or any Chromium browser exposing CDP)…
argent-react-native-optimization
Optimizes a React Native app by profiling first to find real bottlenecks, then sweeping for mechanical issues. Entry-point for all performance work. Use when the app feels slow, user asks to optimize, fix re-renders, reduce jank, or improve startup. Delegates to argent-react-native-profiler for measurement.
argent-native-profiler
Native profiling for CPU hotspots, UI hangs, memory issues. iOS via xctrace; Android via Perfetto. Use when diagnosing native-level performance issues.