一键导入
clean-code
This skill embodies the principles of "Clean Code" by Robert C. Martin (Uncle Bob). Use it to transform "code that works" into "code that is clean."
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
This skill embodies the principles of "Clean Code" by Robert C. Martin (Uncle Bob). Use it to transform "code that works" into "code that is clean."
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Implement advanced Symfony 8.1 components: async/queues with Messenger (#[AsMessageHandler], transports, retry, failed messages), Serializer (serialize/deserialize, groups, context), Workflow & state machines (places/transitions, guards, transition listeners), Mercure realtime updates, Lock (mutexes/critical sections), HTTP Client (HttpClientInterface), Cache pools (CacheInterface, tags), Rate Limiter (RateLimiterFactoryInterface), Scheduler (#[AsSchedule], RecurringMessage), and Webhook/RemoteEvent consumers. Use whenever a task mentions queues, background jobs, async processing, message bus, serialization to JSON, state machines, realtime/SSE, distributed locks, calling external APIs, caching, throttling/rate limiting, cron/recurring tasks, or incoming webhooks.
Use for ANY Symfony AI task: integrating LLMs/AI into a Symfony or PHP app via the Symfony AI components. Covers the Platform component (unified interface to OpenAI, Anthropic Claude, Google Gemini, Azure, Mistral, Ollama), building an AI Agent, tool calling with the #[AsTool] attribute, Retrieval Augmented Generation (RAG) with a vector Store and embeddings, the Chat component and conversation memory, configuring everything through the AI Bundle YAML (config/packages/ai.yaml), and exposing or consuming an MCP server (MCP Bundle / Mate). Trigger on symfony/ai, ai-bundle, AsTool, MessageBag, vectorizer, SimilaritySearch, McpTool, or any "add AI/chatbot/embeddings/RAG to Symfony".
Build and wire the core architecture of a Symfony 8.1 app. Use this whenever you work with the service container, dependency injection, autowiring, service tags, factories, service decoration, the event dispatcher (listeners/subscribers), bundles, the kernel, or app configuration (config/packages, environment variables, secrets, parameters). Reach for this skill before creating a service class, injecting a dependency, hooking into a kernel event, or editing config.
Use when building Symfony 8.1 web pages and features: creating routes, controllers, Twig templates, Doctrine entities and CRUD, forms, and validation. Reach for this skill whenever you create a page, wire a URL to a controller, render HTML with Twig, persist or query data with Doctrine entities/repositories, build a Symfony form, or add validation constraints.
Use for Symfony 8.1 deployment, production configuration, and operations. Covers deploying (APP_ENV=prod, composer install --no-dev --optimize-autoloader, cache:clear/warmup, dump-env), performance tuning (OPcache, realpath cache, preloading, container single-file, classmap-authoritative), HTTP caching (Cache-Control, Expires, ETag, Last-Modified, Vary, reverse proxy, invalidation/PURGE), profiler and debugging, logging with Monolog (handlers, channels, fingers_crossed), testing with PHPUnit (WebTestCase, KernelTestCase, assertions, database), and Symfony best practices. Trigger whenever a task mentions deploy, prod env, opcache, performance, HTTP cache, reverse proxy, profiler, Monolog/logs, PHPUnit tests, or production hardening of a Symfony app.
Use for ALL Symfony 8.1 security work: authentication and authorization, login (form_login, json_login, http_basic, login link), firewalls and security.yaml, user providers, roles and role_hierarchy, password hashing, access control (access_control, #[IsGranted], denyAccessUnlessGranted), voters, CSRF protection, logout, and custom authenticators. Trigger whenever a task mentions login, secure a route, protect an endpoint, roles, permissions, hashing passwords, who can access, firewall, or security.yaml.
| name | clean-code |
| description | This skill embodies the principles of "Clean Code" by Robert C. Martin (Uncle Bob). Use it to transform "code that works" into "code that is clean." |
| risk | safe |
| source | ClawForge (https://github.com/jackjin1997/ClawForge) |
| date_added | 2026-02-27 |
This skill embodies the principles of "Clean Code" by Robert C. Martin (Uncle Bob). Use it to transform "code that works" into "code that is clean."
"Code is clean if it can be read, and enhanced by a developer other than its original author." — Grady Booch
Use this skill when:
elapsedTimeInDays instead of d.accountList if it's actually a Map.ProductData vs ProductInfo.genymdhms.Customer, WikiPage). Avoid Manager, Data.postPayment, deletePage).isPasswordValid is better than check.# Check if employee is eligible for full benefits
if employee.flags & HOURLY and employee.age > 65:
vs
if employee.isEligibleForFullBenefits():
a.getB().getC().doSomething().NullPointerException.