c2f-widget-development
Skill4 starsChanged 33 days agoMITView on GitHub
LEIA ANTES de desenvolver ou alterar widgets do sistema e seus renderizadores. Se não ler: widgets quebram o isolamento de escopo, duplicam IDs no DOM e falham na renderização pública.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- otavioserra/conn2flowword for word, first seen Nov 5, 2026
Other versions1 project uses a version of this.
Word for word · 1
- otavioserra/conn2flow★ 5100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository96 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- cli/CLAUDE.mdCLAUDE.md
- resources/CLAUDE.mdCLAUDE.md
- c2f-agent-visual-inspectionSkill
- c2f-ai-featuresSkill
- c2f-architect-masterSkill
- c2f-database-operationsSkill
- c2f-database-testingSkill
- c2f-dev-scriptsSkill
- c2f-docker-environmentSkill
- c2f-documentation-governanceSkill
- c2f-documentationSkill
- c2f-environment-configurationSkill
- c2f-executor-agentSkill
- c2f-gd-image-safetySkill
- c2f-gestor-functionsSkill
- c2f-global-variablesSkill
- c2f-hooks-systemSkill
- c2f-html-css-pages-and-componentsSkill
- c2f-interface-v2-architectureSkill
- c2f-javascript-ajaxSkill
- c2f-json-resources-syncSkill
- c2f-mdd-indexing-and-handoffsSkill
- c2f-modelo-templatesSkill
- c2f-module-crud-scaffoldingSkill
- c2f-module-visual-assetsSkill
- c2f-multilingual-skills-governanceSkill
- c2f-multilingual-systemSkill
- c2f-mysql-utf8-emoji-encodingSkill
- c2f-payment-gatewaysSkill
- c2f-plugin-architectureSkill
- c2f-preview-modals-systemSkill
- c2f-project-pipeline-and-tasksSkill
- c2f-projects-systemSkill
- c2f-resources-systemSkill
- c2f-reviewer-agentSkill
- c2f-shell-and-windows-trapsSkill
- c2f-system-tasksSkill
- c2f-tailwind-css-architectureSkill
- c2f-tailwind-module-migrationSkill
- c2f-variables-systemSkill
- continue-mdd-batchSkill
- mdd-memory-gardeningSkill
- mdd-workflowSkill
- project-validationSkill
- raise-spec-changeSkill
- review-current-batchSkill
- start-mdd-sliceSkill
- c2f-mdd-indexing-and-handoffsSkill
- c2f-agent-visual-inspectionSkill
- c2f-ai-featuresSkill
- c2f-architect-masterSkill
- c2f-database-operationsSkill
- c2f-database-testingSkill
- c2f-dev-scriptsSkill
- c2f-docker-environmentSkill
- c2f-documentation-governanceSkill
- c2f-documentationSkill
- c2f-environment-configurationSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
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
- Very specific: line 18
No frontend envie ajaxOpcao.
≈ “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
Desenvolvimento de widgets Conn2Flow
⚡ Gatilho Obrigatório
- TRIGGER: Criar ou modificar widgets (
*.widget.php,*.widget.js), tags@[[widgets#...]]@ou controladores de renderização de widgets. - SKIP APENAS SE: Componentes visuais estáticos que não possuem ciclo de vida autônomo de widget.
- CONSEQUÊNCIA DE IGNORAR: Colisão de identificadores no DOM ao instanciar múltiplos widgets, perda de dados na injeção de parâmetros dinâmicos e quebra de renderização no site final.
- Injete CSS, head e JavaScript por
gestor_pagina_recursos_incluir([...]); centralize a inclusão e preserve a deduplicação do helper. - Não chame novamente controladores de recursos que o render do widget já inclui.
- No frontend envie
ajaxOpcao; no backend trate a mesma ação em$_GESTOR['ajax-opcao']e evite nomes reservados pelo fechamento AJAX genérico. - Para tokens de item, aceite wrappers opcionais com
/@?\[\[item#([a-zA-Z0-9_\-]+)\]\]@?/e substitua todas as ocorrências. - Mantenha blocos de repetição, vazio e controles compatíveis com o contrato do AI mode/template do widget.
- Valide duas renderizações na mesma página para detectar duplicação de assets, além do caminho AJAX feliz e de erro.
7. Contrato Modular de Grid (Dimensões Dinâmicas e Drag-and-Drop)
Todo widget que participa de painéis modulares, dashboards ou layouts customizáveis deve obedecer ao contrato de grid modular:
7.1 Dimensões Dinâmicas (width e height)
- Os widgets devem ser declarados com suporte a redimensionamento em unidades de grid (colunas e linhas):
grid_w(largura em colunas, ex:1a12).grid_h(altura em linhas/unidades de altura, ex:1a6).
- Limites Estritos de Redimensionamento:
min_w: largura mínima para renderização legível sem truncamento de controles.max_w: largura máxima permitida no container.min_h: altura mínima que garante exibição do conteúdo essencial sem overflow vertical quebrado.max_h: altura máxima recomendada para evitar distorção de proporção.
- O HTML e CSS do widget devem utilizar containers flexíveis (
w-full h-full) e respeitar overflow interno com scrollbars sutis (overflow-y-auto overflow-x-hidden) quando o conteúdo exceder a área útil.
7.2 Drag-and-Drop e Preservação de Estado
- Ao mover ou redimensionar widgets em um layout interativo, a biblioteca cliente emite eventos de layout.
- O widget deve manter seletores com atributos de dados isolados (ex:
data-widget-id="<id>",data-widget-instance="<hash>") para evitar que clones ou múltiplos widgets na mesma tela colidam event listeners ou propriedades de estilo.
8. Ciclo de Vida e Re-renderização AJAX (ajaxOpcao: 'widget-render')
Widgets dinâmicos que atualizam seu conteúdo assincronamente (filtros, paginação interna, polling ou atualização pós-redimensionamento) devem adotar o endpoint padronizado:
8.1 Chamada Frontend
gestorAjax(state, 'widget-render', {
widget_id: 'meu-widget',
instance_id: instanceId,
width: currentGridWidth,
height: currentGridHeight,
params: { /* parâmetros específicos do widget */ }
}).then(function(response) {
if (response.status === 'Ok' && response.data.html) {
container.innerHTML = response.data.html;
if (response.data.css) {
// Injeção dinâmica ou atualização de estilos
}
// Reinicializar listeners específicos da instância
widgetInit(container, response.data);
}
});8.2 Manipulador Backend no Módulo/Controlador
if (!empty($_GESTOR['ajax'])) {
interface_ajax_iniciar();
switch ($_GESTOR['ajax-opcao']) {
case 'widget-render':
$widget_id = $_REQUEST['widget_id'] ?? '';
$width = (int)($_REQUEST['width'] ?? 1);
$height = (int)($_REQUEST['height'] ?? 1);
$params = $_REQUEST['params'] ?? [];
$render = widget_renderizar([
'id' => $widget_id,
'width' => $width,
'height' => $height,
'params' => $params,
'return_css' => true
]);
$_GESTOR['ajax-json'] = [
'status' => 'Ok',
'data' => [
'html' => $render['html'] ?? '',
'css' => $render['css'] ?? ''
]
];
break;
}
interface_ajax_finalizar();
return;
}[!IMPORTANT] A re-renderização via
ajaxOpcao: 'widget-render'não deve reinjetar dependências de scripts globais (<script>no head) já carregadas; usegestor_pagina_recursos_incluir()com deduplicação nativa.
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.

