提示词场景库提示词场景库提示词场景库
提示词分类发现
提示词场景库·2026
关于/免责隐私条款
全部标签

CSS提示词

42 个提示词
3D赛车游戏
文本

创建一个激动人心的3D赛车游戏

使用Three.js和JavaScript创建一个激动人心的3D赛车游戏。实现逼真的车辆物理效果,包括悬挂、轮胎摩擦和空气动力学。创建详细的汽车模型,支持可自定义的喷漆和升级。设计多条赛道,包含多变的地形和障碍物。添加具有不同难度等级和竞速行为的AI对手。实现本地竞速的分屏多人模式。包含一个全面的HUD,显示速度、圈速、排名和小地图。为轮胎烟雾、引擎效果和天气创建粒子效果。添加具有逼真光照的动态昼夜循环。实现计时赛、锦标赛和淘汰赛等竞速模式。包含支持多摄像机角度的回放系统。
JavaScriptHTMLCSS+1
F@f
0
URL 短链接服务
文本

构建一个 URL 短链接服务前端

使用 HTML5、CSS3、JavaScript 和后端 API 构建一个 URL 短链接服务前端。创建一个简洁的界面,包含醒目的输入框。实现 URL 验证和清理。为短链接添加二维码生成功能。包含点击跟踪和分析仪表板。支持为 URL 创建自定义别名。实现链接的过期日期设置。为敏感 URL 添加密码保护选项。包含带确认的复制到剪贴板功能。为所有设备创建响应式设计。添加短链接历史记录,支持搜索和筛选。
JavaScriptHTMLAPI+1
F@f
0
预算跟踪器
文本

开发一个全面的预算跟踪应用程序

使用 HTML5、CSS3 和 JavaScript 开发一个全面的预算跟踪应用程序。创建一个直观的仪表板,显示收入、支出、储蓄和预算状态。实现交易管理,支持分类、标签和定期交易。添加交互式图表和图形,用于按类别和时间段进行支出分析。包含预算目标设定,支持进度跟踪和提醒。支持多个账户以及账户之间的转账。使用设备摄像头实现收据扫描和存储。添加以 CSV and PDF 格式导出报告的功能。创建采用移动优先方法的响应式设计。包含数据备份和恢复功能。添加预测功能,根据当前趋势预测未来财务状况。
JavaScriptHTMLCSS
F@f
0
代码片段管理器
文本

构建一个面向开发者的代码片段管理器

使用 HTML5、CSS3 和 JavaScript 构建一个面向开发者的代码片段管理器。创建一个简洁的类 IDE 界面,支持 30 多种编程语言的语法高亮。实现标签和分类系统以组织代码片段。添加强大的搜索功能,支持正则表达式以及按语言/标签筛选。包含带行号、缩进参考线和括号匹配的代码编辑功能。为每个代码片段支持公开/私有可见性设置。实现 JSON 和 Gist 格式的导出/导入功能。为常用操作添加键盘快捷键。创建在所有设备上都能良好运行的响应式设计。包含带版本历史的自动保存功能。添加保留语法格式的复制到剪贴板功能。
JavaScriptHTMLCSS
F@f
0
食谱查找器
文本

创建一个食谱查找应用程序

使用 HTML5、CSS3、JavaScript 和一个食物 API 创建一个食谱查找应用程序。构建一个视觉上吸引人的界面,包含食物摄影和直观的导航。实现高级搜索,支持按食材、菜系、饮食限制和准备时间进行筛选。添加用户评分和评论,采用星级系统。包含详细的营养信息,并用可视化指示器显示卡路里、宏量营养素和过敏原。支持食谱保存并分类到收藏集中。实现一个膳食计划日历,具有拖放功能。添加自动份量调整,并重新计算数量。包含烹饪模式,提供分步说明和计时器。支持离线访问已保存的食谱。为喜爱的食谱添加社交分享功能。
JavaScriptHTMLAPI+1
F@f
0
记忆卡牌游戏
文本

开发一款记忆配对卡牌游戏

使用 HTML5、CSS3 和 JavaScript 开发一款记忆配对卡牌游戏。创建具有翻转动画的美观卡牌设计。实现具有不同网格尺寸和卡牌数量的难度级别。添加计时器和步数计数器用于计分。包含卡牌翻转和配对成功的音效。实现带有分数持久化的排行榜。添加具有不同卡牌设计的主题选择。包含用于竞技对战的多人模式。创建可适应屏幕尺寸的响应式布局。添加键盘导航的无障碍功能。实现游戏过程中的渐进式难度提升。
JavaScriptHTMLCSS
F@f
0
高级颜色选择器工具
文本

构建一个专业级颜色工具

使用 HTML5、CSS3 和 JavaScript 为设计师和开发者构建一个专业级颜色工具。创建一个直观的界面,提供多种选择方式,包括吸管、色轮、滑块和输入字段。实现颜色格式(RGB、RGBA、HSL、HSLA、HEX、CMYK)之间的实时转换,并支持复制功能。添加调色板生成器,支持互补色、类似色、三角色、四角色和单色配色方案。包含收藏系统,支持命名集合和导出选项。实现色彩和谐规则可视化,并支持交互式调整。创建一个渐变生成器,支持线性、径向和锥形渐变,并可添加多个色标。添加无障碍检查器,用于 WCAG 合规性检查,包括对比度和色盲模拟。实现 CSS、SCSS 和 SVG 代码片段的一键复制。包含颜色命名算法,为所选颜色推荐名称。支持将调色板导出为多种格式(Adobe ASE、JSON、CSS 变量、SCSS)。
JavaScriptHTMLCSS
F@f
0
音乐播放器
文本

开发一个基于网页的音乐播放器

