adynato-web

adynato-web

Web development conventions for Adynato projects. Covers image optimization with img4web, asset management, component patterns, styling, and performance best practices. Use when building or modifying web applications, adding images/assets, or creating UI components.

1stars
0forks
Updated 1/20/2026
SKILL.md
readonlyread-only
name
adynato-web
description

Web development conventions for Adynato projects. Covers image optimization with img4web, asset management, component patterns, styling, and performance best practices. Use when building or modifying web applications, adding images/assets, or creating UI components.

Web Development Skill

Use this skill for all Adynato web projects and frontend development.

Image & Asset Management

Always Use img4web

When adding images or visual assets to any Adynato project, use adynato/img4web.

# Install globally
npm install -g @adynato/img4web

# Or use npx
npx @adynato/img4web <input> [options]

When to Use img4web

  • Adding any new image to a project
  • Processing user-uploaded images
  • Optimizing existing unoptimized images
  • Converting images to modern formats (WebP, AVIF)
  • Generating responsive image sets

img4web Usage

# Basic optimization
npx @adynato/img4web ./src/images

# With specific output formats
npx @adynato/img4web ./image.png --formats webp,avif

# Generate responsive sizes
npx @adynato/img4web ./hero.jpg --sizes 640,1024,1920

# Watch mode during development
npx @adynato/img4web ./src/images --watch

Image Requirements

Use Case Max Width Formats Quality
Hero/Banner 1920px WebP, AVIF, fallback JPG 80-85
Content Images 1200px WebP, AVIF 80
Thumbnails 400px WebP 75
Icons/Logos Original SVG preferred, else PNG Lossless
OG Images 1200x630 PNG or JPG 90

Image Component Pattern

Always use responsive images with modern format fallbacks:

// Next.js
import Image from 'next/image'

<Image
  src="/images/hero.webp"
  alt="Descriptive alt text"
  width={1920}
  height={1080}
  priority // for above-fold images
  placeholder="blur"
  blurDataURL={blurDataUrl}
/>
<!-- Plain HTML with picture element -->
<picture>
  <source srcset="/images/hero.avif" type="image/avif">
  <source srcset="/images/hero.webp" type="image/webp">
  <img src="/images/hero.jpg" alt="Descriptive alt text" loading="lazy">
</picture>

Asset Organization

public/
├── images/
│   ├── blog/
│   │   └── [post-slug]/
│   │       ├── cover.webp
│   │       ├── cover.avif
│   │       └── *.webp
│   ├── og/
│   │   └── [page-slug].png
│   ├── icons/
│   │   └── *.svg
│   └── hero/
│       └── *.webp
├── fonts/
│   └── *.woff2
└── videos/
    └── *.mp4

Component Patterns

File Naming

  • Components: PascalCase.tsx (e.g., Button.tsx, NavBar.tsx)
  • Utilities: camelCase.ts (e.g., formatDate.ts)
  • Hooks: useCamelCase.ts (e.g., useAuth.ts)
  • Types: types.ts or [feature].types.ts

Component Structure

// components/Button.tsx
import { type ReactNode } from 'react'

interface ButtonProps {
  children: ReactNode
  variant?: 'primary' | 'secondary'
  onClick?: () => void
}

export function Button({ children, variant = 'primary', onClick }: ButtonProps) {
  return (
    <button
      className={`btn btn-${variant}`}
      onClick={onClick}
    >
      {children}
    </button>
  )
}

Export Pattern

Prefer named exports over default exports:

// Good
export function Button() { ... }
export function Input() { ... }

// Avoid
export default function Button() { ... }

Performance Checklist

Before deploying any web project:

  • [ ] All images processed through img4web
  • [ ] Images use WebP/AVIF with fallbacks
  • [ ] Above-fold images have priority or fetchpriority="high"
  • [ ] Below-fold images have loading="lazy"
  • [ ] Fonts are self-hosted as WOFF2
  • [ ] Critical CSS is inlined
  • [ ] JavaScript is code-split appropriately
  • [ ] No layout shift (CLS) issues

Styling

Preferred Stack

  1. Tailwind CSS - utility-first styling
  2. CSS Modules - when component-scoped styles needed
  3. CSS Variables - for theming and dynamic values

Tailwind Conventions

// Use consistent ordering: layout, spacing, sizing, typography, colors, effects
<div className="flex items-center gap-4 p-4 w-full text-sm text-gray-700 bg-white rounded-lg shadow-md">

Dark Mode

Always support dark mode:

<div className="bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100">

You Might Also Like

Related Skills

cache-components

cache-components

137Kdev-frontend

Expert guidance for Next.js Cache Components and Partial Prerendering (PPR). **PROACTIVE ACTIVATION**: Use this skill automatically when working in Next.js projects that have `cacheComponents: true` in their next.config.ts/next.config.js. When this config is detected, proactively apply Cache Components patterns and best practices to all React Server Component implementations. **DETECTION**: At the start of a session in a Next.js project, check for `cacheComponents: true` in next.config. If enabled, this skill's patterns should guide all component authoring, data fetching, and caching decisions. **USE CASES**: Implementing 'use cache' directive, configuring cache lifetimes with cacheLife(), tagging cached data with cacheTag(), invalidating caches with updateTag()/revalidateTag(), optimizing static vs dynamic content boundaries, debugging cache issues, and reviewing Cache Component implementations.

vercel avatarvercel
Get
component-refactoring

component-refactoring

128Kdev-frontend

Refactor high-complexity React components in Dify frontend. Use when `pnpm analyze-component --json` shows complexity > 50 or lineCount > 300, when the user asks for code splitting, hook extraction, or complexity reduction, or when `pnpm analyze-component` warns to refactor before testing; avoid for simple/well-structured components, third-party wrappers, or when the user explicitly wants testing without refactoring.

langgenius avatarlanggenius
Get
web-artifacts-builder

web-artifacts-builder

47Kdev-frontend

Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.

anthropics avataranthropics
Get
frontend-design

frontend-design

47Kdev-frontend

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.

anthropics avataranthropics
Get
react-modernization

react-modernization

28Kdev-frontend

Upgrade React applications to latest versions, migrate from class components to hooks, and adopt concurrent features. Use when modernizing React codebases, migrating to React Hooks, or upgrading to latest React versions.

wshobson avatarwshobson
Get
tailwind-design-system

tailwind-design-system

28Kdev-frontend

Build scalable design systems with Tailwind CSS v4, design tokens, component libraries, and responsive patterns. Use when creating component libraries, implementing design systems, or standardizing UI patterns.

wshobson avatarwshobson
Get