Skip to content
Back to skills

Bracket

ASecurity

Use bracket or with-style functions to guarantee resource cleanup even on exceptions instead of separate do blocks. Use when writing or reviewing Haskell code that acquires and releases resources.

  • 3 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 27, 2026
data-ai

Security analysis

A100/100

Scanned May 27, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Bracket?

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

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

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: bracket
description: Use bracket or with-style functions to guarantee resource cleanup even on exceptions instead of separate do blocks. Use when writing or reviewing Haskell code that acquires and releases resources.
user-invocable: false
---

# bracketによるリソース管理

## bracketで書ける時はそれを使う

`bracket`を使うと、
例外が発生した場合でもリソースの解放を確実に行えます。

`bracket`でリソースの解放処理が書ける時はそちらを使ってください。

わざわざバラバラの`do`ブロックで書かないでください。

## 出来る限りwithパターンの関数を使う

ライブラリには`bracket`関数の特化型である関数がしばしば存在します。

例えば、

```haskell
withAsync :: MonadUnliftIO m => m a -> (Async a -> m b) -> m b
```

などの関数です。

存在するならばそれを優先します。

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.

Comments

Loading comments…

Newsletter

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