Skip to content
Back to skills

Logger

ASecurity

Report progress and status through a MonadLogger logger instead of writing directly with putStrLn, and keep standard output only for results like file paths or JSON. Use when writing or reviewing Haskell code that prints progress, status messages, or debug output.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 3, 2026
ai-agents

Security analysis

A100/100

Scanned December 3, 2026

npx -y skills add ncaq/konoka --skill logger --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Logger?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Logger
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ncaq-logger/badge)](https://www.skillsdirectory.com/skills/ncaq-logger)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: logger
description: Report progress and status through a MonadLogger logger instead of writing directly with putStrLn, and keep standard output only for results like file paths or JSON. Use when writing or reviewing Haskell code that prints progress, status messages, or debug output.
user-invocable: false
---

# 進捗や状況の報告はロガーで出す

進捗や状況の報告は、`putStrLn`などで直接書かずに、
[monad-logger](https://hackage.haskell.org/package/monad-logger)の`MonadLogger`のロガーで出してください。
Debug、Info、Warn、Errorから、内容に合ったレベルを選びます。

標準出力に直接書くのは、ファイルパスやJSONのように、
他のプログラムやシェルが結果として使うものだけに限ります。

ロガーを使う理由は以下です。

- ログレベルで出し分けられます。
  普段は進捗だけを見せて、調査するときだけ詳しい情報を出せます。
- 標準出力を結果の専用に保てます。
  パイプやコマンド置換で、報告の混ざらない結果だけを受け取れます。
- 出力先や形式を入口で一括して変えられます。
  テストではログを捨てたり集めて検査したりできます。

## 関数の型

ログを出す関数は、具体的なモナドに固定せずに、型クラスの制約で書きます。
ログを出すだけなら`(MonadLogger m) => ... -> m a`にして、
IOも行うなら`(MonadIO m, MonadLogger m) => ... -> m a`にします。
[haskell-tasuke:io-monad](../io-monad/SKILL.md)と同じ考えです。

## himariを使う場合

[haskell-tasuke:himari](../himari/SKILL.md)を使うプロジェクトでは、
`import Himari`で`MonadLogger`とログの関数が使えます。
`runSimpleEnv`などで`Himari SimpleEnv`の中で動かせば、ログは標準エラー出力に出ます。

テストでログを出したくない場合は`runSimpleNoLogEnv`を使います。

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.