Enforces type-safety rules (TYPE-1 through TYPE-6). Loaded by the conductor for write and review operations. Blocks use of escape-hatch types, unsafe assertions, and missing exhaustive pattern matching. Loads references/{language}.md for language-specific tooling and rule applicability.
From clean-code-codexnpx claudepluginhub mikecubed/agent-orchestration --plugin clean-code-codexThis skill uses the workspace's default tool permissions.
references/go.mdreferences/javascript.mdreferences/python.mdreferences/rust.mdreferences/typescript.mdGuides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Analyzes BMad project state from catalog CSV, configs, artifacts, and query to recommend next skills or answer questions. Useful for help requests, 'what next', or starting BMad.
First action: Load references/{language}.md for the detected language to
get language-specific tooling, rule applicability, and idioms before checking.
Precedence in the overall system: SEC → TDD → ARCH/TYPE → quality BLOCK.
Severity: BLOCK | Languages: typescript, python, go, javascript | Source: CCC
What it prohibits: Use of any (TypeScript/JavaScript), Any (Python
typing), interface{} / any (Go), JavaScript JSDoc wildcard escape hatches
like @type {*} / @param {*} / @returns {*}, or untyped parameters that
bypass the type system without a runtime guard.
Language applicability: See references/{language}.md.
Rust ownership model supersedes this rule — see references/rust.md.
agent_action:
references/{language}.md — e.g., any type annotations, Any from
typing, interface{}, untyped function parameters, and for JavaScript
JSDoc wildcard tags (@type {*}, @param {*}, @returns {*})TYPE-1 (BLOCK): Escape-hatch type found at {file}:{line}.any with unknown + type guard, or the precise typeAny with concrete type, TypeVar, or Protocolinterface{} / any with a concrete interface or generic{*} wildcard with precise JSDoc types (see
references/javascript.md)Bypass prohibition: "just use any for now", "we can fix types later" → Refuse. Cite TYPE-1. Escape-hatch types in production are deferred bugs.
Severity: BLOCK | Languages: typescript, python, go, javascript | Source: CCC
What it prohibits: Type assertions / casts that bypass the type system without a runtime narrowing guard. Includes:
value as Foo without a preceding type guard; double assertions
value as unknown as Foocast(Foo, value) without a preceding isinstance checkvalue.(ConcreteType) without the two-value form v, ok := value.(Type)agent_action:
as (TypeScript), cast( (Python), \.\( bare type assertion (Go)as unknown as Foo): always flag — no runtime guard can
justify this patternisinstance / two-value
assertion immediately precedesTYPE-2 (BLOCK): Unsafe type assertion at {file}:{line}.if (isFoo(value)) { /* value is Foo here */ }if isinstance(value, Foo): ...if v, ok := value.(Foo); ok { ... }Severity: WARN | Languages: typescript, python, go, rust, javascript | Source: CCC
What it prohibits: switch / match statements on union types or enums that
do not handle all variants, leaving implicit fall-through or silent no-ops.
Detection:
switch / match on a typed discriminant (enum, union, string literal
union, Rust enum, Go interface type switch, Python structural pattern match)default/_ branch is present
that deliberately handles the remaining cases with an exhaustiveness check
(TypeScript/JavaScript default that throws on never/unreachable; Python _
case that raises; Rust exhaustive match; Go type switch with default panic)switch/match that silently ignores unhandled variantsagent_action:
TYPE-3 (WARN): Non-exhaustive switch/match on {type} at {file}:{line}.default: const _exhaustive: never = value; throw new Error(\Unhandled: ${_exhaustive}`);`case _ as unreachable: assert_never(unreachable) (3.10+)default: panic(fmt.Sprintf("unhandled %T", v)) in type switchesSeverity: WARN | Languages: typescript, python, go, rust | Source: CCC
What it prohibits: Using raw primitives (string, int, UUID) for domain
concepts where mixing up arguments is a runtime error waiting to happen
(e.g., createUser(userId: string, tenantId: string) — the two strings are
interchangeable to the compiler but not semantically).
Detection:
type UserId = string without a brandagent_action:
TYPE-4 (WARN): Primitive obsession — use branded/newtype wrapper at {file}:{line}.type UserId = string & { readonly _brand: 'UserId' } or Zod
branded schemaNewType('UserId', str) (PEP 484)type AccountID string — named type over underlying primitivestruct UserId(String); tuple struct newtypenull / undefined in Return TypesSeverity: WARN | Languages: typescript, python, go, rust, javascript | Source: CCC
What it prohibits: Functions that can return null, undefined, or a zero
value on failure without explicitly declaring it in the return type, forcing
callers to guess whether a missing value indicates success or failure.
Detection:
| null
or | undefined but whose body has code paths returning themOptional[T] / T | None
but whose body can return None implicitly or explicitlyT (no error) that can silently fail with
a zero value — flag; require (T, error) signatureunwrap()/expect() in non-test code instead of
propagating Option<T> or Result<T, E> (see references/rust.md)agent_action:
TYPE-5 (WARN): Implicit null/error return not declared in type at {file}:{line}.string | null; Optional[str]; (T, error) in GoOption<T> / Result<T, E> in Rust; eliminate unwrap() in productionSeverity: INFO | Languages: typescript, python, go, rust, javascript | Source: CCC
What it recommends: Function parameters and return types should use the narrowest interface/protocol that satisfies the function's needs, not a concrete class. This keeps dependencies loose and enables easier testing.
Detection:
agent_action:
TYPE-6 (INFO): Concrete class in signature — prefer interface/protocol at {file}:{line}.Before running any checks, load the appropriate language reference:
references/
typescript.md ← ESLint rules, tsconfig flags, TypeScript-specific guidance
python.md ← mypy/pyright config, PEP refs, Python-specific guidance
go.md ← go vet, staticcheck, Go-specific guidance
rust.md ← clippy lints, ownership model notes
javascript.md ← JSDoc fallback strategy, @ts-check pragma
Rules that are inapplicable for a language are documented in that language's reference file and must be skipped — do not flag them as violations.
Report schema: see skills/conductor/shared-contracts.md.