Terminal
Terminal/Skill
Inspects an app repo and recommends SQLCommenter packages that tag database queries with app, route, and release, so PlanetScale can attribute load to code.
By PlanetScale
Works with
npx skills add planetscale/skills --skill planetscale-codebase-sqlcommenter-instrumentationInspect 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.”