ablevarghese/ios-claude-toolkit/loki-logs
Claude Code and agent skill by ablevarghese/ios-claude-toolkit
- community
Checking that the SKILL.md file is still in the repository.
Check the logs, what happened, debug this, app crashed, nothing happens when I tap. iOS device and simulator log streaming, searching, filtering, and pattern analysis. Trigger on: 'check the console', 'what's in the logs', 'why isn't this working', 'app did something weird', 'trace the execution', 'diagnose this', 'read the crash log', or when debugging runtime behavior on device or simulator. Also use when correlating log output across components. For Sentry production crashes, use sentry-find-bugs instead.
Install
npx vskill@latest install ablevarghese/ios-claude-toolkit/loki-logsSKILL.md
The same SKILL.md was published earlier as ablevarghese/ios-claude-toolkit/loki-logs.
LOKI - Log Intelligence & Analytics
Iron Law: "Read the actual error message and surrounding context before hypothesizing. Logs don't lie -- your assumptions do."
Project Discovery: Before executing, determine project-specific values (project name, scheme, bundle ID, target) from project configuration files (CLAUDE.md, project.yml, .xcodeproj, Package.swift). Replace{BUNDLE_ID}with the app's bundle identifier and{PROCESS_NAME}with the app's process/executable name.
Stream, search, filter, and analyze iOS device and simulator logs. Detect error patterns, correlate traces across components, and extract actionable information from log output.
Rationalizations (Do Not Skip)
| Rationalization | Why It's Wrong | Required Action | |
|---|---|---|---|
| "I'll just add a print() statement" | print() has no log levels, no subsystem filtering, no privacy controls, and is stripped in release builds (or worse, leaks data if not stripped). It's invisible to Console.app and Instruments. | Use os.Logger with proper subsystem/category. It persists, it filters, it's production-safe. | |
| "The error message is obvious, I don't need more context" | Error messages describe symptoms, not causes. "Connection refused" could be DNS, firewall, wrong port, server down, or VPN. Context around the error tells you which. | Read 10-20 lines before and after the error. Look for the sequence of events that led to the failure. | |
| "I don't need structured logging for a small app" | Small apps grow. When they do, you'll wish you had subsystem/category from day one. Retrofitting structured logging into an existing codebase is painful and error-prone. | Set up os.Logger with subsystem = bundle ID, categories = functional areas (networking, auth, storage, UI). Do it once, benefit forever. | |
| "Console.app is good enough" | Console.app is a firehose. Without predicate filters, you're reading thousands of irrelevant system messages. It also doesn't help with crash analysis or historical log search. | Use log show with predicates for targeted search. Use Console.app only for real-time streaming with filters configured. | |
| "I'll figure out the crash from the stack trace alone" | Stack traces show where the crash happened, not why. The log entries leading up to the crash reveal the state that caused it. A crash in String.init tells you nothing; the preceding "Received nil response from API" tells you everything. | Always read logs before and around the crash timestamp. Correlate with any request/response logging. | |
| "Debug logging in production is fine, I'll remove it later" | You won't. Debug logs in production consume disk I/O, battery, and may leak sensitive data. Even if os.Logger debug level doesn't persist by default, excessive logging at info+ level has real performance cost. | Use .debug level for development diagnostics. Use .info for normal operations. Audit log levels before release. |
Red Flags -- STOP
- Using `print()` instead of `os.Logger` -- If you see
print()for anything other than a throwaway playground experiment, replace it withos.Logger. No exceptions. - PII in log output -- Names, emails, phone numbers, tokens, passwords, financial data. Use
os.Logger's.privateprivacy level. If you see PII in logs, it's a security incident. - Missing log level classification -- Everything logged at the same level (typically
.infoor.error) is useless for filtering. Classify properly: debug for dev, info for normal, error for failures, fault for system failures. - Debugging without checking logs first -- If someone says "the app crashed" and your first action is to add breakpoints or print statements, stop. Read the crash log first. The answer is usually already there.
- Swallowing errors in catch blocks --
catch { }orcatch { return nil }without logging is a debugging black hole. Every catch must log what failed and why.
Behavioral Enforcement
Phase Gate: EVIDENCE FIRST
Cannot form ANY hypothesis until:
- [ ] Actual error message read (not paraphrased from memory)
- [ ] Surrounding log context checked (5 minutes before and after the error)
- [ ] Error pattern matched against known patterns (see references/error-patterns.md)
Hard Stop: If about to say "I think the problem is..." without having read the actual logs -- STOP. Read the logs. Hypothesizing without evidence wastes time on wrong theories.
Phase Gate: LOG ANALYSIS
Cannot declare root cause until:
- [ ] Error reproduced or pattern confirmed across multiple log entries
- [ ] Correlation IDs traced across components (if applicable)
- [ ] Timeline of events reconstructed from logs
Self-Audit
- Did I read the actual error message, or am I working from a description?
- Did I check the surrounding context, or just the error line?
- Can I reconstruct the sequence of events that led to the error?
- Have I checked for similar errors in the recent log history?
Required Output Artifact
Every log investigation must produce:
- The actual error message(s) with timestamps
- Timeline of events leading to the error (reconstructed from log context)
- Root cause determination with supporting log evidence (not assumption)
When NOT to Use This Skill
- Performance profiling and optimization -- Logs can identify slow operations, but Instruments is the right tool for CPU, memory, and energy profiling. Use Time Profiler, Allocations, and Leaks instruments instead.
- UI layout debugging -- For Auto Layout constraint issues, use Xcode's Debug View Hierarchy or Reveal. Log entries about constraint conflicts are symptoms; visual debugging shows the cause.
- Network request/response inspection -- For detailed HTTP traffic analysis, use Charles Proxy, Proxyman, or Instruments Network template. Logs show errors but not full request/response bodies.
Decision Framework
Standard Operating Procedures
SOP-1: Real-time Device Log Streaming
Why device logs matter: Simulator behavior differs from device behavior. Keychain access, push notifications, background execution, network conditions, and memory pressure all behave differently on real hardware. If a bug only reproduces on device, device logs are your only source of truth.
SOP-2: Simulator Log Streaming
Predicate syntax reference:
subsystem == "com.app.bundle"-- exact matchsubsystem BEGINSWITH "com.app"-- prefix match (catches extensions too)category == "networking"-- specific functional areamessageType >= 16-- error level and above (16=error, 17=fault)eventMessage CONTAINS "failed"-- message content search- Combine with
AND,OR,NOT
SOP-3: Historical Log Search
SOP-4: Crash Log Analysis
SOP-5: Error Correlation Across Components
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/loki-logs/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ablevarghese/ios-claude-toolkit/loki-logs)