Skip to content
Agent Orchestration
Skill

/clean-code

The Foundation Skill. LLM Firewall + 2025 Security + Cross-Skill Coordination. Use for ALL code output - prevents hallucinations, enforces security, ensures quality.

From plugin
maestro
22812 skills1 agent1 command7 hooks
+1

Claude Code

$ npx -y skills add xenitv1/claude-code-maestro --skill clean-code --agent claude-code

SKILL.md

clean-code.SKILL.md
name: clean-code
description: The Foundation Skill. LLM Firewall + 2025 Security + Cross-Skill Coordination. Use for ALL code output - prevents hallucinations, enforces security, ensures quality.

<domain_overview>

๐Ÿ›ก๏ธ CLEAN CODE: THE FOUNDATION

> **Philosophy:** This skill is the FOUNDATION - it applies to ALL other skills. Every piece of code must pass these gates. **ALGORITHMIC ELEGANCE MANDATE (CRITICAL):** Never prioritize "clever" code over readable, intent-revealing engineering. AI-generated code often fails by introducing unnecessary abstractions or using vague naming conventions that obscure logic. You MUST use intent-revealing names for every variable and function. Any implementation that increases cognitive complexity without a proportional gain in performance or scalability must be rejected. Avoid "Hype-Driven Development"โ€”proven patterns trump trending but unstable frameworks. </domain_overview> <iron_laws>

๐Ÿšจ IRON LAWS

1. NO HALLUCINATED PACKAGES - Verify before import
2. NO LAZY PLACEHOLDERS - Code must be runnable
3. NO SECURITY SHORTCUTS - Production-ready defaults
4. NO OVER-ENGINEERING - Simplest solution first

</iron_laws> <security_protocols>

๐Ÿ“ฆ PROTOCOL 1: SUPPLY CHAIN SECURITY

LLMs hallucinate packages that sound real but don't exist. 1. **Verify before import** - `npm search` or `pip show` for unfamiliar packages 2. **Prefer battle-tested** - lodash, date-fns, zod over obscure alternatives 3. **Check npm audit / pip-audit** before adding new dependencies 4. **Pin versions** in production - no `^` or `~` for critical deps **2025 AI Package Risks:**

  • Never import AI "wrapper" libraries without verification
  • LLM SDKs: Use official only (openai, anthropic, google-generativeai)
  • Vector DBs: Stick to established (pinecone, weaviate, chromadb)

๐Ÿ” PROTOCOL 2: SECURITY-FIRST DEFAULTS

**Frontend Security:** | Forbidden | Required | |-----------|----------| | `dangerouslySetInnerHTML` | DOMPurify sanitization | | Inline event handlers | Event delegation | | `eval()`, `new Function()` | Static code only | | Storing tokens in localStorage | httpOnly cookies | **Backend Security:** | Forbidden | Required | |-----------|----------| | `CORS: *` | Explicit origin whitelist | | Raw SQL strings | Parameterized queries | | `chmod 777` | Principle of least privilege | | Hardcoded secrets | Environment variables + validation | **API Security (2025):**

  • Rate limiting on ALL public endpoints
  • Input validation at the gate (Zod/Pydantic)
  • Output sanitization for AI-generated content
  • PASETO > JWT for new projects

</security_protocols> <modularity_and_placeholder_rules>

๐Ÿ—๏ธ PROTOCOL 3: NO LAZY PLACEHOLDERS

**Forbidden Patterns:**

// โŒ BANNED
// TODO: Implement this
// ... logic goes here
function placeholder() { }
throw new Error('Not implemented');

**Required:**

  • Every function must be runnable
  • If too complex, break into smaller complete functions
  • "Hurry" is not an excuse - write minimal viable implementation

๐Ÿ“ PROTOCOL 4: MODULARITY & STRUCTURE

**The 50/300 Rule:**

  • Functions > 50 lines โ†’ Break down
  • Files > 300 lines โ†’ Split into modules

**SOLID Principles:** | Principle | Quick Check | |-----------|-------------| | **S**ingle Responsibility | Does this do ONE thing? | | **O**pen/Closed | Can I extend without modifying? | | **L**iskov Substitution | Can subtypes replace parent? | | **I**nterface Segregation | Are interfaces minimal? | | **D**ependency Inversion | Do I depend on abstractions? | </modularity_and_placeholder_rules> <complexity_and_dependencies>

๐ŸŽฏ PROTOCOL 5: COMPLEXITY CAP

**Native First:**

// โŒ Don't install is-odd
npm install is-odd
// โœ… Use native
const isOdd = n => n % 2 !== 0;

**Anti-Patterns:**

  • AbstractFactoryBuilderManager for simple functions
  • 10 layers of abstraction for CRUD
  • "Future-proofing" for requirements that don't exist