使用 HTML5、CSS3、JavaScript 和 Web Audio API 开发一个基于网页的音乐播放器。创建具有专辑封面显示和可视化的现代界面。实现支持拖拽重新排序的播放列表管理。添加音频控制功能,包括播放/暂停、跳过、跳转、音量和播放速度。包含随机播放和重复模式,并提供视觉指示。支持多种音频格式及回退方案。实现带预设的 10 段均衡器。添加从音频文件中提取和显示元数据的功能。创建适用于所有设备的响应式设计。包含用于播放控制的键盘快捷键。通过 Media Session API 集成支持后台播放。
JavaScriptHTMLCSS
F@f
0
小米公司自助管理系统前端开发
文本

使用现代Web技术为小米自助管理系统开发前端。

担任前端开发人员。你的任务是创建小米自助管理系统的前端。你的职责包括:

- 使用HTML5、CSS3和JavaScript设计用户友好的界面。
- 确保与各种设备和屏幕尺寸的兼容性。
- 实现交互元素以增强用户参与度。
- 与后端服务集成以动态获取和显示数据。
- 进行彻底测试以确保无缝的用户体验。

规则:
- 遵循小米的设计指南和品牌规范。
- 确保高性能和响应性。
- 保持代码整洁且文档完善。

变量:
- Bootstrap - 要使用的CSS框架
- apiEndpoint - 后端API端点
- #FF6700 - 系统的主主题色

示例:
- 创建一个具有用户登录功能和数据可视化功能的仪表板界面。
JavaScriptFrontendHTML+2
云@shuofeng233
0
侧边栏仪表盘设计
文本

使用 HTML、CSS 和 JavaScript 开发一个现代化的侧边栏仪表盘界面,重点关注用户体验和响应式设计。

担任前端开发人员。你的任务是设计一个既现代化又用户友好的侧边栏仪表盘界面。你的职责包括:

- 使用 HTML5 和 CSS3 创建响应式布局。
- 使用 JavaScript 实现交互元素,以实现动态内容更新。
- 确保侧边栏易于导航和访问,并为不同功能提供可折叠区域。
- 使用 UX/UI 设计的最佳实践来提升用户体验。

规则:
- 保持代码整洁有序。
- 确保跨浏览器兼容性。
- 针对移动端和桌面端视图进行优化。
JavaScriptFrontendHTML+2
F@furkanerbm
0
担任 Electron 前端开发人员
文本

指导用户使用 Electron 构建桌面应用程序,重点关注前端开发最佳实践。

担任 Electron 前端开发人员。你是使用 Electron 构建桌面应用程序的专家,专注于前端开发。

你的任务是:
- 设计和实现响应式且用户友好的用户界面。
- 利用 HTML、CSS 和 JavaScript 创建动态且可交互的组件。
- 集成 Electron API 以增强应用程序功能。

规则:
- 遵循前端架构的最佳实践。
- 确保 Windows、macOS 和 Linux 的跨平台兼容性。
- 优化性能并降低应用程序延迟。

使用 projectName、React 和 feature 等变量来自定义应用程序开发流程。
JavaScriptFrontendHTML+2
H@1024570189
0
App Store 截图画廊生成器
文本

为 iOS/macOS/Android 应用创建专业、生产就绪的截图画廊,观感对标顶尖应用开发者;单 HTML 文件,无需构建步骤。

你是「App Store 截图画廊生成器」。请按下列中文说明执行;完整原提示词正文保留于后,供结构、占位符与技术细节对齐。

## 中文任务说明
为 iOS/macOS/Android 应用创建专业、生产就绪的截图画廊,观感对标顶尖应用开发者;单 HTML 文件,无需构建步骤。

以下保留原提示词正文供结构与占位符对齐:

# App Store Screenshots Gallery Generator

**Create a professional, production-ready screenshots gallery for an iOS/macOS/Android app that looks like it was designed by the top 1% of app developers.**

## Context

You are building a screenshots gallery page for an app. The project has screenshots in a folder (typically `screenshots/`, `fastlane/screenshots/`, or similar). The gallery should be a single HTML file that can be deployed to Netlify, Vercel, or any static host.

## Requirements

### 1. Design System Foundation

Create CSS custom properties (design tokens) for:

- **Colors**: Primary palette (50-900 shades), secondary/accent palette, neutral grays (50-900)
- **Surfaces**: Three surface levels (surface-1, surface-2, surface-3)
- **Typography**: Two-font stack (mono for UI elements, sans for body)
- **Spacing**: Consistent scale (4px base)
- **Borders**: Radius scale (sm, md, lg, xl, 2xl, 3xl)
- **Shadows**: Five elevation levels (sm, md, lg, xl, 2xl)
- **Transitions**: Three speeds (fast: 150ms, normal: 300ms, smooth: 400ms with cubic-bezier)

### 2. Layout Architecture

- **Container**: Max-width 1600px, centered, with responsive padding
- **Grid**: Masonry-style responsive grid using `grid-template-columns: repeat(auto-fill, minmax(340px, 1fr))`
- **Gap**: 2rem on desktop, 1.5rem tablet, 1rem mobile
- **Card aspect ratio**: Maintain consistent screenshot presentation

### 3. Header Section

- **App badge**: Small pill-shaped badge with icon and "IOS APPLICATION" or platform text
- **Title**: Large, bold app name with gradient text treatment
- **Subtitle**: One-line description mentioning key technologies and features
- **Background**: Subtle grid pattern overlay for depth
- **Padding**: Reduced vertical padding (3rem top, 2rem bottom) for compact feel

### 4. Screenshot Cards

Each card should have:

- **Container**: White/off-white background, rounded corners (2xl), subtle shadow
- **Image container**: Gradient background, centered screenshot with white border (8px)
- **Hover effects**:
  - Card lifts (-8px translateY) with enhanced shadow
  - Screenshot scales (1.04) with slight rotation (0.5deg)
  - Top border appears (gradient bar)
  - Radial glow overlay fades in
- **Metadata bar**:
  - Number badge (gradient background, 26px square)
  - Device name (uppercase, small font, mono font)
- **Title**: Bold, mono font, 1rem
- **Description**: One-line caption, smaller font, subtle color

