logging-monitoring

logging-monitoring is a skill for Claude Code, Codex from wangjianqi/AppStore. It costs 43 tokens per session (2,672 once invoked), scanned A, original, MIT.

An iOS logging and monitoring guide using OSLog, Apple’s system for structured application logs, plus crash monitoring with Firebase Crashlytics. It defines log levels and categories for different app areas.

In plain words
What is it for?
Use it when adding debug, information, warning, error, or fault logs, filtering logs by module, or setting up crash reporting for an iOS app.
Why use it?
It replaces scattered print statements with searchable logs and helps record failures without exposing sensitive information.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Use it when adding debug, information, warning, error, or fault logs, filtering logs by module, or setting up crash reporting for an iOS app.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/wangjianqi/appstore/20-logging-monitoring
Install

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.

Any agent
npx skills add wangjianqi/AppStore --skill 20-logging-monitoring
Clone the repo
git clone --depth 1 https://github.com/wangjianqi/AppStore

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for logging-monitoring

README.md
[![agentmods](https://agentmods.dev/badge/skills/wangjianqi/appstore/20-logging-monitoring/github.svg)](https://agentmods.dev/skills/wangjianqi/appstore/20-logging-monitoring)
Your own site
<a href="https://agentmods.dev/skills/wangjianqi/appstore/20-logging-monitoring"><img src="https://agentmods.dev/badge/skills/wangjianqi/appstore/20-logging-monitoring/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.

agentmods 80×15 button for logging-monitoring

Your own site · 80×15
<a href="https://agentmods.dev/skills/wangjianqi/appstore/20-logging-monitoring"><img src="https://agentmods.dev/badge/skills/wangjianqi/appstore/20-logging-monitoring.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,672 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00043 $0.02672
Opus 5 $0.00022 $0.01336
Sonnet 5 $0.00009 $0.00534
Haiku 4.5 $0.00004 $0.00267

Measured 12d ago against content hash 5a8d370b9fae, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

logging-monitoring 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 12d 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.

ios-claude-skills/20-logging-monitoring/SKILL.md · 333 lines

How it starts

The opening of the file, as written. The whole thing — 333 lines — stays where its author put it; the contents beside it link to each section on GitHub.

日志与监控

日志系统

OSLog(推荐)

import os.log

enum AppLog {
    static let general = Logger(subsystem: "com.app", category: "General")
    static let network = Logger(subsystem: "com.app", category: "Network")
    static let storage = Logger(subsystem: "com.app", category: "Storage")
    static let ui = Logger(subsystem: "com.app", category: "UI")
}

日志级别

AppLog.general.debug("调试信息: \(detail)")
AppLog.general.info("常规信息: 用户登录成功")
AppLog.network.warning("网络警告: 请求超时,将重试")
AppLog.storage.error("存储错误: CoreData 保存失败 - \(error)")
AppLog.general.fault("严重错误: 数据损坏")
级别 用途 Release 可见 性能影响
debug 开发调试 极低(编译时移除)
info 关键流程
warning 异常但可恢复
error 功能失败
fault 严重错误

规范

  • 禁止使用 print(),统一用 Logger
  • subsystem 用 Bundle Identifier,category 按模块划分
  • 日志中禁止包含敏感数据(Token、密码、身份证号)
  • Debug 日志用 #if DEBUGLogger.debug(Release 自动过滤)
  • 日志格式:{操作} - {对象} - {结果/原因}

Console 过滤

subsystem:com.app AND category:Network
level:error OR level:fault

崩溃监控

Firebase Crashlytics

配置
  1. SPM 添加 firebase-ios-sdk,Product 选 FirebaseCrashlytics
  2. Build Phase 添加脚本:
"${BUILD_DIR%/Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run"
  1. Info.plist 添加 FirebaseCrashlyticsCollectionEnabled = NO(延迟初始化)
初始化
import FirebaseCore
import FirebaseCrashlytics

func application(_ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    FirebaseApp.configure()
    Crashlytics.crashlytics().setCrashlyticsCollectionEnabled(true)
    return true
}
自定义键值
Crashlytics.crashlytics().setUserID(userId)
Crashlytics.crashlytics().setCustomValue("premium", forKey: "subscription_tier")
Crashlytics.crashlytics().setCustomValue(true, forKey: "has_completed_onboarding")
记录非致命异常
do {
    try performRiskyOperation()
} catch {
    Crashlytics.crashlytics().record(error: error)
}

Read the full file on GitHub · 333 lines

Changes

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.

  1. 12d ago First seen · 333 lines · 43 tokens per session scan A 5a8d370b9fae

Subscribe to this mod's changes

logging-monitoring is a skill published in the GitHub repository wangjianqi/AppStore (11 stars, last pushed 3mo ago), licensed MIT. It adds 43 tokens to every session and 2,672 once invoked, about $0.0002 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.

Related

Other skills, from other repositories

ipaship-audit

Use when auditing iOS/Android app submissions for compliance with Apple App Store Review Guidelines or Google Play Developer Policies. Scan .ipa, .apk, or .zip files against official store policies, generate structured compliance reports, and identify violations with remediation steps.

atharvnaik1/ipaship-audit · 57 tokens

view-specifications

Guide for writing view specification documents and a starter template for SwiftUI and cross-platform views.

jpavley/meta-loop-ios · 21 tokens

project-structure

Directory layout, file responsibilities, and Xcode integration for meta-loop projects.

jpavley/meta-loop-ios · 18 tokens

analyzing-ios-app-security-with-objection

Runtime iOS app security testing with Objection (Frida): inspect keychain and filesystem data, explore app internals at runtime, and validate/bypass client-side protections during authorized mobile assessments.

mukul975/Anthropic-Cybersecurity-Skills · 49 tokens

ios-simulator-skill

29 production-ready scripts for iOS app testing, building, and automation. Provides semantic UI navigation, build automation, accessibility testing, and simulator lifecycle management. Optimized for AI agents with minimal token output.

conorluddy/ios-simulator-skill · 47 tokens

argent-tv-interact

Control and inspect TV apps via argent — Apple TV (tvOS), Android TV (leanback), and Amazon Fire TV (Vega). Boot the target, read focus, navigate with the D-pad remote, type, screenshot, and on Vega debug the JS runtime (evaluate, console logs, network inspector). Use when a task targets a TV (runtimeKind "tv", or…

software-mansion/argent · 107 tokens