This skill helps you merge new .origin.ts files into Angular projects without breaking custom logic, preserving behavior and enabling safe regeneration.
npx playbooks add skill avvale/aurora-front --skill aurora-origin-merge
.origin.ts files after front-end regeneration.origin.ts files after running aurora load front moduleReference files (loaded on demand):
Always combine with: aurora-cli, aurora-development, prettier
---
Aurora tracks generated files via SHA1 hash in *-lock.json. On regeneration:
File hash matches lock? → YES → Overwrite safely (no custom code)
→ NO → Create filename.origin.ts (new generated version)
Keep filename.ts intact (your custom code)
---
Before touching ANY .origin file, determine what changed in the YAML schema.
# Check if YAML has uncommitted changes
git diff HEAD -- cliter/<bc>/<module>.aurora.yaml
HEAD has old version# Get previous YAML version
# Flujo A (uncommitted):
git show HEAD:cliter/<bc>/<module>.aurora.yaml > /tmp/old-schema.yaml
# Flujo B (committed):
PREV_COMMIT=$(git log -2 --format="%H" -- cliter/<bc>/<module>.aurora.yaml | tail -1)
git show $PREV_COMMIT:cliter/<bc>/<module>.aurora.yaml > /tmp/old-schema.yaml
# Compare
diff /tmp/old-schema.yaml cliter/<bc>/<module>.aurora.yaml
Build three lists: NEW fields, MODIFIED fields, DELETED fields.
WHY: Without the delta, you can't distinguish between a NEW field (must merge) and an INTENTIONALLY REMOVED field (must NOT re-add).
---
fd ".origin.ts"
Read BOTH files: existing (custom code) and .origin (new generated).
GOLDEN RULE: The .origin shows HOW Aurora implements each field. Copy that pattern, respecting all custom code.
Apply in this order:
init() assignmentscreateForm()For file-type specific rules → see [merge-by-file-type.md](merge-by-file-type.md)
rm path/to/file.origin.ts
fd ".origin.ts" # Should return empty
---
fields + relationsFields if relationshipResolveFn<{}> return types)init())CRITICAL: Partial merge causes runtime errors.
fields and relationsFields---
| Mistake | Prevention |
| --- | --- |
| Skipping YAML delta (Step 0) | ALWAYS diff YAML via git before merging |
| Re-adding intentionally removed fields | Check YAML delta — if NOT new, don't add |
| Replacing file with .origin entirely | Always compare first |
| Forgetting imports for new fields | Check .origin imports section |
| Leaving .origin files in codebase | Always delete after merge |
| Missing GraphQL field but added in component | Update GraphQL FIRST |
| Not running Prettier after merge | npx prettier --write <files> |
---
.origin.ts files remain.aurora.yamlnpx tsc --noEmit)---
| Skill | When to Use Together |
| --- | --- |
| aurora-cli | Triggers regeneration that creates .origin files |
| aurora-development | Understand component patterns |
| aurora-schema | Understanding YAML field order |
| prettier | Format files after merge |
Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.