Source profileQuality 85/100Review permissions

lidge-jun/codexclaw/plugins/codexclaw/skills/dev-architecture/SKILL.md

cxc-dev-architecture

Use it for engineering tasks; the detail page covers purpose, installation, and practical steps.

Source repository stars
9
Declared platforms
0
Static risk flags
1
Last source update
2026-08-03
Source checked
2026-08-04

Decision brief

What it does—and where it fits

C0/C1 work (small local patches): See dev §0.0 Work Classifier + §0.1 Patch Fast-Path before reading references.

Best for

    Not for

    • Tasks that require unconfirmed production actions or broad system permissions.
    • Environments where the pinned source and install steps cannot be inspected.

    Compatibility matrix

    Platform support, with evidence labels

    PlatformStatusEvidenceWhat to check
    CodexNot declaredNo explicit evidencePortability before use
    Claude CodeNot declaredNo explicit evidencePortability before use
    CursorNot declaredNo explicit evidencePortability before use
    Gemini CLINot declaredNo explicit evidencePortability before use
    Open the compatibility checker

    Installation

    Inspect first. Install second.

    The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

    Source-detected install commandSource
    npx skills add https://github.com/lidge-jun/codexclaw --skill "plugins/codexclaw/skills/dev-architecture"
    Safe inspection promptEditorial

    Inspect the Agent Skill "cxc-dev-architecture" from https://github.com/lidge-jun/codexclaw/blob/ecc644e7742dc516ea91777414baf3da1859a162/plugins/codexclaw/skills/dev-architecture/SKILL.md at commit ecc644e7742dc516ea91777414baf3da1859a162. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

    Workflow

    What the source asks the agent to do

    1. 01

      Required Agent Workflow

      Detection commands are ecosystem-specific. See references/circular-dependencies.md for command templates, examples, and verification details.

      Detection commands are ecosystem-specific. See references/circular-dependencies.md for command templates, examples, and verification details.
    2. 02

      Review Decision Matrix

      See references/coupling-taxonomy.md for examples, detection signals, refactoring patterns, and banned review responses.

      See references/coupling-taxonomy.md for examples, detection signals, refactoring patterns, and banned review responses.
    3. 03

      6. Review Integration

      When reviewing any PR that adds/modifies module structure, verify:

      [ ] No new circular dependencies — run madge --circular or equivalent[ ] Layer violations — no upward imports (infra-domain OK, domain-infra BLOCKED)[ ] Coupling classified — any new cross-module dependency has coupling type identified
    4. 04

      Architecture Review Checklist (for code-reviewer)

      When reviewing any PR that adds/modifies module structure, verify:

      [ ] No new circular dependencies — run madge --circular or equivalent[ ] Layer violations — no upward imports (infra-domain OK, domain-infra BLOCKED)[ ] Coupling classified — any new cross-module dependency has coupling type identified
    5. 05

      Modular References

      Review the “Modular References” section in the pinned source before continuing.

      Review and apply the “Modular References” source section.

    Permission review

    Static risk signals and limitations

    Runs scripts

    medium · line 140

    The documentation asks the agent to run terminal commands or scripts.

    | 1. Detect | Run ecosystem-specific detection command | Command exits clean (no cycles reported) |

    Evidence record

    Why each signal appears

    EvidenceSourceComputedTestedEditorial
    SignalValueEvidence typeMeaning
    Quality score85/100ComputedDocumentation, specificity, maintenance, and trust rules
    Repository stars9SourceRepository attention, not individual Skill quality
    Compatibility0 platformsSourceDeclared in the catalog source record
    Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

    Pinned source

    Provenance and original SKILL.md

    Repository
    lidge-jun/codexclaw
    Skill path
    plugins/codexclaw/skills/dev-architecture/SKILL.md
    Commit
    ecc644e7742dc516ea91777414baf3da1859a162
    License
    NOASSERTION
    Collected
    2026-08-04
    Default branch
    main
    View the original SKILL.md

    Dev-Architecture — Module Boundaries & Structural Integrity

    C0/C1 work (small local patches): See dev §0.0 Work Classifier + §0.1 Patch Fast-Path before reading references.

    dev is canonical: dev §0.2 Rule Classes, §3 Verification Gate, and §5 Safety Rules apply to all work governed by this skill. Read the dev skill first for universal development discipline before applying architecture rules.

    Enforces architectural rules that prevent structural decay: circular dependencies, implicit coupling, barrel abuse, and misplaced validation. These rules are mechanical — an AI coding agent can follow them without subjective judgment.

    Severity mapping (dev §0.2): Severity: CRITICAL/HIGH ⇒ STRICT; MEDIUM ⇒ DEFAULT.

    Modular References

    FileWhen to ReadWhat It Covers
    references/circular-dependencies.mdDetecting or fixing import cyclesDetection commands (madge/pydeps/go vet), fix strategies, real examples
    references/coupling-taxonomy.mdReviewing code for hidden coupling8 coupling types, severity matrix, refactoring patterns, banned review responses
    references/barrel-discipline.mdCreating/modifying index/barrel filesWhen barrels OK vs banned, tree-shaking impact, safe barrel template

    External/current architecture evidence

    Architecture rules in this skill are local and mechanical. When an architectural decision depends on current framework guidance, cloud/provider reference architecture, package deprecation, platform limits, or public source evidence, read the active search skill and follow its query-rewrite, source-fetch, and evidence-status rules. Use browser verification only after candidate URLs exist.


    1. Module Boundaries

    Structural Decision Gate

    Severity: HIGH Rule (ARCH-DECISION-01): When changing module boundaries, seams, layering, shared packages, or public exports above C0/C1 local-patch scope, name the structural decision before editing.

    Required decision record, inline in the plan or in the repo's ADR/source-of-truth file:

    • Context: what pressure forced the boundary change.
    • Rejected alternative: at least one plausible option not chosen, with why.
    • Chosen move: split, extract, merge, invert dependency, introduce adapter, or change public export.
    • Consequences: new dependency direction, public contract impact, migration cost, and follow-up verification.

    Route durable, surprising, hard-to-reverse, or cross-team choices to the repo's ADR/current-architecture source of truth instead of leaving them only in chat. dev-scaffolding owns where those durable docs live; this skill owns the boundary decision content.

    Pre-Change Structural Map

    Severity: HIGH Rule (ARCH-MAP-01): Before recommending or applying a split/extract/merge for boundary work above C0/C1, produce a compact structural map from code evidence.

    Map fields:

    • Core modules involved.
    • Direct dependents and dependencies.
    • Current and intended dependency direction.
    • Public boundaries touched (index.*, package exports, route/API contracts, CLI entry points).
    • Blast-radius class (local module, feature, package, app, cross-app/monorepo).

    Do not choose the fix first and backfill the map. The map is the evidence that tells whether the right move is colocation, extraction, dependency inversion, adapter introduction, or no structural change.

    Layered Architecture Boundaries

    LayerMay ImportMUST NOT ImportExample
    Presentation (UI/CLI/Controller)Application, DomainInfrastructure directlyReact component importing DB client
    Application (Use Cases/Services)Domain, PortsPresentation, Infra adaptersService importing React component
    Domain (Entities/Value Objects)Nothing (self-contained)Any other layerEntity importing Express
    Infrastructure (Adapters/DB/HTTP)Domain (implements ports)Presentation, ApplicationDB adapter importing controller

    When to Split a Module

    Canonical file-size rule: >400 LOC -> split (DEFAULT). Deviations require a stated reason.

    SignalAction
    File exceeds 400 LOCSplit by responsibility (DEFAULT)
    Module has 6+ direct dependentsExtract shared interface
    Two unrelated features share a fileSeparate into own modules
    Circular import detectedExtract shared types/interfaces to a third module
    Module name contains "and" or "utils"Split by actual concern

    Banned Patterns

    BannedWhyFix
    utils.ts / helpers.ts growing unboundedBecomes a coupling magnetSplit by domain: date-utils.ts, string-format.ts
    Cross-layer direct importBreaks dependency directionUse ports/adapters or event bus
    Shared mutable state between modulesHidden temporal couplingPass explicitly or use event system
    God module (20+ exports)Everything depends on itExtract cohesive sub-modules

    Module SSOT (Single Source of Truth)

    Every concept, constant, type, or configuration value MUST have exactly one canonical owner module.

    ConceptCanonical OwnerConsumers Do
    Shared types / interfacestypes/ or contracts/ moduleImport, never redefine
    Constants / magic valuesDomain-specific constants moduleImport the constant
    Config / envCentral config moduleImport resolved values
    Validation schemasBoundary module (API entry)Import schema, don't recreate
    API contractsAPI layerImport types from API module
    BannedWhyFix
    Duplicating a type/constant in a consumerTwo sources of truth → driftImport from canonical owner
    "Local copy for convenience"Convenience becomes divergenceImport the original
    Re-deriving a value that has a canonical sourceSilent inconsistencyImport the derived value or computation

    Deep Modules and Seams

    Use this vocabulary when deciding whether an abstraction earns its keep:

    TermMeaning
    ModuleA cohesive unit with a named responsibility and public interface
    InterfaceThe small surface consumers depend on
    ImplementationThe hidden work behind that surface
    DepthLarge useful behavior hidden behind a small interface
    SeamA boundary where alternative implementations are real or likely
    AdapterCode translating one external shape into the module's interface
    LeverageHow much change the abstraction absorbs for its callers
    LocalityHow close related behavior stays to its owning concept

    Frontend depth means small props/events hiding complex rendering, state management, data transformation, or integration behavior. One adapter usually means hypothetical indirection; two adapters, or a near-term second adapter, is evidence of a real seam. Do not expose internals only for tests; test through the public interface or add a boundary-owned diagnostic hook with production value.


    2. Circular Dependency Detection & Prevention

    Severity: CRITICAL Rule: No circular dependency may exist between modules. Every detected cycle MUST be resolved before merge.

    Required Agent Workflow

    PhaseRequired ActionPass Condition
    1. DetectRun ecosystem-specific detection commandCommand exits clean (no cycles reported)
    2. ClassifyIdentify cycle type: direct A<->B or transitive A->B->C->AType documented
    3. AnalyzeDetermine root cause: shared type? callback? event?Root interface identified
    4. FixApply appropriate fix strategy (see references/)Detection command passes
    5. VerifyRe-run detection + confirm no regressionsZero cycles in report

    Detection commands are ecosystem-specific. See references/circular-dependencies.md for command templates, examples, and verification details.

    Banned Patterns

    Banned PatternWhy BannedRequired Fix
    A imports B, B imports A (direct cycle)Compile failures, bundler issues, test fragilityExtract shared interface to C
    Type-only cycle (import type both ways)Still signals wrong boundaryMove shared types to types/ module
    Barrel re-export creating hidden cycleIndex file masks real dependency graphRemove barrel, use direct imports
    Lazy import to "break" cycle (require() inside function)Hides the problem, breaks tree-shakingFix the architecture, not the symptom
    "It works in runtime" as justificationFragile, bundler-dependent, blocks refactoringMust pass static analysis
    Circular via test file importing source that imports test helperTest infra leaking into production graphIsolate test helpers in __test_utils__/

    Fix Guidance

    SituationPreferred Fix
    Two modules share typesExtract types.ts or contracts/ module both import
    Module A calls back into BDependency inversion: A defines interface, B implements
    Event producer and consumer import each otherEvent bus / mediator pattern
    Circular at package level (monorepo)Introduce shared or contracts package
    UI component imports its containerLift shared state to context or prop drilling
    Service layer cycleExtract orchestrator service or use events

    3. Implicit Coupling Taxonomy

    Severity: CRITICAL Rule: Every coupling instance in a code review MUST be classified by type. Coupling severity determines whether the code can merge.

    Coupling Types (ordered by severity, worst first)

    #TypeDefinitionExampleSeverityFix Pattern
    1ContentModule reaches into another's internalsAccessing private fields, reading internal stateCRITICALExpose via public API/method
    2CommonMultiple modules share global mutable stateGlobal config object mutated by servicesCRITICALDependency injection, immutable config
    3ControlModule passes flag to control another's logicprocessOrder(order, isRetry=true)HIGHPolymorphism, strategy pattern
    4StampModule passes large struct when only one field neededrenderHeader(entireUserObject)HIGHPass only needed fields
    5ExternalMultiple modules depend on same external formatBoth parse same CSV format independentlyHIGHSingle parser module, shared schema
    6TemporalModules must execute in specific orderinit() must run before process()MEDIUMMake ordering explicit (state machine, builder)
    7SequentialOutput of A is input of B (pipeline)ETL stagesLOWDocument the contract, validate at boundary
    8FunctionalModules share a well-defined interfaceFunction call with typed params/returnLOWThis is GOOD coupling — the target state

    Review Decision Matrix

    SeverityMerge?Action Required
    CRITICAL (Content, Common)BLOCKMust refactor before merge
    HIGH (Control, Stamp, External)BLOCK unless justifiedRequire tech-debt ticket if merged
    MEDIUM (Temporal)Allowed with documentationAdd ordering comments or state assertions
    LOW (Sequential, Functional)ALLOWEDNo action needed

    See references/coupling-taxonomy.md for examples, detection signals, refactoring patterns, and banned review responses.


    4. Boundary-Only Defensive Programming

    Severity: CRITICAL Rule: Validation and defensive checks belong ONLY at system boundaries. Internal module boundaries MUST trust their callers.

    Ownership split: placement (validation happens at the boundary, nowhere else) is owned by this section; what the validation schema enforces (content/policy) is owned by dev-security §1.

    Validation Location Matrix

    LocationValidate?RationaleExample
    HTTP/API controller inputYESUntrusted external dataZod schema, JSON schema
    CLI argument parsingYESUntrusted user inputyargs/commander validation
    File system readsYESExternal data, may be corruptParse + validate structure
    Database query resultsYES at ORM-untyped/raw-query boundaries (shape only); NO when a typed schema/ORM guarantees the shapeUntyped results may drift; typed guarantees are trusted (see Banned Patterns)Check raw-query nulls/shape; trust typed ORM results
    Message queue consumerYESCross-process boundaryValidate message schema
    Internal function paramsNOCaller is trusted code you controlType system handles this
    Private method argsNOSame module, same authorRedundant — types suffice
    Service-to-service in same processNOIn-process calls share type systemInterface contracts handle this

    Banned Patterns

    Banned PatternWhy BannedFix
    if (!param) throw at start of every internal functionRedundant with type system, clutters codeRemove — let TypeScript/types enforce
    Runtime type checks in typed language internalsDuplicates compiler work, adds noiseTrust the type system
    assert(x !== null) in module-internal codeIf x can be null, fix the type; if it can't, the assert is noiseFix type signature or remove assert
    Validation in domain entity constructor for in-process callersEntities should be created from validated dataValidate at boundary, trust domain layer
    Try-catch around every internal callHides bugs, makes debugging harderLet errors propagate, catch at boundary
    Null checks after DB query that schema guarantees NOT NULLDistrusts your own schemaTrust schema, validate at migration time

    Allowed Defensive Checks (Exceptions)

    SituationWhy AllowedPattern
    Security-critical path (auth, crypto)Defense in depth required by policyDouble-check even internal calls
    Data from deserialization (JSON.parse)Runtime data, types lostValidate with schema (Zod/io-ts)
    Plugin/extension boundaryThird-party code, untrustedValidate at plugin interface
    Across deployment boundary (microservice call)Network = system boundaryFull validation required
    Feature flags / A-B test pathsRuntime variation, not type-safeGuard with runtime check

    Fix Guidance

    SmellDiagnosisFix
    10+ if (!x) throw in one fileOver-defensive internal codeRemove guards, fix types
    Every function starts with parameter validationBoundary confusionMove all validation to entry point
    try { } catch { return null } everywhereError suppressionLet errors bubble, handle at boundary
    typeof x === 'string' in TypeScriptDistrusting compilerRemove, or fix the type to be accurate
    Same validation in controller AND serviceDuplicated boundaryValidate once at controller, service trusts

    5. Barrel/Re-export Discipline

    Severity: HIGH Rule: Barrel files (index.ts/index.js/init.py) are ONLY allowed at public boundaries — package APIs and feature public boundary exports. Internal convenience barrels are banned.

    Barrel Policy Matrix

    ContextBarrel Allowed?Rationale
    Library/package public API (packages/ui/index.ts)YESSingle entry point for consumers
    Framework plugin entry (plugin/index.ts)YESPlugin contract requires it
    Feature public boundary export (features/auth/index.ts as the feature's single external entry)YESPublic Boundary Export (dev-scaffolding §1); external consumers import the boundary
    Feature internal convenience barrel (re-exporting siblings for imports inside the feature)NOHides internal structure, breaks tree-shaking
    Utility folder (utils/index.ts)NOCreates coupling magnet
    Component folder re-exporting siblingsNODirect imports are clearer
    Monorepo package boundary (@org/shared/index.ts)YESCross-package contract

    See references/barrel-discipline.md for import examples, tree-shaking details, ESLint enforcement, and the safe barrel template.


    6. Review Integration

    Architecture Review Checklist (for code-reviewer)

    When reviewing any PR that adds/modifies module structure, verify:

    • No new circular dependencies — run madge --circular or equivalent
    • Layer violations — no upward imports (infra->domain OK, domain->infra BLOCKED)
    • Coupling classified — any new cross-module dependency has coupling type identified
    • No CRITICAL/HIGH coupling without justification — Content/Common/Control coupling blocked
    • Barrel files — no new internal barrels; existing public barrels use named exports only
    • Validation placement — new validation is at system boundary, not internal functions
    • Module size — new/modified modules under 400 LOC
    • No "utils" growth — shared code placed in domain-specific module, not catch-all utils
    • Dependency direction — dependencies point inward toward Domain: outer layers depend on inner layers (Presentation/Application/Infrastructure -> Domain), and inner layers never import outward
    • No lazy-import hacks — no require() inside function body to hide circular deps

    Automated Enforcement (CI Recommendations)

    CheckToolCI Command
    Layer/dependency rules (preferred CI gate)dependency-cruisernpx depcruise --validate .dependency-cruiser.cjs src/
    Circular deps (quick visualization)madgenpx madge --circular --extensions ts,tsx src/ && echo "OK"
    Dead files/exports/depsknipnpx knip
    Monorepo package consistencysherifnpx sherif
    Import boundarieseslint-plugin-boundariesESLint with boundaries config
    Layer violationsdependency-cruisernpx depcruise --validate .dependency-cruiser.cjs src/
    Barrel abusecustom ESLint ruleno-restricted-imports pattern for internal index files
    Module sizecustom script`find src -name '*.ts' -exec wc -l {} +

    On Windows without Unix tools, use PowerShell equivalents: Get-ChildItem -Recurse, Measure-Object, Select-String.


    Cross-Skill References

    • Observability: Trace emission at module boundaries is a production/long-lived-runtime concern (DEFAULT there, not universal). See dev-backend/references/core/observability.md for the canonical OTel setup.
    • Security: Validate at every trust/process/external boundary (HTTP entry, IPC, file/CLI input, third-party responses). Intra-trust-domain module calls follow §4 boundary-only defense — do not re-validate already-trusted data. See dev-security/SKILL.md for input validation and auth patterns.
    • Coupling and boundary review: see dev-code-reviewer.
    • Debugging escalation for boundary or coupling issues: see dev-debugging.
    • Infrastructure architecture and deployment boundaries: see dev-devops.

    Quick Decision Trees

    "Should I create a new module?"

    Does the code serve a distinct responsibility? 
      NO  -> Keep in existing module
      YES -> Is it used by 3+ other modules?
        NO  -> Co-locate with primary consumer
        YES -> Create dedicated module with clear interface
    

    "Is this coupling acceptable?"

    What type? (see taxonomy above)
      Content/Common -> BLOCK, refactor now
      Control/Stamp/External -> BLOCK unless tech-debt ticket created
      Temporal -> ALLOW with documentation
      Sequential/Functional -> ALLOW
    

    "Where does this validation go?"

    Is the data source external (HTTP, file, queue, DB, user input)?
      YES -> Validate here (boundary)
      NO  -> Is this a security-critical path?
        YES -> Validate (defense in depth)
        NO  -> Trust the type system, no validation needed
    

    Structural Index Concept (ARCH-INDEX-01, DEFAULT)

    Source: sol research (wednesday-solutions/ai-agent-skills AST dependency graph).

    Instead of reconstructing a module map for every task, maintain a lightweight structural index that agents can query:

    • Use cxc map <dir> for on-demand symbol-level maps (already shipped).
    • For larger repos, consider a persistent dependency graph artifact (e.g., dependency-cruiser JSON, Nx project graph, or a custom SQLite index).
    • The index should track: module → exports, module → imports, symbol → callers.
    • Freshness: re-generate on significant structural changes (new modules, moved files).
    • Query before editing: "what depends on this module?" should be answerable from the index without a full codebase scan.

    This is a guidance concept, not a shipped tool. The agent should check for existing index artifacts before running ad-hoc scans.

    Architecture Conformance Tests (ARCH-CONFORMANCE-01, DEFAULT)

    Source: sol research (HoangNguyen0403/agent-skills-standard compliance auditing).

    Architecture rules that exist only as prose are invisible to CI. For C3+ work where boundary violations would cause real harm:

    • Generate tool-specific configs from architecture decisions (dependency-cruiser rules, ESLint boundaries plugin, Nx enforce-module-boundaries, Go depguard).
    • Include at least one allowed-edge and one forbidden-edge test fixture.
    • The CI gate should FAIL on new violations while allowing a baselined set of legacy violations (ratcheting: new cycles fail, old ones are migrated).
    • Return a machine-readable report (JSON or SARIF) that agents can consume.

    Alternatives

    Compare before choosing

    Computed 10042,968

    coreyhaines31/marketingskills

    ab-testing

    When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program

    Computed 10023,781

    alirezarezvani/claude-skills

    app-store-optimization

    App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist

    Computed 1004,922

    dotnet/skills

    migrate-vstest-to-mtp

    Migrates .NET test projects from VSTest to Microsoft.Testing.Platform (MTP). Use when user asks to "migrate to MTP", "switch from VSTest", "enable Microsoft.Testing.Platform", "use MTP runner", set OutputType=Exe only for test projects in Directory.Build.props, or mentions EnableMSTestRunner, EnableNUnitRunner, or UseMicrosoftTestingPlatformRunner. USE FOR: MTP behavioral differences vs VSTest (exit code 8, zero tests discovered, --ignore-exit-code, TESTINGPLATFORM_EXITCODE_IGNORE); centralizing

    Computed 100165

    JasonColapietro/suede-creator-skills

    suede-ab-testing

    Suede-owned experimentation discipline for hypotheses, sample sizing, test duration, significance, and repeatable experiment programs. Use when comparing variants, deciding whether a result is reliable, or building an experiment backlog and cadence. NOT FOR: analytics instrumentation (use suede-analytics), post-click conversion diagnosis (use suede-site-alchemy), or writing the variant copy itself (use suede-copy).