Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问许可证需确认审计异常

front-dev前端开发

Agent Skill

front-dev 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

245

周安装

10

GitHub Stars

公开资料未说明

下载量

78
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:front-dev(前端开发)
来源仓库:https://github.com/marsolab/skills
仓库路径:skills/front-dev
安装命令:
npx skills add https://github.com/marsolab/skills --skill front-dev
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/marsolab/skills --skill front-dev

简介

front-dev 用于查找、检索和筛选相关信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词快速定位候选结果。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装,需结合原始 README 核验具体用法。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 暂无额外注意事项,建议参考来源仓库获取最新使用说明。

SKILL.md

Web Frontend Stack

Build modern, performant web applications using Bun + Astro + React/Preact + Tailwind v4 + Shadcn UI.

Core Philosophy

Astro is always the foundation. We don't choose between Astro and React — we use them together:

  • Astro handles routing, pages, layouts, and static content (zero JS by default)
  • React/Preact powers interactive islands within Astro pages
  • Tailwind v4 provides utility-first styling with CSS variables
  • Shadcn UI gives us accessible, customizable React components
  • Bun accelerates development with fast installs, builds, and testing
┌─────────────────────────────────────────────────────────────────┐
│                         Astro (Foundation)                       │
│  ┌──────────────┐  ┌──────────────┐  ┌──────────────────────┐  │
│  │ Static Page  │  │ Static Page  │  │    Dynamic Page      │  │
│  │   (0 JS)     │  │   (0 JS)     │  │  ┌────────────────┐  │  │
│  │              │  │              │  │  │  React Island  │  │  │
│  │  Hero.astro  │  │ About.astro  │  │  │  client:load   │  │  │
│  │  Footer.astro│  │              │  │  └────────────────┘  │  │
│  │              │  │              │  │  ┌────────────────┐  │  │
│  │              │  │              │  │  │ Preact Island  │  │  │
│  │              │  │              │  │  │ client:visible │  │  │
│  └──────────────┘  └──────────────┘  │  └────────────────┘  │  │
│                                       └──────────────────────┘  │
└─────────────────────────────────────────────────────────────────┘

Workflow: New Project

Follow these steps when creating a new frontend project from scratch.

Step 1: Check for Agentation

Before writing any frontend code, check if the user has Agentation installed — a visual feedback tool that lets you click elements on the page and generate structured context for AI agents.

  1. Look for "agentation" in package.json devDependencies
  2. If NOT found, propose to the user:
Agentation provides visual feedback for AI-assisted frontend development — you click elements, add notes, and I get precise selectors and context. Want me to install it?

If they agree:

bun add -d agentation
# Also install the Claude Code skill for setup automation:
npx skills add benjitaylor/agentation

Add to the dev-only layout wrapper:

import { Agentation } from 'agentation';

// Only render in development
{import.meta.env.DEV && <Agentation />}

Step 2: Scaffold the Project

# Initialize Astro project
bun create astro@latest my-project
cd my-project

# Add integrations
bunx astro add react     # React islands
bunx astro add tailwind  # Tailwind CSS v4

# Initialize Shadcn UI
bunx shadcn@latest init
bunx shadcn@latest add button card form input dialog

# Start dev server
bun run dev

Step 3: Configure Logging

Set up LogTape for structured logging across all runtimes. See references/bun.md for full patterns.

bun add @logtape/logtape
import { configure, getConsoleSink } from '@logtape/logtape';

await configure({
  sinks: { console: getConsoleSink() },
  loggers: [{ category: ['myapp'], lowestLevel: 'info', sinks: ['console'] }],
});

Step 4: Set Up Testing

Set up Playwright for E2E testing. Ask the user which browser(s) they want:

BrowserBest ForSpeed
ChromiumDefault, full compatBaseline
FirefoxCross-browserSimilar
WebKitSafari compatSimilar
LightpandaFast CI, headless11x faster

See references/testing.md for full Playwright config, Lightpanda setup, and component testing patterns.

bun add -d @playwright/test
bunx playwright install chromium  # or user's chosen browser

Step 5: First Dev Run

bun run dev
# Open http://localhost:4321

Workflow: Existing Project

When working on an existing frontend project:

  1. Detect the stack — read astro.config.mjs, package.json, tsconfig.json to understand what's already configured
  2. Check for Agentation — same as Step 1 above. If missing, propose it.
  3. Route to the right reference based on the task:

- Building pages/routing → references/astro.md - React/Preact components → references/react.md or references/preact.md - Styling/theming → references/tailwind.md - Forms/tables/UI → references/shadcn.md - Testing → references/testing.md - Deploying → references/deployment.md

Project Type Decision

BuildingAstro ConfigKey Integrations
Content site (blog, docs)Static (default)Content Collections, MDX, Tailwind
Web app (dashboard, SaaS)SSR or hybridReact islands, Shadcn UI, React Query
E-commerceHybridStatic product pages, React cart island
Landing pageStaticMinimal islands, Tailwind, Astro components
DocumentationStaticContent Collections, MDX, search island
Internal toolSSRReact islands (heavy), Shadcn DataTable, Forms

Island Framework: React vs Preact

NeedChooseWhy
Shadcn UI componentsReactShadcn is built for React
Complex state (React Query, Zustand)ReactEcosystem support
Bundle size critical (<50KB page JS)Preact~3KB vs ~40KB
High-frequency updates (live data)Preact + SignalsFine-grained reactivity
Simple widget (counter, toggle, form)PreactSmaller, sufficient
Web Component outputPreactSmaller, easier to wrap
Default (no specific need)Preact without Shadcn, React with Shadcn

Both can coexist in the same Astro project:

bunx astro add react preact

