# Fail-Closed Member Gate Kit

> Fail-closed membership gating reference implementation: 401 + door, never content — SQLite + PBKDF2, HMAC sessions, and a falsifier suite proving every property.

Fail-Closed Member Gate Kit is a paid AI agent skill on Agensi by Enoch Gardiner, in Security. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $2 (one-time purchase)
- Creator: [Enoch Gardiner](https://www.agensi.io/creators/enoch-gardiner)
- Category: [Security](https://www.agensi.io/skills/security)
- Version: 1.0
- Last updated: 2026-11-22
- Security: scan passed (2026-11-21); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/fail-closed-member-gate-kit
- Tags: security, api, ai-agents, python, membership

## About this skill

The member gate, built the way production incidents teach you to build it. Fail closed (401 + door, never content), check membership liveness on every request so a lapsed member's next hit is a 401, serve protected files and PDFs with Cache-Control: private, no-store, count ONLY failures in the login rate limiter (successes clear the history), and validate post-login next targets so the login form can never become an open redirect.

Complete stdlib reference implementation: SQLite + PBKDF2 pass store, HMAC session tokens, cookie-or-Bearer resolution, and a WSGI wiring example — plus a unittest falsifier suite that proves each property, including the two subtle ones (lapsed member with a valid cookie still gets 401; a successful login after 9 failures does not burn the tenth slot). Python 3 stdlib only, no dependencies, no API keys.

## Requires

- Python

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Fail-Closed Member Gate Kit skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### What does Fail-Closed Member Gate Kit do?

Fail-closed membership gating reference implementation: 401 + door, never content — SQLite + PBKDF2, HMAC sessions, and a falsifier suite proving every property.

### Which AI agents support Fail-Closed Member Gate Kit?

This skill uses the open SKILL.md standard. Use it through an MCP-compatible agent connected to Agensi, and check the compatibility information on this page for confirmed agents and required capabilities.

### How do I use Fail-Closed Member Gate Kit?

Connect your AI agent to Agensi through MCP, then ask it to use Fail-Closed Member Gate Kit on your task. Your agent loads the latest approved version each time. Paid skills require a purchase or active subscription. Skill files are not available for download; your licence does not allow you to save, copy or export any part of a skill.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