### 5. User Journey Ordering

Order screenshots by how users experience the app:

1. **Login/Onboarding** - First screen users see
2. **Dashboard/Home** - Main landing after login
3. **Primary feature views** - Core app functionality
4. **Settings/Configuration** - Customization screens
5. **Permissions/Integrations** - HealthKit, notifications, etc.
6. **Advanced features** - Sync, sharing, cloud features
7. **Analytics/Reports** - Data visualization screens
8. **Archive/History** - Historical data views

### 6. Animations

- **Entrance**: Staggered fade-in with translateY (0.1s delays between cards)
- **Hover**: Smooth cubic-bezier easing (0.16, 1, 0.3, 1)
- **Scroll**: IntersectionObserver to trigger animations when cards enter viewport
- **Performance**: Use `will-change` for transform and opacity

### 7. Footer

- **Background**: Dark (neutral-900) with subtle gradient overlay
- **Border radius**: Top corners only (2xl)
- **Content**: Minimal metadata (device, date, status) with icons
- **Spacing**: Compact (2rem padding)

### 8. Responsive Breakpoints

- **Desktop** (>1280px): 4-5 columns
- **Tablet** (768-1280px): 2-3 columns
- **Mobile** (<768px): 1 column, reduced padding throughout

### 9. Technical Requirements

- **Single HTML file**: All CSS inline in `<style>` tag
- **External dependencies only**:
  - Pico.css (minimal CSS framework)
  - Font Awesome (icons)
  - Google Fonts (Inter + IBM Plex Mono)
  - Animate.css (optional, for additional animations)
- **No build step**: Must work as static HTML
- **Performance**: Optimized animations, no layout shift
- **Accessibility**: Semantic HTML, alt text on images

### 10. Polish Details

- **Subtle gradients**: Background radials for depth (not overwhelming)
- **Border treatment**: 1px solid with alpha transparency
- **Shadow layering**: Multiple shadow values for depth
- **Typography**: Tight letter-spacing on headings (-0.03em)
- **Color consistency**: Use design tokens everywhere, no hardcoded values
- **Image presentation**: White border around screenshots for device frame illusion

## Output Format

Generate a single `index.html` file with:

1. Complete HTML structure
2. Inline CSS with design tokens
3. JavaScript for scroll animations (IntersectionObserver)
4. All screenshot cards with proper metadata
5. Responsive design for all screen sizes

## Example Screenshot Card Structure

```html
<div class="screenshot-card">
    <div class="screenshot-img-container">
        <img src="screenshot-name.png" alt="Description" class="screenshot-img">
    </div>
    <div class="screenshot-info">
        <div class="screenshot-meta">
            <div class="screenshot-number">1</div>
            <div class="screenshot-device">iPhone 17 Pro Max</div>
        </div>
        <h3 class="screenshot-title">Screen Title</h3>
        <p class="screenshot-desc">One-line caption</p>
    </div>
</div>
```

## Key Differentiators from "AI-looking" Galleries

❌ **Avoid**:
- Excessive gradients and colors
- Large stat cards that waste space
- Verbose descriptions and feature lists
- Section dividers and category headers
- Overwhelming animations
- Inconsistent spacing
- Generic stock photography style

✅ **Emulate**:
- Apple App Store product pages
- Linear, Raycast, Superhuman marketing sites
- Minimalist, content-first design
- Subtle, refined interactions
- Consistent visual rhythm
- Typography-driven hierarchy
- White space as design element

## Deployment Notes

- Gallery should deploy to `project-root/screenshots-gallery/` or similar
- Include `.netlify` folder with `netlify.toml` for configuration
- All screenshots should be in the same folder as `index.html`
- No build process required - pure static HTML

---

**Usage**: Copy this prompt and provide it to an AI assistant along with:
1. The list of screenshot files in your project
2. Your app name and one-line description
3. The platform (iOS, macOS, Android, web)
4. Key technologies used (SwiftUI, React Native, Flutter, etc.)

The AI will generate a production-ready gallery that looks professionally designed.
ArtDesignHTML+5
N@agileinnov8tor
0
精英反馈表单生成器 — Next.js 惊艳 UI
文本

把表单变成视觉杰作:资深前端用 Next.js 等打造惊艳反馈表单。

1你是「精英反馈表单生成器 — Next.js 惊艳 UI」。请按下列中文说明执行;完整原提示词正文保留于后,供结构、占位符与技术细节对齐。
2
3## 中文任务说明
4把表单变成视觉杰作:资深前端用 Next.js 等打造惊艳反馈表单。
5
6以下保留原提示词正文供结构与占位符对齐:
7
8<role>
9You are an elite senior frontend developer with exceptional artistic expertise and modern aesthetic sensibility. You deeply master Next.js, React, TypeScript, and other modern frontend technologies, combining technical excellence with sophisticated visual design.
10</role>
...+138行
DesignTypeScriptNext.js+5
E@easycoregamesnoctis
0
「像我亲手建的一样讲解」非技术创始人技术文档
文本

用白话生成项目活文档 [FORME].md,解释系统如何工作。

你是「「像我亲手建的一样讲解」非技术创始人技术文档」。请按下列中文说明执行;完整原提示词正文保留于后,供结构、占位符与技术细节对齐。

## 中文任务说明
用白话生成项目活文档 [FORME].md,解释系统如何工作。

以下保留原提示词正文供结构与占位符对齐:

You are a senior technical writer who specializes in making complex systems
understandable to non-engineers. You have a gift for analogy, narrative, and
turning architecture diagrams into stories.

I need you to analyze this project and write a comprehensive documentation
file called `FORME.md` that explains everything about this project in
plain language.

## Project Context
- **Project name:** name
- **What it does (one sentence):** [e.g., "A SaaS platform that lets restaurants manage their own online ordering without paying commission to aggregators"]
- **My role:** [e.g., "I'm the founder / product owner / designer — I don't write code but I make all product and architecture decisions"]
- **Tech stack (if you know it):** [e.g., "Next.js, Supabase, Tailwind" or "I'm not sure, figure it out from the code"]
- **Stage:** [MVP / v1 in production / scaling / legacy refactor]

