Zum Inhalt springen
Skillpedia
APIs & Server (Backend)16k · #10841

add-logging

Was er macht

Dieser Skill fügt vor der Auslieferung nützliche Logzeilen in Code ein, damit Probleme später verstanden werden können. Er richtet sich an Entwickler, die nicht blind debuggen wollen.

Wann du ihn nutzt

  • ✓Wenn du ein Feature oder eine Korrektur schreibst oder prüfst und gute Logs einrichten willst.
  • ✓Wenn ein Fehler schwer zu finden war, weil die Logs stumm waren.
  • ✓Wenn du das Logging auf einem Codepfad verbessern willst, der sich gleich ändert.

Link zum Skill

https://github.com/ParadevAI/Paradev/blob/main/plugins/sazabi/skills/add-logging/SKILL.md

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/ParadevAI/Paradev/blob/main/plugins/sazabi/skills/add-logging/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Füge dem Checkout-Änderung, die ich mache, Logging hinzu, damit wir später nachvollziehen können, warum eine Zahlung auf die Ersatzroute gefallen ist.”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Der Agent übernimmt den Logging-Stil, den das Projekt bereits nutzt, und fügt für jeden Fehler und jede Entscheidung, die das Verhalten ändert, eine Zeile hinzu. Er protokolliert IDs statt vollständiger Daten und hält Geheimnisse aus den Logs heraus.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von GitHub.

Log what you will need to ask about

Every investigation in Sazabi is limited by what the code logged. The cheapest time to add the right lines is while the change is fresh. The job is a small number of structured lines that answer "what happened to this request, and why".

0. How the tools work

The Sazabi MCP server lists only two tools, search and execute. Browse Sazabi's operations with search and namespace: "sazabi" (an empty query without a namespace lists connected connectors, not Sazabi operations). Before calling one, repeat search with namespace: "sazabi", the hit's full name as the query, and includeInputSchema: true to load its arguments. Then run it with execute as { name, arguments }, the name copied from the hit (for example sazabi/logs.ask).

1. Match what is already there

Read how this repository logs: which logger, which field names, how request and trace IDs are attached. Ask sazabi/logs.ask for a sample of this service's recent lines to see the real shape. New lines must look like their neighbors; an investigation that has to join two naming schemes is slower.

2. Pick the lines

On the changed path, log:

  • Failures with the error, the input that caused it (IDs, not payloads), and what the code did next (retry, fallback, give up).
  • Decisions that change behavior: a feature flag, a fallback, a skipped step, a limit hit.
  • Boundaries: calls to other services or queues, with target, outcome and duration.

Skip lines that restate the obvious ("entering function").

3. Shape each line

  • A stable event name (checkout.payment_declined), so a question can count it.
  • Structured fields, not values glued into the message string.
  • IDs that join the story: request or trace ID, user or tenant ID, order ID.
  • The right level: ERROR for failures someone must act on, WARN for degraded but handled, INFO for decisions, DEBUG for detail that is off in production.
  • Never secrets, tokens, passwords or full personal data. Redact or omit.

4. Check it

Run the path locally or in tests and read the lines it emits. After deploy, ask Sazabi for the new event name to confirm the lines arrive with their fields.

Anti-patterns

  • Logging payloads. They leak data and cost money; log IDs and sizes.
  • ERROR for expected outcomes. A declined card is INFO; an ERROR should mean a broken system.
  • Many lines per request in a hot loop. Log the summary, not every iteration.
Häufige Fragen

Enthalten die Logs Kundendaten?

Nein. Der Skill protokolliert IDs statt vollständiger Nutzdaten und hält Geheimnisse aus den Logzeilen.

Folgt er dem bestehenden Stil des Projekts?

Ja. Er liest, wie der Code bereits loggt, damit die neuen Zeilen zu ihren Nachbarn passen.

Warum schon vor der Auslieferung Logs ergänzen?

Untersuchungen sind nur so gut wie das, was protokolliert wurde. Die richtigen Zeilen zu ergänzen ist am günstigsten, solange die Änderung noch frisch ist.

Details

Originalbeschreibung des Autors

Before shipping a change, add structured log lines to the code path it touches so the next investigation has evidence — one line per decision and failure, with stable event names and the IDs needed to join requests, at the right level and without secrets. Use when writing or reviewing a feature or fix, when a bug was hard to diagnose because the logs were silent, or when the user asks to improve logging or observability in code.

repo: ParadevAI/Paradev

Beliebtheit

GitHub-Sterne
16k
Platz im Ranking
#10841
Lizenz
—
Aktualisiert
2.11.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills