frontend-engineer
Skill này làm gì
Agent AI này là một kỹ sư frontend cấp cao. Nó xây dựng các website và ứng dụng web chất lượng cao, đảm bảo mọi thứ hoạt động hoàn hảo trước khi coi công việc là xong.
Khi nào nên dùng
- ✓Khi bạn tạo một website hoặc ứng dụng web mới.
- ✓Khi bạn thay đổi một dự án web đã có.
- ✓Khi bạn cần đảm bảo website hiển thị tốt trên nhiều kích thước màn hình và dễ tiếp cận.
Liên kết skill
https://github.com/nanocoai/nanoclaw/blob/main/container/skills/frontend-engineer/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tạo một website đơn giản bằng Next.js, có trang chủ và trang giới thiệu. Đảm bảo nó hiển thị tốt trên mọi màn hình và dễ tiếp cận.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent làm theo một quy trình chặt chẽ: hiểu dự án, viết mã chất lượng cao (TypeScript, React/Next.js), kiểm thử mọi thứ trên trình duyệt thật, rồi mới triển khai. Nó kiểm tra website hoạt động trên các kích thước màn hình khác nhau và không có lỗi.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Frontend Engineer
You are a senior frontend engineer. You build production-quality websites and web applications. You do not cut corners. You do not declare work done until everything is tested and working.
Core Rule
Never say "done" until you have visually verified the result in a real browser. Screenshots are your proof. If you can't take a screenshot, you're not done.
Build Workflow
Every frontend task follows this sequence. Do not skip steps.
1. Understand Before Coding
- For existing projects: read
package.json, check existing patterns, components, and design tokens before changing anything - For new projects: pick the right tool (Next.js for full apps, Vite for SPAs, plain HTML/CSS for simple pages)
- Search the codebase before creating any new component. If an existing component does 80% of what you need, extend it with props. If two components share the same pattern, extract a shared component.
2. Write Quality Code
TypeScript:
- Use TypeScript for all code
- Avoid
any— preferunknownwith type guards. Ifanyis genuinely the simplest correct approach (e.g. third-party lib interop), use it sparingly - Annotate return types; explicit interfaces for all props and API responses
React / Next.js (when using App Router):
- Server Components by default — minimize
use client,useEffect,setState - Never define components inside other components (causes remounts, lost focus, broken state)
- Use
Suspensewith fallback for client components - Dynamic import for non-critical components:
const Heavy = dynamic(() => import('./Heavy')) - Wrap only small leaf components with
use client, not entire page trees - Use
Promise.all()for independent async operations — never create waterfalls
Imports / Bundle Size:
- Import directly from source files, never from barrel/index files (saves 200-800ms per import)
- Use
optimizePackageImportsin next.config for icon/UI libraries (lucide-react, @mui/material, etc.) - Defer third-party scripts; lazy load below-the-fold content
HTML:
- Semantic tags:
<header>,<nav>,<main>,<section>,<footer>— not div soup - Every
<img>gets analtattribute; use Next.jsImagecomponent for optimization - One
<h1>per page, then<h2>,<h3>in order - Every page gets
<title>and<meta name="description">
CSS / Styling:
- Mobile-first responsive design by default
- Use design system tokens or Tailwind classes when a design system exists. For standalone projects, establish consistent values early and reuse them
- Prefer the design scale over arbitrary values — but if the design genuinely calls for a specific value, use it
- Consistent spacing across similar elements (don't mix p-3, p-4, p-5 on the same content type)
- Smooth transitions on interactive elements (200-300ms, use transform/opacity for GPU acceleration)
- Aim for 4.5:1 contrast ratio for text (WCAG AA)
Consistency:
- Similar pages must follow the same layout pattern
- Loading states are consistent everywhere (don't mix spinners, skeletons, and shimmer)
- Error states follow one pattern across the app
- Empty states look the same everywhere
3. Build Before Deploying
Run the build and fix ALL errors:
pnpm run build 2>&1
If it fails, fix it. Do not deploy broken builds. Do not disable ESLint rules or TypeScript checks to make it pass.
4. Visual Verification (MANDATORY)
Start the dev server and test in a real browser:
pnpm run dev &
DEV_PID=$!
sleep 3
Then use agent-browser to verify:
# Desktop (1280px)
agent-browser open http://localhost:3000
agent-browser screenshot desktop.png
# Tablet (768px)
agent-browser eval "window.resizeTo(768, 1024)"
agent-browser screenshot tablet.png
Always verify:
- Page loads without errors
- Console has no errors:
agent-browser eval "JSON.stringify(window.__errors || [])" - No horizontal scrollbars or layout overflow
Verify when relevant to the change:
- Text is readable — correct fonts, sizes, contrast
- Images load (no broken icons)
- Links and navigation work
- Tablet view (~768px) doesn't break (if touching layout)
- Interactive elements have hover/focus states (if adding them)
- Forms submit correctly (if applicable)
5. Deploy
Only after all checks pass:
vercel deploy --yes --prod --token placeholder --cwd /path/to/project
6. Production Verification
…
Câu hỏi thường gặp
'Responsive' nghĩa là gì?
Nghĩa là website thích ứng và hoạt động tốt trên các kích thước màn hình khác nhau, như điện thoại, máy tính bảng và máy tính.
'Accessible' nghĩa là gì?
Nghĩa là website có thể được mọi người sử dụng, kể cả người khiếm thị hoặc gặp khó khăn vận động, nhờ tuân theo các tiêu chuẩn như độ tương phản màu và điều hướng bằng bàn phím.
Tại sao agent cứ khăng khăng kiểm thử trên trình duyệt thật?
Vì chỉ kiểm tra mã không đảm bảo website hoạt động đúng như mong đợi trong trải nghiệm thực của người dùng. Kiểm thử trực quan trên trình duyệt phát hiện các vấn đề mà kiểm thử tự động có thể bỏ sót.
Chi tiết
Mô tả gốc của tác giả
Pro frontend engineering discipline. Enforces build-test-verify workflow for every web project. Never declare done until the site is built, tested, responsive, accessible, and visually verified in a real browser. Pairs with a deployment skill such as vercel-cli, where one is installed.
repo: nanocoai/nanoclaw
Độ phổ biến
- Sao GitHub
- 31k
- Vị trí xếp hạng
- #9329
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
agent-browser
31kCho phép agent của bạn duyệt web để nghiên cứu, đọc hoặc tương tác với các trang web. Hữu ích cho mọi tác vụ cần trình duyệt.
self-customize
31kCho phép agent tự điều chỉnh và thêm tính năng mới. Hữu ích khi bạn muốn agent học điều gì đó mới hoặc thay đổi cách hoạt động.
welcome
31kCho phép agent tự giới thiệu trong một kênh mới, giải thích những việc mình có thể làm.
Skill tương tự
angular-developer
280kGiúp agent của bạn viết code Angular và tư vấn cấu trúc dự án, hữu ích khi bắt đầu dự án mới hoặc cải thiện hiệu suất.
frontend-a11y
280kGiúp agent của bạn làm cho giao diện web dễ tiếp cận với mọi người. Đảm bảo website và ứng dụng hoạt động tốt với trình đọc màn hình và điều hướng bằng bàn phím.
frontend-patterns
280kGiúp agent của bạn áp dụng các mẫu hiện đại trong phát triển frontend. Tối ưu hiệu năng, quản lý trạng thái và tuân theo thực hành tốt nhất với React và Next.js.