# logging-and-error-reporting

Logging-and-error-reporting is a Claude Code skill that standardizes log levels and Sentry error reporting. It runs during development or code review to ensure consistent error handling.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf (Devin Desktop), Claude.ai · ★ 720 repo stars
- Author: dominikmartn
- License: AGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/dominikmartn/harp/tree/HEAD/.agents/skills/logging-and-error-reporting/SKILL.md
- Updated: 2026-11-10
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/logging-and-error-reporting

## What it does

The skill guides the selection between `log::*` macros for local diagnostics and `report_error!` for actionable Sentry events. It ensures developers avoid `log::error!` for issues requiring engineering attention, as it does not trigger a Sentry issue by itself.

It enforces security protocols by requiring `safe_*` macros when handling file paths or user data, preventing PII from leaking into logs. The logic relies on the `SentryLogger` wrapper; keep in mind that `debug!` and `trace!` levels are discarded from Sentry entirely to maintain performance.

## Requirements
- Works with: Sentry

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add dominikmartn/harp --skill logging-and-error-reporting -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/logging-and-error-reporting/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/logging-and-error-reporting/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add dominikmartn/harp --skill logging-and-error-reporting -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/logging-and-error-reporting/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add dominikmartn/harp --skill logging-and-error-reporting -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/logging-and-error-reporting/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install dominikmartn/harp .agents/skills/logging-and-error-reporting
```

2. **Manually: put the files in place**
- File: `.github/skills/logging-and-error-reporting/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add dominikmartn/harp --skill logging-and-error-reporting -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/dominikmartn/harp --path .agents/skills/logging-and-error-reporting
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/logging-and-error-reporting/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/dominikmartn/harp/tree/HEAD/.agents/skills/logging-and-error-reporting/SKILL.md

## When to use it
- Select correct logging levels
- Decide between log and report_error!
- Sanitize sensitive data in logs
- Identify actionable bugs for Sentry

## Example prompts
- Check if the logging levels in this module are correct
- Use `report_error!` instead of `log::error!` for bugs that need fixing
- Refactor this code to use `safe_error!` for sensitive information

## Similar
- [sentry-instrument-logging](https://affpapa.org/en/nevibecode/skills/sentry-instrument-logging.md) — skill · 675 installs
- [sentry-go-sdk](https://affpapa.org/en/nevibecode/skills/sentry-go-sdk.md) — skill · 2300 installs
- [sentry](https://affpapa.org/en/nevibecode/skills/mitsuhiko-sentry.md) — skill · 136 installs
- [sentry-best-practices](https://affpapa.org/en/nevibecode/skills/sentry-best-practices.md) — skill · 106 installs
- [observability](https://affpapa.org/en/nevibecode/skills/observability.md) — skill · 7 installs
- [cloud-logging](https://affpapa.org/en/nevibecode/skills/cloud-logging.md) — skill · ★ 151 repo stars

From the same set: [dominikmartn/harp](https://affpapa.org/en/nevibecode/by/dominikmartn/harp.md) — 62 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