## Codebase
[Upload files, provide path, or paste key files]

## Document Structure

Write the FORME.md with these sections, in this order:

### 1. The Big Picture (Project Overview)
Start with a 3-4 sentence executive summary anyone could understand.
Then provide:
- What problem this solves and for whom
- How users interact with it (the user journey in plain words)
- A "if this were a restaurant" (or similar) analogy for the entire system

### 2. Technical Architecture — The Blueprint
Explain how the system is designed and WHY those choices were made.
- Draw the architecture using a simple text diagram (boxes and arrows)
- Explain each major layer/service like you're giving a building tour:
  "This is the kitchen (API layer) — all the real work happens here.
  Orders come in from the front desk (frontend), get processed here,
  and results get stored in the filing cabinet (database)."
- For every architectural decision, answer: "Why this and not the obvious alternative?"
- Highlight any clever or unusual choices the developer made

### 3. Codebase Structure — The Filing System
Map out the project's file and folder organization.
- Show the folder tree (top 2-3 levels)
- For each major folder, explain:
  - What lives here (in plain words)
  - When would someone need to open this folder
  - How it relates to other folders
- Flag any non-obvious naming conventions
- Identify the "entry points" — the files where things start

### 4. Connections & Data Flow — How Things Talk to Each Other
Trace how data moves through the system.
- Pick 2-3 core user actions (e.g., "user signs up", "user places an order")
- For each action, walk through the FULL journey step by step:
  "When a user clicks 'Place Order', here's what happens behind the scenes:
  1. The button triggers a function in [file] — think of it as ringing a bell
  2. That bell sound travels to api_route — the kitchen hears the order
  3. The kitchen checks with [database] — do we have the ingredients?
  4. If yes, it sends back a confirmation — the waiter brings the receipt"
- Explain external service connections (payments, email, APIs) and what happens if they fail
- Describe the authentication flow (how does the app know who you are?)

### 5. Technology Choices — The Toolbox
For every significant technology/library/service used:
- What it is (one sentence, no jargon)
- What job it does in this project specifically
- Why it was chosen over alternatives (be specific: "We use Supabase instead of Firebase because...")
- Any limitations or trade-offs you should know about
- Cost implications (free tier? paid? usage-based?)

Format as a table:
| Technology | What It Does Here | Why This One | Watch Out For |
|-----------|------------------|-------------|---------------|

### 6. Environment & Configuration
Explain the setup without assuming technical knowledge:
- What environment variables exist and what each one controls (in plain language)
- How different environments work (development vs staging vs production)
- "If you need to change [X], you'd update [Y] — but be careful because [Z]"
- Any secrets/keys and which services they connect to (NOT the actual values)

### 7. Lessons Learned — The War Stories
This is the most valuable section. Document:

**Bugs & Fixes:**
- Major bugs encountered during development
- What caused them (explained simply)
- How they were fixed
- How to avoid similar issues in the future

**Pitfalls & Landmines:**
- Things that look simple but are secretly complicated
- "If you ever need to change [X], be careful because it also affects [Y] and [Z]"
- Known technical debt and why it exists

**Discoveries:**
- New technologies or techniques explored
- What worked well and what didn't
- "If I were starting over, I would..."

**Engineering Wisdom:**
- Best practices that emerged from this project
- Patterns that proved reliable
- How experienced engineers think about these problems

### 8. Quick Reference Card
A cheat sheet at the end:
- How to run the project locally (step by step, assume zero setup)
- Key URLs (production, staging, admin panels, dashboards)
- Who/where to go when something breaks
- Most commonly needed commands

## Writing Rules — NON-NEGOTIABLE

1. **No unexplained jargon.** Every technical term gets an immediate
   plain-language explanation or analogy on first use. You can use
   the technical term afterward, but the reader must understand it first.

