On this page

Agent skill

An agent skill for Claude Code, Codex, Cursor and other agents: how to debug StitchDB error codes, empty results caused by Row Level Security, Auth and Storage denials, plus the monitoring prompts.

The stitchdb skill gives your coding agent StitchDB know-how it loads only when it needs it: when a request fails with a StitchDB error code, a query returns nothing although rows exist, or you ask it to check production.

Terminal
npx skills add stitchdb/agent-skills

The command asks which of your agents to install it for. To install by hand, copy the stitchdb folder into your agent's skills folder (for example .claude/skills/ in a project, or ~/.claude/skills/ for all projects).

#What the skill does

  • Reads the current docs first. Before it diagnoses anything, the agent searches this documentation with the MCP tool search_docs (or reads stitchdb.com/docs) instead of relying on what it remembers.
  • Error codes: what PGRST116, PGRST204, PGRST301, 42501, 42P01, 23505, 57014 and others mean on StitchDB, and what evidence to collect (logs, policies, table definition).
  • Empty results that are really Row Level Security: which role made the request, which policies apply, and why "it works in SQL" proves nothing (SQL over MCP runs as the owner).
  • Auth 401/403 and Storage denials: expired or foreign tokens, missing grants, storage.objects policies, private buckets.
  • Monitoring: the four monitoring prompts and how to schedule them.

The skill proposes fixes as SQL for you to review; it does not change your schema or policies on its own.

#Files

stitchdb/agent-skills
skills/stitchdb/
  SKILL.md                         when to use it, triage table, ground rules
  references/errors.md             PGRST and Postgres error codes
  references/rls-and-empty-results.md
  references/auth.md
  references/storage.md
  references/monitoring/README.md  connection, rules, overrides, state
  references/monitoring/health.md
  references/monitoring/security.md
  references/monitoring/performance.md
  references/monitoring/resources.md

Read or download the files here: SKILL.md, stitchdb-skill.zip. The skill works best with the StitchDB MCP server connected; a read-only connection is enough.