create-entity-links-section

Adds a polymorphic entity links section to an existing Glyvio sidebar backed by a join table.

1|Updated Jun 11, 2026
One-click install
npx skills add https://github.com/devena/glyvio-forge --skill create-entity-links-section-devena
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: create-entity-links-section
Source: https://github.com/devena/glyvio-forge/tree/main/claude/skills/create-entity-links-section
Command: npx skills add https://github.com/devena/glyvio-forge --skill create-entity-links-section-devena

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Glyvio plugins repeatedly re-implement the same ~110-line "Links" sidebar section from scratch, copying the pattern across plugins like TaskSidebar, ComplaintSidebar, and MeetingSidebar. This Skill turns that recurring hand-copy into a single guided workflow that wires a generic, entity-type-agnostic links section into an existing sidebar. ## Core Features & Use Cases - Polymorphic Link Management: Adds attach/remove link actions backed by a dedicated <owner>_entity join table, with soft-delete semantics on the join row only. - Entity-Agnostic Type Picker: Builds the pick-a-type-then-pick-a-record flow by filtering AllEntities.allEntities() for registered ENTITY_MODAL routes, never hardcoding entity types. - Permission-Gated UI and i18n: Gates the add-link button on the join entity's insert permission scoped to the owner's user group, and adds plugin-specific translation keys to both .arb files. - Use Case: A developer needs a "Vínculos" section on a ComplaintSidebar so users can link a complaint to a Sale and a Client; the Skill generates the state, query, events, design, and i18n wiring against the existing ComplaintEntity join table. ## Quick Start Ask the agent to add a Links section to your sidebar, providing the owner entity name, the existing join entity name, the target sidebar file, the add-link permission, and the desired section placement.

Frequently Asked Questions about create-entity-links-section

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a links section to a Glyvio sidebar?▼

Provide the owner entity name, the existing join entity, the target sidebar file, the add-link permission, and the section placement. The workflow then adds state, a filtered query, add/remove link events, an EntityLinksDesign section, and i18n keys.

How does the entity type picker avoid hardcoding entity types?▼

The picker filters glyvio_structure.AllEntities.allEntities() down to entities with a registered ENTITY_MODAL route via routerService.getRouteForEntity. This keeps the flow entity-agnostic, so no per-entity if or switch statements are written.

Does the join entity need to exist before running this workflow?▼

Yes. The polymorphic join entity must already exist in @types and the manifest; if it does not, that schema change must land and publish first through modify-manifest. This workflow only wires the app-layer UI against an existing join table.

Does removing a link delete the linked entity record?▼

No. removeLink performs a soft-delete by setting deleted: true on the join row via entityService.saveInput. The linked entity itself, such as a Sale or Client, is never modified.

How are links loaded for many owner records without N+1 queries?▼

Query the join entity once using addFilterOperator on the owner field with the full list of owner IDs, then group results client-side. Never loop one query per owner record when building list previews or counts.