haskell-pro
전문가와 함께하는 고급 Haskell 프로그래밍 마스터
Haskell의 복잡한 타입 시스템과 순수 함수형 디자인으로 어려움을 겪고 계신가요? 이 스킬은 타입 레벨 프로그래밍, 동시성 패턴, 강력한 정적 보장措施을 갖춘 고신뢰성 소프트웨어 구축에 대한 전문가 지침을 제공합니다.
스킬 ZIP 다운로드
Claude에서 업로드
설정 → 기능 → 스킬 → 스킬 업로드로 이동
토글을 켜고 사용 시작
테스트해 보기
"haskell-pro" 사용 중입니다. Design a type-safe API for handling money transfers that prevents invalid states at compile time.
예상 결과:
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.
"haskell-pro" 사용 중입니다. How do I handle concurrent access to a shared cache in Haskell?
예상 결과:
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
"haskell-pro" 사용 중입니다. Review my Haskell code for functional design improvements.
예상 결과:
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.
보안 감사
안전Static 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.
낮은 위험 문제 (1)
품질 점수
만들 수 있는 것
타입 레벨 프로그래밍
비즈니스 로직을 타입 시스템에 인코딩하여 컴파일 타임에 오류를 포착하는 정교한 타입 레벨 추상화 설계
동시성 시스템 설계
적절한 예외 안전성을 가진 STM, async, 경량 스레드를 사용하여 동시 및 병렬 애플리케이션 구축
코드베이스 아키텍처 리뷰
기존 Haskell 코드베이스에 대한 함수형 디자인 패턴, 타입 안전성, 아키텍처 개선 사항 평가
이 프롬프트를 사용해 보세요
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.
모범 사례
- Start by clarifying your specific Haskell challenge - whether it is type-level design, concurrency, architecture, or performance tuning
- Provide relevant code snippets, error messages, or compiler warnings for more targeted guidance
- Specify your GHC version and key dependencies when requesting architecture or compatibility advice
피하기
- Asking for non-Haskell programming help - use a general coding skill instead
- Requesting execution of arbitrary system commands or file operations outside your project context
- Expecting complete application implementations without providing project requirements or constraints