planetscale/planetscale-codebase-sqlcommenter-instrumentation
Inspect an application repository connected to PlanetScale and recommend SQLCommenter-compatible query tagging packages and conventions.
npx skills add https://github.com/planetscale/skills --skill planetscale-codebase-sqlcommenter-instrumentation
Inspect the application repository connected to PlanetScale and recommend the correct SQLCommenter-style instrumentation so PlanetScale Insights and Postgres Traffic Control can attribute queries to application code paths. Do not edit files or install dependencies without approval.
Identify:
Use the most native maintained option for the detected stack.
Preferred for PlanetScale tag compatibility:
activerecord-sql_commenter from PlanetScale when Rails query comments need SQLCommenter format for PlanetScale Query Insights.Other options:
marginalia for older Rails or when Basecamp-style ActiveRecord query attribution is already in use.sqlcommenter_rails where the project already uses the OpenTelemetry SQLCommenter ecosystem.Recommend tags:
applicationcontrolleractionjobrouterelease_shaPreferred:
spatie/laravel-sql-commenter for SQLCommenter-format comments compatible with PlanetScale Query Insights.Recommend tags:
applicationroutecontrolleractionjobqueuerelease_shaPreferred:
@prisma/sqlcommenter@prisma/sqlcommenter-query-tags@prisma/sqlcommenter-trace-contextNote: PlanetScale’s Postgres query-tag docs may list Prisma as lacking official SQLCommenter support, but Prisma’s own current docs provide first-party SQLCommenter packages. Prefer current Prisma docs when Prisma is detected.
Recommend tags:
applicationservicerouteoperationfeaturerelease_shaUse SQLCommenter-compatible middleware or instrumentation from the OpenTelemetry SQLCommenter ecosystem where maintained and compatible.
Recommend tags:
applicationserviceroutecontrolleractionfeaturerelease_shaIf there is no maintained SQLCommenter package, recommend manual tagging at the database client boundary or query builder extension layer.
Requirements:
Use SQLCommenter instrumentation from the OpenTelemetry SQLCommenter ecosystem where compatible.
Recommend tags:
applicationframeworkrouteviewjobrelease_shaUse SQLCommenter-compatible instrumentation for Hibernate/Spring where compatible.
Recommend tags:
applicationservicecontrolleractionrouterelease_shaUse SQLCommenter-compatible instrumentation or a database wrapper at the query boundary.
Recommend tags:
applicationservicehandlerroutejobrelease_shaRecommend this baseline across all frameworks:
Before recommending merge:
Return:
End with:
“No repository files or dependencies have been changed.”
Take planetscale/planetscale-codebase-sqlcommenter-instrumentation from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.