feat: refactor 30+ skills to Anthropic progressive disclosure pattern
- All SKILL.md files now <500 lines (avg reduction 69%) - Detailed content extracted to references/ subdirectories - Frontmatter standardised: only name + description (Anthropic standard) - New skills: brand-guidelines, spec-coauthor, report-templates, skill-creator - Design skills: anti-slop guidelines, premium-proposals reference - Removed non-standard frontmatter fields (triggers, version, author, category) Plugins affected: infraestrutura, marketing, dev-tools, crm-ops, gestao, core-tools, negocio, perfex-dev, wordpress, design-media Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
100
wordpress/skills/branda-menu/references/mapeamento-slugs.md
Normal file
100
wordpress/skills/branda-menu/references/mapeamento-slugs.md
Normal file
@@ -0,0 +1,100 @@
|
||||
# Mapeamento de Slugs para Seccoes Branda
|
||||
|
||||
Referencia completa de mapeamento slug -> seccao e tabela de Branda IDs.
|
||||
|
||||
---
|
||||
|
||||
## Mapeamento Standard por Slug
|
||||
|
||||
```
|
||||
# Admin
|
||||
index.php -> Admin
|
||||
users.php -> Admin
|
||||
options-general.php -> Admin
|
||||
plugins.php -> Admin
|
||||
tools.php -> Admin
|
||||
|
||||
# Conteudo
|
||||
edit.php -> Conteudo (Artigos)
|
||||
edit.php?post_type=page -> Conteudo (Paginas)
|
||||
upload.php -> Conteudo (Multimedia)
|
||||
edit.php?post_type=acf-field-group -> Conteudo (ACF)
|
||||
edit.php?post_type=* -> Conteudo (CPTs)
|
||||
|
||||
# Design
|
||||
elementor-home -> Design (Elementor)
|
||||
edit.php?post_type=elementor_library -> Design (Modelos)
|
||||
jkit -> Design (Jeg Kit)
|
||||
themes.php -> Design (Apresentacao)
|
||||
|
||||
# Marketing
|
||||
fluentcrm-admin -> Marketing
|
||||
fluent_forms -> Marketing
|
||||
rank-math -> Marketing
|
||||
click-to-chat -> Marketing
|
||||
|
||||
# Idiomas (se multilingue)
|
||||
mlang -> Idiomas (Polylang)
|
||||
loco -> Idiomas (Loco Translate)
|
||||
|
||||
# Performance
|
||||
wpfastestcacheoptions -> Performance
|
||||
|
||||
# Seguranca
|
||||
Wordfence -> Seguranca
|
||||
complianz -> Seguranca
|
||||
|
||||
# WebMaster
|
||||
branding -> WebMaster (Branda)
|
||||
wpcode -> WebMaster (Code Snippets)
|
||||
|
||||
# Hidden
|
||||
separator1, separator2, separator-last -> Hidden
|
||||
edit-comments.php -> Hidden
|
||||
hello-elementor -> Hidden
|
||||
elementor -> Hidden (duplicado de elementor-home)
|
||||
```
|
||||
|
||||
**Itens que nao encaixam no standard:** Perguntar ao utilizador em que seccao colocar. Exemplos: WooCommerce, KiviCare, FareHarbor.
|
||||
|
||||
---
|
||||
|
||||
## IDs de Slugs Comuns (referencia rapida)
|
||||
|
||||
| Slug | Branda ID |
|
||||
|------|-----------|
|
||||
| `index.php` | `menu_item_42ho017e7jo0` |
|
||||
| `edit.php` | `menu_item_6lk5pbiakha0` |
|
||||
| `upload.php` | `menu_item_1jkdde99dfd0` |
|
||||
| `edit.php?post_type=page` | `menu_item_774p5endtlu0` |
|
||||
| `themes.php` | `menu_item_7jgmlsspgv60` |
|
||||
| `plugins.php` | `menu_item_5g2kqk93qi30` |
|
||||
| `users.php` | `menu_item_gajld83c8es0` |
|
||||
| `tools.php` | `menu_item_3t0no8pv5bfg` |
|
||||
| `options-general.php` | `menu_item_d1a8rsor9700` |
|
||||
| `edit-comments.php` | `menu_item_252pn6seih20` |
|
||||
| `separator1` | `menu_item_3u7nva84d1i0` |
|
||||
| `separator2` | `menu_item_6lm7mo14a4r0` |
|
||||
| `separator-last` | `menu_item_74g99t5jejn0` |
|
||||
| `elementor-home` | `menu_item_2kehh8g6nop0` |
|
||||
| `elementor` | `menu_item_27qkhd7iqao0` |
|
||||
| `edit.php?post_type=elementor_library` | `menu_item_3rubghs8krfg` |
|
||||
| `hello-elementor` | `menu_item_3q7v6ask7gpg` |
|
||||
| `fluentcrm-admin` | `menu_item_4a7t8bi9mt30` |
|
||||
| `fluent_forms` | `menu_item_ebai6etubd00` |
|
||||
| `rank-math` | `menu_item_148bl1t91os0` |
|
||||
| `click-to-chat` | `menu_item_1b65lubbpnd8` |
|
||||
| `Wordfence` | `menu_item_1077vi8mf9b0` |
|
||||
| `complianz` | `menu_item_5etmjgu9lnk0` |
|
||||
| `wpfastestcacheoptions` | `menu_item_4hqsn1kbum10` |
|
||||
| `branding` | `menu_item_7qde2b2f7670` |
|
||||
| `wpcode` | `menu_item_69igp9fj4tl0` |
|
||||
| `loco` | `menu_item_2c34vb7r1csg` |
|
||||
| `mlang` | `menu_item_24um676vv08g` |
|
||||
| `woocommerce` | Computar: `branda_id('woocommerce')` |
|
||||
| `edit.php?post_type=acf-field-group` | `menu_item_70ga2p32mc70` |
|
||||
|
||||
Para slugs nao listados, computar com:
|
||||
```bash
|
||||
wp eval 'echo "menu_item_" . substr(base_convert(md5("SLUG"), 16, 32), 0, 12);' --allow-root --path=/home/USER/SITE
|
||||
```
|
||||
174
wordpress/skills/branda-menu/references/script-template.md
Normal file
174
wordpress/skills/branda-menu/references/script-template.md
Normal file
@@ -0,0 +1,174 @@
|
||||
# Script Template Branda Menu Builder
|
||||
|
||||
Script PHP completo para construir e guardar menu Branda via WP-CLI.
|
||||
|
||||
---
|
||||
|
||||
## Template Base
|
||||
|
||||
```bash
|
||||
mcp__ssh-unified__ssh_execute server:"server" command:"cat > /tmp/branda-menu-SITE.php << 'PHPEOF'
|
||||
<?php
|
||||
/**
|
||||
* Branda menu builder for SITENAME
|
||||
* Generated by /branda-menu skill
|
||||
*/
|
||||
|
||||
function branda_id(\$slug) {
|
||||
return 'menu_item_' . substr(base_convert(md5(\$slug), 16, 32), 0, 12);
|
||||
}
|
||||
|
||||
function native_item(\$subs = array()) {
|
||||
return array(
|
||||
'title' => '', 'id_attribute' => '', 'css_classes' => '',
|
||||
'icon_svg' => '', 'icon_url' => '', 'icon_image_id' => '',
|
||||
'dashicon' => '', 'icon_type' => '', 'custom_url' => '',
|
||||
'link_type' => '', 'link_target' => '', 'is_invisible' => '',
|
||||
'is_hidden' => '', 'was_native' => 1, 'submenu' => \$subs
|
||||
);
|
||||
}
|
||||
|
||||
function hidden_item() {
|
||||
\$item = native_item();
|
||||
\$item['is_hidden'] = '1';
|
||||
return \$item;
|
||||
}
|
||||
|
||||
function section_header(\$title, \$dashicon) {
|
||||
return array(
|
||||
'icon_type' => 'dashicon', 'link_type' => 'none',
|
||||
'submenu' => array(), 'title' => \$title,
|
||||
'css_classes' => 'menu-highlight', 'dashicon' => \$dashicon
|
||||
);
|
||||
}
|
||||
|
||||
function custom_link(\$title, \$url, \$dashicon, \$target = '') {
|
||||
return array(
|
||||
'icon_type' => 'dashicon', 'link_type' => 'custom',
|
||||
'submenu' => array(), 'title' => \$title,
|
||||
'dashicon' => \$dashicon, 'link_target' => \$target,
|
||||
'custom_url' => \$url
|
||||
);
|
||||
}
|
||||
|
||||
// === BUILD MENU ===
|
||||
\$menu = array();
|
||||
|
||||
// 1. SUPORTE
|
||||
\$menu['menu_item_sec_suporte'] = section_header('Suporte', 'dashicons-admin-tools');
|
||||
\$menu['menu_item_desk_link'] = custom_link('Descomplicar', 'https://desk.descomplicar.pt/', 'dashicons-admin-comments', '_blank');
|
||||
|
||||
// 2. ADMIN
|
||||
\$menu['menu_item_sec_admin'] = section_header('Admin', 'dashicons-admin-generic');
|
||||
\$menu[branda_id('index.php')] = native_item();
|
||||
\$menu[branda_id('users.php')] = native_item();
|
||||
\$menu[branda_id('options-general.php')] = native_item();
|
||||
\$menu[branda_id('plugins.php')] = native_item();
|
||||
\$menu[branda_id('tools.php')] = native_item();
|
||||
|
||||
// 3. CONTEUDO
|
||||
\$menu['menu_item_sec_conteudo'] = section_header('Conteudo', 'dashicons-admin-page');
|
||||
\$menu[branda_id('edit.php?post_type=page')] = native_item();
|
||||
// [INSERIR CPTs DO PROJECTO AQUI]
|
||||
\$menu[branda_id('edit.php')] = native_item();
|
||||
\$menu[branda_id('upload.php')] = native_item();
|
||||
\$menu[branda_id('edit.php?post_type=acf-field-group')] = native_item();
|
||||
|
||||
// 4. DESIGN
|
||||
\$menu['menu_item_sec_design'] = section_header('Design', 'dashicons-admin-appearance');
|
||||
\$menu[branda_id('elementor-home')] = native_item();
|
||||
\$menu[branda_id('edit.php?post_type=elementor_library')] = native_item();
|
||||
// \$menu[branda_id('jkit')] = native_item(); // Se Jeg Kit activo
|
||||
\$menu[branda_id('themes.php')] = native_item();
|
||||
|
||||
// 5. MARKETING
|
||||
\$menu['menu_item_sec_marketing'] = section_header('Marketing', 'dashicons-megaphone');
|
||||
\$menu[branda_id('fluentcrm-admin')] = native_item();
|
||||
\$menu[branda_id('fluent_forms')] = native_item();
|
||||
\$menu[branda_id('rank-math')] = native_item();
|
||||
\$menu[branda_id('click-to-chat')] = native_item();
|
||||
|
||||
// 6. IDIOMAS (se multilingue)
|
||||
// \$menu['menu_item_sec_idiomas'] = section_header('Idiomas', 'dashicons-translation');
|
||||
// \$menu[branda_id('mlang')] = native_item();
|
||||
// \$menu[branda_id('loco')] = native_item();
|
||||
|
||||
// 7. PERFORMANCE
|
||||
\$menu['menu_item_sec_performance'] = section_header('Performance', 'dashicons-performance');
|
||||
\$menu[branda_id('wpfastestcacheoptions')] = native_item();
|
||||
|
||||
// 8. SEGURANCA
|
||||
\$menu['menu_item_sec_seguranca'] = section_header('Seguranca', 'dashicons-shield');
|
||||
\$menu[branda_id('Wordfence')] = native_item();
|
||||
\$menu[branda_id('complianz')] = native_item();
|
||||
|
||||
// 9. WEBMASTER
|
||||
\$menu['menu_item_sec_webmaster'] = section_header('WebMaster', 'dashicons-admin-settings');
|
||||
\$menu[branda_id('branding')] = native_item();
|
||||
\$menu[branda_id('wpcode')] = native_item();
|
||||
|
||||
// HIDDEN
|
||||
\$menu[branda_id('separator1')] = hidden_item();
|
||||
\$menu[branda_id('separator2')] = hidden_item();
|
||||
\$menu[branda_id('separator-last')] = hidden_item();
|
||||
\$menu[branda_id('edit-comments.php')] = hidden_item();
|
||||
\$menu[branda_id('hello-elementor')] = hidden_item();
|
||||
\$menu[branda_id('elementor')] = hidden_item();
|
||||
|
||||
// SAVE
|
||||
update_option('ub_custom_admin_menu', array('administrator' => \$menu));
|
||||
wp_cache_flush();
|
||||
|
||||
\$visible = count(array_filter(\$menu, function(\$i) { return empty(\$i['is_hidden']); }));
|
||||
\$hidden = count(\$menu) - \$visible;
|
||||
echo "Menu guardado: \$visible visiveis + \$hidden hidden = " . count(\$menu) . " total\n";
|
||||
PHPEOF
|
||||
echo 'Script criado'
|
||||
"
|
||||
|
||||
# Executar
|
||||
mcp__ssh-unified__ssh_execute server:"server" command:"wp eval-file /tmp/branda-menu-SITE.php --allow-root --path=/home/USER/SITE"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Adaptacoes por Tipo de Site
|
||||
|
||||
### Sites multilingue (Polylang/WPML)
|
||||
|
||||
Descomentar seccao Idiomas no script. Adicionar:
|
||||
```php
|
||||
$menu['menu_item_sec_idiomas'] = section_header('Idiomas', 'dashicons-translation');
|
||||
$menu[branda_id('mlang')] = native_item(); // Polylang
|
||||
$menu[branda_id('loco')] = native_item(); // Loco Translate
|
||||
```
|
||||
|
||||
### Sites WooCommerce
|
||||
|
||||
Adicionar seccao e-Commerce entre Marketing e Idiomas:
|
||||
```php
|
||||
$menu['menu_item_sec_ecommerce'] = section_header('e-Commerce', 'dashicons-cart');
|
||||
$menu[branda_id('woocommerce')] = native_item();
|
||||
```
|
||||
|
||||
### Sites Care (KiviCare)
|
||||
|
||||
Adicionar seccao Clinica entre Marketing e Idiomas:
|
||||
```php
|
||||
$menu['menu_item_sec_clinica'] = section_header('Clinica', 'dashicons-heart');
|
||||
$menu[branda_id('kivicare-...')] = native_item(); // Verificar slug exacto
|
||||
```
|
||||
|
||||
### CPTs customizados
|
||||
|
||||
Adicionar na seccao Conteudo, antes de Artigos:
|
||||
```php
|
||||
$menu[branda_id('edit.php?post_type=SLUG_CPT')] = native_item();
|
||||
```
|
||||
|
||||
### Itens desconhecidos
|
||||
|
||||
Se o menu nativo tiver itens que nao encaixam no mapeamento standard:
|
||||
1. Perguntar ao utilizador onde colocar
|
||||
2. Se plugin temporario/teste: adicionar ao Hidden
|
||||
3. Se plugin permanente: criar seccao propria ou adicionar a seccao existente
|
||||
Reference in New Issue
Block a user