# Improve React Native Observability

Silent failures and weak error messages make mobile bugs hard to diagnose. This skill gives practical React Native patterns for logs, errors, tracing, and safe reporting.

## Install

```bash
npx skillstore add cjharmath/rn-observability
```

## Metadata

- Status: approved
- Slug: cjharmath-rn-observability
- Skillstore revision: r1
- Version status: missing
- Tree hash: 22423cda211bceede74f55cb4892ad3c586dfd0ec300a7f37ca8e86b9f054ab6
- Author: CJHarmath
- GitHub username: CJHarmath
- License: MIT
- Repository: https://github.com/CJHarmath/claude-agents-skills/tree/main/skills/rn-observability
- Ref: dd4a3ef9f20ddf38830950b4bb713df96b431fd6
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands
- Quality score: 78
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/cjharmath-rn-observability
- Manifest: https://skillstore.pages.dev/api/skills/cjharmath-rn-observability/manifest

## Capabilities

- Shows how to add logging for early returns and silent failure paths.
- Provides templates for diagnostic error messages with useful context.
- Defines structured logging levels and a small logger wrapper pattern.
- Explains redaction of sensitive fields before logging context objects.
- Demonstrates flow tracing, state snapshots, assertions, and production error reporting.
- Includes checklists and a temporary debugging template for async state issues.

## Use Cases

- Add Feature Logging: Add clear log events to a React Native feature without exposing sensitive values.
- Debug Production Failures: Design error messages and flow traces that show where a mobile workflow failed.
- Standardize Observability Patterns: Create team guidance for logging levels, assertions, redaction, and crash reporting context.

## Prompt Templates

### Add Basic Logging

```
Review this React Native function and suggest where to add logs for early returns. Include the reason and minimal safe context for each log.
```

### Improve Error Messages

```
Rewrite these React Native error messages so they include location, failed condition, relevant state counts, and a likely cause. Avoid sensitive values.
```

### Trace Async Flow

```
Design observability for this async React Native workflow. Add flow identifiers, step-level logs, state snapshots, and error reporting boundaries.
```

### Review Production Observability

```
Audit this React Native observability plan for production. Check log levels, redaction, crash reporting context, temporary debug logs, and missing failure paths.
```

## Limitations

- It provides documentation examples only and does not inspect code automatically.
- It does not configure Sentry or any monitoring service for you.
- Teams must adapt redaction rules to their data model and compliance needs.
- Temporary debug logs should be removed or gated before release builds.

## Best Practices

- Log the reason for every early return with minimal diagnostic context.
- Redact secrets and personal data before logs or crash reports leave the device.
- Use flow identifiers for multi-step async operations that may fail in production.

## Anti Patterns

- Logging full answer objects, tokens, or personal values in production.
- Catching errors without logging or rethrowing enough diagnostic context.
- Leaving temporary debug logging enabled in release builds.

## Security Audit

- Audited at: 2026-07-06T05:38:59.292\+00:00
- Summary: All static findings were adjudicated as false positives. The external command alerts are Markdown code fences or TypeScript template literals, and the sensitive-file alerts are object key counts or redaction helper examples rather than certificate or key file access. No prompt injection or malicious intent was found in SKILL.md.

## Stats

- Views: 247
- Downloads: 12
- Favorites: 0
- Popularity score: 0
