Pular para o conteúdo
Skillpedia
APIs e servidores (backend)16 mil · #10841

add-logging

O que ela faz

Esta skill adiciona linhas de log úteis ao código antes de ele ser lançado, para que os problemas possam ser entendidos depois. É para desenvolvedores que não querem depurar às cegas.

Quando usar

  • ✓Quando você está escrevendo ou revisando uma funcionalidade ou correção e quer bons logs no lugar.
  • ✓Quando um bug foi difícil de diagnosticar porque os logs estavam em silêncio.
  • ✓Quando você quer melhorar o log de um trecho de código que está para ser alterado.

Link da skill

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

Copie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.

Como usar

O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.

Mensagem pronta para colar

Use esta skill para me ajudar: https://github.com/ParadevAI/Paradev/blob/main/plugins/sazabi/skills/add-logging/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Adicione logs à mudança de checkout que estou fazendo para que depois possamos ver por que um pagamento caiu para a rota de backup.”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

O agente segue o estilo de log que o projeto já usa e adiciona uma linha para cada falha e para cada decisão que altera o comportamento. Registra IDs em vez de dados completos e mantém segredos fora dos logs.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do 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.
Perguntas frequentes

Os logs vão incluir dados de clientes?

Não. A skill registra IDs em vez de payloads completos e mantém segredos fora das linhas de log.

Ele segue o estilo existente do projeto?

Sim. Ele lê como o código já registra logs para que as novas linhas combinem com as vizinhas.

Por que adicionar logs antes de lançar?

Investigações são limitadas pelo que foi registrado, e adicionar as linhas certas é mais barato enquanto a mudança ainda está fresca.

Detalhes

Descrição original do 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

Popularidade

Estrelas no GitHub
16 mil
Posição no ranking
#10841
Licença
—
Atualizada em
02/11/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas