返回技能列表

athanor

pjt222
更新于 2 days ago
10 次查看
17
2
17
在 GitHub 上查看
设计aidesign

关于

The Athanor skill systematically transforms tangled or legacy code into optimized, modern output using a four-stage alchemical process. It is designed for deep refactoring tasks where incremental fixes have failed, such as converting codebases between paradigms or overhauling deeply problematic modules. The process includes structured checkpoints to analyze and purify the code at each stage.

快速安装

Claude Code

推荐
主要方式
npx skills add pjt222/agent-almanac -a claude-code
插件命令备选方式
/plugin add https://github.com/pjt222/agent-almanac
Git 克隆备选方式
git clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/athanor

在 Claude Code 中复制并粘贴此命令以安装该技能

技能文档

Athanor

Execute four-stage alchemical transmutation of code or data — decomposing prima materia, purifying its essence, illuminating its target form, synthesizing refined output. Athanor is furnace that maintains steady heat across all stages.

When Use

  • Transforming legacy code into modern, well-structured equivalents
  • Refactoring deeply tangled modules where incremental fixes keep failing
  • Converting codebase from one paradigm to another (procedural to functional, monolith to modular)
  • Processing raw, messy data into clean analytical datasets
  • Simpler refactoring approaches have stalled and full-cycle transformation needed

