mime-type
하는 일
이 스킬은 서버가 HTML, CSS, 자바스크립트, 이미지, 폰트와 함께 보내는 콘텐츠 타입 헤더를 확인합니다. 웹 서버를 관리하거나 깨진 페이지 리소스를 진단하는 사람을 위한 스킬입니다.
사용하는 경우
- ✓서버가 올바른 파일 타입을 보내는지 확인해 달라고 요청할 때.
- ✓스타일시트나 스크립트가 로드되지 않고 콘텐츠 타입이 잘못된 것 같을 때.
- ✓새 호스팅이나 프레임워크를 설정하면서 헤더가 올바른지 확인하려 할 때.
스킬 링크
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/mime-type/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“내 사이트에서 CSS가 로드되지 않아요. 서버가 올바른 콘텐츠 타입을 보내는지 확인해 주실 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트가 주요 페이지와 연결된 파일의 응답 헤더를 검사하고, 각 헤더를 예상 타입과 비교합니다. 예를 들어 스타일시트는 text/css여야 하며, 일치하지 않으면 서버 변경을 제안합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
MIME Type Validation
Incorrect MIME types cause browsers to block stylesheets and scripts (MIME sniffing is disabled by X-Content-Type-Options: nosniff), breaking page rendering and signalling poor site quality to crawlers.
Quick Reference
- The Content-Type header must match the actual file type being served
- HTML pages must be served as text/html; charset=utf-8
- CSS files must be served as text/css and JavaScript as text/javascript
- Incorrect MIME types cause browsers to block or mishandle resources
Check
For key pages and their linked resources, inspect the HTTP Content-Type response header. Verify HTML responses use text/html; charset=utf-8, CSS uses text/css, JS uses text/javascript, and images use image/jpeg, image/png, etc.
Fix
Update your server configuration to serve each file type with its correct MIME type. Set X-Content-Type-Options: nosniff to prevent browsers from guessing content types. In Next.js and similar frameworks, configure headers in next.config.js.
Explain
The Content-Type header tells browsers and crawlers what kind of content is being sent. When it mismatches the actual file type, browsers either block the resource or render it incorrectly—CSS served as text/plain won't be applied, and JavaScript served as text/html may be blocked by strict MIME checking.
Code Review
For HTML, CSS, and JS assets, check the Content-Type response header. Verify HTML responses include 'charset=utf-8'. Check that X-Content-Type-Options: nosniff is set. Flag any resource returning Content-Type: text/html that is not an HTML page. Check for missing charset declarations on text responses.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
자주 묻는 질문
콘텐츠 타입이 틀리면 어떻게 되나요?
브라우저가 파일을 막거나 잘못 표시할 수 있어서, 스타일시트가 전혀 적용되지 않을 수 있다고 스킬은 설명합니다.
nosniff는 무엇을 하나요?
X-Content-Type-Options 헤더는 브라우저가 타입을 추측하지 말고 서버가 보낸 값을 따르도록 합니다.
Next.js에서는 어떻게 설정하나요?
next.config.js 파일에서 헤더를 설정하라고 스킬은 제안합니다.
상세 정보
작성자의 원본 설명
Use when auditing server configuration or diagnosing broken resources. Applies to any web server serving HTML, CSS, JS, images, fonts, or other static assets.
인기도
- GitHub 스타
- 75k
- 순위
- #2938
- 라이선스
- MIT
- 업데이트
- 2026. 10. 31.
댓글
- …
이 저장소의 다른 스킬
frontendchecklist
75k명령줄 도구를 사용해 380개가 넘는 규칙으로 프런트엔드 코드와 실시간 페이지를 접근성, 속도, SEO, 보안 측면에서 점검합니다.
frontend-checklist-global
75kFront-End Checklist의 386개 규칙 전체로 프런트엔드 프로젝트를 감사하고, 발견한 문제마다 구체적인 해결 방법을 제시합니다.
404-page
75k없는 페이지 화면에 도움이 되는 링크가 있고 실제 404 상태 코드를 반환하는지 확인해, 길을 잃은 방문자를 돕습니다.
about-page
75k사이트를 운영하는 사람을 설명하는 명확한 소개 페이지가 있는지 검토해, 방문자와 검색 엔진의 신뢰를 높입니다.
비슷한 스킬
openclaw-update
394k에이전트가 설치 방식에 맞는 방법을 골라 기존 OpenClaw Gateway를 업데이트하고, 세션이 계속 작동하도록 돕습니다.
diagnose-gateway
394k에이전트가 설정, 채널, 포트를 확인해 OpenClaw Gateway가 왜 실패하는지 찾되, 아무것도 바꾸지 않도록 돕습니다.
crabbox-apps
394k에이전트가 임시 클라우드 머신에서 앱을 열고 실행한 뒤, 그 화면을 채팅의 측면 패널에 보여 주도록 돕습니다.