haskell-pro
Domine a Programação Haskell Avançada com Orientação de Especialistas
Lutando com sistemas de tipos complexos e design funcional puro em Haskell? Esta skill fornece orientação especializada em programação a nível de tipos, padrões de concorrência e construção de software de alta confiabilidade com fortes garantias estáticas.
Baixar o ZIP da skill
Upload no Claude
Vá em Configurações → Capacidades → Skills → Upload skill
Ative e comece a usar
Testar
A utilizar "haskell-pro". Design a type-safe API for handling money transfers that prevents invalid states at compile time.
Resultado esperado:
Use newtypes to wrap Amount and Currency with phantom types to track transfer states (Pending, Completed, Failed). Implement a state machine using GADTs that only allows valid transitions. Encode account invariants in types to prevent overdrafts. Provide type signatures that make invalid transfers unrepresentable.
A utilizar "haskell-pro". How do I handle concurrent access to a shared cache in Haskell?
Resultado esperado:
Use STM (Software Transactional Memory) with TVar for atomic cache updates. Wrap cache operations in retry blocks for automatic conflict resolution. Combine with async for concurrent read/write operations. Implement exception-safe cleanup using bracket or finally. Example pattern: atomically $ do cached <- readTVar cacheVar; case cached of Just val -> return val; Nothing -> do newValue <- computeValue; writeTVar cacheVar (Just newValue); return newValue
A utilizar "haskell-pro". Review my Haskell code for functional design improvements.
Resultado esperado:
Separate pure business logic into standalone functions with explicit signatures. Isolate database and network IO using transformer stacks (ReaderT for config, ExceptT for errors). Replace partial functions with total alternatives using Maybe or Either. Introduce newtypes to distinguish between UserID and Username at the type level. Split large modules into focused single-responsibility modules.
Auditoria de Segurança
SeguroStatic analysis detected 7 potential issues (1 external_commands, 6 weak cryptographic patterns). All findings are false positives: the 'external_commands' detection was Markdown backticks for file paths, not shell execution. The 'weak cryptographic' detections appear to be scanner errors as no cryptographic code exists in the skill. The skill contains only documentation and instructions for Haskell programming assistance with no executable code, network operations, or security risks.
Problemas de Baixo Risco (1)
Pontuação de qualidade
O Que Você Pode Construir
Programação a Nível de Tipos
Projete abstrações sofisticadas a nível de tipos que codificam lógica de negócio no sistema de tipos, capturando erros em tempo de compilação
Design de Sistemas Concorrentes
Construa aplicações concorrentes e paralelas usando STM, async e threads leves com segurança adequada de exceções
Revisão de Arquitetura de Codebase
Avalie codebases Haskell existentes quanto a padrões de design funcional, segurança de tipos e melhorias arquiteturais
Tente Estes Prompts
Design a type-safe domain model for a [domain] system. Use newtypes, phantom types, or GADTs to encode invariants at the type level and prevent invalid states.
Review this Haskell code and refactor it to separate pure logic from effectful code. Identify where IO can be isolated and propose a function signature architecture.
Design a concurrent [system] using Haskell's STM and async. Show how to handle shared state safely and implement exception-safe resource cleanup.
Analyze this Haskell code for performance bottlenecks. Identify opportunities for strictness analysis, fusion optimizations, or better data structure choices.
Melhores Práticas
- Comece esclarecendo seu desafio específico em Haskell - seja design a nível de tipos, concorrência, arquitetura ou tuning de performance
- Forneça snippets de código relevantes, mensagens de erro ou warnings do compilador para orientação mais direcionada
- Especifique sua versão do GHC e dependências principais ao solicitar conselhos de arquitetura ou compatibilidade
Evitar
- Pedir ajuda de programação não-Haskell - use uma skill de codificação geral em vez disso
- Solicitar execução de comandos de sistema arbitrários ou operações de arquivo fora do contexto do seu projeto
- Esperar implementações completas de aplicações sem fornecer requisitos ou restrições do projeto