About webman-best-practices
A Webman framework skill for developers applying DDD architecture, dependency rules, and PER Coding Style. It organizes guidance around common architectural and code-quality violations.
Key features
- 01DDD architecture and dependency guidance
- 02Naming convention checks
- 03PER Coding Style guidance
- 04Domain pattern guidance
- 05Dependency injection guidance
Use cases
- 01Reviewing a Webman project's architecture
- 02Checking directory and interface naming
- 03Improving domain model design
- 04Auditing dependency injection patterns
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ kitephp/ webman-design-skills --skill webman-best-practicesAfter installing, type/webman-best-practicesin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
references/architecture/avoid-static-methods.mdconstructor-injection.mdcontroller-skip-service.mddomain-framework-dependency.mdinfrastructure-without-contract.mdno-service-locator.mdservice-circular-dependency.mdservice-direct-model-access.mdreferences/code-style/complete-type-declarations.mdconstructor-property-promotion.mdprefer-final-classes.mdreadonly-properties.mdstrict-types-declaration.mdreferences/domain/business-logic-in-domain.mddomain-events.mdentity-identity.mdrich-domain-model.mdvalue-object-immutability.mdreferences/naming/directory-lowercase.mdinterface-naming.mdnamespace-directory-mismatch.mdrepository-implementation-naming.mdservice-naming-pattern.mdDetails
From the project READMEWebman framework best practices following DDD architecture, dependency rules, and PER Coding Style.
Architecture & Dependencies
- Controller directly depends on Model, skipping Service layer → See controller-skip-service
- Domain layer depends on framework classes (Request, DB, etc.) → See domain-framework-dependency
- Service layer has circular dependencies with another Service → See service-circular-dependency
- Infrastructure layer not implementing Contract interface → See infrastructure-without-contract
- Using Model directly in Service instead of Repository → See service-direct-model-access
Naming Conventions
- Using camelCase or PascalCase for directories → See directory-lowercase
- Interface without Interface suffix → See interface-naming
- Service not following VerbNounService pattern → See service-naming-pattern
- Repository implementation without descriptive prefix → See repository-implementation-naming
- Namespace not matching directory structure → See namespace-directory-mismatch
Code Style (PER Coding Style)
- Missing declare(strict_types=1) at file start → See strict-types-declaration
- Not using final class by default → See prefer-final-classes
- Not using readonly for immutable properties → See readonly-properties
- Missing type declarations for parameters or return types → See complete-type-declarations
- Not using constructor property promotion → See constructor-property-promotion
Domain Patterns
- Entity without unique identity → See entity-identity
- Value object that is mutable → See value-object-immutability
- Business logic in Service instead of Domain → See business-logic-in-domain
- Not using domain events for side effects → See domain-events
- Anemic domain model with only getters/setters → See rich-domain-model
Dependency Injection
- Using static methods instead of dependency injection → See avoid-static-methods
- Not using constructor injection → See constructor-injection
- Service locator pattern instead of dependency injection → See no-service-locator
Comments
Markdown supported