software-design-patterns-and-refactoring

software-design-patterns-and-refactoring is a skill for Claude Code, Codex from xiaohei-info/oh-my-multica. It costs 38 tokens per session (1,193 once invoked), scanned A, original, MIT.

A practical guide to choosing structural design patterns before coding and cleaning up code after it becomes difficult to change. Design patterns are reusable ways to organize collaboration; refactoring is changing code structure without changing what it does.

In plain words
What is it for?
Use it when planning class or module relationships, reviewing repeated structures or code smells, making code easier to extend or test, and deciding whether a pattern or refactoring is appropriate.
Why use it?
It helps distinguish a real structural problem from an urge to add abstractions. It connects early design choices with later code cleanup and keeps both focused on clear responsibilities.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when planning class or module relationships, reviewing repeated structures or code smells, making code easier to extend or test, and deciding whether a pattern or refactoring is appropriate.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xiaohei-info/oh-my-multica/software-design-patterns-and-refactoring
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.

Any agent
npx skills add xiaohei-info/oh-my-multica --skill software-design-patterns-and-refactoring
Clone the repo
git clone --depth 1 https://github.com/xiaohei-info/oh-my-multica

Made for: Claude Code, Codex.

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 software-design-patterns-and-refactoring

README.md
[![agentmods](https://agentmods.dev/badge/skills/xiaohei-info/oh-my-multica/software-design-patterns-and-refactoring/github.svg)](https://agentmods.dev/skills/xiaohei-info/oh-my-multica/software-design-patterns-and-refactoring)
Your own site
<a href="https://agentmods.dev/skills/xiaohei-info/oh-my-multica/software-design-patterns-and-refactoring"><img src="https://agentmods.dev/badge/skills/xiaohei-info/oh-my-multica/software-design-patterns-and-refactoring/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for software-design-patterns-and-refactoring

Your own site · 80×15
<a href="https://agentmods.dev/skills/xiaohei-info/oh-my-multica/software-design-patterns-and-refactoring"><img src="https://agentmods.dev/badge/skills/xiaohei-info/oh-my-multica/software-design-patterns-and-refactoring.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,193 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00038 $0.01193
Opus 5 $0.00019 $0.00596
Sonnet 5 $0.00008 $0.00239
Haiku 4.5 $0.00004 $0.00119

Measured 11d ago against content hash daf84c91f126, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

software-design-patterns-and-refactoring 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 11d 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.

src/omac/agents/architect/skills/software-design-patterns-and-refactoring/SKILL.md · 150 lines

How it starts

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

Design Patterns and Refactoring

Overview

This skill captures one practical truth: design-pattern thinking is useful before coding, and refactoring thinking is useful after coding — but both can improve the structure of the system when used with restraint.

Its purpose is not to dump a giant catalog of pattern names. Its purpose is to help decide:

  • when a structural problem exists before coding
  • which pattern family is worth considering
  • when code smells indicate refactoring pressure
  • how to improve structure without turning the code into abstraction theater

Core principle: patterns are design tools, refactoring is structure repair, and both should serve clarity of responsibility rather than decorative cleverness.

When to Use

Use when:

  • the team is deciding a class/module collaboration structure before coding
  • code review reveals repeated structure problems or code smells
  • a change is easier to express as a structural pattern decision than as ad hoc branching
  • implementation is becoming hard to extend, test, or reason about
  • you need one practical bridge between pre-code design and post-code cleanup

Do not use when:

  • the problem is fundamentally domain-boundary or system-architecture design
  • the task is a trivial code change with no structural pressure
  • the user only wants pattern definitions without design judgment
  • the code is so small that introducing indirection would only make it worse

Two Main Uses

1. Before-code structural guidance

Use pattern thinking before coding to ask:

  • where is variation expected?
  • where is behavior currently likely to branch or sprawl?
  • where should dependencies be inverted?
  • where is composition better than inheritance?
  • where should responsibilities be separated instead of packed together?

Typical outputs:

  • candidate pattern family
  • reason for the pattern choice
  • explicit note on what complexity it removes
  • explicit note on what extra indirection it introduces

2. Post-code refactoring guidance

Read the full file on GitHub · 150 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. 11d ago First seen · 150 lines · 38 tokens per session scan A daf84c91f126

Subscribe to this mod's changes

software-design-patterns-and-refactoring is a skill published in the GitHub repository xiaohei-info/oh-my-multica (26 stars, last pushed 3d ago), licensed MIT. It adds 38 tokens to every session and 1,193 once invoked, about $0.0002 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-30.