File convention: *.tsx for React, *.preact.tsx for Preact (or use folders).

Hydration Strategy

DirectiveWhenUse Case
(none)NeverStatic content — zero JS
client:loadPage loadCritical interactivity (nav, auth)
client:idleBrowser idleNon-critical features (analytics, chat)
client:visibleIn viewportBelow-fold content (comments, footer)
client:mediaMedia matchResponsive features (desktop-only)
client:onlyPage load, no SSRBrowser-only APIs (WebGL, canvas)

State Management

State TypeSolution
UI state (form, toggle)useState / useReducer
Derived stateuseMemo / computed signals
Server state (API data)React Query / SWR
Global UI (theme, sidebar)Zustand (React) or @preact/signals (Preact)
Form state (complex)react-hook-form + Zod
URL state (filters, pagination)Query params / nuqs
Cross-island stateAstro nanostores or custom events

Testing Strategy

LayerToolWhat to TestCount
Unitbun test / VitestUtils, hooks, pure functionsMany
ComponentTesting LibraryReact/Preact interactionsSome
IntegrationTesting Library + MSWFeatures with mocked APIsSome
E2EPlaywrightCritical user flowsFew

See references/testing.md for full setup, browser selection, Lightpanda integration, and MSW patterns.

Tool Integration: Agentation

Agentation provides visual feedback for AI- assisted frontend development. It renders a toolbar in the bottom-right corner during development — click any element to annotate it and generate structured context with CSS selectors and positions.

Detection: Check package.json for "agentation" in devDependencies.

If not installed, propose to the user:

bun add -d agentation
npx skills add benjitaylor/agentation

Setup in Astro layout:

import { Agentation } from 'agentation';

// Dev-only — renders toolbar for visual annotation
{import.meta.env.DEV && <Agentation />}

MCP Integration: Agentation has an MCP server that lets Claude Code access annotations directly in real-time without manual copy-pasting. Recommend the user set this up for the best experience.

Requirements: React 18+, desktop browsers only.

Tool Integration: LogTape

LogTape is the preferred logging library — zero dependencies, 5.3KB, works across Node.js, Deno, Bun, browsers, and edge functions. ~2x faster than Pino with nested categories and lazy evaluation.

bun add @logtape/logtape

Key advantages over Pino:

  • Multi-runtime: One logger for server + client + edge
  • Library-friendly: Libraries log without configuring; apps configure sinks
  • Lazy evaluation: Templates only interpolated if level is enabled
  • Integrations: Express, Fastify, Hono, OpenTelemetry, Sentry

See references/bun.md for full LogTape patterns, request logging middleware, and OpenTelemetry integration.

Tool Integration: Lightpanda

Lightpanda is a Zig-based headless browser — 11x faster than Chrome, 9x less memory. CDP-compatible with Playwright.

# Install
curl -fsSL https://pkg.lightpanda.io/install.sh | bash
# Or Docker: docker run -p 9222:9222 lightpanda/browser:nightly

# Connect from Playwright
lightpanda serve --host 127.0.0.1 --port 9222

Use for: fast CI tests, web scraping, AI browser automation. Not for: visual regression, screenshot testing, CSS layout checks.

See references/testing.md for full Playwright + Lightpanda configuration.

Architecture Principles

  1. Astro-First — Every page starts static, add islands only when needed
  2. Mobile-First — Base styles for mobile, responsive variants for larger
  3. Accessibility-First — Semantic HTML, keyboard nav, ARIA when needed
  4. Performance Budget — <100KB JS per page, LCP <2.5s, CLS <0.1

Quick Start: Page with Islands

---
// src/pages/index.astro
import Layout from '../layouts/Layout.astro';
import Hero from '../components/Hero.astro';
import Counter from '../components/Counter';
import Comments from '../components/Comments';
---

<Layout title="Home">
  <Hero />                              <!-- Static: Zero JS -->
  <Counter client:load />               <!-- Immediate hydration -->
  <Comments client:visible />           <!-- Hydrate when visible -->
</Layout>

Reference Files

Consult these based on what you're working on:

When you need to...Read
Build Astro pages, routing, content collections, View Transitions, error pages, SSR, MDXreferences/astro.md
Write React components, hooks, state management, React Query, error boundariesreferences/react.md
Use Preact, Signals, fine-grained reactivity, Web Componentsreferences/preact.md
Style with Tailwind v4, @theme, container queries, CVA variants, dark modereferences/tailwind.md
Use Shadcn UI forms, data tables, dialogs, command palettereferences/shadcn.md
Set up Bun server, LogTape logging, bundling, TypeScript configreferences/bun.md
Configure testing: Playwright, Lightpanda, Vitest, Testing Library, MSW, E2Ereferences/testing.md
Deploy to Vercel, Netlify, Cloudflare, Docker, static hostingreferences/deployment.md
Implement security: XSS prevention, CSRF, CSP, auth, rate limitingreferences/security.md
Add accessibility: ARIA, focus management, keyboard nav, screen readersreferences/accessibility.md

Common Pitfalls

AreaPitfallSolution
AstroMaking everything an islandOnly client:* for interactivity
Astroclient:load everywhereUse idle/visible for non-critical
ReactReact libs for simple widgetsUse Preact for small islands
PreactMixing signals with useStateSignals outside components
TailwindHardcoded colorsUse semantic tokens via @theme
ShadcnNot customizing componentsOwn the code, modify freely
TestingOnly testing in ChromiumAdd Firefox/WebKit, consider Lightpanda for CI
DeployNot testing production buildAlways bun run preview before deploying

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.9%
按下载量换算29

Claude

30.32%
按下载量换算24

Cursor

17.23%
按下载量换算13

Gemini CLI

8.76%
按下载量换算7

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

未通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills