Unsafe (Grade A) logo

Unsafe (Grade A)安全性经过校验的数据AI技能。A级。禁止Haskell中的无安全函数,例如unsafePerformIO、unsafeCoerce以及其他以"unsafe-"开头的函数。适用于编写或审查Haskell 代码

(0)
Daniel Nikulshyn审阅者 Daniel Nikulshyn·更新 2026年7月

概览

这个技能禁止了Haskell中的无安全函数,例如unsafePerformIO、unsafeCoerce以及其他以"unsafe-"开头的函数。它用于编写或审查使用任何以"unsafe-"开头函数的Haskell代码。目标是防止破坏Haskell中参考透明性和类型安全性的语言保证。无安全函数可能导致不可预测的行为、崩溃或安全性问题。这个技能建议不要使用无安全函数,提供更安全的替代方案。

主要功能

  • 检测和禁止无安全前缀函数
  • 提供更安全替代方案的指导
  • 支持FFI绑定和全局可变变量(NOINLINE)

价格

模型
Free
评分
暂无评价

使用场景

Haskell 代码审查

使用这个技能审查Haskell代码,确保它不使用无安全前缀函数。

编写安全的Haskell代码

使用这个技能编写安全的Haskell代码,避免无安全前缀函数,遵循最佳实践。

优点 & 缺点

优点

  • 预防破坏语言保证的函数
  • 促进更安全的编码实践
  • 帮助预防不可预测的行为和崩溃

缺点

  • 可能在某些情况下限制性能优化
  • 要求明确的安全API设计的正当理由

评测

登录以留下评测。

暂无评测。来当第一个吧!

问答

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

提问

育言活动 的替代品

Manage Headers (Grade A) logo
Manage Headers (Grade A)育言活动

专为 Claude AI 设计的安全测试开发技巧, Grade A。检查并配置 Power Pages 站点向浏览器发送的安全 headers — 内容安全策略,框架和点击劫持保护

(0)
Free
Using Git Worktrees (Grade A) logo
Using Git Worktrees (Grade A)育言活动

安全试验的数据-AI技能 - Claude AI。A级。即将开始需要与当前工作环境隔离的功能工作,或执行实施计划前-创建隔离的git工作tree

(0)
Free
Ga4 Bigquery Schema (Grade A) logo
Ga4 Bigquery Schema (Grade A)育言活动

为Claude AI提供了经过安全测试的数据ai技能。 Grade A. GA4 BigQuery导出模式参考 - 完整字段参考、嵌套结构、查询模式和性能提示

(0)
Free
Meta Capi (Grade A) logo
Meta Capi (Grade A)育言活动

安全测试的数据-AI技能,专为Claude AI打造。Grade A. Meta Conversions API (CAPI) 设置指南-架构、事件类型、客户信息哈希、去重复、实现示例、AEM

(0)
Free
Callees (Grade A) logo
Callees (Grade A)育言活动

经过安全测试的 Claude AI 开发技能。Grade A。列出函数/方法调用的直接调用图

(0)
Free
Test Module Name (Grade A) logo
Test Module Name (Grade A)育言活动

安全测试数据-ai技能,Grade A. 名为Haskell测试模块,以同一命名空间中的测试模块命名,并在其后添加 Spec 辅助。 在编写或审阅Haskell测试模块时使用。

(0)
Free
Board Of Directors (Grade A) logo
Board Of Directors (Grade A)育言活动

经安全检测的数据 AI 技能,适用于 Claude AI。A级。模拟五位专家董事会就重大决策进行审议。用于评估计划、架构选择、功能设计或任何决策。

(0)
Free
Advpl Mvc Avancado (Grade A) logo
Advpl Mvc Avancado (Grade A)育言活动

安全测试的开发技能,适用于 Claude AI。Grade A。通过 PE(入口点)实现高级 MVC —— 在标准 MVC 界面(CNTA300/MATA070/MATA440/MATA460/FINA040 via *STRU)中添加自定义网格。

(0)
Free