session-cookie-flags
What it does
This skill checks the cookies that keep users logged in and sets the security flags that protect them. It is for developers who manage authentication and server configuration.
When to use it
- ✓When you ask the agent to review the cookie settings of a login or session system.
- ✓When your site sets session cookies without security flags.
- ✓When you add authentication middleware and want the cookies configured safely from the start.
Skill link
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/session-cookie-flags/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
“Can you check the session cookies my login system sets and add the Secure, HttpOnly, and SameSite flags?”
5 new skills a week. 1 minute to read.
How it works
The agent reviews the Set-Cookie headers and cookie creation code. It adds Secure so the cookie is sent only over HTTPS, HttpOnly so scripts cannot read it, and SameSite set to Strict or Lax to limit cross-site requests.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Set Secure, HttpOnly, and SameSite flags on session cookies
Missing cookie flags are one of the most common and easily fixed authentication weaknesses. Without Secure, session tokens are transmitted in plain text over HTTP and can be captured by network eavesdroppers. Without HttpOnly, any XSS payload can exfiltrate the session token in one line. Without SameSite, any website can trigger authenticated actions on behalf of the victim without their knowledge.
Quick Reference
- Secure — cookie is only sent over HTTPS, never plain HTTP
- HttpOnly — cookie is invisible to JavaScript (blocks XSS theft)
- SameSite=Strict or Lax — prevents the cookie from being sent on cross-site requests (blocks CSRF)
- Never use SameSite=None without also setting Secure and understanding the CSRF implications
Check
Check whether session and authentication cookies are set with the Secure, HttpOnly, and SameSite flags.
Fix
Update the server's cookie configuration to include Secure, HttpOnly, and SameSite=Strict (or Lax) on all session and auth cookies.
Explain
Explain what each cookie security flag does and the specific attack each one prevents.
Code Review
Review all Set-Cookie headers and cookie creation code. Flag any cookies missing the HttpOnly flag, absent Secure flag, or an unspecified or overly permissive SameSite setting.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/security/session-cookie-flags
FAQ
What does HttpOnly protect against?
The skill says it hides the cookie from JavaScript, which blocks many cross-site scripting attacks from stealing the session.
What does SameSite protect against?
The skill says it stops the cookie from being sent on cross-site requests, which helps block cross-site request forgery.
When is SameSite None acceptable?
The skill says only when Secure is also set and the cross-site request risks are understood.
Details
Original description by the author
Use when reviewing server-side session management, setting up authentication middleware, or auditing cookie configuration in HTTP response headers.
Popularity
- GitHub stars
- 75k
- Ranking position
- #3017
- 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.