design-patterns

design-patterns is a skill for Claude Code from piomin/claude-ai-spring-boot. It costs 56 tokens per session (3,143 once invoked), scanned A, original, Apache-2.0.

A Java reference guide for choosing common design patterns—reusable ways to structure code for recurring problems such as object creation, changing behavior, and connecting incompatible parts.

In plain words
What is it for?
Use it when implementing or selecting Java Factory, Builder, Strategy, Observer, Decorator, or Adapter patterns, or when designing components that should be easier to extend.
Why use it?
It helps you choose a suitable structure when code is rigid, has many construction options, or needs behavior that can change. The examples make the trade-offs easier to understand before refactoring.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the spring-boot-template plugin — 8 skills, 6 agents shipped together

Good fit Use it when implementing or selecting Java Factory, Builder, Strategy, Observer, Decorator, or Adapter patterns, or when designing components that should be easier to extend.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/piomin/claude-ai-spring-boot/design-patterns
About the project

piomin/claude-ai-spring-boot is a starter template for creating Spring Boot applications with Claude Code. Developers clone it as a structured foundation when using Claude Code to generate Spring Boot projects.

piomin/claude-ai-spring-boot · 1,427 stars · on GitHub

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 piomin/claude-ai-spring-boot --skill design-patterns
Clone the repo
git clone --depth 1 https://github.com/piomin/claude-ai-spring-boot

Made for: Claude Code.

Or install spring-boot-template, the plugin that ships this one along with the rest of its 8 skills, 6 agents.

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 design-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/piomin/claude-ai-spring-boot/design-patterns/github.svg)](https://agentmods.dev/skills/piomin/claude-ai-spring-boot/design-patterns)
Your own site
<a href="https://agentmods.dev/skills/piomin/claude-ai-spring-boot/design-patterns"><img src="https://agentmods.dev/badge/skills/piomin/claude-ai-spring-boot/design-patterns/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 design-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/piomin/claude-ai-spring-boot/design-patterns"><img src="https://agentmods.dev/badge/skills/piomin/claude-ai-spring-boot/design-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,143 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.00056 $0.03143
Opus 5.5 $0.00022 $0.01257
Sonnet 5.5 $0.00011 $0.00629
Haiku 4.5 $0.00006 $0.00314

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

Security

Grade A, and why

design-patterns 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 7d 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.

skills/design-patterns/SKILL.md · 542 lines

How it starts

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

Design Patterns Skill

Quick reference for common design patterns in Java.

When to Use

  • User asks to implement a specific pattern
  • Designing extensible/flexible components
  • Refactoring rigid code

Quick Reference: When to Use What

Problem Pattern Use When
Complex object construction Builder Many parameters, some optional
Create objects without specifying class Factory Type determined at runtime
Multiple algorithms, swap at runtime Strategy Behavior varies by context
Add behavior without changing class Decorator Dynamic composition needed
Notify multiple objects of changes Observer One-to-many dependency
Convert incompatible interfaces Adapter Integrate legacy/3rd party code
DB update + event publish atomically Outbox Dual-write problem in microservices
Distributed transaction across services Saga Multi-service business process
Separate read/write models CQRS Heavy read/write ratio skew

Creational Patterns

Builder

Problem: Telescoping constructors, many optional parameters

// ✅ Builder pattern
public class User {
    private final String name;  // required
    private final String email; // required
    private final int age;      // optional

    private User(Builder builder) {
        this.name = builder.name;
        this.email = builder.email;
        this.age = builder.age;
    }

    public static Builder builder(String name, String email) {
        return new Builder(name, email);
    }

    public static class Builder {
        private final String name;
        private final String email;
        private int age = 0;

        private Builder(String name, String email) {
            this.name = name;
            this.email = email;
        }

        public Builder age(int age) {
            this.age = age;
            return this;
        }

        public User build() {
            return new User(this);
        }
    }
}

// Usage
User user = User.builder("John", "[email protected]")
    .age(30)
    .build();

Read the full file on GitHub · 542 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. 7d ago Changed · +252 lines · +9 tokens per session d069be000ce8
  2. 1mo ago First seen · 290 lines · 47 tokens per session scan A f0114046c07f

Subscribe to this mod's changes

design-patterns is a skill published in the GitHub repository piomin/claude-ai-spring-boot (1,427 stars, last pushed 2d ago), licensed Apache-2.0. It adds 56 tokens to every session and 3,143 once invoked, about $0.0002 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-30.

Related

Other skills, from other repositories

geoserver-cloud

Use when deploying GeoServer Cloud 3.0.2 on Docker Compose or Kubernetes — gateway serving WMS/WFS/WCS/WPS/GWC microservices under /geoserver/cloud, PgConfig vs datadir backends, RabbitMQ config-bus sync, Helm chart geoservercloud 3.0.2, and diagnosing 502s via actuator/health and Consul registration.

znlgis/opengis-skills · 86 tokens

Docker Testcontainers

Integration testing with real dependencies in throwaway Docker containers using the Testcontainers Node.js API - GenericContainer, exposed ports, wait strategies, module containers, Docker Compose environments, and reliable cleanup.

PramodDutta/qaskills · 42 tokens

java-fast-skill

A beginner-friendly Java learning guide that answers questions about core Java topics such as types, syntax, classes, collections, errors, files, threads, generics, and lambdas.

jiushiwon/wg-skills · 155 tokens

context-service-guide

Navigate and understand any legacy cpp-context- WildFly/Maven service. LEGACY ONLY — must not be applied to new Spring Boot work. Use when onboarding to a context service, exploring its modules, or understanding its CQRS structure and integrations.

hmcts/agentic-plugins-marketplace · 53 tokens

core-builder

"implement core feature ", "build the core feature", "next core feature", "next core", "continue building core", "core-builder" — this skill implements a specific feature from a core-blueprint outline (requires core-outline.md in the project). Generates working simplified Java source code, unit/integration tests, and…

nlinhvu/learn-java-frameworks-marketplace · 120 tokens

automotive-examples-code

Production-ready automotive code examples from automotive-claude-code-agents. Includes BMS ECU firmware (C), ADAS perception pipeline (Python), battery thermal modeling, network topologies, multi-region cloud deployment (Terraform/K8s), and automotive protocol demos. Use when the user wants real working code for…

pangzhenying2025/hermes-automotive-skills · 80 tokens