Maintains UI standards for Blade-based components with Alpine.js and Tailwind CSS.
Install
mkdir -p .claude/skills/blade && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/12131" && unzip -o skill.zip -d .claude/skills/blade && rm skill.zipInstalls to .claude/skills/blade
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Convenciones de UI con Blade + Alpine.js + Tailwind para PrintecPOS. Úsalo al crear/editar vistas, componentes Blade, formularios, tablas, modales o cualquier UI del cotizador, panel admin o partner site. Incluye reglas de cache busting y SweetAlert2.Key capabilities
- →Create Blade components following conventions
- →Implement local state with Alpine.js
- →Apply Tailwind utility-first classes
- →Integrate SweetAlert2 for confirmations
- →Manage cache busting for static assets
How it works
The skill provides conventions for using Blade, Alpine.js, and Tailwind to build UI components, ensuring consistency across the application.
Inputs & outputs
When to use blade
- →Create new Blade component
- →Implement Alpine state
- →Apply Tailwind utility classes
- →Configure UI templates
About this skill
UI — Blade + Alpine + Tailwind
Stack
- Blade (
resources/views/) - Alpine.js 3.4 (state local)
- Tailwind 3.1 (utility-first)
- SweetAlert2 (modales / confirmaciones)
- Swiper (carousels)
- Vite 7.1 (dev/build)
Componentes Blade
- Crear componentes en
resources/views/components/. - Anonymous components para UI sencilla (sin clase PHP).
- Class-based components cuando hay lógica de presentación o defaults complejos.
- Slots con nombre para layouts:
<x-slot:header>,<x-slot:actions>.
<x-card>
<x-slot:header>Cotización #{{ $quote->id }}</x-slot:header>
{{-- contenido --}}
</x-card>
Alpine.js
x-datacon state local del componente. Evitar tiendas globales.- Inicializar listas/objetos en
x-data, no in-line en eventos. - Eventos personalizados con
$dispatchy escuchar con@event-name.window. - No mezclar Alpine con jQuery (este repo no usa jQuery, no introducirlo).
<div x-data="{ open: false }">
<button @click="open = !open">Toggle</button>
<div x-show="open" x-transition>...</div>
</div>
Tailwind
- Utility-first siempre. Componentes solo si la clase se repite >5 veces.
- Responsive con
sm: md: lg: xl:. Mobile-first. - Colores por marca tomar de
Partner(site_primary_color, etc.) cuando la vista es del sitio del partner. - Configurar nuevas clases en
tailwind.config.js, no<style>inline.
Formularios
@csrfsiempre en POST/PUT/DELETE (Blade lo agrega con@method).- Mostrar errores con
@error('campo')debajo del input. - Old values con
value="{{ old('campo') }}". - Validación se queda en FormRequest (ver skill
laravel).
SweetAlert2 — confirmaciones
<button onclick="confirmDelete({{ $item->id }})">Eliminar</button>
<script>
function confirmDelete(id) {
Swal.fire({
title: '¿Eliminar?',
icon: 'warning',
showCancelButton: true,
confirmButtonText: 'Sí, eliminar',
cancelButtonText: 'Cancelar'
}).then(r => {
if (r.isConfirmed) document.getElementById('form-delete-' + id).submit();
});
}
</script>
Cache busting
Assets estáticos referenciados directamente DEBEN llevar versión:
<script src="{{ asset('js/custom.js') }}?v={{ filemtime(public_path('js/custom.js')) }}"></script>
<link rel="stylesheet" href="{{ asset('css/custom.css') }}?v={{ filemtime(public_path('css/custom.css')) }}">
Para assets de Vite usar @vite directiva (ya maneja hash automáticamente).
Anti-patrones
- ❌ Lógica de negocio en Blade (
@php $total = $items->sum(...) @endphp) — calcular en controller/service. - ❌ Loops anidados pesados en vista — preparar el array en el controller.
- ❌ jQuery en código nuevo.
- ❌ Estado de Alpine global; usar dispatch/eventos en su lugar.
- ❌ CSS inline (
style="...") salvo colores dinámicos del partner.
Layouts
- Layout principal en
resources/views/layouts/. - Header/footer extraídos a componentes para reutilización.
- Vista de partner site usa branding del modelo
Partner(logo, hero, colores).
When not to use it
- →When implementing business logic in Blade templates
- →When using jQuery in new code
- →When using global Alpine state
Limitations
- →Business logic should not be placed in Blade templates
- →Heavy nested loops should not be used in views
- →jQuery should not be used in new code
How it compares
This skill enforces specific architectural patterns and best practices for UI development, unlike a generic approach that might lead to inconsistencies.
Compared to similar skills
blade side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| blade (this skill) | 0 | 3mo | No flags | Intermediate |
| ui-styling | 12 | 9mo | Review | Beginner |
| tailwind-design-system | 34 | 2mo | No flags | Intermediate |
| figma | 22 | 4mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
ui-styling
mrgoonie
Create beautiful, accessible user interfaces with shadcn/ui components (built on Radix UI + Tailwind), Tailwind CSS utility-first styling, and canvas-based visual designs. Use when building user interfaces, implementing design systems, creating responsive layouts, adding accessible components (dialogs, dropdowns, forms, tables), customizing themes and colors, implementing dark mode, generating visual designs and posters, or establishing consistent styling patterns across applications.
tailwind-design-system
wshobson
Build scalable design systems with Tailwind CSS, design tokens, component libraries, and responsive patterns. Use when creating component libraries, implementing design systems, or standardizing UI patterns.
figma
openai
Use the Figma MCP server to fetch design context, screenshots, variables, and assets from Figma, and to translate Figma nodes into production code. Trigger when a task involves Figma URLs, node IDs, design-to-code implementation, or Figma MCP setup and troubleshooting.
design-system-patterns
wshobson
Build scalable design systems with design tokens, theming infrastructure, and component architecture patterns. Use when creating design tokens, implementing theme switching, building component libraries, or establishing design system foundations.
interaction-design
wshobson
Design and implement microinteractions, motion design, transitions, and user feedback patterns. Use when adding polish to UI interactions, implementing loading states, or creating delightful user experiences.
web-design-reviewer
github
This skill enables visual inspection of websites running locally or remotely to identify and fix design issues. Triggers on requests like "review website design", "check the UI", "fix the layout", "find design problems". Detects issues with responsive design, accessibility, visual consistency, and layout breakage, then performs fixes at the source code level.