transmute
정보
`transmute` 스킬은 함수나 데이터 구조와 같은 개별 코드 단위의 핵심 동작을 보존하면서 한 형태에서 다른 형태로 변환합니다. 이는 전체 시스템이 아닌 단일 컴포넌트를 대상으로 언어, 패러다임 또는 API 간의 목적에 맞는 변환을 수행하는 경량 도구입니다. API 소비자 이전이나 데이터 형식 변환과 같은 정밀한 리팩토링 작업에 사용하세요.
빠른 설치
Claude Code
추천npx skills add pjt222/agent-almanac -a claude-code/plugin add https://github.com/pjt222/agent-almanacgit clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/transmuteClaude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요
문서
変容
Transform a specific piece of code or data from one form to another — language translation, paradigm shift, format conversion, or API migration — while preserving essential behavior and semantics.
使用タイミング
- Converting a function from one language to another (Python to R, JavaScript to TypeScript)
- Shifting a module from one paradigm (class-based to functional, callbacks to async/await)
- Migrating an API consumer from v1 to v2 of an external service
- Converting data between formats (CSV to Parquet, REST to GraphQL schema)
- Replacing a dependency with an equivalent (moment.js to date-fns, jQuery to vanilla JS)
- When the transformation scope is a single function, class, or module (not a full system)
入力
- 必須: Source material (file path, function name, or data sample)
- 必須: Target form (language, paradigm, format, or API version)
- 任意: Behavioral contract (tests, type signatures, or expected I/O pairs)
- 任意: Constraints (must maintain backward compatibility, performance budget)
手順
ステップ1: Analyze the Source Material
Understand exactly what the source does before attempting transformation.
- Read the source completely — every branch, edge case, and error path
- Identify the behavioral contract:
- What inputs does it accept? (types, ranges, edge cases)
- What outputs does it produce? (return values, side effects, error signals)
- What invariants does it maintain? (ordering, uniqueness, referential integrity)
- Catalog dependencies: what does the source import, call, or rely on?
- If tests exist, read them to understand expected behavior
- If no tests exist, write behavioral characterization tests before transmuting
期待結果: A complete understanding of what the source does (not how it does it). The behavioral contract is explicit and testable.
失敗時: If the source is too complex for a single transmute, consider breaking it into smaller pieces or escalating to the full athanor procedure. If behavior is ambiguous, ask for clarification rather than guessing.
ステップ2: Map Source to Target Form
Design the transformation mapping.
- For each element in the source, identify the target equivalent:
- Language constructs: loops → map/filter, classes → closures, etc.
- API calls: old endpoint → new endpoint, request/response shape changes
- Data types: data frame columns → schema fields, nested JSON → flat tables
- Identify elements with no direct equivalent:
- Source features missing in target (e.g., pattern matching in a language without it)
- Target idioms that don't exist in source (e.g., R's vectorization vs. Python loops)
- For each gap, choose an adaptation strategy:
- Emulate: reproduce the behavior with target-native constructs
- Simplify: if the source construct was a workaround, use the target's native solution
- Document: if behavior changes slightly, note the difference explicitly
- Write the transformation map: source element → target element, for every piece
期待結果: A complete mapping where every source element has a target destination. Gaps are identified and adaptation strategies chosen.
失敗時: If too many elements lack direct equivalents, the transformation may be inappropriate (e.g., transmuting a highly object-oriented design into a language without classes). Reconsider the target form or escalate to athanor.
ステップ3: Execute the Transformation
Write the target form following the map.
- Create the target file(s) with appropriate structure and boilerplate
- Transmute each element following the map from Step 2:
- Preserve the behavioral contract — same inputs produce same outputs
- Use target-native idioms rather than literal translations
- Maintain or improve error handling
- Handle dependencies:
- Replace source dependencies with target equivalents
- If a dependency has no equivalent, implement a minimal adapter
- Add inline comments only where the transformation was non-obvious
期待結果: A complete target implementation that follows the transformation map. The code reads like it was written natively in the target form, not mechanically translated.
失敗時: If a specific element resists transformation, isolate it. Transform everything else first, then tackle the resistant element with focused attention. If it truly cannot be transmuted, document why and provide a workaround.
ステップ4: Verify Behavioral Equivalence
Confirm the transmuted form preserves the original's behavior.
- Run the behavioral contract tests against the target implementation
- For each test case, verify:
- Same inputs → same outputs (within acceptable tolerance for numeric conversions)
- Same error conditions → equivalent error signals
- Side effects (if any) are preserved or documented as changed
- Check edge cases explicitly:
- Null/NA/undefined handling
- Empty collections
- Boundary values (max int, empty string, zero-length arrays)
- If the target form adds capabilities (e.g., type safety), verify those too
期待結果: All behavioral contract tests pass. Edge cases are handled equivalently. Any behavioral differences are documented and intentional.
失敗時: If tests fail, diff the source and target behavior to find the divergence. Fix the target to match the source contract. If the divergence is intentional (e.g., fixing a bug in the original), document it explicitly.
バリデーション Checklist
- Source material fully analyzed with explicit behavioral contract
- Transformation map covers every source element
- Gaps identified with adaptation strategies documented
- Target implementation uses native idioms (not literal translation)
- All behavioral contract tests pass against target
- Edge cases verified (null, empty, boundary values)
- Dependencies resolved with target equivalents
- Any behavioral differences documented and intentional
よくある落とし穴
- Literal translation: Writing Python-in-R or Java-in-JavaScript instead of using target idioms. The result should look native
- Skipping behavioral tests: Transmuting without tests means you can't verify equivalence. Write characterization tests first
- Ignoring edge cases: The happy path transmutes easily; edge cases are where bugs hide
- Over-engineering the adapter: If a dependency needs a 200-line adapter, the transmutation scope is too large
- Transmuting comments verbatim: Comments should explain the target code, not echo the source. Rewrite them
関連スキル
athanor— Full four-stage transformation for systems too large for a single transmutechrysopoeia— Optimizing transmuted code for maximum value extractionreview-software-architecture— Post-transmutation architecture review for larger conversionsserialize-data-formats— Specialized data format conversion procedures
GitHub 저장소
연관 스킬
executing-plans
디자인executing-plans 스킬은 검토 체크포인트가 포함된 통제된 배치로 실행할 완전한 구현 계획이 있을 때 사용합니다. 이 스킬은 계획을 불러와 비판적으로 검토한 후, 소규모 배치(기본값 3개 작업)로 작업을 실행하면서 각 배치 사이에 진행 상황을 아키텍트 검토를 위해 보고합니다. 이를 통해 내재된 품질 관리 체크포인트를 갖춘 체계적인 구현이 보장됩니다.
requesting-code-review
디자인이 스킬은 코드 변경 사항을 요구 사항에 따라 분석하기 위해 코드 리뷰어 하위 에이전트를 호출합니다. 작업 완료 후, 주요 기능 구현 후, 또는 메인 브랜치에 병합하기 전에 사용해야 합니다. 이 리뷰는 현재 구현체와 원래 계획을 비교하여 문제를 조기에 발견하는 데 도움이 됩니다.
connect-mcp-server
디자인이 스킬은 개발자들이 HTTP, stdio 또는 SSE 전송 방식을 통해 MCP 서버를 Claude Code에 연결하는 포괄적인 가이드를 제공합니다. GitHub, Notion 및 사용자 정의 API와 같은 외부 서비스를 통합하기 위한 설치, 구성, 인증 및 보안을 다룹니다. MCP 통합 설정, 외부 도구 구성 또는 Claude의 모델 컨텍스트 프로토콜 작업 시 활용하세요.
web-cli-teleport
디자인이 스킬은 작업 분석을 기반으로 개발자가 Claude Code 웹 인터페이스와 CLI 인터페이스 중 선택할 수 있도록 돕고, 두 환경 간 원활한 세션 텔레포트를 가능하게 합니다. 웹, CLI 또는 모바일 환경 전환 시 세션 상태와 컨텍스트를 관리하여 워크플로를 최적화합니다. 다양한 단계에서 서로 다른 도구가 필요한 복잡한 프로젝트에 사용하세요.
