x-frame-options
What it does
This skill checks whether a site blocks other websites from embedding its pages in frames. It is for developers and security staff protecting sites where users log in or take actions.
When to use it
- ✓When a site with logins or payments has no framing protection header.
- ✓When a security scan reports a clickjacking risk.
- ✓When a site should be embedded only on its own domain.
Skill link
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/x-frame-options/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
“A security scan says my login page can be put inside another site's frame. How do I block that?”
5 new skills a week. 1 minute to read.
How it works
The agent adds a header that stops other sites from framing the pages, or limits framing to the same domain. It can also suggest the newer CSP frame-ancestors setting.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Set an X-Frame-Options header
Without framing protection, an attacker can embed your banking login page in a transparent iframe on a malicious site and trick users into clicking buttons they cannot see — transferring money, changing settings, or leaking credentials.
Quick Reference
- Use
X-Frame-Options: DENYto prevent all framing, orSAMEORIGINto allow framing only from your own domain ALLOWFROMis obsolete and unsupported in modern browsers — use CSPframe-ancestorsinstead- The modern equivalent is
Content-Security-Policy: frame-ancestors 'none'— prefer CSP for new sites - Both headers can coexist: X-Frame-Options for older browsers, frame-ancestors for modern ones
- Clickjacking attacks trick users into clicking invisible iframe buttons — DENY eliminates this entirely
Check
Check whether the server sends an X-Frame-Options header (DENY or SAMEORIGIN) or a Content-Security-Policy header with frame-ancestors directive to prevent clickjacking.
Fix
Add X-Frame-Options: DENY to all responses if the site does not need to be embedded anywhere. If legitimate framing is needed on the same origin, use SAMEORIGIN. For fine-grained control, use CSP frame-ancestors instead.
Explain
Explain what a clickjacking attack is, how X-Frame-Options and CSP frame-ancestors prevent it, and the difference between DENY and SAMEORIGIN values.
Code Review
Review server config, headers, forms, and integration points related to Set an X-Frame-Options header. 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-frame-options
FAQ
What is clickjacking?
It is an attack where a hidden frame lets a malicious site trick users into clicking buttons they cannot see.
What is the difference between DENY and SAMEORIGIN?
DENY blocks all framing, while SAMEORIGIN allows framing only from your own domain.
Is ALLOWFROM still supported?
No. The skill says it is obsolete and unsupported in modern browsers.
Details
Original description by the author
Use when reviewing HTTP response headers for clickjacking protection on any web application with authenticated user actions.
Popularity
- GitHub stars
- 75k
- Ranking position
- #3091
- 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.