gating-sensitive-actions

gating-sensitive-actions is a skill for Claude Code, Codex from PostHog/posthog-foss. It costs 193 tokens per session (1,902 once invoked), scanned B, original, MIT.

Guidance for protecting sensitive changes with recent re-authentication. It explains which backend endpoints and settings areas need a fresh sign-in, and how the interface should retry a refused change.

In plain words
What is it for?
Use it when adding or reviewing re-authentication for sensitive writes, organization settings, permission rules, or the interface shown after a write is refused.
Why use it?
It prevents an old session cookie from making sensitive changes without checking the user's identity again. It also avoids relying on a frontend-only check, which could be bypassed by calling the API directly.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it when adding or reviewing re-authentication for sensitive writes, organization settings, permission rules, or the interface shown after a write is refused.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/posthog/posthog-foss/gating-sensitive-actions
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add PostHog/posthog-foss --skill gating-sensitive-actions
Clone the repo
git clone --depth 1 https://github.com/PostHog/posthog-foss

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gating-sensitive-actions

README.md
[![agentmods](https://agentmods.dev/badge/skills/posthog/posthog-foss/gating-sensitive-actions/github.svg)](https://agentmods.dev/skills/posthog/posthog-foss/gating-sensitive-actions)
Your own site
<a href="https://agentmods.dev/skills/posthog/posthog-foss/gating-sensitive-actions"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/gating-sensitive-actions/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gating-sensitive-actions

Your own site · 80×15
<a href="https://agentmods.dev/skills/posthog/posthog-foss/gating-sensitive-actions"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/gating-sensitive-actions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 193 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,902 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00193 $0.01902
Opus 5.5 $0.00077 $0.00761
Sonnet 5.5 $0.00039 $0.00380
Haiku 4.5 $0.00019 $0.00190

Measured 2mo ago against content hash 66ac40931fc9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

gating-sensitive-actions scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

description: 'Use when deciding whether an endpoint, settings section, or UI flow should require recent authentication (re-auth), when adding `TimeSensitiveActionPermission` or its exemptions (`time_sensitive_allow_if_on
.agents/skills/gating-sensitive-actions/SKILL.md · 92 lines

How it starts

The opening of the file, as written. The whole thing — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Gating sensitive actions behind re-authentication

A session cookie that is older than SESSION_SENSITIVE_ACTIONS_AGE (2 hours by default) can still read everything, but it cannot do sensitive writes until the user re-authenticates. This skill says which writes count as sensitive, where the gate goes, and how the UI recovers when a write is refused.

The decision

These rules are settled. Do not reopen them in a feature PR.

  1. Reads stay open. Opening a page or loading a list never asks for re-auth. Only an action that changes something sensitive does.
  2. The backend enforces the gate. A frontend-only gate protects nothing, because anyone with the cookie can call the API directly. If an action is sensitive, its endpoint carries TimeSensitiveActionPermission. Adding a frontend gate instead of this is wrong.
  3. The frontend reacts, and does not gate up front. A write that fails with sensitive_action_required_reauth opens the re-auth modal. After the user re-authenticates, the same request is sent again. The user does not repeat the action.
  4. Organization settings are the exception. The whole organization level of settings is wrapped in TimeSensitiveAuthenticationArea, so it prompts on navigation. Keep it like that.
  5. User, project, and environment settings never prompt on navigation. There is no per-section opt-in. If reading a section feels sensitive, the fix is to stop the read from returning the secret (see below), not to gate the page.
  6. A GET never returns a live secret that already exists. Return a secret only in the response that creates it: new personal API keys, rolled keys, new backup codes. A later read returns metadata, a masked value, or a count. two_factor_status returns backup_codes_remaining, not the codes.

What counts as sensitive

Gate a write when it does one of these:

  • It changes how someone signs in or proves who they are: password, email, 2FA, passkeys, backup codes.
  • It creates, rolls, or revokes a credential: personal API keys, project secret API keys, OAuth connected apps, personal integrations (GitHub, Slack), personal PostHog connections.
  • It ends sessions or deletes the account.
  • It changes who can act as the user, or what data is collected about them: allow impersonation, data opt-out.
  • It changes organization membership, roles, domains, SSO, or invites.

Read the full file on GitHub · 92 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 92 lines · 193 tokens per session scan B 66ac40931fc9

Subscribe to this mod's changes

gating-sensitive-actions is a skill published in the GitHub repository PostHog/posthog-foss (736 stars, last pushed today), licensed MIT. It adds 193 tokens to every session and 1,902 once invoked, about $0.0008 per session on Opus 5.5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-24.

Related

gating-sensitive-actions compared with skills from other repositories

gating-sensitive-actions next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
gating-sensitive-actionsPostHog/posthog-fossSkill736todayMITB193Claude Code, Codex
local-ai-agentsmicrosoft/ai-agents-for-beginnersSkill82ktodayMITA200Claude Code, Codex
imagegenopenai/codexSkill137ktodayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill102ktodayApache-2.0A19Claude Code
browser-automationopenclaw/openclawSkill396ktodayMITA36Claude Code
free-llm-apismnfst/awesome-free-llm-apisSkill15ktodayCC0-1.0A113Claude Code, Codex
systematic-debuggingobra/superpowersSkill332k6d agoMITA21Claude Code