google-agents-cli-scaffold
Project scaffolding, deployment configuration, and CI/CD setup for Google ADK agents.
acc-create-psr16-simple-cache
Generates PSR-16 Simple Cache implementation for PHP 8.5. Creates CacheInterface with get/set/delete operations and TTL handling. Includes unit tests.
Full skill instructions
Generates PSR-16 compliant simple cache implementations for basic caching needs.
<?php
declare(strict_types=1);
namespace App\Infrastructure\Cache;
use DateInterval;
use DateTimeImmutable;
use Psr\SimpleCache\CacheInterface;
final class ArrayCache implements CacheInterface
{
/** @var array<string, array{value: mixed, expiration: ?int}> */
private array $cache = [];
public function get(string $key, mixed $default = null): mixed
{
$this->validateKey($key);
if (!isset($this->cache[$key])) {
return $default;
}
$item = $this->cache[$key];
if ($item['expiration'] !== null && $item['expiration'] < time()) {
unset($this->cache[$key]);
return $default;
}
return $item['value'];
}
public function set(string $key, mixed $value, null|int|DateInterval $ttl = null): bool
{
$this->validateKey($key);
$expiration = $this->calculateExpiration($ttl);
$this->cache[$key] = [
'value' => $value,
'expiration' => $expiration,
];
return true;
}
public function delete(string $key): bool
{
$this->validateKey($key);
unset($this->cache[$key]);
return true;
}
public function clear(): bool
{
$this->cache = [];
return true;
}
public function getMultiple(iterable $keys, mixed $default = null): iterable
{
$result = [];
foreach ($keys as $key) {
$result[$key] = $this->get($key, $default);
}
return $result;
}
public function setMultiple(iterable $values, null|int|DateInterval $ttl = null): bool
{
foreach ($values as $key => $value) {
$this->set($key, $value, $ttl);
}
return true;
}
public function deleteMultiple(iterable $keys): bool
{
foreach ($keys as $key) {
$this->delete($key);
}
return true;
}
public function has(string $key): bool
{
return $this->get($key, $this) !== $this;
}
private function calculateExpiration(null|int|DateInterval $ttl): ?int
{
if ($ttl === null) {
return null;
}
if ($ttl instanceof DateInterval) {
return (new DateTimeImmutable())->add($ttl)->getTimestamp();
}
return time() + $ttl;
}
private function validateKey(string $key): void
{
if ($key === '' || preg_match('/[{}()\/\\\\@:]/', $key)) {
throw new InvalidArgumentException("Invalid cache key: {$key}");
}
}
}
<?php
declare(strict_types=1);
namespace App\Infrastructure\Cache;
use DateInterval;
use DateTimeImmutable;
use Psr\SimpleCache\CacheInterface;
use Redis;
final readonly class RedisCache implements CacheInterface
{
public function __construct(
private Redis $redis,
private string $prefix = 'cache:',
) {
}
public function get(string $key, mixed $default = null): mixed
{
$value = $this->redis->get($this->prefix . $key);
if ($value === false) {
return $default;
}
return unserialize($value);
}
public function set(string $key, mixed $value, null|int|DateInterval $ttl = null): bool
{
$serialized = serialize($value);
$fullKey = $this->prefix . $key;
if ($ttl === null) {
return $this->redis->set($fullKey, $serialized);
}
$seconds = $ttl instanceof DateInterval
? (new DateTimeImmutable())->add($ttl)->getTimestamp() - time()
: $ttl;
return $this->redis->setex($fullKey, $seconds, $serialized);
}
public function delete(string $key): bool
{
return $this->redis->del($this->prefix . $key) > 0;
}
public function clear(): bool
{
$keys = $this->redis->keys($this->prefix . '*');
if (!empty($keys)) {
$this->redis->del($keys);
}
return true;
}
public function getMultiple(iterable $keys, mixed $default = null): iterable
{
$result = [];
foreach ($keys as $key) {
$result[$key] = $this->get($key, $default);
}
return $result;
}
public function setMultiple(iterable $values, null|int|DateInterval $ttl = null): bool
{
foreach ($values as $key => $value) {
$this->set($key, $value, $ttl);
}
return true;
}
public function deleteMultiple(iterable $keys): bool
{
foreach ($keys as $key) {
$this->delete($key);
}
return true;
}
public function has(string $key): bool
{
return $this->redis->exists($this->prefix . $key) > 0;
}
}
<?php
declare(strict_types=1);
namespace App\Infrastructure\Cache;
use Psr\SimpleCache\CacheException as PsrCacheException;
use Psr\SimpleCache\InvalidArgumentException as PsrInvalidArgumentException;
final class CacheException extends \RuntimeException implements PsrCacheException
{
}
final class InvalidArgumentException extends \InvalidArgumentException implements PsrInvalidArgumentException
{
}
<?php
use App\Infrastructure\Cache\RedisCache;
$cache = new RedisCache($redis);
// Simple operations
$cache->set('user:123', $userData, 3600);
$user = $cache->get('user:123');
// Check existence
if ($cache->has('user:123')) {
$cache->delete('user:123');
}
// Multiple operations
$cache->setMultiple([
'config:app' => $appConfig,
'config:db' => $dbConfig,
], 86400);
$configs = $cache->getMultiple(['config:app', 'config:db']);
{
"require": {
"psr/simple-cache": "^3.0"
}
}
Project 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.