fp-refactor
하는 일
이 도구는 전통적인(명령형) 스타일로 작성된 코드를 TypeScript의 fp-ts 라이브러리를 사용해 함수형 프로그래밍 스타일로 바꾸도록 돕습니다. 이 전환을 위한 포괄적인 가이드를 제공합니다.
사용하는 경우
- ✓기존 TypeScript 코드를 fp-ts 함수형 패턴으로 리팩터링할 때.
- ✓`try/catch`, null 검사, 콜백, 반복문 같은 블록을 함수형 대응 코드로 바꿔야 할 때.
- ✓독립적인 예제가 아니라 전환 지침과 장단점이 필요한 경우.
스킬 링크
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/fp-refactor/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“제 명령형 TypeScript 코드를 fp-ts 함수형 패턴으로 바꾸려면 어떻게 해야 하나요? try/catch 블록과 null 검사의 변환도 포함해서요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
도구는 TypeScript 코드를 분석하고 fp-ts 라이브러리의 함수형 프로그래밍 패턴을 적용합니다. 명령형 구조를 함수형 방식으로 바꾸도록 안내합니다. 예를 들어 오류 처리에는 `Either`를, 선택적 값에는 `Option`을 사용합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Refactoring Imperative Code to fp-ts
This skill provides comprehensive patterns and strategies for migrating existing imperative TypeScript code to fp-ts functional programming patterns.
Detailed Guide
Read the detailed guide before executing this skill. It retains the complete procedure and reference material. Treat its safety, prerequisites, and validation requirements as mandatory. For focused work, load the relevant sections; for end-to-end work, read the guide completely.
When to Use
- You are refactoring an existing imperative TypeScript codebase toward fp-ts patterns.
- The task involves converting
try/catch, null checks, callbacks, DI, or loops into functional equivalents. - You need migration guidance and tradeoffs, not just isolated fp-ts examples.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
자주 묻는 질문
함수형 프로그래밍이란 무엇인가요?
계산을 수학적 함수의 평가처럼 다루고, 상태와 변경 가능한 데이터를 바꾸는 것을 피하는 프로그래밍 방식입니다.
fp-ts란 무엇인가요?
함수형 프로그래밍의 장점을 TypeScript에 가져오는 라이브러리입니다. 더 견고하고 표현력 있는 코드를 만드는 타입과 함수를 제공합니다.
명령형 코드란 무엇인가요?
프로그램이 상태를 어떻게 바꿔야 하는지 설명하는 프로그래밍 방식으로, 명령을 사용해 단계별로 프로그램의 상태를 바꿉니다.
상세 정보
작성자의 원본 설명
Comprehensive guide for refactoring imperative TypeScript code to fp-ts functional patterns
인기도
- GitHub 스타
- 48k
- 순위
- #4647
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
00-andruia-consultant
48k에이전트가 AI 프로젝트를 시작하거나 개선할 수 있도록 코드를 분석하고 스페인어로 실행 계획을 세워 줍니다.
007
48k에이전트가 보안 감사와 위협 모델링을 수행해 공격과 취약점으로부터 프로젝트를 보호하도록 돕습니다.
10-andruia-skill-smith
48k에이전트가 AI 도구의 작동 방식을 정의하고 문서를 쓰며 구조를 검증하도록 돕습니다.
20-andruia-niche-intelligence
48k에이전트가 신뢰할 수 있는 자료를 바탕으로 특정 산업의 맥락, 규칙, 사용 패턴, 위험을 정리한 요약을 만들도록 돕습니다.