introduce-parameter-object

introduce-parameter-object is a skill for Claude Code from msbaek/msbaek-claude-plugins. It costs 111 tokens per session (2,768 once invoked), scanned A, original, MIT.

A refactoring method for replacing repeated groups of function parameters with one object, or passing an existing object instead of repeatedly taking values out of it.

In plain words
What is it for?
Use it when several methods receive the same related values, or when code passes separate fields that already belong to one object.
Why use it?
Repeated parameter groups make function calls longer and allow related values to become inconsistent.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the msbaek-tdd plugin — 28 skills, 10 agents, 2 hooks shipped together

Good fit Use it when several methods receive the same related values, or when code passes separate fields that already belong to one object.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/msbaek/msbaek-claude-plugins/introduce-parameter-object
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 msbaek/msbaek-claude-plugins --skill introduce-parameter-object
Clone the repo
git clone --depth 1 https://github.com/msbaek/msbaek-claude-plugins

Made for: Claude Code.

Or install msbaek-tdd, the plugin that ships this one along with the rest of its 28 skills, 10 agents, 2 hooks.

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 introduce-parameter-object

README.md
[![agentmods](https://agentmods.dev/badge/skills/msbaek/msbaek-claude-plugins/introduce-parameter-object/github.svg)](https://agentmods.dev/skills/msbaek/msbaek-claude-plugins/introduce-parameter-object)
Your own site
<a href="https://agentmods.dev/skills/msbaek/msbaek-claude-plugins/introduce-parameter-object"><img src="https://agentmods.dev/badge/skills/msbaek/msbaek-claude-plugins/introduce-parameter-object/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 introduce-parameter-object

Your own site · 80×15
<a href="https://agentmods.dev/skills/msbaek/msbaek-claude-plugins/introduce-parameter-object"><img src="https://agentmods.dev/badge/skills/msbaek/msbaek-claude-plugins/introduce-parameter-object.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 111 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,768 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.
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.00111 $0.02768
Opus 5.5 $0.00044 $0.01107
Sonnet 5.5 $0.00022 $0.00554
Haiku 4.5 $0.00011 $0.00277

Measured 1mo ago against content hash afdcf997e39c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

introduce-parameter-object 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 1mo 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.

msbaek-tdd/skills/introduce-parameter-object/SKILL.md · 294 lines

How it starts

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

Introduce Parameter Object / Preserve Whole Object

상황에 따라 두 가지 기법 중 적합한 것을 선택:

  • Introduce Parameter Object (IPO): 파라미터에 행위를 추가해야 할 때 → 새 객체 생성 → 행위 이동 → Value Object 발견
  • Preserve Whole Object (PWO): 기존 객체에서 값을 꺼내 전달할 때 → 객체 자체를 전달하여 파라미터 수 감소

GOAL

  • 성공 = 반복 파라미터가 IPO 또는 PWO로 정리되어 커밋 완료됨
  • IPO: 파라미터 그룹이 Parameter Object로 치환되고 관련 행위가 이동됨
  • PWO: 객체에서 꺼낸 값들이 객체 자체 전달로 대체됨
  • 사용자 확인 후 적용
  • 모든 테스트 통과

기법 선택 기준

상황 적용 기법 이유
파라미터들이 이미 하나의 객체에서 꺼내져 전달됨 Preserve Whole Object 객체가 이미 존재 — 꺼내지 말고 그대로 전달
파라미터에 대한 행위를 추가해야 하는 경우 Introduce Parameter Object 새 객체 생성 → 행위 이동 → Value Object 발견

IPO의 진짜 목적

"더 큰 혜택은 파라미터 그룹에 대해서 동작하는 행위들을 파라미터 객체로 이동시킬 수 있는 것" — Fowler, Ch10

IPO는 파라미터 묶기 자체가 목적이 아니라, Value Object를 발견하는 시작점:

Introduce Parameter Object
  → Move Instance Method (관련 로직을 Parameter Object로 이동)
    → Value Object 탄생 (데이터 + 행위를 가진 객체)

적용하면 안 되는 경우

상황 이유
파라미터 간에 논리적 관계가 없음 논리 관계 없이 그룹화하면 의미 없는 객체가 생성됨
한 메서드에서만 사용되는 파라미터 조합 반복이 없으면 추상화의 가치 없음
파라미터 객체에 이동할 행위가 없음 단순 DTO가 되어 Anemic Domain Model 유발 (이 경우 PWO가 더 적합할 수 있음)

CONSTRAINTS

  • 계열: System-wide — 후보 제시 후 승인 받고 적용 (../../references/refactoring-procedure.md §0·§3-B)

Hard Rules

  • 동작 변경 금지 — 구조 개선만 수행
  • 테스트 수정 금지 — 구조 변경이 테스트를 실패시키면 되돌리기
  • 사용자 확인 없이 리팩토링 금지 — 모든 후보는 사용자 승인 후 실행
  • 커밋 단위 — 1파일 x 1기법 = 1커밋 (논리적으로 연결된 파일은 함께)
  • git add -A 금지 — 변경된 파일만 명시적으로 추가

적용 패턴

Introduce Parameter Object 리팩토링 단계:

  1. 반복 파라미터 그룹 식별

    • 3개 이상의 파라미터가 함께 전달되는 패턴
    • 2곳 이상에서 동일한 파라미터 조합 반복
  2. Parameter Object 클래스 생성

    • 논리적으로 관련된 파라미터를 하나의 클래스로
    • record 또는 immutable class 사용 (Java 14+)
    • 의미 있는 이름 부여
  3. 메서드 시그니처 변경

    • 개별 파라미터를 Parameter Object로 치환
    • 호출자 코드 업데이트
  4. 관련 동작 이동 (선택적)

    • Parameter Object와 관련된 로직을 객체 내부로 이동
    • Value Object로 발전 가능

Before/After 예시

// Before: 반복되는 파라미터 그룹
public class PriceService {
    public void processPrice(int originalPrice, int discountedPrice, String currency) {
        // 처리 로직
        validatePrice(originalPrice, discountedPrice, currency);
        formatPrice(originalPrice, discountedPrice, currency);
    }
    
    private void validatePrice(int originalPrice, int discountedPrice, String currency) {
        if (originalPrice < 0 || discountedPrice < 0) {
            throw new IllegalArgumentException("Price cannot be negative");
        }
        if (discountedPrice > originalPrice) {
            throw new IllegalArgumentException("Discounted price cannot exceed original");
        }
    }
    
    private String formatPrice(int originalPrice, int discountedPrice, String currency) {
        double discount = (originalPrice - discountedPrice) * 100.0 / originalPrice;
        return String.format("%s %.0f%% off: %d -> %d", 
            currency, discount, originalPrice, discountedPrice);
    }
}

// After: Parameter Object 적용
record Price(int original, int discounted, String currency) {
    // 생성자에서 검증
    public Price {
        if (original < 0 || discounted < 0) {
            throw new IllegalArgumentException("Price cannot be negative");
        }
        if (discounted > original) {
            throw new IllegalArgumentException("Discounted price cannot exceed original");
        }
    }
    
    // 관련 동작을 객체 내부로 이동
    public double discountPercentage() {
        return (original - discounted) * 100.0 / original;
    }
    
    public String formatted() {
        return String.format("%s %.0f%% off: %d -> %d", 
            currency, discountPercentage(), original, discounted);
    }
}

public class PriceService {
    public void processPrice(Price price) {
        // Parameter Object 하나만 전달
        // 검증은 Price 생성자에서 자동 수행
        String formatted = price.formatted();
    }
}

Read the full file on GitHub · 294 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. 1mo ago Changed · +1 lines · +64 tokens per session afdcf997e39c
  2. 1mo ago Changed 92e228b4ce18
  3. 1mo ago First seen · 293 lines · 47 tokens per session scan A b645e699bff4

Subscribe to this mod's changes

introduce-parameter-object is a skill published in the GitHub repository msbaek/msbaek-claude-plugins (8 stars, last pushed 5d ago), licensed MIT. It adds 111 tokens to every session and 2,768 once invoked, about $0.0004 per session on Opus 5.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.

Related

Other skills, from other repositories

autoreview

Structured code review through the shared OpenClaw agent-skills installation.

openclaw/clawhub · 17 tokens

omh-code-review

This is an OMH code-review workflow skill, projected for Agent Skills hosts (Claude Code, Codex, Cursor, opencode, OpenClaw, pi).

rlaope/oh-my-hermes · 48 tokens

revdiff-plan

Review the last Codex assistant message (plan, analysis, or proposal) with inline annotations in a TUI overlay. Extracts the most recent response from Codex rollout files and opens it in revdiff for review and annotation. Activates on "revdiff-plan", "review plan with revdiff", "annotate plan", "review last response"…

umputun/revdiff · 84 tokens

asplos-writing-style

Use when drafting or revising ASPLOS prose — engineering the first two pages that rapid review actually reads, stating the cross-layer insight as one quotable sentence, structuring per-layer mechanism sections, writing bounded claims, and fitting everything into 11 self-contained pages that include figures and…

brycewang-stanford/Awesome-Journal-Skills · 65 tokens

explore-unknowns

Guide the user through a quadrant walk that maps the unknowns of a task — open by listing the known knowns, then work through known unknowns, unknown knowns, and unknown unknowns one stage at a time, ending with a complete four-quadrant map in the user's hands. Use when a request is ambiguous or underspecified, the…

dzhng/skills · 162 tokens

re0-merge

Review and land an external contribution the way this suite does: gate it against the thesis, land it with the author's credit intact, complete a new skill rather than merging it raw, then approve, credit, and explain before closing. Use when reviewing a pull request, as any collaborator or maintainer, not only the…

LilMGenius/paperthin · 70 tokens