add-logging
できること
このスキルは、出荷の前にコードに役立つログ行を加え、後で問題を理解できるようにします。推測ではなく、ログを頼りにデバッグしたい開発者向けです。
使う場面
- ✓ある機能や修正を書いたりレビューしたりしていて、良いログを入れておきたいとき。
- ✓ログが沈黙していたためにバグの診断が難しかったとき。
- ✓これから変わるコードパスの、ログを改善したいとき。
スキルのリンク
https://github.com/ParadevAI/Paradev/blob/main/plugins/sazabi/skills/add-logging/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私が変更している決済の処理に、ログを追加して、後から支払いがなぜバックアップのルートに切り替わったのかわかるようにしてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、プロジェクトがすでに使っているログの書き方に合わせ、失敗と動作を変える判断ごとに一行ずつ追加します。全体のデータではなくIDを記録し、秘密情報はログに含めません。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)を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.
よくある質問
ログには顧客のデータが含まれますか?
いいえ。このスキルは、データ全体ではなくIDを記録し、秘密情報をログに含めません。
プロジェクトの既存のスタイルに従いますか?
はい。既存のコードのログの書き方を読み、新しい行が隣接するものに合うようにします。
なぜ出荷の前にログを追加するのですか?
調査できる範囲は記録されたことで制限されるため、変更がまだ新しいうちに適切な行を加えるのが最も安くすむからです。
詳細
作者による元の説明
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
人気
- GitHubのスター
- 16k
- ランキング
- #10841
- ライセンス
- —
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
decide
16kエージェントが、設計やコードの決定を明確な選択肢と推奨を添えて一つずつ進められるよう支援し、最後に要約を示します。
mobile-demo-film
16kエージェントが、スマートフォンの画面録画を、タイトルカード、電話のフレーム、エンドカード付きの洗練されたデモ動画に変えられるよう支援します。
redesign
16kエージェントが、既存のインターフェースを見直し、余白、コントラスト、階層、レイアウトの具体的な修正案を示せるよう支援します。
superset-settings
16kエージェントが、Paradevデスクトップアプリのテーマ、フォント、通知などの設定を、コマンドラインから確認し変更できるよう支援します。
似ているスキル
api-connector-builder
280kエージェントが既存のパターンに従って、新しいAPI連携を構築します。新しい方式を作らずに、もう一つ連携を追加したいときに使います。
api-design
280kエージェントがベストプラクティスに沿ってREST APIを設計できるようにします。APIの通信方法、エラーの表示方法、データの整理方法を決めるのに役立ちます。
backend-patterns
280kエージェントのサーバーサイドのアーキテクチャパターンとデータベースの最適化を支援します。サーバー上で動くコードを作成またはレビューするときに役立ちます。