# HTTP cookies

> HTTP cookies is an open-source agent skill for security. Guides an agent to write, read and harden HTTP cookies per RFC 6265 and 6265bis. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/ScaleDockHQ/better-supabase/tree/main/.agents/skills/http-cookies
- **Repository:** https://github.com/scaledockhq/better-supabase
- **GitHub stars:** 5
- **License:** MIT
- **Skill name:** http-cookies
- **Collection:** https://github.com/ScaleDockHQ/better-supabase
- **Categories:** [security](https://ai-powered.com/categories/security), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-02

## About

This skill gives an agent a server-side workflow for cookies: writing exact Set-Cookie strings, parsing the Cookie request header, and picking attributes such as Domain, Path, Secure, HttpOnly and SameSite. It walks through inventorying each cookie, choosing its scope and lifetime, and applying the __Secure- and __Host- prefix rules. It also sets a list of invariants, such as size limits, the 400-day lifetime cap and no repeated attributes, and a final verification checklist.

The skill covers the security side too. It lists checks against session fixation, CSRF beyond SameSite, cookie tossing across sibling subdomains and clear-text exposure. It treats RFC 6265 as the current standard and RFC 6265bis as a preview to build on now, and it marks RFC 2109 and RFC 2965 as legacy that should be upgraded rather than emitted.

The agent is expected to read the SKILL.md and its reference files, which are organised by topic: versions, attributes, same-site rules, storage limits and security. Work needs the hosts that set and read each cookie, whether they are all HTTPS, and whether any cookie must travel cross-site, such as in an iframe or single sign-on.

## When your agent uses it

> HTTP cookies (RFC 6265, State Management): set and read cookies safely from a server with Set-Cookie and Cookie, choosing Expires, Max-Age, Domain, Path, Secure, HttpOnly and SameSite, the __Secure- and __Host- name prefixes, sizes and lifetimes. RFC 6265 is the current line; RFC 6265bis (draft-ietf-httpbis-rfc6265bis-22, in the RFC Editor queue) is a preview to build on now, because it defines SameSite=Strict/Lax/None, Lax-by-default, the prefixes, the 400-day lifetime cap and the 4096-octet limit. RFC 2965 and RFC 2109 (Set-Cookie2, Cookie2, $Version) are legacy. Use when designing session cookies, writing or reviewing Set-Cookie headers, parsing a Cookie header, deleting a cookie, scoping a cookie to a subdomain, debugging a cookie that is not sent or not stored, or hardening cookies against CSRF, session fixation, cookie tossing and subdomain attacks. Triggers: Set-Cookie, SameSite, cross-site cookie, third-party cookie, HttpOnly, Secure flag, __Host-, cookie prefix, cookie size limit, cookie expiry.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/ScaleDockHQ/better-supabase/tree/HEAD/.agents/skills/http-cookies)
- [License: MIT](https://github.com/ScaleDockHQ/better-supabase/tree/HEAD/.agents/skills/http-cookies)

## Features

- **Set-Cookie grammar checks:** Validates cookie names, values, attributes and one-field-per-cookie rules against the header grammar.
- **SameSite and prefix guidance:** Explains Strict, Lax and None choices plus the __Secure- and __Host- prefix conditions.
- **Lifetime and size limits:** Covers session versus persistent cookies, the 400-day cap and 4096-octet name-value limit.
- **Cookie header parsing:** Describes reading several Cookie fields, duplicate names and missing cookies without relying on order.
- **Cookie security review:** Checklist for session fixation, CSRF defence, cookie tossing and subdomain attacks.
- **Legacy cookie upgrades:** Steps for moving from RFC 2109 and RFC 2965 Set-Cookie2 code to current standards.

## Good for

- Review the Set-Cookie header for a session cookie
- Find out why a cookie is not sent in a cross-site iframe
- Set up a __Host- prefixed session cookie
- Harden login cookies against CSRF and session fixation
- Parse a Cookie header with duplicate names safely
- Upgrade legacy Set-Cookie2 code to standard cookies

## Install

### Claude Code

This skill ships in the `better-supabase` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add ScaleDockHQ/better-supabase
/plugin install better-supabase@better-supabase
```

Or copy only this skill to `~/.claude/skills/http-cookies`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/http-cookies &&
cp -R "$tmp/.agents/skills/http-cookies" ~/.claude/skills/http-cookies &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/http-cookies` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/http-cookies` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/http-cookies &&
cp -R "$tmp/.agents/skills/http-cookies" ~/.agents/skills/http-cookies &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/http-cookies` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/http-cookies` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/http-cookies &&
cp -R "$tmp/.agents/skills/http-cookies" ~/.cursor/skills/http-cookies &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/http-cookies` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/ScaleDockHQ/better-supabase.git --path .agents/skills/http-cookies
```

Or copy the folder to `~/.gemini/skills/http-cookies` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/http-cookies`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/http-cookies &&
cp -R "$tmp/.agents/skills/http-cookies" ~/.copilot/skills/http-cookies &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/http-cookies` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git
```

Then copy `better-supabase/.agents/skills/http-cookies` into your agent's skills folder as `http-cookies`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Which RFC does the skill follow?

It treats RFC 6265 as the current standard and RFC 6265bis (draft revision 22) as a preview to build on now, since browsers already implement its SameSite and prefix rules.

### Does HTTP cookies change how cookies are stored?

It guides the agent to write and review Set-Cookie and Cookie handling on the server; it does not itself modify files or code beyond what the agent is asked to produce.

### Which cookie limits does HTTP cookies enforce?

It checks that name plus value stay within 4096 octets, attribute values within 1024 octets, and lifetimes no longer than 400 days.

### Are scripts or tools included?

No scripts are included. The skill works through instructions and reference files only.

### How do I install HTTP cookies in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/http-cookies to use it in all your projects, or to .claude/skills/http-cookies in one project. Or install the better-supabase plugin, which includes it: /plugin marketplace add ScaleDockHQ/better-supabase, then /plugin install better-supabase@better-supabase.

### Does HTTP cookies run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use HTTP cookies?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to HTTP cookies?

The closest alternatives to HTTP cookies are HTTP semantics, Server side, Client side, Content security policy and Techstack security.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [HTTP semantics](https://ai-powered.com/skills/http-semantics): HTTP semantics is an open-source agent skill for developer tools.
- [Server side](https://ai-powered.com/skills/server-side): Server side is an open-source agent skill for security.
- [Client side](https://ai-powered.com/skills/client-side): Client side is an open-source agent skill for security.
- [Content security policy](https://ai-powered.com/skills/content-security-policy): Content security policy is an open-source agent skill for security.
- [Techstack security](https://ai-powered.com/skills/techstack-security): Techstack security is an open-source agent skill for security.
- [API compliance checker](https://ai-powered.com/skills/api-compliance-checker): API compliance checker is an open-source agent skill for security.
- [Django security](https://ai-powered.com/skills/django-security): Django security is an open-source agent skill for security.
- [Spring security](https://ai-powered.com/skills/spring-security): Spring security is an open-source agent skill for security.

---
Source: https://ai-powered.com/skills/http-cookies
