google-agents-cli-scaffold
Project scaffolding, deployment configuration, and CI/CD setup for Google ADK agents.
acc-create-chain-of-responsibility
Generates Chain of Responsibility pattern for PHP 8.5. Creates handler chains for request processing with middleware-style composition. Includes unit tests.
Full skill instructions
Creates Chain of Responsibility pattern infrastructure for sequential request processing.
| Scenario | Example |
|---|---|
| Multiple processors | Validation, discounts, approvals |
| Unknown handlers | Plugin systems |
| Priority processing | First match wins |
| Middleware | HTTP pipeline, logging |
Path: src/Domain/{BoundedContext}/Handler/
{Name}HandlerInterface.php — Handler contract with setNext and handle methodsPath: src/Domain/{BoundedContext}/Handler/
Abstract{Name}Handler.php — Base class with chain linking logicPath: src/Domain/{BoundedContext}/Handler/
{Specific}{Name}Handler.php — Specific handler implementationsPath: src/Domain/{BoundedContext}/Handler/
{Name}ChainBuilder.php — Fluent builder for chain construction{Handler}Test.php — Individual handler tests{Name}ChainTest.php — Chain integration tests| Component | Path |
|---|---|
| Handler Interface | src/Domain/{BoundedContext}/Handler/ |
| Abstract Handler | src/Domain/{BoundedContext}/Handler/ |
| Concrete Handlers | src/Domain/{BoundedContext}/Handler/ |
| Chain Builder | src/Domain/{BoundedContext}/Handler/ |
| Pipeline | src/Application/Pipeline/ |
| Unit Tests | tests/Unit/Domain/{BoundedContext}/Handler/ |
| Component | Pattern | Example |
|---|---|---|
| Interface | {Name}HandlerInterface | ValidationHandlerInterface |
| Abstract | Abstract{Name}Handler | AbstractValidationHandler |
| Concrete | {Specific}{Name}Handler | EmailValidationHandler |
| Builder | {Name}ChainBuilder | ValidationChainBuilder |
| Test | {ClassName}Test | EmailValidationHandlerTest |
interface {Name}HandlerInterface
{
public function setNext(self $handler): self;
public function handle({RequestType} $request): {ResultType};
}
abstract class Abstract{Name}Handler implements {Name}HandlerInterface
{
private ?{Name}HandlerInterface $next = null;
public function setNext({Name}HandlerInterface $handler): {Name}HandlerInterface
{
$this->next = $handler;
return $handler;
}
public function handle({RequestType} $request): {ResultType}
{
if ($this->next !== null) {
return $this->next->handle($request);
}
return $this->getDefaultResult();
}
abstract protected function getDefaultResult(): {ResultType};
}
final class {Specific}Handler extends Abstract{Name}Handler
{
public function handle({RequestType} $request): {ResultType}
{
if ($this->canHandle($request)) {
return $this->process($request);
}
return parent::handle($request);
}
private function canHandle({RequestType} $request): bool
{
return {condition};
}
}
final class {Name}ChainBuilder
{
private array $handlers = [];
public function add({Name}HandlerInterface $handler): self
{
$this->handlers[] = $handler;
return $this;
}
public function build(): {Name}HandlerInterface
{
$first = $this->handlers[0];
$current = $first;
for ($i = 1; $i < count($this->handlers); $i++) {
$current = $current->setNext($this->handlers[$i]);
}
return $first;
}
}
$chain = (new ValidationChainBuilder())
->add(new NotEmptyValidationHandler('email'))
->add(new EmailValidationHandler('email'))
->add(new MinLengthValidationHandler('password', 8))
->build();
$result = $chain->validate($request);
if ($result->hasErrors()) {
throw new ValidationException($result->getMessage());
}
$vipHandler = new VipDiscountHandler();
$promoHandler = new PromoCodeDiscountHandler($promoCodes);
$bulkHandler = new BulkDiscountHandler();
$vipHandler->setNext($promoHandler);
$promoHandler->setNext($bulkHandler);
$result = $vipHandler->apply($discountRequest);
| Anti-pattern | Problem | Solution |
|---|---|---|
| Circular Chain | Infinite loop | Validate chain structure |
| No Default | Unhandled requests | Provide fallback handler |
| Coupled Handlers | Hard to reorder | Use interface properly |
| Missing Builder | Manual chain assembly | Create ChainBuilder |
| State in Handler | Non-reentrant | Make handlers stateless |
For complete PHP templates and examples, see:
references/templates.md — Handler Interface, Abstract Handler, Concrete Handler, Chain Builder, Pipeline templatesreferences/examples.md — Validation Chain, Discount Chain examples and testsProject scaffolding, deployment configuration, and CI/CD setup for Google ADK agents.
Set up tracing, logging, and monitoring for deployed ADK agents across Cloud Trace, BigQuery, and third-party platforms.
Enterprise Azure infrastructure architect generating Bicep or Terraform from workload descriptions.
Plan and configure production-ready Azure Kubernetes Service clusters with Day-0 and Day-1 best practices.
Raw mechanical interfaces fusing Swiss typographic print with military terminal aesthetics. Rigid grids, extreme type scale contrast, utilitarian color, analog degradation effects. For data-heavy dashboards, portfolios, or editorial sites that need to feel like declassified blueprints.
Web search, scraping, extraction, crawling, and monitoring via ScrapeGraph AI CLI.
Skill for working with Firebase Hosting (Classic). Use this when you want to deploy static web apps, Single Page Apps (SPAs), or simple microservices. Do NOT use for Firebase App Hosting.
Deploy and manage web apps with Firebase App Hosting. Use this skill when deploying Next.js/Angular apps with backends.
Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".
Build SEO-optimized pages at scale using templates, data, and proven playbook patterns.
Design and build isolated, reusable Convex backend components with clear boundaries and app-facing wrappers.
Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".
Opus.ai: Revolutionize Your Web Experience
Build a no-code AI app in minutes.
An IDE for code migration from legacy to modern frameworks through coding agents.
Automate CGI animation in live-action scenes
Branded artistic QR-code concepts
Launch a website in seconds with AI.
Streamline Your Coding Experience with AI Code Helper
Convert any screenshot or design to clean code.