Inputs

  • Required: Material to transform (file paths, module names, or data sources)
  • Required: Desired end state (target architecture, paradigm, or format)
  • Optional: Known constraints (must preserve API, can't change database schema, etc.)
  • Optional: Prior failed transformation attempts and why they stalled

Steps

Step 1: Nigredo — Decomposition

Break prima materia into its constituent elements. Nothing sacred; everything cataloged.

  1. Inventory material complete:
    • List every function, class, module, or data entity
    • Map all dependencies (imports, calls, data flows)
    • Identify hidden coupling (shared globals, implicit state, side effects)
  2. Surface hidden assumptions:
    • What undocumented behaviors does code rely on?
    • What error conditions silently swallowed?
    • What ordering dependencies exist?
  3. Catalog anti-patterns and technical debt:
    • God objects, circular dependencies, copy-paste duplication
    • Dead code paths, unreachable branches, vestigial features
    • Hardcoded values, magic numbers, embedded configuration
  4. Produce Nigredo Inventory: structured catalog of every element, dependency, assumption, anti-pattern

Got: Complete, unflinching inventory of material. Inventory should feel uncomfortable — if it doesn't, decomposition isn't thorough enough. Every hidden assumption now explicit.

If fail: Material too large to inventory fully? Decompose by module boundary and treat each module as separate athanor run. Dependencies too tangled to map? Use grep/Grep to trace actual call sites rather than relying on documentation.

Step 2: Meditate — Calcination Checkpoint

Run meditate skill to clear assumptions accumulated during nigredo.

  1. Set aside nigredo inventory and clear mental context
  2. Anchor on transformation goal stated in Inputs
  3. Observe what biases nigredo introduced — did decomposition make certain approaches seem inevitable?
  4. Label any premature solution ideas as "tangent" and return to goal

Got: Clear, unbiased state ready to evaluate material without being anchored to its current form. Goal feels fresh rather than constrained by what was found.

If fail: Nigredo findings keep pulling attention (particularly bad anti-pattern, clever hack tempting to preserve)? Write it down and explicitly set it aside. Proceed only when goal clearer than current form.

Step 3: Albedo — Purification

Separate essential from accidental. Strip away everything that doesn't serve target form.

  1. From nigredo inventory, classify each element:
    • Essential: Core business logic, irreplaceable algorithms, critical data transformations
    • Accidental: Framework boilerplate, workarounds for old bugs, compatibility shims
    • Toxic: Anti-patterns, security vulnerabilities, dead code
  2. Extract essential elements into isolation:
    • Pull core logic out of framework wrappers
    • Separate data transformation from I/O
    • Extract interfaces from implementations
  3. Remove toxic elements entirely — document what was removed and why
  4. For accidental elements, determine if equivalents exist in target form
  5. Produce Albedo Extract: purified essential logic with clean interfaces

Got: Set of pure, isolated functions/modules that represent core value of original material. Each piece testable in isolation. Extract significantly smaller than original.

If fail: Essential and accidental too intertwined to separate? Introduce seam points (interfaces) first. Material resists purification? May need dissolve-form before athanor can continue.

Step 4: Heal — Purification Assessment

Run heal skill to assess whether purification was thorough.

  1. Triage albedo extract: is anything still carrying toxic residue?
  2. Check for drift: has purification drifted from original transformation goal?
  3. Assess completeness: are all essential elements accounted for, or were some discarded prematurely?
  4. Rebalance if needed: restore any essential elements that were incorrectly classified as accidental

Got: Confidence that albedo extract is complete, clean, ready for illumination. No essential logic was lost; no toxic patterns remain.

If fail: Assessment reveals significant gaps? Return to Step 3 with specific gaps identified. Do not proceed to citrinitas with incomplete material.

Step 5: Citrinitas — Illumination

See target form. Map purified elements to their optimal structure.

  1. Pattern recognition: identify which design patterns serve purified elements
    • Does data flow suggest pipes/filters, event sourcing, CQRS?
    • Do interfaces suggest strategy, adapter, facade?
    • Does module structure suggest hexagonal, layered, micro-kernel?
  2. Design target architecture:
    • Map each essential element to its new location
    • Define interfaces between components
    • Specify data flow through new structure
  3. Identify what must be created new (has no equivalent in original):
    • New abstractions that unify duplicated logic
    • New interfaces that replace implicit coupling
    • New error handling that replaces silent failures
  4. Produce Citrinitas Blueprint: complete mapping from albedo extract to target form

Got: Clear, detailed blueprint where every essential element has home and every interface defined. Blueprint should feel inevitable — given purified elements, this structure is natural fit.

If fail: Multiple valid architectures compete? Evaluate each against constraints from Inputs. No clear winner emerges? Prefer simplest option and document alternatives as future options.

Step 6: Meditate — Pre-Synthesis Checkpoint

Run meditate skill to prepare for final synthesis.

  1. Clear analytical context from citrinitas
  2. Anchor on citrinitas blueprint as synthesis guide
  3. Observe any anxiety about transformation — is anything being rushed?
  4. Confirm readiness: blueprint clear, material purified, constraints known

Got: Calm clarity about what needs to be built. Synthesis phase should be execution, not design.

If fail: Doubt persists about blueprint? Revisit Step 5 with specific concerns. Better to refine blueprint than to begin synthesis with uncertainty.

Step 7: Rubedo — Synthesis

Compose purified elements into their target form. Philosopher's stone: working, optimized code.

  1. Build new structure following citrinitas blueprint:
    • Create files, modules, interfaces as specified
    • Migrate each essential element to its new location
    • Implement new abstractions and interfaces
  2. Wire components together:
    • Connect data flows as designed
    • Implement error propagation through new paths
    • Configure dependency injection or module loading
  3. Verify synthesis:
    • Does each component work in isolation? (unit tests)
    • Do components compose correctly? (integration tests)
    • Does full system produce same outputs as original? (regression tests)
  4. Remove scaffolding:
    • Delete temporary compatibility shims
    • Remove migration aids
    • Clean up any remaining references to old structure
  5. Produce Rubedo Output: transmuted code, fully functional in its new form

Got: Working code measurably better than original: fewer lines, clearer structure, better test coverage, fewer dependencies. Transformation complete and old form can be retired.

If fail: Synthesis reveals gaps in blueprint? Do not patch — return to Step 5 (citrinitas) to revise design. Individual components fail? Isolate and fix them before attempting full integration. Rubedo must not produce half-transformed chimera.

Validation Checklist

  • Nigredo inventory complete (all elements, dependencies, assumptions cataloged)
  • Meditate checkpoint passed between nigredo/albedo (assumptions cleared)
  • Albedo extract contains only essential elements with clean interfaces
  • Heal assessment confirms purification completeness
  • Citrinitas blueprint maps every essential element to target form
  • Meditate checkpoint passed between citrinitas/rubedo (ready for synthesis)
  • Rubedo output passes regression tests against original behavior
  • Rubedo output measurably improved (complexity, coupling, test coverage)
  • No toxic elements survived into final output
  • Transformation constraints from Inputs satisfied

Pitfalls

  • Skipping nigredo depth: Rushing decomposition means hidden coupling surfaces during synthesis. Invest fully in inventory
  • Preserving accidental complexity: Attachment to clever workarounds or "it works, don't touch it" code. Not essential? It goes
  • Skipping meditate checkpoints: Cognitive momentum from one stage biases next. Pauses are structural, not optional
  • Blueprint-less synthesis: Starting to code before citrinitas complete produces patchwork, not transmutation
  • Incomplete regression testing: Rubedo must reproduce original behavior. Untested paths will break silently
  • Scope creep during citrinitas: Illumination phase reveals opportunities for improvement beyond original goal. Note them but don't pursue them — athanor serves stated transformation, not hypothetical ideal

See Also

  • transmute — Lighter-weight transformation for single functions or small modules
  • chrysopoeia — Value extraction and optimization (turning base code into gold)
  • meditate — Meta-cognitive clearing used as stage-gate checkpoints
  • heal — Subsystem assessment used for purification validation
  • dissolve-form — When material too rigid for athanor, dissolve first
  • adapt-architecture — Complementary approach for system-level migration patterns
  • review-software-architecture — Post-synthesis architecture review

GitHub 仓库

pjt222/agent-almanac
路径: i18n/caveman/skills/athanor
0
agentsagentskillsai-assisted-developmentclaude-codeskillsteams

相关推荐技能

executing-plans

设计

该Skill用于当开发者提供完整实施计划时,以受控批次方式执行代码实现。它会先审阅计划并提出疑问,然后分批次执行任务(默认每批3个任务),并在批次间暂停等待审查。关键特性包括分批次执行、内置检查点和架构师审查机制,确保复杂系统实现的可控性。

查看技能

requesting-code-review

设计

该Skill可在完成任务、实现主要功能或合并代码前自动调度代码审查子代理,确保实现符合需求和计划。它支持通过指定git SHA范围进行精准的代码变更审查,帮助开发者在关键节点及时发现潜在问题。核心原则是"早审查、勤审查",适用于开发流程的各个关键阶段。

查看技能

connect-mcp-server

设计

这个Skill指导开发者如何将MCP服务器连接到Claude Code,支持HTTP、stdio和SSE三种传输协议。它涵盖了从安装配置到认证安全的完整流程,适用于集成GitHub、Notion、数据库等外部服务。当开发者需要添加集成、配置外部工具或提及MCP相关功能时,这个Skill能提供实用的操作指南。

查看技能

web-cli-teleport

设计

该Skill帮助开发者根据任务特性选择Claude Code的Web或CLI界面,并指导如何在两种环境间无缝迁移会话。它能分析任务复杂度、迭代需求等要素,推荐最优工作界面和工作流。关键特性包括会话状态管理、环境切换指导和上下文优化建议。

查看技能