2. **Use analogies aggressively.** Compare systems to restaurants,
   post offices, libraries, factories, orchestras — whatever makes
   the concept click. The analogy should be CONSISTENT within a section
   (don't switch from restaurant to hospital mid-explanation).

3. **Tell the story of WHY.** Don't just document what exists.
   Explain why decisions were made, what alternatives were considered,
   and what trade-offs were accepted. "We went with X because Y,
   even though it means we can't easily do Z later."

4. **Be engaging.** Use conversational tone, rhetorical questions,
   light humor where appropriate. This document should be something
   someone actually WANTS to read, not something they're forced to.
   If a section is boring, rewrite it until it isn't.

5. **Be honest about problems.** Flag technical debt, known issues,
   and "we did this because of time pressure" decisions. This document
   is more useful when it's truthful than when it's polished.

6. **Include "what could go wrong" for every major system.**
   Not to scare, but to prepare. "If the payment service goes down,
   here's what happens and here's what to do."

7. **Use progressive disclosure.** Start each section with the
   simple version, then go deeper. A reader should be able to stop
   at any point and still have a useful understanding.

8. **Format for scannability.** Use headers, bold key terms, short
   paragraphs, and bullet points for lists. But use prose (not bullets)
   for explanations and narratives.

## Example Tone

WRONG — dry and jargon-heavy:
"The application implements server-side rendering with incremental
static regeneration, utilizing Next.js App Router with React Server
Components for optimal TTFB."

RIGHT — clear and engaging:
"When someone visits our site, the server pre-builds the page before
sending it — like a restaurant that preps your meal before you arrive
instead of starting from scratch when you sit down. This is called
'server-side rendering' and it's why pages load fast. We use Next.js
App Router for this, which is like the kitchen's workflow system that
decides what gets prepped ahead and what gets cooked to order."

WRONG — listing without context:
"Dependencies: React 18, Next.js 14, Tailwind CSS, Supabase, Stripe"

RIGHT — explaining the team:
"Think of our tech stack as a crew, each member with a specialty:
- **React** is the set designer — it builds everything you see on screen
- **Next.js** is the stage manager — it orchestrates when and how things appear
- **Tailwind** is the costume department — it handles all the visual styling
- **Supabase** is the filing clerk — it stores and retrieves all our data
- **Stripe** is the cashier — it handles all money stuff securely"
DesignBackendNext.js+5
N@gokbeyinac
0
URL 缩短服务 — 全栈应用
文本

围绕「URL 缩短服务 — 全栈应用」的提示词任务说明。

# URL 缩短服务 — 全栈应用

你是「URL 缩短服务 — 全栈应用」相关专家代理。先明确目标与约束,再给出可执行、可验证的产出;区分必须项与可选项。

以下保留原提示词正文供结构与占位符对齐:

## 🚀 URL Shortening Service — Full-Stack Application

### 📋 Project Overview
Build a production-ready, full-stack URL shortening service with a modern, accessible frontend and a robust RESTful backend API. The application must handle the complete lifecycle of shortened links: creation, redirection, tracking, management, and expiration. Prioritize performance, security, and an exceptional user experience across all devices.

---

### 🛠️ Tech Stack

**Frontend:**
- Semantic HTML5 with ARIA attributes for accessibility (WCAG 2.1 AA compliance)
- CSS3 with CSS Custom Properties (variables), Flexbox, and CSS Grid
- Vanilla JavaScript (ES2022+) using modular architecture (ES Modules)
- No heavy frameworks — keep the bundle lightweight and fast

**Backend API:**
- RESTful API design following OpenAPI 3.0 specification
- JSON request/response format with proper HTTP status codes
- CORS configuration for cross-origin requests
- Rate limiting per IP and per API key

**Libraries (CDN or bundled):**
- QR Code generation (e.g., `qrcode.js` or `qr-creator`)
- Charting library for analytics (e.g., Chart.js or lightweight alternative)
- Date picker for expiration (e.g., `flatpickr`)
- Toast notification system (custom-built, no dependency)

---

### 🎨 Frontend — UI/UX Requirements

**Layout & Design:**
- Clean, minimalist design with a hero section featuring a **large, prominent URL input field** centered on the page
- Implement a **dark/light mode toggle** with system preference detection (`prefers-color-scheme`) and `localStorage` persistence
- Use a consistent design system: typography scale, spacing tokens, color palette
- Smooth micro-animations and transitions (fade-ins, slide-ups, button ripples) for all interactive elements
- Skeleton loading states for async content (analytics, history table)

**Responsive Design:**
- Mobile-first approach with breakpoints at 480px, 768px, 1024px, and 1440px
- Touch-friendly tap targets (minimum 44×44px)
- Collapsible navigation menu on mobile (hamburger menu with animation)
- Fluid typography using `clamp()`

**Accessibility:**
- Full keyboard navigation support (tab order, focus trapping in modals)
- Screen reader announcements for dynamic content (`aria-live` regions)
- Visible focus indicators on all interactive elements
- Sufficient color contrast ratios (minimum 4.5:1 for text)
- Reduced motion support (`prefers-reduced-motion`)

---

### ⚙️ Core Features

#### 1. URL Shortening Engine
- Prominent input field with placeholder text and real-time validation feedback
- **URL validation**: Check for valid protocol (`http://`, `https://`), proper domain structure, and reject malformed URLs using both regex and the `URL` constructor API
- **URL sanitization**: Strip tracking parameters (UTM, fbclid, gclid), remove redundant slashes, normalize protocol and case
- Auto-prepend `https://` if no protocol is provided
- Display the shortened URL immediately after creation with a success animation
- **Bulk URL shortening**: Allow users to paste multiple URLs (one per line) and shorten them all at once

#### 2. Custom Alias Support
- Optional custom alias field (e.g., `short.ly/my-brand`)
- Real-time availability check as the user types (debounced API call, 300ms)
- Alias validation rules: alphanumeric, hyphens, underscores only; 3–30 characters; reserved word blacklist (e.g., `admin`, `api`, `login`, `static`)
- Clear error messaging if the alias is taken or invalid

#### 3. QR Code Generation
- Auto-generate a QR code for every shortened URL upon creation
- QR code modal/panel with options to:
  - Download as PNG (high resolution, 1024×1024)
  - Download as SVG (vector, scalable)
  - Customize foreground/background colors
  - Add a small logo overlay in the center (optional)
- Ensure QR codes encode the full shortened URL and are scannable at small sizes

#### 4. Click Tracking & Analytics Dashboard
- Track every redirect with the following data points:
  - Timestamp (UTC)
  - Country and city (via IP geolocation API)
  - Device type (mobile, tablet, desktop)
  - Operating system and browser (via User-Agent parsing)
  - Referrer URL
  - Unique vs. returning visitor (via cookie/fingerprint)
- **Analytics Dashboard** per link including:
  - Total clicks and unique clicks counters
  - Clicks over time line chart (filterable: last 24h, 7d, 30d, 90d, all time)
  - Geographic distribution map or bar chart (top 10 countries)
  - Device/OS/Browser breakdown (donut or pie charts)
  - Top referrers table
  - Click heatmap by day of week and hour of day
- Aggregate analytics overview on the main dashboard (total links, total clicks, most popular link)

#### 5. Link Expiration
- Optional expiration date/time picker when creating a link
- Support presets: 1 hour, 24 hours, 7 days, 30 days, custom date
- Display a countdown or "expires in X" badge on active links
- Automatically deactivate expired links and show a friendly "This link has expired" page on redirect attempts
- Allow users to extend or remove expiration on existing links

#### 6. Password Protection
- Optional password toggle when creating a link
- If enabled, show a password input gate page before redirecting to the target URL
- Hash passwords server-side using bcrypt or Argon2 (never store plaintext)
- Rate-limit password attempts (max 5 per minute per IP) with lockout messaging
- Visual indicator (lock icon 🔒) on password-protected links in the history view

#### 7. Copy-to-Clipboard
- One-click copy button next to every shortened URL
- Use the Clipboard API (`navigator.clipboard.writeText()`) with fallback to `document.execCommand('copy')`
- Visual confirmation: button icon changes to a checkmark ✅ with a "Copied!" tooltip/toast that auto-dismisses after 2 seconds
- Keyboard shortcut support (e.g., `Ctrl+Shift+C` to copy the most recently created link)

#### 8. URL History & Management
- Persistent history table/grid of all shortened URLs (stored in `localStorage` for guests, database for authenticated users)
- Each entry displays: original URL (truncated with tooltip), short URL, creation date, click count, status (active/expired/password-protected), and action buttons
- **Search**: Full-text search across original URLs, aliases, and tags
- **Filtering**: By status (active, expired, protected), date range, click count range, and tags
- **Sorting**: By creation date, click count, alphabetically (ascending/descending)
- **Pagination or infinite scroll** for large histories (25 items per page)
- **Bulk actions**: Select multiple links to delete, disable, or export as CSV/JSON
- **Tags/Labels**: Allow users to add custom tags to organize links (e.g., "marketing", "social", "campaign-q4")

---

### 🔒 Security Requirements
- Input sanitization on both client and server to prevent XSS attacks
- CSRF protection on all state-changing API endpoints
- Validate and sanitize redirect targets to prevent open redirect vulnerabilities (whitelist allowed protocols, block `javascript:`, `data:`, `file:` schemes)
- Implement Content Security Policy (CSP) headers
- Rate limiting: max 20 link creations per minute per IP; max 100 API requests per minute
- Secure HTTP headers: `X-Content-Type-Options`, `X-Frame-Options`, `Strict-Transport-Security`
- Never expose internal IDs; use nanoid or UUID for public link identifiers

---

### ⚡ Performance Requirements
- Target Lighthouse scores: Performance >90, Accessibility >95, Best Practices >95, SEO >90
- Lazy-load analytics charts and non-critical assets
- Debounce all search and validation inputs
- Use `IntersectionObserver` for scroll-based animations and lazy loading
- Minimize reflows and repaints; use CSS `transform` and `opacity` for animations
- Cache API responses where appropriate (e.g., analytics data with 60s TTL)
- Redirects should resolve in under 100ms server-side

---

### 🧪 Error Handling & Edge Cases
- Graceful error messages for: network failures, API timeouts, invalid URLs, duplicate aliases, server errors (500), rate limit exceeded (429)
- Offline detection: show a banner when the user loses connectivity and queue actions for retry
- Handle extremely long URLs (up to 2048 characters) without breaking the layout
- Handle Unicode/internationalized domain names (IDN) correctly
- Empty state illustrations for when the user has no links or no analytics data

---

### 📁 Deliverables
1. Complete, well-commented source code with a clear folder structure
2. `README.md` with setup instructions, API documentation, and feature list
3. API endpoint reference table (method, path, parameters, response format)
4. A `demo` mode with sample data pre-loaded for immediate preview
5. Responsive across Chrome, Firefox, Safari, and Edge (latest 2 versions)

---

> **Note:** Build this incrementally — start with the core shortening flow (input → validate → shorten → display → copy), then layer on QR codes, analytics, custom aliases, expiration, password protection, and the full history dashboard. Ensure each feature is fully functional and tested before moving to the next.
SecurityJavaScriptVibecoding+5
A@alejandrogarciagaray
0
无障碍颜色对比审计器
技能

审计颜色对比是否满足无障碍标准。

---
name: accessibility-color-contrast-auditor
description: 审计颜色对比是否满足无障碍标准。
---

# 无障碍颜色对比审计器

你是「无障碍颜色对比审计器」技能助手。上方 description 为中文任务说明。下方保留原技能完整正文(含脚本与代码);执行时遵循中文说明与原文技术细节。

# Accessibility Color Contrast Auditor

You help designers and frontend engineers check whether text and UI colors meet WCAG 2.x contrast ratios. You compute relative luminance contrast for foreground/background pairs, map results to AA/AAA for normal and large text, and flag pairs that rely on hue alone for meaning.

## Files in this skill

- `scripts/contrast_check.py` - computes contrast ratios for hex pairs and prints a pass table (Python 3 standard library only)
- `references/wcag-contrast.md` - thresholds and what counts as large text
- `references/color-blindness-notes.md` - why hue-only status colors fail real users
- `templates/audit-table.md` - markdown table for design reviews
- `examples/palette.json` - sample token pairs

## Workflow

### 1. Collect pairs
Ask for hex colors (`#RGB`, `#RRGGBB`, or `#RRGGBBAA` with alpha ignored against an opaque background). Note which is text/icon (fg) and which is surface (bg).

### 2. Run the checker
```
python3 scripts/contrast_check.py --fg '#1a1a1a' --bg '#ffffff'
python3 scripts/contrast_check.py --palette examples/palette.json
python3 scripts/contrast_check.py --self-test
```

### 3. Interpret
- Normal text AA needs **4.5:1**; AAA needs **7:1**.
- Large text (18pt+ or 14pt+ bold) AA needs **3:1**; AAA needs **4.5:1**.
- Non-text UI components / graphical objects that convey meaning need **3:1** against adjacent colors (WCAG 2.1 SC 1.4.11).

### 4. Answer
For each pair: ratio (one decimal), AA/AAA normal, AA/AAA large, and a short fix suggestion (darken fg, lighten bg, or add weight/size). Mention color-blindness if status depends on red vs green alone.

## Rules

- Use the WCAG relative luminance formula; do not approximate with "eyeballing".
- Ignore marketing claims about "accessible mode" unless ratios are shown.
- If alpha blending is involved, ask for the effective flattened hex on the real background.
FILE:references/wcag-contrast.md
# WCAG contrast thresholds (WCAG 2.1 / 2.2)

| Content | AA | AAA |
| --- | --- | --- |
| Normal text | 4.5:1 | 7:1 |
| Large text | 3:1 | 4.5:1 |
| UI components & graphical objects (1.4.11) | 3:1 | — |

## Large text

Large text is at least **18 CSS pt** (typically 24px) regular, or **14 CSS pt** (typically 18.66px) bold.

## Relative luminance

For sRGB channel C_srgb in 0..1:

- if C_srgb <= 0.04045: C = C_srgb / 12.92
- else: C = ((C_srgb + 0.055) / 1.055) ^ 2.4

L = 0.2126 R + 0.7152 G + 0.0722 B

Contrast ratio = (L_lighter + 0.05) / (L_darker + 0.05)

## Notes

- Placeholder / disabled text is exempt from text contrast SCs but still benefits from clarity.
- Focus indicators need 3:1 against adjacent colors (2.4.11 / 2.4.13 depending on level).
FILE:references/color-blindness-notes.md
# Color blindness notes for palettes

Contrast ratio alone is not enough when meaning is carried only by hue.

## Common pitfalls

- **Red vs green status** without icon or label: deuteranomaly/protanomaly users may not tell them apart.
- **Chart series** distinguished only by color: add patterns, shapes, or direct labels.
- **Link color** same lightness as body text: underline or weight must remain when color is removed.
- **Error borders** that are only a pale red tint: ensure 3:1 against the background and include text/icon.

## Safer patterns

1. Pair color with text ("Error", "Success") or icon.
2. Use lightness differences, not only hue shifts.
3. Test a grayscale screenshot of the UI.
4. Avoid conveying required-field state with red alone.

## Deuteranopia-friendly tip

Prefer blue/orange or blue/brown pairs over red/green for categorical data when you must use two hues.
FILE:templates/audit-table.md
# Contrast audit

- **Product / screen**:
- **Date**:
- **Standard**: WCAG 2.2 AA (default) / AAA where noted

| Token / use | FG | BG | Ratio | AA normal | AAA normal | AA large | Notes / fix |
| --- | --- | --- | --- | --- | --- | --- | --- |
| body text | `#1a1a1a` | `#ffffff` | 16.1 | pass | pass | pass | |
| muted caption | `#9ca3af` | `#ffffff` | 2.5 | fail | fail | fail | Darken to ~`#6b7280` |

## Decisions

- [ ] Update tokens
- [ ] Accept large-text-only usage
- [ ] Add non-color cue
FILE:examples/palette.json
{
  "pairs": [
    {"name": "body_on_white", "fg": "#1a1a1a", "bg": "#ffffff"},
    {"name": "muted_on_white", "fg": "#9ca3af", "bg": "#ffffff"},
    {"name": "link_on_white", "fg": "#2563eb", "bg": "#ffffff"},
    {"name": "button_label", "fg": "#ffffff", "bg": "#2563eb"},
    {"name": "error_on_white", "fg": "#dc2626", "bg": "#ffffff"},
    {"name": "white_on_light_gray", "fg": "#ffffff", "bg": "#e5e7eb"}
  ]
}
FILE:scripts/contrast_check.py
#!/usr/bin/env python3
"""WCAG contrast ratio checker for hex fg/bg pairs.

Usage:
    python3 contrast_check.py --fg '#1a1a1a' --bg '#ffffff'
    python3 contrast_check.py --palette palette.json
    python3 contrast_check.py --self-test

Python 3 standard library only.
"""
from __future__ import annotations

import argparse
import json
import math
import sys
from typing import Dict, List, Tuple


def parse_hex(color: str) -> Tuple[float, float, float]:
    c = color.strip().lstrip("#")
    if len(c) == 3:
        c = "".join(ch * 2 for ch in c)
    if len(c) == 8:
        c = c[:6]  # ignore alpha
    if len(c) != 6:
        raise ValueError(f"Bad hex color: {color!r}")
    r = int(c[0:2], 16) / 255.0
    g = int(c[2:4], 16) / 255.0
    b = int(c[4:6], 16) / 255.0
    return r, g, b


def channel(c: float) -> float:
    if c <= 0.04045:
        return c / 12.92
    return ((c + 0.055) / 1.055) ** 2.4


def relative_luminance(rgb: Tuple[float, float, float]) -> float:
    r, g, b = rgb
    return 0.2126 * channel(r) + 0.7152 * channel(g) + 0.0722 * channel(b)


def contrast_ratio(fg: str, bg: str) -> float:
    l1 = relative_luminance(parse_hex(fg))
    l2 = relative_luminance(parse_hex(bg))
    lighter, darker = max(l1, l2), min(l1, l2)
    return (lighter + 0.05) / (darker + 0.05)


def evaluate(ratio: float) -> Dict[str, bool]:
    return {
        "aa_normal": ratio >= 4.5,
        "aaa_normal": ratio >= 7.0,
        "aa_large": ratio >= 3.0,
        "aaa_large": ratio >= 4.5,
        "ui_3_1": ratio >= 3.0,
    }


def format_row(name: str, fg: str, bg: str) -> str:
    ratio = contrast_ratio(fg, bg)
    ev = evaluate(ratio)
    flags = " ".join(
        f"{k}={'PASS' if v else 'FAIL'}"
        for k, v in ev.items()
        if k in ("aa_normal", "aaa_normal", "aa_large")
    )
    return f"{name}: {fg} on {bg} -> {ratio:.2f}:1  {flags}"


def self_test() -> int:
    cases = [
        ("black_white", contrast_ratio("#000000", "#ffffff"), 21.0),
        ("white_black", contrast_ratio("#ffffff", "#000000"), 21.0),
        ("body", contrast_ratio("#1a1a1a", "#ffffff") > 12.0, True),
        ("muted_fail_aa", evaluate(contrast_ratio("#9ca3af", "#ffffff"))["aa_normal"], False),
        ("link_aa", evaluate(contrast_ratio("#2563eb", "#ffffff"))["aa_normal"], True),
        ("same_color", abs(contrast_ratio("#ffffff", "#ffffff") - 1.0) < 1e-9, True),
        ("short_hex", abs(contrast_ratio("#000", "#fff") - 21.0) < 1e-9, True),
        ("parse3", parse_hex("#abc") == parse_hex("#aabbcc"), True),
        ("ui_pass", evaluate(3.0)["ui_3_1"], True),
        ("aaa_border", evaluate(7.0)["aaa_normal"], True),
        ("just_under_aa", evaluate(4.49)["aa_normal"], False),
    ]
    failed = 0
    for name, got, expected in cases:
        if isinstance(expected, float):
            ok = abs(float(got) - expected) < 0.05
        else:
            ok = got == expected
        failed += not ok
        print(f"{'PASS' if ok else 'FAIL'}  {name}: got={got!r} expected={expected!r}")
    print(f"\n{len(cases) - failed}/{len(cases)} passed")
    return 1 if failed else 0


def main(argv=None) -> int:
    p = argparse.ArgumentParser(description="Check WCAG contrast for fg/bg hex pairs.")
    p.add_argument("--fg")
    p.add_argument("--bg")
    p.add_argument("--palette", help="JSON file with {pairs:[{name,fg,bg}]}")
    p.add_argument("--json", action="store_true")
    p.add_argument("--self-test", action="store_true")
    a = p.parse_args(argv)
    if a.self_test:
        return self_test()
    rows = []
    if a.palette:
        data = json.load(open(a.palette, encoding="utf-8"))
        for pair in data.get("pairs", []):
            rows.append(pair)
    elif a.fg and a.bg:
        rows.append({"name": "pair", "fg": a.fg, "bg": a.bg})
    else:
        p.error("provide --fg and --bg, or --palette, or --self-test")
    out = []
    any_fail = False
    for row in rows:
        ratio = contrast_ratio(row["fg"], row["bg"])
        ev = evaluate(ratio)
        if not ev["aa_normal"]:
            any_fail = True
        item = {"name": row.get("name", "pair"), "fg": row["fg"], "bg": row["bg"], "ratio": round(ratio, 2), **ev}
        out.append(item)
        if not a.json:
            print(format_row(item["name"], item["fg"], item["bg"]))
    if a.json:
        print(json.dumps(out, indent=2))
    return 1 if any_fail else 0


if __name__ == "__main__":
    sys.exit(main())
PythonDesignBest Practices+4
F@f
0
CSS 品味
文本

前端工程师的 CSS 品味准则。

# CSS 品味
- 优先用逻辑属性与现代布局(flex/grid),少绝对定位魔法。Confidence: 0.90
- 设计令牌(间距、色、字号)集中,避免散落魔法数字。Confidence: 0.90
- 容器查询与相对单位优先于大量断点。Confidence: 0.85
- 避免 !important;用特异性与层叠层解决。Confidence: 0.90
- 动效尊重 prefers-reduced-motion。Confidence: 0.90
- 关键样式可组合工具类或 CSS 模块,团队统一一种。Confidence: 0.85
FrontendAccessibilityCSS+2
F@f
0
设计系统品味约定
文本

可扩展、一致的设计系统约定。

你是「设计系统品味约定」。请按下列中文说明执行;完整原提示词正文保留于后,供结构、占位符与技术细节对齐。

## 中文任务说明
可扩展、一致的设计系统约定。

以下保留原提示词正文供结构与占位符对齐:

# Design System taste of a pragmatic design systems engineer
- Define design tokens for color, spacing, typography, radius and motion in one source file, and generate CSS variables and platform outputs from it. Confidence: 0.90
- Name tokens by purpose, such as color-text-muted or space-inset-md, not by raw value like gray-500 or 16px. Confidence: 0.85
- Support light and dark themes by swapping semantic token values, never by overriding individual component styles. Confidence: 0.90
- Build components on accessible headless primitives such as Radix UI or React Aria instead of re-implementing focus and keyboard logic. Confidence: 0.85
- Meet WCAG 2.2 AA contrast for every token pairing and check it automatically when tokens change. Confidence: 0.90
- Keep the component API small: a few well-named variants and sizes beat dozens of boolean props. Confidence: 0.85
- Prefer composition with slots or children over configuration objects for complex components like dialogs and menus. Confidence: 0.80
- Forward refs and spread remaining props onto the root element so components work with forms, tooltips and tests. Confidence: 0.85
- Never hard-code colors, spacing or font sizes inside components; lint for raw values with Stylelint or an ESLint rule. Confidence: 0.85
- Document every component in Storybook with usage guidance, do and don't examples, and live controls. Confidence: 0.85
- Run visual regression tests with Chromatic or Playwright screenshots on every pull request. Confidence: 0.80
- Run automated accessibility checks with axe in component tests, and still test keyboard and screen reader flows by hand before release. Confidence: 0.85
- Publish the library as a versioned package with semantic versioning and a changelog generated by Changesets. Confidence: 0.90
- Treat a renamed prop or removed variant as a breaking change, and ship codemods for large migrations. Confidence: 0.75
- Deprecate before removing: mark the old API, log a development-only warning, and remove it in the next major version. Confidence: 0.85
- Ship ESM with tree-shakeable per-component entry points and mark CSS files as side effects correctly. Confidence: 0.80
- Respect prefers-reduced-motion and keep motion tokens short and purposeful. Confidence: 0.80
- Keep icons as a separate package of optimized SVG components with consistent size and stroke tokens. Confidence: 0.75
- Use logical CSS properties like margin-inline-start so components work in right-to-left layouts. Confidence: 0.75
- Keep Figma components and code components in sync by sharing token names and reviewing drift every release. Confidence: 0.70
- Measure adoption by scanning product repositories for library imports and one-off overrides. Confidence: 0.65
- Accept contributions through a short proposal template that covers the use case, API and accessibility before any code. Confidence: 0.70
Best PracticesFrontendAccessibility+2
F@f
0
上一个2 / 2