referrer-policy
What it does
This skill checks the headers a site sends and sets a Referrer-Policy that limits what address information is shared with other sites. It is for developers who want to protect sensitive links and tokens.
When to use it
- ✓When you ask the agent to review the security headers of a website.
- ✓When your pages include private tokens or IDs in the address and you want to stop them leaking.
- ✓When you are hardening an app that handles logins or sessions.
Skill link
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/referrer-policy/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
“My password reset links have tokens in them. Can you make sure those tokens cannot leak to other sites when someone clicks a link?”
5 new skills a week. 1 minute to read.
How it works
The agent checks whether a Referrer-Policy header is sent and sets it to strict-origin-when-cross-origin, a recommended default. For pages with especially sensitive addresses, it suggests a stricter setting.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Set a Referrer-Policy header
Without a Referrer-Policy, a password reset link like https://example.com/reset?token=abc123 is included in the Referer header when the user clicks an external link on that page — leaking the token to third parties.
Quick Reference
- Use
Referrer-Policy: strict-origin-when-cross-origin— the recommended modern default strict-origin-when-cross-originsends the full URL for same-origin requests, only the origin for cross-origin HTTPS, and nothing for HTTPS→HTTP- Never use
unsafe-url— it sends the full URL including path and query string to every external site - Can be set via HTTP header,
<meta>tag, or thereferrerpolicyattribute on individual<a>and<img>elements - Sensitive URLs (reset tokens, private IDs) in query strings can be exposed via the Referer header if policy is too permissive
Check
Check whether the server sends a Referrer-Policy header and verify the value is appropriate. The recommended value is strict-origin-when-cross-origin. Check for any pages with sensitive URL parameters that could be leaked via the Referer header.
Fix
Add Referrer-Policy: strict-origin-when-cross-origin to all HTTP responses. Configure it in your web server, CDN, or application framework. For pages with particularly sensitive URLs, consider no-referrer or same-origin.
Explain
Explain what the Referer header contains, how a permissive Referrer-Policy can leak sensitive URL parameters to third parties, and what the difference is between the various Referrer-Policy values.
Code Review
Review server config, headers, forms, and integration points related to Set a Referrer-Policy 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/referrer-policy
FAQ
What does strict-origin-when-cross-origin do?
It sends the full address to your own site, only the site name to other HTTPS sites, and nothing when moving from HTTPS to HTTP.
Why should unsafe-url be avoided?
The skill says it sends the full address, including path and query, to every external site.
Where else can the policy be set?
The skill says it can also be set with a meta tag or on individual links and images.
Details
Original description by the author
Use when reviewing HTTP response headers for privacy hardening on any website that handles authentication, session state, or sensitive URL parameters.
Popularity
- GitHub stars
- 75k
- Ranking position
- #2993
- 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.