x-content-type
What it does
This skill checks that a web server sends the nosniff security header. It is for developers and IT staff who harden websites against common attacks.
When to use it
- ✓When a server's responses do not include the X-Content-Type-Options header.
- ✓When a security checklist asks for header hardening.
- ✓When files are uploaded and then served back to visitors.
Skill link
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/x-content-type/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Our security scan says we are missing the X-Content-Type-Options header. Can you add it?”
5 new skills a week. 1 minute to read.
How it works
The agent adds the header to the server or framework configuration for all responses. It then checks the response headers to confirm the header is present.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Set X-Content-Type-Options: nosniff
Browsers that MIME-sniff can be tricked into executing malicious JavaScript uploaded as an image — even if the server sends Content-Type: image/png. nosniff forces the browser to honor the declared type.
Quick Reference
- Set
X-Content-Type-Options: nosniffon all responses — the only valid value isnosniff - Without this header, browsers may execute a JavaScript file disguised as an image if the server serves it with the wrong MIME type
- This header is required by OWASP's security hardening checklist and the Fetch specification
- Pair with correct
Content-Typeheaders on all responses for defense in depth - Takes 5 minutes to configure and has no compatibility issues
Check
Check whether the server sends an X-Content-Type-Options: nosniff header on responses. Verify the header is present on HTML pages, scripts, stylesheets, and API responses.
Fix
Add X-Content-Type-Options: nosniff to all HTTP responses. Configure it at the web server level (Nginx, Apache) or in your application framework, and verify with curl -I https://example.com.
Explain
Explain what MIME type sniffing is, how it can be exploited to execute malicious files, and how X-Content-Type-Options: nosniff prevents this attack.
Code Review
Review server config, headers, forms, and integration points related to Set X-Content-Type-Options: nosniff. Flag exact responses, cookies, or browser behaviors that violate the rule, and verify them against the effective production-like response.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/security/x-content-type
FAQ
What does nosniff do?
It tells browsers to trust the declared file type, instead of guessing it and possibly running a harmful file.
Are there compatibility issues?
The skill says the header has no known compatibility problems and takes minutes to set up.
How can I check that it works?
The skill suggests checking the response headers with a curl request.
Details
Original description by the author
Use when auditing HTTP response headers on any web server or CDN for security hardening.
Popularity
- GitHub stars
- 75k
- Ranking position
- #3090
- License
- MIT
- Updated
- 10/31/2026
Comments
- …
More skills from this repository
frontendchecklist
75kChecks frontend code and live pages against 380+ rules for accessibility, speed, SEO and security, using a command-line tool.
frontend-checklist-global
75kAudits a frontend project against all 386 Front-End Checklist rules, and gives a specific fix for each issue found.
404-page
75kChecks that your missing-page screen offers helpful links and returns a real 404 status, to help lost visitors find their way.
about-page
75kReviews whether your site has a clear About page that explains who runs it, to build trust with visitors and search engines.
Similar skills
reverse-engineer-anything
422kHelps your agent look inside shipped apps and packages to explain features, compare versions, or guide a rebuild, using the REA tool.
1password
394kHelps your agent set up the 1Password CLI, sign in, and read or inject secrets without printing their values into chat.
healthcheck
394kHelps your agent audit the computer or server that runs OpenClaw for security risks, such as SSH, firewall, updates, and backups, then suggest safe fixes.