К основному содержанию
скилл CX Codex

add-integration — скилл для Claude Code: установка

Скилл добавляет и настраивает интеграции Astro, адаптеры и UI-фреймворки. Нужен, когда проекту требуются React, Tailwind, MDX или серверный адаптер.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add incluud/astro-agent-skills --skill add-integration -a claude-code
Открыть на GitHub

Что делает add-integration

Скилл сначала определяет тип изменения: UI-фреймворк, стили, адаптер деплоя, контентный инструмент или утилита. Затем он выбирает astro add, если интеграция поддерживает официальный путь, либо подключает пакет вручную через пакетный менеджер и astro.config.*.

Он проверяет регистрации в integrations, output, импорты стилей, переменные окружения и настройки платформы. Для React, Vue и других фреймворков скилл подбирает директиву гидрации: от client:visible до client:only, когда это действительно нужно.

После настройки он предлагает запустить astro check, astro build или тесты проекта и проверить ошибки гидрации. Для Astro 6 сначала нужна среда с Node 22.12.0 или новее, иначе интеграционные сбои легко принять за ошибки приложения.

Какие задачи решает

  • добавить официальную интеграцию Astro
  • подключить React, Vue или Svelte
  • настроить адаптер Netlify, Vercel, Cloudflare или Node
  • проверить импорт стилей и конфигурацию Tailwind
  • найти ошибки гидрации после настройки

Примеры запросов агенту

  • Добавь React в Astro-проект и настрой интеграцию через официальный путь.
  • Подключи Tailwind и проверь импорт общей таблицы стилей.
  • Настрой адаптер Vercel, обнови astro.config.* и проверь сборку.

Как установить add-integration

1Через Skills CLI (Vercel)

npx skills add incluud/astro-agent-skills --skill add-integration -a claude-code

2Вручную: положить файлы

~/.claude/skills/add-integration/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/add-integration/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о add-integration

Как установить add-integration в Claude Code?

Выполните npx skills add incluud/astro-agent-skills --skill add-integration -a claude-code, затем проверьте файл ~/.claude/skills/add-integration/SKILL.md.

Что делает add-integration?

Скилл добавляет интеграции Astro, адаптеры, UI-фреймворки и инструменты для стилей или контента. Он также проверяет конфигурацию, гидрацию и результат сборки.

Что нужно проверить при использовании add-integration с Astro 6?

Среда должна работать на Node 22.12.0 или новее. После настройки стоит проверить регистрацию интеграции, output и соответствие среды требованиям адаптера.

Исходный текст

SKILL.md · MIT
---
name: add-integration
description: Add and configure Astro integrations, adapters, and UI framework tooling.
---

# Add Astro Integration

Use this skill when adding official or community integrations to an Astro project, including UI frameworks, styling tools, adapters, content tooling, and utilities.

If `astro-best-practices` is available, apply it alongside this skill for performance, accessibility, and hydration defaults.

## Workflow

### 1. Classify the integration

Identify what is being added before changing anything:

- UI framework: React, Vue, Svelte, Preact, Solid
- Styling: Tailwind, UnoCSS, Sass, CSS tooling
- Deployment adapter: Netlify, Vercel, Cloudflare, Node
- Content tooling: MDX, Markdoc, CMS integrations
- Utilities: sitemap, Partytown, analytics, database helpers

This determines whether the change affects rendering mode, hydration, config shape, or build output.

### 2. Prefer the official Astro path

Use `astro add` when an official integration supports it:

```bash
npx astro add react
npx astro add tailwind
npx astro add netlify
```

If the integration is community-maintained, install it with the project package manager and wire it into `astro.config.*` manually.

Before finalizing, verify the current setup in the official Astro docs or the integration README, especially when Astro or the integration recently changed versions.

If the project is also upgrading Astro itself, upgrade Astro and official integrations together. For Astro 6, confirm the environment is running Node 22.12.0 or newer before treating integration issues as application bugs.

### 3. Configure Astro deliberately

When editing `astro.config.*`:

- add integrations explicitly and keep the array readable
- set `output` only when the adapter or runtime requires it
- avoid enabling server output unless the feature actually needs request-time work
- preserve existing config ordering unless the integration docs require a specific sequence

Example:

```ts
import { defineConfig } from 'astro/config'
import react from '@astrojs/react'

export default defineConfig({
  integrations: [react()],
})
```

### 4. Handle framework components with restraint

When adding React, Vue, or another UI framework:

- prefer `.astro` for static content
- keep framework components for interactive islands
- choose the lightest client directive that satisfies the UX

Hydration guidance:

- `client:visible` for below-the-fold or deferred UI
- `client:idle` for non-critical enhancements
- `client:load` only for immediately interactive UI
- `client:only` only when skipping server rendering is intentional

### 5. Finish the surrounding setup

Do not stop at package installation. Check for:

- stylesheet imports or entrypoints
- environment variables
- config files such as `tailwind.config.*`
- adapter-specific output requirements
- platform deployment settings

For Tailwind v4, the minimum setup is often just:

```css
@import "tailwindcss";
```

and importing that stylesheet from a shared layout or entrypoint.

### 6. Validate the result

After setup:

- confirm the integration is registered in `astro.config.*`
- run the project checks that make sense for the repo, such as `astro check`, `astro build`, or the existing test suite
- confirm the deployment/runtime environment still matches the adapter requirements after major Astro upgrades
- inspect for hydration mismatches, missing styles, or adapter/runtime drift

## Common Failure Modes

- Package installed but not added to `integrations`
- Adapter added without matching `output`
- Styles present but never imported
- Framework component added where a plain `.astro` component would be simpler
- Overuse of `client:load`, increasing JavaScript cost

© incluud · MIT · incluud/astro-agent-skills

Похожие скиллы

Всё по теме «Фронтенд и UI» →
add-ui aladicf Генерирует пять разных вариантов интерфейса для новой или существующей секции, а потом помогает сравнить их и внедрить выбранный. CX Codex +1 636установок astro Mindrally Скилл задаёт агенту правила работы с Astro: статическая генерация, частичная гидратация, файловый роутинг и минимум клиентского JavaScript. CX Codex +1 886установок flutter-add-integration-test flutter Скилл настраивает интеграционные тесты во Flutter через пакет integration_test. Он переносит действия из MCP-сервера в готовые тестовые сценарии. CX Codex +1 38 200установок clerk-astro-patterns clerk Подсказывает агенту, как подключить Clerk к Astro: middleware, защита SSR-страниц, авторизация в API-роутах и островных компонентах. CX Codex +1 14 300установок astro-typescript-cursorrules-prompt-file PatrickJS Правило задаёт Cursor стандарты для Astro, TypeScript и TailwindCSS, а также добавляет слэш-команду для подготовки Git-коммитов. ★ 41 024звёзд репо dittu Manish-Tamang Клонирует фронтенд любого сайта в проект Next.js или Astro и сверяет точность вёрстки попиксельным диффом. CX Codex +1 ★ 44звёзд репо

Из того же набора4

Спонсоры проекта

Компании, которые помогают держать аналитику открытой