Saltar al contenido
Skillpedia
APIs y servidores (backend)16 mil · #10841

add-logging

Qué hace

Esta skill añade líneas de registro útiles al código antes de publicarlo, para que los problemas puedan entenderse más adelante. Está pensada para desarrolladores que quieren evitar depurar a ciegas.

Cuándo usarla

  • ✓Cuando escribes o revisas una función o una corrección y quieres tener buenos registros desde el principio.
  • ✓Cuando un error fue difícil de diagnosticar porque los registros estaban en silencio.
  • ✓Cuando quieres mejorar los registros de un camino de código que está a punto de cambiar.

Link de la skill

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

Cópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.

Cómo usar

La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.

Mensaje listo para pegar

Usa esta skill para ayudarme: https://github.com/ParadevAI/Paradev/blob/main/plugins/sazabi/skills/add-logging/SKILL.md Lee el archivo SKILL.md de ese link y sigue sus instrucciones en mi tarea.
¿Quieres que tu IA encuentre skills como esta por sí sola?Instala el MCP gratis de Skillpedia: una línea, y busca entre 15.000+ skills antes de cada tarea.Instalar en 1 minuto →

Ejemplo de qué pedirle a la IA

“Añade registros al cambio del checkout que estoy haciendo para que más adelante podamos saber por qué un pago cayó en la ruta de respaldo.”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

El agente sigue el estilo de registro que ya usa el proyecto y añade una línea por cada fallo y cada decisión que cambia el comportamiento. Registra identificadores en lugar de datos completos y mantiene los secretos fuera de los registros.

Contenido técnico (SKILL.md original)

Texto original del autor, en inglés, directo de 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.
Preguntas frecuentes

¿Los registros incluirán datos de clientes?

No. La skill registra identificadores en lugar de cargas completas y mantiene los secretos fuera de las líneas de registro.

¿Sigue el estilo existente del proyecto?

Sí. Lee cómo ya registra el código para que las líneas nuevas coincidan con sus vecinas.

¿Por qué añadir registros antes de publicar?

Las investigaciones están limitadas por lo que se registró, y añadir las líneas adecuadas es lo más barato mientras el cambio está fresco.

Detalles

Descripción original del autor

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

Popularidad

Estrellas en GitHub
16 mil
Posición en el ranking
#10841
Licencia
—
Actualizada
2/11/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas