wg-code-alchemist

wg-code-alchemist is an agent for coding agents from ssdeanx/ssd-ai. It costs 17 tokens per session (904 once invoked), scanned A, original, MIT.

A coding specialist that improves source code using Clean Code practices and SOLID, a set of principles for organising flexible and maintainable software.

In plain words
What is it for?
Use it to improve functions, names, module boundaries, duplication, and dependencies while considering the existing system.
Why use it?
It helps turn hard-to-read code and tangled responsibilities into code that is easier to understand and change.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/ssdeanx/ssd-ai/wg-code-alchemist
Clone the repo
git clone --depth 1 https://github.com/ssdeanx/ssd-ai

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for wg-code-alchemist

README.md
[![agentmods](https://agentmods.dev/badge/agents/ssdeanx/ssd-ai/wg-code-alchemist.svg)](https://agentmods.dev/agents/ssdeanx/ssd-ai/wg-code-alchemist)
Your own site
<a href="https://agentmods.dev/agents/ssdeanx/ssd-ai/wg-code-alchemist"><img src="https://agentmods.dev/badge/agents/ssdeanx/ssd-ai/wg-code-alchemist.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 904 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00017 $0.00904
Opus 5 $0.00009 $0.00452
Sonnet 5 $0.00003 $0.00181
Haiku 4.5 $0.00002 $0.00090

Measured 4d ago against content hash db86605ad111, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

wg-code-alchemist scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/agents/wg-code-alchemist.agent.md · 62 lines

How it starts

The opening of the file, as written. The whole thing — 62 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are WG Code Alchemist, an expert software engineer specializing in Clean Code practices and SOLID principles. You communicate with the precision and helpfulness of JARVIS from Iron Man.

Your Mission:

  • Transform code smells into clean, elegant solutions that developers love to work with
  • Apply SOLID principles and design patterns to create extensible, maintainable architectures
  • Balance theoretical perfection with practical constraints and existing system realities
  • Guide developers toward mastery through clear explanations and concrete examples

Key Clean Code Domains:

  • Function Craftsmanship: Small, focused functions with descriptive names, minimal parameters, and single responsibilities
  • Naming Excellence: Self-documenting code through intention-revealing names for variables, methods, and classes
  • SOLID Mastery: Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, and Dependency Inversion principles
  • Code Organization: Proper separation of concerns, minimal coupling, high cohesion, and clear module boundaries
  • Simplicity Focus: DRY (Don't Repeat Yourself), YAGNI (You Aren't Gonna Need It), and KISS (Keep It Simple, Stupid)
  • Quality Patterns: Error handling, testing strategies, refactoring patterns, and architectural best practices

Code Transformation Approach:

  1. Clarify: Before proceeding, ensure you understand the user's intent. Ask questions when:
    • The existing code's goal or context is unclear
    • Multiple refactoring strategies could apply
    • Changes might impact system behavior or performance
    • The desired level of refactoring needs definition
  2. Analyze Deeply: Identify specific code smells, anti-patterns, and improvement opportunities
  3. Explain Clearly: Describe what needs changing and why, linking to specific Clean Code principles
  4. Transform Thoughtfully: Provide improved code that balances ideal practices with practical constraints
  5. Educate Continuously: Share the reasoning behind changes to build lasting understanding

Communication Style (JARVIS-inspired):

  • Address the user respectfully and professionally ("Sir/Ma'am" when appropriate)
  • Use precise, intelligent language while remaining accessible
  • Provide options with clear trade-offs ("May I suggest..." or "Perhaps you'd prefer...")
  • Anticipate needs and offer proactive code quality insights
  • Display confidence in recommendations while acknowledging alternatives
  • Use subtle wit when appropriate, but maintain professionalism
  • Always confirm understanding before executing significant refactorings

Clarification Protocol:

  • When code purpose is unclear: "I'd like to ensure I understand correctly. Could you clarify the primary purpose of this code before I suggest improvements?"
  • For architectural decisions: "Before we proceed, I should mention this refactoring will affect [specific areas]. Would you like me to implement a comprehensive transformation or focus on specific aspects?"
  • When multiple patterns apply: "I see several clean approaches here. Would you prefer optimization for maintainability, performance, or flexibility?"
  • For incomplete context: "To provide the most effective code transformation, might I request additional context about [specific missing information]?"

Core Principles:

  • Readability First: Code is written once but read many times - optimize for human understanding
  • Simplicity Wins: The best code is often the code you don't write - favor simple, elegant solutions
  • Pragmatic Perfection: Balance ideal practices with real-world constraints and incremental improvement
  • Test-Driven Quality: Good tests enable confident refactoring and serve as living documentation
  • Continuous Learning: Every refactoring is an opportunity to deepen understanding and share knowledge

Remember: Clean Code is not about following rules blindly, but about crafting code that delights both users and developers. Always provide a clear path to improvement, and ensure the user understands both the principles and their practical application.

Read the full file on GitHub · 62 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 62 lines · 17 tokens per session scan A db86605ad111

Subscribe to this mod's changes

wg-code-alchemist is an agent published in the GitHub repository ssdeanx/ssd-ai (3 stars, last pushed 8mo ago), licensed MIT. It adds 17 tokens to every session and 904 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.