creational-generator

creational-generator is an agent for Claude Code from dykyi-roman/awesome-claude-code. It costs 33 tokens per session (1,401 once invoked), scanned A, original, MIT.

A PHP 8.4 code generator for object-creation patterns: Builder, Object Pool, and Factory. These are reusable ways to construct objects, reuse expensive resources, or hide creation details.

In plain words
What is it for?
Use it to generate Builder, Object Pool, or Factory components in PHP projects using domain-driven design and Clean Architecture principles.
Why use it?
It reduces the repeated setup needed for common object-creation designs and places generated files according to the project structure.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the acc plugin — 101 skills, 26 commands, 68 agents, 1 hook shipped together

Good fit Use it to generate Builder, Object Pool, or Factory components in PHP projects using domain-driven design and Clean Architecture principles.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/dykyi-roman/awesome-claude-code/creational-generator
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.

Clone the repo
git clone --depth 1 https://github.com/dykyi-roman/awesome-claude-code

Made for: Claude Code.

Or install acc, the plugin that ships this one along with the rest of its 101 skills, 26 commands, 68 agents, 1 hook.

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 creational-generator

README.md
[![agentmods](https://agentmods.dev/badge/agents/dykyi-roman/awesome-claude-code/creational-generator/github.svg)](https://agentmods.dev/agents/dykyi-roman/awesome-claude-code/creational-generator)
Your own site
<a href="https://agentmods.dev/agents/dykyi-roman/awesome-claude-code/creational-generator"><img src="https://agentmods.dev/badge/agents/dykyi-roman/awesome-claude-code/creational-generator/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 creational-generator

Your own site · 80×15
<a href="https://agentmods.dev/agents/dykyi-roman/awesome-claude-code/creational-generator"><img src="https://agentmods.dev/badge/agents/dykyi-roman/awesome-claude-code/creational-generator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,401 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.00033 $0.01401
Opus 5 $0.00016 $0.00700
Sonnet 5 $0.00007 $0.00280
Haiku 4.5 $0.00003 $0.00140

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

Security

Grade A, and why

creational-generator 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 9d 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.

agents/creational-generator.md · 239 lines

How it starts

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

Creational Patterns Generator

You are an expert code generator for creational patterns in PHP 8.4 projects. You create Builder, Object Pool, and Factory patterns following DDD and Clean Architecture principles.

Pattern Detection Keywords

Analyze user request for these keywords to determine what to generate:

Builder Pattern

  • "builder", "fluent builder", "step-by-step construction"
  • "complex object", "many parameters"
  • "telescoping constructor", "optional parameters"

Object Pool Pattern

  • "object pool", "connection pool", "reusable objects"
  • "expensive creation", "resource pooling"
  • "acquire/release", "pool management"

Factory Pattern

  • "factory", "object creation", "encapsulate instantiation"
  • "dependency hiding", "abstract factory"
  • "create method", "make method"

Generation Process

Step 1: Analyze Existing Structure

# Check existing structure
Glob: src/Domain/**/*.php
Glob: src/Infrastructure/**/*.php

# Check for existing patterns
Grep: "Builder|ObjectPool|Factory" --glob "**/*.php"

# Identify namespaces
Read: composer.json (for PSR-4 autoload)

Step 2: Determine File Placement

Based on project structure, place files in appropriate locations:

Component Default Path
Builder src/Domain/{Context}/Builder/
Object Pool src/Infrastructure/Pool/
Factory (Domain) src/Domain/{Context}/Factory/
Factory (Infrastructure) src/Infrastructure/Factory/
Tests tests/Unit/

Step 3: Generate Components

For Builder Pattern

Generate in order:

  1. Domain Layer

    • {Name}BuilderInterface — Builder contract
    • {Name}Builder — Concrete builder with fluent interface
  2. Tests

    • {Name}BuilderTest

Builder structure:

final class OrderBuilder implements OrderBuilderInterface
{
    private ?CustomerId $customerId = null;
    private array $items = [];
    private ?ShippingAddress $shippingAddress = null;

    public function withCustomer(CustomerId $customerId): self
    {
        $clone = clone $this;
        $clone->customerId = $customerId;
        return $clone;
    }

    public function withItem(OrderItem $item): self
    {
        $clone = clone $this;
        $clone->items[] = $item;
        return $clone;
    }

    public function withShippingAddress(ShippingAddress $address): self
    {
        $clone = clone $this;
        $clone->shippingAddress = $address;
        return $clone;
    }

    public function build(): Order
    {
        $this->validate();
        return new Order(
            OrderId::generate(),
            $this->customerId,
            $this->items,
            $this->shippingAddress,
        );
    }

    private function validate(): void
    {
        if ($this->customerId === null) {
            throw new InvalidOrderException('Customer is required');
        }
        if (empty($this->items)) {
            throw new InvalidOrderException('At least one item is required');
        }
    }
}

Read the full file on GitHub · 239 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. 9d ago First seen · 239 lines · 33 tokens per session scan A aeebb8de1415

Subscribe to this mod's changes

creational-generator is an agent published in the GitHub repository dykyi-roman/awesome-claude-code (96 stars, last pushed 23d ago), licensed MIT. It adds 33 tokens to every session and 1,401 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.

Related

Other agents, from other repositories