filename-quality
Skill này làm gì
Skill này rà soát tên file ảnh trong website hoặc dự án và gợi ý tên rõ ràng hơn. Skill dành cho chủ site và lập trình viên muốn tìm kiếm ảnh tốt hơn và thư mục tài nguyên gọn gàng hơn.
Khi nào nên dùng
- ✓Khi các file ảnh của bạn có tên như IMG_4532.jpg hoặc image1.jpg.
- ✓Khi bạn muốn ảnh của mình xuất hiện tốt hơn trong tìm kiếm hình ảnh.
- ✓Khi đội của bạn khó tìm ảnh trong một thư mục tài nguyên lớn.
Liên kết skill
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/filename-quality/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
“Bạn có thể kiểm tra tên file ảnh của tôi và gợi ý tên tốt hơn không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent quét các tham chiếu ảnh trong mã và thư mục tài nguyên để tìm tên được tạo tự động hoặc không rõ nghĩa. Agent gợi ý tên viết thường, các từ cách nhau bằng dấu gạch ngang và mô tả đúng từng bức ảnh.
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.
Use descriptive image filenames
Google explicitly recommends descriptive filenames in its Image SEO best practices. A file named red-leather-wallet.jpg gives search engines context about the image content, improving discoverability in image search. Generic filenames waste this SEO signal. Descriptive names also help developers maintain large asset libraries without opening every file to identify its content.
Quick Reference
- Use descriptive, hyphen-separated filenames:
hero-homepage-team-collaboration.jpg - Avoid generic names like
image1.jpg,photo.png, or camera defaults likeIMG_4532.jpg - Use lowercase only—avoid uppercase letters and spaces which can cause URL encoding issues
- Google uses filenames as a relevance signal for image search results
Check
Scan all image file references in this codebase (<img src>, CSS url(), import statements, and public/assets directories). Identify filenames that: 1) Use auto-generated names (e.g., IMG_1234.jpg, DSC_0056.png, screenshot-2024-01-01.png). 2) Use meaningless names (e.g., image1.jpg, photo.png, pic.jpg). 3) Contain spaces (e.g., 'my photo.jpg'). 4) Use underscores as word separators (e.g., hero_image.jpg instead of hero-image.jpg). 5) Mix uppercase and lowercase letters. Report each problematic filename with its path.
Fix
Rename image files with descriptive, SEO-friendly names: 1) Replace generic names with descriptive ones reflecting the content (e.g., rename IMG_1234.jpg to blue-running-shoes-side-view.jpg). 2) Use lowercase letters only. 3) Replace spaces and underscores with hyphens. 4) Keep names concise but meaningful—3 to 5 words is ideal. 5) Update all references to the renamed file in HTML, CSS, and JavaScript. For large-scale renames, provide a migration script that reads old paths, generates new names, and updates all references.
Explain
Explain why descriptive filenames matter for image SEO. Google explicitly states it uses filename as a signal for image search ranking. A filename like product-red-leather-wallet.jpg gives Google context about the image before it even analyses the pixels. Generic filenames (image1.jpg, photo.png) provide no signal. Additionally, descriptive filenames improve developer experience—team members can understand what an asset is without opening it.
Code Review
Review image assets, markup, and delivery configuration related to Use descriptive image filenames. Flag exact files or components where format choice, sizing, or loading behavior violates the rule, and describe how to confirm the fix in DevTools.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/images/filename-quality
Câu hỏi thường gặp
Vì sao tên file lại quan trọng với tìm kiếm?
Skill cho biết Google khuyến nghị tên file mô tả như một tín hiệu ngữ cảnh cho tìm kiếm hình ảnh.
Kiểu đặt tên nào được khuyến nghị?
Các từ viết thường cách nhau bằng dấu gạch ngang, ví dụ hero-homepage-team-collaboration.jpg.
Còn dấu cách và dấu gạch dưới thì sao?
Skill đánh dấu dấu cách và dấu gạch dưới, và gợi ý dùng dấu gạch ngang để ngăn cách các từ.
Chi tiết
Mô tả gốc của tác giả
Use when reviewing image assets, markup, and CDN or build transforms related to Use descriptive image filenames. Check encoded size, rendered size, loading strategy, and above-the-fold impact together.
Độ phổ biến
- Sao GitHub
- 75k
- Vị trí xếp hạng
- #2845
- Giấy phép
- MIT
- Cập nhật
- 31/10/2026
Bình luận
- …
Thêm skill từ kho mã này
frontendchecklist
75kKiểm tra mã frontend và trang trực tiếp theo hơn 380 quy tắc về khả năng tiếp cận, tốc độ, SEO và bảo mật, bằng một công cụ dòng lệnh.
frontend-checklist-global
75kKiểm toán một dự án frontend theo đủ 386 quy tắc của Front-End Checklist, và đưa cách sửa cụ thể cho từng vấn đề tìm thấy.
404-page
75kKiểm tra xem trang báo thiếu của bạn có đưa ra các liên kết hữu ích và trả về mã trạng thái 404 thật hay không, để giúp khách bị lạc tìm đường.
about-page
75kKiểm tra xem trang web có trang Giới thiệu rõ ràng giải thích ai điều hành nó hay không, để xây dựng niềm tin với khách và công cụ tìm kiếm.
Skill tương tự
competitive-platform-analysis
280kGiúp bạn hiểu rõ đối thủ cạnh tranh. Công cụ xác định, phân loại và lọc các công ty cạnh tranh trước khi phân tích sâu hơn.
competitive-report-structure
280kTạo báo cáo đối thủ cạnh tranh toàn diện. Kết hợp thông tin để thể hiện bức tranh chung, đề xuất và giúp đồng đội thống nhất hướng đi.
lead-intelligence
280kGiúp agent tìm và liên hệ với những người quan trọng. Phân tích khách hàng tiềm năng, gợi ý cách tiếp cận và quản lý việc liên lạc qua email và mạng xã hội.