본문으로 건너뛰기
cccskills
무료GitHub에 공개

chrysopoeia

Extract maximum value from existing code — performance optimization, API surface refinement, and dead weight elimination. The art of turning base code into gold through systematic identification and amplification of value-bearing patterns. Use when optimizing a working but sluggish codebase, refining an API surface that has accumulated cruft, reducing bundle size or memory footprint, or preparing code for open-source release — when code works correctly but doesn't shine and needs polish rather than a full rewrite.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md8.7 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Chrysopoeia

Systematically extract maximum value from existing code — identify what's golden (high-value, well-designed), what's lead (resource-heavy, poorly optimized), and what's dross (dead weight). Then amplify the gold, transmute the lead, and remove the dross.

When to Use

  • Optimizing a working but sluggish codebase for performance
  • Refining an API surface that has accumulated cruft over iterations
  • Reducing bundle size, memory footprint, or startup time
  • Preparing code for open-source release (extracting the valuable core)
  • When code works correctly but doesn't shine — it needs polish, not rewrite

Inputs

  • Required: Codebase or module to optimize (file paths)
  • Required: Value metric (performance, API clarity, bundle size, readability)
  • Optional: Profiling data or benchmarks showing current performance
  • Optional: Budget or target (e.g., "reduce bundle by 40%", "sub-100ms response")
  • Optional: Constraints (can't change public API, must maintain backward compat)

Procedure

Step 1: Assay — Classify the Material

Systematically classify every element by its value contribution.

  1. Define the value metric from Inputs (performance, clarity, size, etc.)
  2. Inventory the codebase elements (functions, modules, exports, dependencies)
  3. Classify each element:
Value Classification:
+--------+---------------------------------------------------------+
| Gold   | High value, well-designed. Amplify and protect.         |
| Silver | Good value, minor imperfections. Polish.                |
| Lead   | Functional but heavy — poor performance, complex API.   |
|        | Transmute into something lighter.                       |
| Dross  | Dead code, unused exports, vestigial features.          |
|        | Remove entirely.                                        |
+--------+---------------------------------------------------------+
  1. For performance optimization, profile first:
    • Identify hot paths (where time is spent)
    • Identify cold paths (rarely executed code that may be dross)
    • Measure memory allocation patterns
  2. Produce the Assay Report: element-by-element classification with evidence

Expected: Every significant element classified with evidence. Gold elements are identified for protection during optimization. Lead elements are prioritized by impact.

On failure: If profiling tools aren't available, use static analysis: function complexity (cyclomatic), dependency count, and code size as proxies. If the codebase is too large, focus on the critical path first.

Step 2: Refine — Amplify the Gold

Protect and enhance the highest-value elements.

  1. For each Gold element:
    • Ensure it has comprehensive tests (these are your most valuable assets)
    • Document its interface clearly if not already done
    • Consider whether it could be extracted as a reusable module
  2. For each Silver element:
    • Apply targeted improvements (better naming, clearer types, minor optimizations)
    • Bring test coverage to Gold-level
    • Resolve minor code smells without restructuring
  3. Do not modify Gold/Silver behavior — only improve their polish and protection

Expected: Gold and Silver elements are better tested, documented, and protected. No behavioral changes, only quality improvements.

On failure: If a "Gold" element reveals hidden problems during closer inspection, reclassify it. Better to be honest about value than to protect flawed code.

Step 3: Transmute — Convert Lead to Gold

Transform heavy, inefficient elements into optimized equivalents.

  1. Prioritize Lead elements by impact (highest resource consumption first)
  2. For each Lead element, choose a transmutation strategy:
    • Algorithm optimization: Replace O(n^2) with O(n log n), eliminate redundant computation
    • Caching/memoization: Store expensive results that are requested repeatedly
    • Lazy evaluation: Defer computation until results are actually needed
    • Batch processing: Combine many small operations into fewer large ones
    • Structural simplification: Reduce cyclomatic complexity, flatten deep nesting
  3. Apply the strategy and measure the improvement:
    • Before/after benchmarks for performance changes
    • Before/after line counts for complexity changes
    • Before/after dependency counts for coupling changes
  4. Verify behavioral equivalence after each transmutation

Expected: Measurable improvement on the target value metric. Each transmuted element performs better than its Lead predecessor while maintaining identical behavior.

On failure: If a Lead element resists optimization within its current interface, consider whether the interface itself is the problem. Sometimes the transmutation requires changing how the element is called, not just how it's implemented.

Step 4: Purge — Remove the Dross

Eliminate dead weight systematically.

  1. For each Dross element, verify it's truly unused:
    • Search for all references (grep, IDE find-usages)
    • Check for dynamic references (string-based dispatch, reflection)
    • Check for external consumers (if the code is a library)
  2. Remove confirmed dross:
    • Delete dead code, unused exports, vestigial features
    • Remove unused dependencies from package manifests
    • Clean up configuration for removed features
  3. Verify nothing breaks after each removal (run tests)
  4. Document what was removed and why (in commit messages, not in code)

Expected: The codebase is lighter. Bundle size, dependency count, or code volume measurably reduced. All tests still pass.

On failure: If removing an element breaks something, it wasn't dross — reclassify it. If dynamic references make it hard to verify usage, add temporary logging before deletion to confirm no runtime access.

Step 5: Verify — Weigh the Gold

Measure the overall improvement.

  1. Run the same benchmarks/metrics used in Step 1
  2. Compare before/after on the target value metric
  3. Document the chrysopoeia results:
    • Elements refined (Gold/Silver improvements)
    • Elements transmuted (Lead → Gold conversions with measurements)
    • Elements purged (Dross removed with size/count impact)
    • Overall metric improvement (e.g., "47% faster", "32% smaller bundle")

Expected: Measurable, documented improvement on the target value metric. The codebase is demonstrably more valuable than before.

On failure: If overall improvement is marginal, the original code may have been better than assumed. Document what was learned — knowing that code is already near-optimal is itself valuable.

Validation Checklist

  • Assay report classifies all significant elements with evidence
  • Gold elements have comprehensive tests and documentation
  • Lead transmutations show measurable before/after improvement
  • Dross removal verified with reference checks before deletion
  • All tests pass after each stage
  • Overall improvement measured and documented
  • No behavioral regressions introduced
  • Constraints from Inputs are satisfied

Common Pitfalls

  • Premature optimization: Optimizing without profiling. Always measure first, optimize the hot paths
  • Polishing dross: Spending effort improving code that should be deleted. Classify before refining
  • Breaking Gold: Optimization that degrades the best code. Gold elements should only get better, never worse
  • Unmeasured claims: "It feels faster" is not chrysopoeia. Every improvement must be quantified
  • Optimizing cold paths: Spending effort on code that runs once at startup when the bottleneck is the request loop

Related Skills

  • athanor — Full four-stage transformation when chrysopoeia reveals the code needs restructuring, not just optimization
  • transmute — Targeted conversion when a Lead element needs a paradigm shift
  • review-software-architecture — Architecture-level evaluation that complements code-level chrysopoeia
  • review-data-analysis — Data pipeline optimization parallels code optimization

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Execute structural metamorphosis using strangler fig migration, chrysalis phases, and interface preservation. Covers transformation planning, parallel running, progressive cutover, rollback design, and post-metamorphosis stabilization for system architecture evolution. Use when assess-form has classified the system as READY for transformation, when migrating from monolith to microservices, when replacing a core subsystem while dependents continue operating, or when any architectural change must be gradual rather than big-bang.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

pjt222/agent-almanac422026년 10월 22일 업데이트

adaptic

무료

Master skill composing the 5-step synoptic cycle for panoramic synthesis across multiple domains. Orchestrates meditate, expand-awareness, observe, awareness, integrate-gestalt, and express-insight into a coherent process that produces unified understanding rather than sequential compromise. Use when a problem genuinely spans 3+ domains and the interactions between domains matter more than depth in any one, when sequential analysis feels like compromise rather than integration, or before major architectural decisions affecting multiple stakeholders.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

pjt222/agent-almanac422026년 10월 22일 업데이트

Scaffold a new puzzle type across all 10+ pipeline integration points in jigsawR. Creates the core puzzle module, wires it into the unified pipeline (generation, positioning, rendering, adjacency), adds ggpuzzle geom/stat layers, updates DESCRIPTION and config.yml, extends the Shiny app, and creates a comprehensive test suite. Use when adding a completely new puzzle type to the package or following the 10-point integration checklist to ensure nothing is missed end-to-end.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

pjt222/agent-almanac422026년 10월 22일 업데이트

Add Rcpp or RcppArmadillo integration to an R package for high-performance C++ code. Covers setup, writing C++ functions, RcppExports generation, testing compiled code, and debugging. Use when an R function is too slow and profiling confirms a bottleneck, when you need to interface with existing C/C++ libraries, or when implementing algorithms (loops, recursion, linear algebra) that benefit from compiled code.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

pjt222/agent-almanac422026년 10월 22일 업데이트

aikido

무료

Practice aikido as a defensive martial art emphasizing harmony, redirection, and controlled resolution. Covers centering and grounding, ukemi (safe falling and rolling), core techniques (irimi-nage, shiho-nage, kote-gaeshi, ikkyo), blending and tai sabaki (body movement), randori (multiple attacker practice), weapons awareness, and applying principles off the mat. Use when learning a defensive martial art that prioritizes de-escalation, developing the ability to redirect aggression without causing unnecessary harm, building safe falling skills, or cultivating calm centeredness under physical pressure.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

pjt222/agent-almanac422026년 10월 22일 업데이트

Analyze an arbitrary codebase to identify functions, APIs, and data sources suitable for exposure as MCP tools, producing a tool specification document. Use when planning an MCP server for an existing project, auditing a codebase before wrapping it as an AI-accessible tool surface, comparing what a codebase can do versus what is already exposed via MCP, or generating a tool spec to hand off to scaffold-mcp-server.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

pjt222/agent-almanac422026년 10월 22일 업데이트

pjt222의 스킬 모두 보기

이 스킬의 문제 신고