property-addition
Skill0 starsChanged 6 months agoMITView on GitHub
Adds a new property/field/column to an existing domain entity, updating all 20+ required files (value object, entity, commands, handlers, repository, migration, database, views, tests). Use when user requests to add field, new column, entity property, or update existing entity with new attribute.
In this repository14 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- api-endpoint-creationSkill
- database-migrationsSkill
- local-dev-testingSkill
- testing-cqrs-securitySkill
- business-rule-additionSkill
- chrome-devtools-expertSkill
- code-reviewSkill
- context7-docsSkill
- domain-scaffoldingSkill
- markitdown-converterSkill
- playwright-automationSkill
- serena-code-generatorSkill
- strategic-plannerSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 7 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
Default value (if any)
- Distinctive: line 33
No validation beyond type
- Very specific: line 43
Use ddd-specialist + php-specialist to create value object following Cookie value object patterns.
- Distinctive: line 56
Add setter if mutable
- Distinctive: line 97
Add column with proper type, constraints, defaults.
- Distinctive: line 110
create.php (add form field)
- Distinctive: line 115
Use Bootstrap 5 with validation feedback.
- Distinctive: line 129
Test factory (add to defaults)
- Very specific: line 153
Follow checklist in .claude/documentation/PROPERTY_ADDITION_PROTOCOL.md
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Property Addition Skill
Automates adding a property to an existing entity across all layers.
Step 1: Gather Information
Ask user:
- Domain name (e.g., Cookie)
- Property name (camelCase, e.g., flavor, isGlutenFree)
- Property type (string, int, bool, float)
- Validation rules (min/max, required, format)
- Default value (if any)
Step 2: Decide Value Object vs. Simple Property
Create Value Object if:
- Has validation rules (min/max, format, regex)
- Has business logic
- Represents domain concept
Use Simple Property if:
- Simple boolean flag
- No validation beyond type
Invoke ddd-specialist for guidance if unsure.
Step 3: Create Value Object (If Needed)
Reference: .claude/documentation/PROPERTY_ADDITION_PROTOCOL.md Step 1
Use ddd-specialist + php-specialist to create value object following Cookie value object patterns.
Step 4: Update Entity
Reference: .claude/documentation/PROPERTY_ADDITION_PROTOCOL.md Step 2
Update:
- Constructor
- create() method
- reconstitute() method
- Add getter
- Add setter if mutable
Invoke: ddd-specialist + clean-code-specialist
Step 5: Update Commands and Handlers
Reference: .claude/documentation/PROPERTY_ADDITION_PROTOCOL.md Step 3
Update:
- CreateCommand (add property)
- CreateHandler (convert to value object, pass to entity)
- UpdateCommand (add property)
- UpdateHandler (convert to value object, pass to entity)
Invoke: cqrs-specialist + clean-code-specialist
Step 6: Update Repository
Reference: .claude/documentation/PROPERTY_ADDITION_PROTOCOL.md Step 4
Update:
- Model $allowedFields
- Repository save() method
- Repository toDomainEntity() method with proper array shape
Invoke: phpstan-specialist for array shape validation
Step 7: Create Migration
Reference: .claude/documentation/PROPERTY_ADDITION_PROTOCOL.md Step 5
php spark make:migration Add{Property}To{Entities}TableAdd column with proper type, constraints, defaults.
Run: php spark migrate
Invoke: codeigniter4-specialist
Step 8: Update Views
Reference: .claude/documentation/PROPERTY_ADDITION_PROTOCOL.md Step 6
Update:
- create.php (add form field)
- edit.php (add form field with old value)
- show.php (display value)
- index.php (if shown in list)
Use Bootstrap 5 with validation feedback.
Step 9: Create/Update Tests
Reference: .claude/documentation/PROPERTY_ADDITION_PROTOCOL.md Step 7
Create/update:
- Value object test (if created)
- Entity test (test new property)
- Handler tests (test with new property)
- Repository test (test persistence)
- Feature test (test form submission)
- Test factory (add to defaults)
Invoke: test-specialist to ensure 90% coverage maintained
Step 10: Validate Quality
Run checks:
vendor/bin/phpstan analyse --level=8
vendor/bin/phpcs
vendor/bin/phpunit --coverage-textInvoke in sequence:
phpstan-specialist(0 errors required)slevomat-specialist(0 violations required)test-specialist(90%+ coverage required)
Completion Checklist
Follow checklist in .claude/documentation/PROPERTY_ADDITION_PROTOCOL.md
Minimum 20+ files modified:
- Value object created (if needed)
- Entity updated
- Commands updated (2)
- Handlers updated (2)
- Repository updated
- Model updated
- Migration created and run
- Views updated (3-4)
- Tests updated (6-8)
- Factory updated
- All quality checks passing
Report completion with file count and quality metrics.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