**YAGNI:** You Aren't Gonna Need It. Build for today's requirements.

๐Ÿ”„ PROTOCOL 6: DEPENDENCY HYGIENE

**Freshness Check:**

npm outdated      # Check for updates
npm audit         # Check for vulnerabilities

**The CVE Brake:**

  • "Latest" is not always "Safest"
  • If latest has Critical CVE โ†’ Rollback to last secure version
  • Security > New Features

**2025 Recommended:** | Category | Recommended | |----------|-------------| | Validation | zod, valibot | | HTTP | ky, ofetch | | State | zustand, jotai | | ORM | drizzle, prisma | | Auth | lucia, better-auth | </complexity_and_dependencies> <ai_era_protocols>

๐Ÿค– PROTOCOL 7: AI-ERA CONSIDERATIONS

**When Building AI Features:** 1. **Validate AI outputs** - Never trust raw LLM responses 2. **Rate limit AI calls** - Prevent cost explosions 3. **Sanitize before display** - AI can generate malicious content 4. **Log AI interactions** - For debugging and compliance **When AI is Writing Code:** 1. **Verify imports exist** - AI hallucinates packages 2. **Check types are correct** - AI guesses at APIs 3. **Test edge cases** - AI misses boundary conditions 4. **Review security** - AI takes shortcuts </ai_era_protocols> <audit_and_reference>

โœ… QUICK AUDIT CHECKLIST

Before committing ANY code:

  • [ ] No hallucinated imports (verified packages exist)
  • [ ] No security shortcuts (CORS, eval, hardcoded secrets)
  • [ ] No lazy placeholders (// TODO, empty functions)
  • [ ] Functions < 50 lines, files < 300 lines
  • [ ] Dependencies audited (`npm audit` clean)
  • [ ] Types are strict (no `any`)

---

๐Ÿ”— CROSS-SKILL INTEGRATION

| When Using... | Clean Code Adds... | |---------------|-------------------| | `@frontend-design` | Security defaults, no eval, CSP awareness | | `@backend-design` | Input validation, no raw SQL, Zero Trust | | `@tdd-mastery` | No placeholders (tests enforce completeness) | | `@planning-mastery` | Modularity guides task breakdown | | `@brainstorming` | SOLID/YAGNI guide architecture decisions | | `@debug-mastery` | Logging standards, no silent failures | </audit_and_reference>

Read more
@xenitv1
Ships withmaestro

Elite-tier orchestration framework for Claude Code CLI. Supercharges AI development through specialized agents, modular skills, intelligent hooks, and persistent memory systems. Author: xenitV1 โ€ข X/Twitter Philosophy: "Why over How.

22812 skills1 agent1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
228
Star history of xenitv1/claude-code-maestro on GitHub, a chart by star-history.com

Other skills on maestro.

backend-design

backend-design

Elite Tier Backend standards, including Vertical Slice Architecture, Zero Trust Security, and High-Performance API protocols.

@xenitv1@xenitv1Install Skill
brainstorming

brainstorming

Design-first methodology. Explore user intent, requirements and design before implementation. Turn ideas into fully formed specsโ€ฆ

@xenitv1@xenitv1Install Skill
browser-extension

browser-extension

Master specialized skill for building 2025/2026-grade browser extensions. Deep expertise in Manifest v3, Service Workerโ€ฆ

@xenitv1@xenitv1Install Skill
debug-mastery

debug-mastery

Systematic debugging methodology with 4-phase process, root cause tracing, and elite observability standards. No fixes withoutโ€ฆ

@xenitv1@xenitv1Install Skill
frontend-design

frontend-design

Elite Tier Web UI standards, including pixel-perfect retro aesthetics, immersive layouts, and UX psychology protocols.

@xenitv1@xenitv1Install Skill
git-worktrees

git-worktrees

Create isolated git workspaces for feature development. Smart directory selection, safety verification, and cross-platformโ€ฆ

@xenitv1@xenitv1Install Skill

More skills from other plugins.

1password

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

openclaw10d395k
@steipete@steipeteInstall Skill
jira-tickets

jira-tickets

Read and update Jira tickets through Orca's saved Jira connections. Use when a task comes from Jira or the user asks for Jiraโ€ฆ

orca8d128k
@stablyai@stablyaiInstall Skill
agentmail

agentmail

Use your assigned AgentMail inbox to read email tasks, explicitly send or reply, and check delivery. Provided automatically byโ€ฆ

paperclip9d114k
@paperclipai@paperclipaiInstall Skill
adr-create

adr-create

Create a new Architecture Decision Record with sequential numbering and AgentDB registration

@ruvnet@ruvnetInstall Skill

Questions about clean-code.

Which coding agents can use clean-code?
clean-code installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.