# Gnap

> Gnap is an open-source agent skill for security. Guides an agent to build or review GNAP (RFC 9635) clients, auth servers and resource. 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/gnap
- **Repository:** https://github.com/scaledockhq/better-supabase
- **GitHub stars:** 5
- **License:** MIT
- **Skill name:** gnap
- **Collection:** https://github.com/ScaleDockHQ/better-supabase
- **Categories:** [security](https://ai-powered.com/categories/security)
- **Listing updated:** 2026-12-02

## About

This skill gives an AI coding agent working knowledge of the Grant Negotiation and Authorization Protocol, covering grant requests, key-bound tokens, interaction handling with hash checks, continuation and token management. It also covers the RFC 9767 resource server connection model, including discovery, introspection, resource registration and derived tokens.

The skill is organized as a step-by-step workflow with reference files for versions, grant flow, access rights and resource servers. It includes invariants that the agent should enforce, such as signing every request to the authorization server, refusing bearer use outside the Authorization header, and rejecting continuation tokens at resource servers. A verification checklist closes the workflow.

It expects the agent to work with JSON, HTTP signatures and JOSE-style key material, and it points to related skills for OAuth and JWT. No scripts are bundled, and the skill is MIT licensed.

## When your agent uses it

> GNAP (RFC 9635): request, issue and verify access tokens. Covers the Grant Negotiation and Authorization Protocol core: grant requests, the access rights array, interaction start and finish modes with the interaction hash, continuation, token rotation and revocation, key binding with httpsig, mtls, jwsd and jws proofs, and RS-first discovery. Also covers RFC 9767 GNAP resource server connections: the token model, token formats, /.well-known/gnap-as-rs discovery, introspection, resource registration and derived tokens, and how the access array relates to OAuth Rich Authorization Requests (authorization_details, RFC 9396). Use when building a GNAP client, authorization server or resource server, validating key-bound GNAP tokens, writing WWW-Authenticate: GNAP challenges, designing access types, or comparing GNAP with OAuth 2.0. RFC 9635 is the only version line; pre-RFC drafts are upgraded to it, and no preview exists.

## 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/gnap)
- [License: MIT](https://github.com/ScaleDockHQ/better-supabase/tree/HEAD/.agents/skills/gnap)

## Features

- **Grant request construction:** Covers building GNAP grant requests with client keys and the supported proofing methods.
- **Interaction and hash checks:** Explains start and finish interaction modes and verifying the interaction hash before continuing.
- **Access rights design:** Guides defining the access array and how it relates to OAuth Rich Authorization Requests.
- **Resource server validation:** Describes validating key-bound tokens and returning GNAP challenges when access is missing.
- **Resource server connections:** Covers RFC 9767 discovery, introspection, resource registration and derived tokens.
- **Draft upgrade checklist:** Provides steps for moving pre-RFC draft implementations to RFC 9635.

## Good for

- Build a GNAP authorization server endpoint
- Add GNAP token validation to a resource server
- Map existing RAR authorization_details to GNAP access rights
- Compare GNAP with OAuth 2.0 for a new project
- Upgrade a GNAP draft implementation to RFC 9635

## 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/gnap`:

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

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

### Codex

Copy the skill folder to `~/.agents/skills/gnap` 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/gnap &&
cp -R "$tmp/.agents/skills/gnap" ~/.agents/skills/gnap &&
rm -rf "$tmp"
```

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

### Cursor

Copy the skill folder to `~/.cursor/skills/gnap` 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/gnap &&
cp -R "$tmp/.agents/skills/gnap" ~/.cursor/skills/gnap &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/gnap` 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/gnap
```

Or copy the folder to `~/.gemini/skills/gnap` yourself.

### VS Code

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

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

For one project only, put the folder in `.github/skills/gnap` 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/gnap` into your agent's skills folder as `gnap`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Which GNAP version does the skill target?

It targets RFC 9635, the only version line, with RFC 9767 for resource server connections. Pre-RFC drafts are upgraded to it.

### Does the skill include scripts?

No, the skill has no bundled scripts; it consists of a SKILL.md and reference files.

### How does Gnap relate to OAuth skills?

It points to a separate oauth skill for OAuth 2.0 and 2.1 and a jwt skill for JWT-formatted GNAP tokens.

### How do I install Gnap in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/gnap to use it in all your projects, or to .claude/skills/gnap 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 Gnap 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 Gnap?

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 Gnap?

The closest alternatives to Gnap are Authzen, Fapi, Security grc, Sh kb auth and JWT.

## Where this comes from

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

## Alternatives

- [Authzen](https://ai-powered.com/skills/authzen): Authzen is an open-source agent skill for security.
- [Fapi](https://ai-powered.com/skills/fapi): Fapi is an open-source agent skill for security.
- [Security grc](https://ai-powered.com/skills/security-grc): Security grc is an open-source agent skill for security.
- [Sh kb auth](https://ai-powered.com/skills/sh-kb-auth): Sh kb auth is an open-source agent skill for security.
- [JWT](https://ai-powered.com/skills/jwt-scaledockhq): JWT is an open-source agent skill for security.
- [Axiom security](https://ai-powered.com/skills/axiom-security-charleswiltgen-2): Axiom security is an open-source agent skill for security.
- [API security](https://ai-powered.com/skills/api-security): API security is an open-source agent skill for security.
- [API security auth pattern](https://ai-powered.com/skills/api-security-auth-pattern): API security auth pattern is an open-source agent skill for security.

---
Source: https://ai-powered.com/skills/gnap
