angular-primeng-ui
Skill2 starsChanged 4 months agoMITView on GitHub
Create or refactor Angular + PrimeNG UI following smart/dumb boundaries. Use when working on templates, smart pages, dumb list/create/edit components, p-table, p-dialog, p-select, p-multiselect, p-button, PrimeNG module imports, Angular signal input()/output(), or the dialogVisible close pattern.
In this repository18 other files it gives its agents.
- agents/AGENTS.mdAGENTS.md
- ai-operating-protocolSkill
- angular-feature-architectureSkill
- angular-primeng-auditSkill
- angular-testing-patternsSkill
- commit-and-branch-conventionsSkill
- frontend-auth-bootstrapSkill
- generating-backend-moduleSkill
- generating-data-layerSkill
- generating-dumb-createSkill
- generating-dumb-editSkill
- generating-dumb-listSkill
- generating-smart-pageSkill
- monorepo-workspace-standardsSkill
- nestjs-api-standardsSkill
- prisma-migration-disciplineSkill
- rbac-security-auditorSkill
- shared-contracts-librarySkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use esta skill antes de implementar ou refatorar UI Angular com PrimeNG.
- Very specific: line 76
Create/Edit: p-dialog, Reactive Forms, dialogVisible interno, ProgressBarModule.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Angular + PrimeNG UI
Use esta skill antes de implementar ou refatorar UI Angular com PrimeNG.
Fontes obrigatorias
references/primeng-checklist.md(nesta skill) para o checklist rapido.- Se o projeto tiver um doc proprio de templates de UI, ler primeiro e tratar como fonte de verdade; esta skill vale como default quando nao houver.
Fluxo
- Confirmar escopo: lista, lista server-side, dialog create/edit, grid de campos, select/multiselect, botoes de acao ou smart page.
- Ler a secao correspondente do checklist.
- Manter a fronteira Smart/Dumb:
- Smart pages injetam facades, coordenam dialogs, confirmacoes e loading.
- Dumb components usam
input()/output()e nunca injetam facade/service.
- Arquivos separados:
.component.ts,.component.html,.component.scss. - Importar os modulos PrimeNG exatos dos seletores usados.
- Visibilidade RBAC via diretiva estrutural (
*hasPermission="'resource:action'"). - Dialogs controlados por
@ifno pai: usardialogVisible = signal(true)interno e emitir cancel/close apenas no(onHide). - Validar rodando o target de teste/build mais focado que existir.
Regras rigidas
ChangeDetectionStrategy.OnPushem dumb components.input()/output(), nunca@Input()/@Output().inject(), nunca DI por construtor.@if/@for, nunca*ngIf/*ngFor.SelectModule+p-select;DropdownModuleesta deprecado desde PrimeNG 18.templateUrlestyleUrl; evitartemplate:/styles:inline.- Nunca chamar
cancel.emit()ouclose.emit()direto do X/footer do dialog. - Nao esconder o botao de submit em form invalido/carregando: desabilitar com
[disabled]. - Nao injetar service/facade em dumb component.
- Todo overlay (
p-select,p-multiselect,p-datepicker) dentro de dialog ou tabela:appendTo="body"para evitar clipping.
Infra de UI que a skill assume
Se o projeto destino tiver equivalentes, usar os dele; se nao tiver, vale criar antes de espalhar solucao ad-hoc:
NotificationService: wrapper unico de toast. Componente e facade nunca chamam oMessageServicedo PrimeNG direto; centralizar e o que permite trocar o mecanismo depois.BaseFacade<T>: signalsitems,selectedItem,isLoading,errore CRUD comum.BasePaginatedListComponent<T>: base para lista server-side comp-tablelazy.- Servico de layout unico como fonte da verdade do tema (claro/escuro). Nao criar alternador de tema paralelo por pagina.
- Servico de loading global com
suppress()/restore(): telas que ja tem skeleton proprio suprimem o overlay global nongOnInite restauram no destroy (DestroyRef.onDestroy), senao o usuario ve dois indicadores de carregamento ao mesmo tempo. - Interceptor de erro que trata API fora do ar (
status === 0) redirecionando para uma rota publica dedicada, sem facade nem service de dominio.
Padrao de topbar
Quando a plataforma tem varios frontends, a topbar segue o mesmo desenho em todos:
titulo/breadcrumb a esquerda; a direita, na ordem, seletores de escopo (visiveis conforme
permissao), acoes especificas do app, notificacoes e avatar. Botao de topbar sempre e o
componente de botao da lib de UI, nunca <button> com CSS proprio: icone-only usa
text rounded com aria-label; acao com label usa text e severidade refletindo estado.
Sidebar pode variar por app; a topbar nao.
Mapa de referencia
- Lista:
p-table,TableModule, toolbar com busca,p-tag, botoes de acao. - Lista server-side: paginacao lazy com
[lazy]="true"e(onLazyLoad). - Create/Edit:
p-dialog, Reactive Forms,dialogVisibleinterno,ProgressBarModule. - Selects:
SelectModule,MultiSelectModule,appendTo="body",optionLabel,optionValue. - Smart page: orquestracao de facade,
p-toast,p-confirmDialog,ConfirmationService.
Alinhamento de arquitetura
Estrutura assumida (ajustar se o projeto destino usar outra):
- Frontend:
<dominio>/comdata-access/,feature/,ui/. - Backend: modulo com
dto/e services. - Contratos HTTP publicos vivem na lib compartilhada, nunca duplicados nos dois lados.
Nao introduzir novas camadas de rede ou contratos duplicados sem aprovacao explicita.
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.

