본문으로 건너뛰기
Skillpedia
일반 코딩48k · #4647

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가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/fp-refactor/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#4647
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