Unsafe (Grade A) logo

Unsafe (Grade A)Security-tested data-ai skill for Claude AI. Grade A. Forbid unsafe Haskell functions such as unsafePerformIO, unsafeCoerce, and other unsafe-prefixed functions. Use when writing or reviewing Haskell

(0)
Daniel NikulshynReviewed by Daniel Nikulshyn·Updated July 2026

Overview

This skill forbids unsafe Haskell functions such as unsafePerformIO, unsafeCoerce, and other unsafe-prefixed functions. It is used when writing or reviewing Haskell code that uses any unsafe-prefixed function. The goal is to prevent the use of functions that compromise referential transparency and type safety in Haskell, which are fundamental guarantees of the language. Unsafe functions can lead to unpredictable behavior, crashes, or security vulnerabilities. The skill advises against using unsafe functions and suggests safer alternatives.

Key features

  • Detects and forbids unsafe-prefixed functions
  • Provides guidance on safer alternatives
  • Supports FFI bindings and global mutable variables with NOINLINE

Pricing

Model
Free
Category
Skills
Rating
No reviews yet

Use cases

Haskell Code Review

Use this skill to review Haskell code and ensure it does not use unsafe-prefixed functions.

Writing Safe Haskell Code

Use this skill to write safe Haskell code by avoiding unsafe-prefixed functions and following best practices.

Pros & Cons

Pros

  • Prevents use of functions that compromise language guarantees
  • Encourages safer coding practices
  • Helps prevent unpredictable behavior and crashes

Cons

  • May limit performance optimizations in some cases
  • Requires explicit justification for safe API design

Reviews

Sign in to leave a review.

No reviews yet. Be the first!

Q&A

What alternatives does the skill suggest for unsafe functions?

It recommends safer equivalents like using the safe versions of library functions (e.g., indexMaybe instead of unsafeIndex), using Data.Coerce.coerce instead of unsafeCoerce, and designing APIs that avoid unsafePerformIO by encapsulating side‑effects internally.

Asked by Rina Desai · Dec 29, 2025

Can I still use unsafe functions for FFI bindings or global mutable variables?

Yes, the skill allows unsafe functions in limited cases such as FFI bindings or when combined with NOINLINE for global mutable variables, but they must be confined to internal modules and exposed only through a safe pure API with explicit justification comments.

Asked by Hiroshi Tanaka · Dec 26, 2025

What specific Haskell functions does the Unsafe skill block?

It forbids any function whose name starts with the unsafe prefix, including unsafePerformIO, unsafeDupablePerformIO, unsafeInterleaveIO, unsafeFixIO, unsafeCoerce, and library functions like unsafeIndex or unsafeRead that skip safety checks.

Asked by Cristina Moreno · Nov 21, 2025

Ask a question

Skills alternatives

Using Git Worktrees (Grade A) logo
Using Git Worktrees (Grade A)Skills

Security-tested data-ai skill for Claude AI. Grade A. Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktre

(0)
Free
Ga4 Bigquery Schema (Grade A) logo
Ga4 Bigquery Schema (Grade A)Skills

Security-tested data-ai skill for Claude AI. Grade A. GA4 BigQuery Export Schema Reference — complete field reference, nested structures, query patterns, and performance tips

(0)
Free
Meta Capi (Grade A) logo
Meta Capi (Grade A)Skills

Security-tested data-ai skill for Claude AI. Grade A. Meta Conversions API (CAPI) Setup Reference — architecture, event types, customer information hashing, deduplication, implementation examples, AEM

(0)
Free
Callees (Grade A) logo
Callees (Grade A)Skills

Security-tested development skill for Claude AI. Grade A. Lista o que uma funcao/metodo chama (call graph direto)

(0)
Free
Test Module Name (Grade A) logo
Test Module Name (Grade A)Skills

Security-tested data-ai skill for Claude AI. Grade A. Name Haskell test modules after the module under test with a Spec suffix in the same namespace. Use when writing or reviewing Haskell test module

(0)
Free
Board Of Directors (Grade A) logo
Board Of Directors (Grade A)Skills

Security-tested data-ai skill for Claude AI. Grade A. Simulate a 5-member expert board deliberation for major decisions. Use when evaluating plans, architecture choices, feature designs, or any decisi

(0)
Free
Advpl Mvc Avancado (Grade A) logo
Advpl Mvc Avancado (Grade A)Skills

Security-tested development skill for Claude AI. Grade A. MVC avançado via PE (Pontos de Entrada) — adicionar grids customizadas em telas MVC padrão (CNTA300/MATA070/MATA440/MATA460/FINA040 via *STRU)

(0)
Free
D
Docs Writer (Grade A)Skills

Security-tested devops skill for Claude AI. Grade A. **WORKFLOW SKILL** — Maintains repository documentation accuracy and freshness across the docs site, agent files, and changelog. WHEN: "update docs

(0)
Free