debugging-table-access-denied

debugging-table-access-denied is a skill for Claude Code, Codex from PostHog/posthog-foss. It costs 73 tokens per session (410 once invoked), scanned A, original, MIT.

A troubleshooting guide for HogQL errors that say a system or warehouse table is not accessible. HogQL is PostHog's query language for analysing stored data.

In plain words
What is it for?
Use it when investigating TableAccessDeniedError reports from error tracking, Slack alerts, user reports, or background jobs.
Why use it?
It helps distinguish a real application bug from an expected access restriction and explains what the error context means.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/posthog/posthog-foss/debugging-table-access-denied
Any agent
npx skills add PostHog/posthog-foss --skill debugging-table-access-denied
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 debugging-table-access-denied

README.md
[![agentmods](https://agentmods.dev/badge/skills/posthog/posthog-foss/debugging-table-access-denied.svg)](https://agentmods.dev/skills/posthog/posthog-foss/debugging-table-access-denied)
Your own site
<a href="https://agentmods.dev/skills/posthog/posthog-foss/debugging-table-access-denied"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/debugging-table-access-denied.svg" alt="Measured on agentmods" height="20"></a>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 410 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00073 $0.00410
Opus 5 $0.00036 $0.00205
Sonnet 5 $0.00015 $0.00082
Haiku 4.5 $0.00007 $0.00041

Measured 5d ago against content hash 09c9994a6fbd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

debugging-table-access-denied scanned grade A with 0 findings 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 5d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/debugging-table-access-denied/SKILL.md · 20 lines

What it actually says

Debugging "You don't have access to table"

TableAccessDeniedError (posthog/hogql/errors.py, code table_access_denied) means the query referenced a table that access control removed from the HogQL schema. The mechanism — how and why tables get removed — is documented in posthog/hogql/ACCESS_CONTROL.md; read it first.

Hints:

  • The error proves the table exists and was denied. A nonexistent table raises Unknown table instead.
  • On an HTTP request this is an expected 4xx, never captured. An error tracking issue means it was raised in a background context — figure out which from the event's query tags (team_id, user_id, product, celery_task_id, temporal.*).
  • A system.* name is a system-table decision; a bare name is a warehouse table/view denial.
  • No user_id on the event usually means a userless Database.create_for — it fails closed, and bypass_warehouse_access_control does not cover system tables. That's a bug in the calling code.
  • Background jobs run as the resource's created_by; a creator who left the org is the known benign cause (cache warming, alerts, and exports already suppress capture for it via creator_access_revoked).
  • Otherwise it's a real access rule (RBAC or entitlement) — see the readme for how a table's access level resolves, and check the AccessControl rows for the table's access_scope.
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. 5d ago First seen · 20 lines · 73 tokens per session scan A 09c9994a6fbd

Subscribe to this mod's changes

debugging-table-access-denied is a skill published in the GitHub repository PostHog/posthog-foss (712 stars, last pushed today), licensed MIT. It adds 73 tokens to every session and 410 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

schema-exploration

Lists tables, describes columns and data types, identifies foreign key relationships, and maps entity relationships in a database. Use when the user asks about database schema, table structure, column types, what tables exist, ERD, foreign keys, or how entities relate.

langchain-ai/deepagents · 57 tokens

debugging

How to debug tursodb using Bytecode comparison, logging, ThreadSanitizer, deterministic simulation, and corruption analysis tools.

tursodatabase/turso · 28 tokens

sdk-design

Doctrine for designing and evolving any SDK Grida ships — TypeScript, Rust, or otherwise. "SDK" here means a surface that crosses a foreign-or-foreign-treated boundary: published packages, separately-versioned consumers, FFI bindings, public-by-design modules. An SDK's job is to refuse; a strict, honest surface…

gridaco/grida · 199 tokens

ha-data-stores

Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…

shiwenwen/hope-agent · 115 tokens

supabase

Supabase / PostgREST Row-Level-Security playbook — pull the anon (or leaked servicerole) key out of the frontend JS, map tables from the auto-generated OpenAPI spec, test anonymous RLS READ disclosures (PII/secret leaks), and anonymous RLS WRITE abuse (insert/update/delete — e.g. forging…

PentesterFlow/agent · 120 tokens

nornicdb-cypher-queries

Pick fast, predictable Cypher query shapes in NornicDB — point lookups, batch retrieval, pagination, search, traversal, batched UNWIND/MERGE writes, cleanup, multi-tenant isolation. Use when writing or reviewing Cypher whose latency or throughput matters; maps user intent to the executor's hot-path query templates.

orneryd/NornicDB · 79 tokens