Official agent skill

Planetscale Codebase Sqlcommenter Instrumentation

by planetscale in planetscale/skills

Inspect an application repository connected to PlanetScale and recommend SQLCommenter-compatible query tagging packages and conventions.

OfficialMITAuto-check passedDatabases

Install Planetscale Codebase Sqlcommenter Instrumentation

skills CLI
$ npx skills add planetscale/skills --skill planetscale-codebase-sqlcommenter-instrumentation -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install planetscale/skills planetscale-codebase-sqlcommenter-instrumentation --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/planetscale/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/planetscale-codebase-sqlcommenter-instrumentation .claude/skills/planetscale-codebase-sqlcommenter-instrumentation && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
planetscale-codebase-sqlcommenter-instrumentation
GitHub stars
132
Token cost
~1.2k tokens
SKILL.md length
539 words
Files
1
Skills in repo
15
Repo updated
First seen
Licence
MIT

At a glance

Inspect an application repository connected to PlanetScale and recommend SQLCommenter-compatible query tagging packages and conventions.

  • Tasks that involve ORMs and data access
  • SKILL.md covers Purpose, Repository inspection, Recommended package mapping and Standard tag policy, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Tasks that involve Backend development

What it does

Planetscale Codebase Sqlcommenter Instrumentation is an agent skill from planetscale/skills, published by the product's own GitHub organization. Inspect an application repository connected to PlanetScale and recommend SQLCommenter-compatible query tagging packages and conventions.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Databases, covering ORMs and data access, Backend development and Observability. It works with PlanetScale, Ruby on Rails, Prisma and SQL. The repository describes itself as: Skills that help you configure and get the most out of PlanetScale. The licence is MIT.

When your agent uses it

  • Tasks that involve ORMs and data access
  • Tasks that involve Backend development
  • Tasks that involve Observability

Example prompts

  • “/planetscale-codebase-sqlcommenter-instrumentation”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 999045c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Planetscale Codebase Sqlcommenter Instrumentation loads about 1.2k tokens when it runs. Until then it costs about 47 tokens; SKILL.md has 539 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~47
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from planetscale/skills at commit 999045c, republished under its MIT licence (© planetscale). 539 words, ~1,241 tokens.

Download SKILL.mdSave it as .claude/skills/planetscale-codebase-sqlcommenter-instrumentation/SKILL.md (or your agent's skills folder).
name
planetscale-codebase-sqlcommenter-instrumentation
description
Inspect an application repository connected to PlanetScale and recommend SQLCommenter-compatible query tagging packages and conventions.

Codebase SQLCommenter instrumentation

Purpose

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.

Repository inspection

Identify:

  • Language and framework.
  • ORM or query builder.
  • Database adapter.
  • Migration tool.
  • Background job system.
  • Routing framework.
  • Deployment metadata source, such as git SHA or release ID.
  • Existing SQL comments, query tags, tracing, OpenTelemetry, or database middleware.
  • PlanetScale connection configuration.
  • Whether the repository connects to Vitess, Postgres, or both.

Use the most native maintained option for the detected stack.

Ruby on Rails / ActiveRecord

Preferred for PlanetScale tag compatibility:

  • activerecord-sql_commenter from PlanetScale when Rails query comments need SQLCommenter format for PlanetScale Query Insights.

Other options:

  • Rails built-in query logs when sufficient and compatible with the target database/Insights behavior.
  • 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:

  • application
  • controller
  • action
  • job
  • route
  • release_sha
Laravel / PHP

Preferred:

  • spatie/laravel-sql-commenter for SQLCommenter-format comments compatible with PlanetScale Query Insights.

Recommend tags:

  • application
  • route
  • controller
  • action
  • job
  • queue
  • release_sha
Prisma / TypeScript / JavaScript

Preferred:

  • Prisma’s first-party SQL comments packages when Prisma is detected:
    • @prisma/sqlcommenter
    • @prisma/sqlcommenter-query-tags
    • @prisma/sqlcommenter-trace-context

Note: 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:

  • application
  • service
  • route
  • operation
  • feature
  • release_sha
Knex / Sequelize / Express / Node

Use SQLCommenter-compatible middleware or instrumentation from the OpenTelemetry SQLCommenter ecosystem where maintained and compatible.

Recommend tags:

  • application
  • service
  • route
  • controller
  • action
  • feature
  • release_sha
Kysely / Drizzle / Bun / custom query builders

If there is no maintained SQLCommenter package, recommend manual tagging at the database client boundary or query builder extension layer.

Requirements:

  • Tags must be structured SQL comments.
  • Tags must be inserted before the statement terminator.
  • Tags must survive ORM, proxy, and pooler behavior.
  • Values must be URL encoded and safe for SQL comments.
  • Tags must be low-cardinality.
Show full SKILL.md (200 more words)Show less
Django / SQLAlchemy / psycopg2 / Flask / Python

Use SQLCommenter instrumentation from the OpenTelemetry SQLCommenter ecosystem where compatible.

Recommend tags:

  • application
  • framework
  • route
  • view
  • job
  • release_sha
Java / Hibernate / Spring

Use SQLCommenter-compatible instrumentation for Hibernate/Spring where compatible.

Recommend tags:

  • application
  • service
  • controller
  • action
  • route
  • release_sha
Go / database/sql / net/http / gorilla/mux

Use SQLCommenter-compatible instrumentation or a database wrapper at the query boundary.

Recommend tags:

  • application
  • service
  • handler
  • route
  • job
  • release_sha

Standard tag policy

Recommend this baseline across all frameworks:

  • Stable, bounded values only.
  • Normalize routes before tagging.
  • Include app/service/job attribution.
  • Include deploy SHA.
  • Include source type for agents, scripts, BI, workers, and integrations.
  • Do not include secrets, PII, user IDs, request IDs, raw tenant IDs, or raw URLs.

Validation plan

Before recommending merge:

  • Confirm generated SQL comments appear in local/staging query logs.
  • Confirm comments survive the ORM, driver, pooler, and PlanetScale connection path.
  • Confirm Insights displays tags.
  • Confirm tag cardinality is bounded.
  • Confirm Traffic Control can match the intended tags for Postgres.
  • Confirm no sensitive data is present.

Output

Return:

  • Detected stack.
  • Current query tagging state.
  • Recommended package or manual instrumentation path.
  • Proposed tag schema.
  • Files likely to change.
  • Validation steps.
  • Risks.
  • Proposed changes requiring approval.

End with:

“No repository files or dependencies have been changed.”

© planetscale, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in planetscale-codebase-sqlcommenter-instrumentation of planetscale/skills.

Open the folder on GitHubat commit 999045c

Compare with similar skills

Planetscale Codebase Sqlcommenter Instrumentation next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Planetscale Codebase Sqlcommenter Instrumentation compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Planetscale Codebase Sqlcommenter Instrumentation this skillplanetscale/skills132—~1.2kAutomated safety check: PassMIT
Database FundamentalsDanielPodolsky/ownyourcode2901 repos~1.6kAutomated safety check: PassMIT
DB SculptorEliasOulkadi/shokunin114—~3.1kAutomated safety check: NotesMIT
Database Migrationsaffaan-m/ECC274k4 repos~3kAutomated safety check: PassMIT
Database Migrationsaffaan-m/ECC274k3 repos~1.9kAutomated safety check: PassMIT
DB Review312362115/claude107—~1.8kAutomated safety check: PassMIT

Similar skills

  • Database Fundamentals

    DanielPodolsky/ownyourcode

    Reviews schema design, SQL queries, ORM patterns. An agent skill from DanielPodolsky/ownyourcode.

    290 GitHub starsUsed in 1 repo~1.6k tokens
    DatabasesAuto-check passed
  • DB Sculptor

    EliasOulkadi/shokunin

    Design database schemas with Prisma/Drizzle, PostgreSQL index strategy (B-tree, GIN, GiST, BRIN, Hash), query optimization (EXPLAIN ANALYZE), migration safety (expand/contract, zero-downtime), and…

    114 GitHub stars~3.1k tokensUpdated 2 days ago
    DatabasesAuto-check: notes
  • Safe, reversible database migration patterns: forward-only production changes, expand-contract zero-downtime renames, concurrent indexes, batched backfills, and per-tool workflows for PostgreSQL…

    274k GitHub starsUsed in 4 repos~3k tokens
    DatabasesAuto-check passed
  • 数据库迁移最佳实践,涵盖模式变更、数据迁移、回滚以及零停机部署,适用于PostgreSQL、MySQL及常用ORM(Prisma、Drizzle、Django、TypeORM、golang-migrate)。

    274k GitHub starsUsed in 3 repos~1.9k tokens
    DatabasesAuto-check passed
  • DB Review

    312362115/claude

    数据库代码审查 + Migration 安全检查. An agent skill from 312362115/claude.

    107 GitHub stars~1.8k tokensUpdated 4 mo ago
    DatabasesAuto-check passed
  • Şema değişiklikleri, veri migration'ları, rollback'ler ve PostgreSQL, MySQL ve yaygın ORM'ler (Prisma, Drizzle, Django, TypeORM, golang-migrate) arasında sıfır kesinti deployment'ları için…

    274k GitHub starsUsed in 1 repo~2.4k tokens
    DatabasesAuto-check passed

More from planetscale/skills

All 15 skills in this repo
  • Official

    Use the PlanetScale CLI (pscale) from automated agents with --format json, auth check, pscale sql, and per-command --force.

    132 GitHub stars~880 tokensUpdated 4 days ago
    Auto-check passed
  • Official

    Master skill that runs the full PlanetScale safe best-practices assessment — inventory, engine review, Insights, Traffic Control, webhooks, schema recommendations, codebase instrumentation, and…

    132 GitHub stars~2.9k tokensUpdated 4 days ago
    Auto-check passed
  • Official

    Execute approved PlanetScale changes end-to-end without per-step approval when the operator has explicitly acknowledged the risk.

    132 GitHub stars~2.6k tokensUpdated 4 days ago
    Auto-check passed
  • Official

    A concise feature matrix for deciding which PlanetScale safety, observability, and automation recommendations apply by engine.

    132 GitHub stars~1.4k tokensUpdated 4 days ago
    Auto-check passed
  • Enforce explicit approval gates for any PlanetScale, database, repository, credential, network, or automation mutation.

    132 GitHub stars~1.3k tokensUpdated 4 days ago
    Auto-check passed
  • Official

    Produce the final PlanetScale best-practices report after running the inventory and relevant review skills.

    132 GitHub stars~1.9k tokensUpdated 4 days ago
    Auto-check passed

Categories

Questions about Planetscale Codebase Sqlcommenter Instrumentation

What does Planetscale Codebase Sqlcommenter Instrumentation do?

Inspect an application repository connected to PlanetScale and recommend SQLCommenter-compatible query tagging packages and conventions. Planetscale Codebase Sqlcommenter Instrumentation is an agent skill from planetscale/skills, published by the product's own GitHub organization. Inspect an application repository connected to PlanetScale and recommend SQLCommenter-compatible query tagging packages and conventions.

When should I use Planetscale Codebase Sqlcommenter Instrumentation?

Planetscale Codebase Sqlcommenter Instrumentation fits situations like: tasks that involve ORMs and data access; tasks that involve Backend development; tasks that involve Observability.

How do I install Planetscale Codebase Sqlcommenter Instrumentation in Claude Code?

Run `npx skills add planetscale/skills --skill planetscale-codebase-sqlcommenter-instrumentation -a claude-code`. Or copy the skill folder (planetscale-codebase-sqlcommenter-instrumentation in planetscale/skills) into .claude/skills/planetscale-codebase-sqlcommenter-instrumentation in your project. Claude Code loads it when a task matches its description.

How do I install Planetscale Codebase Sqlcommenter Instrumentation in Codex?

Run `npx skills add planetscale/skills --skill planetscale-codebase-sqlcommenter-instrumentation -a codex`. Or copy the skill folder (planetscale-codebase-sqlcommenter-instrumentation in planetscale/skills) into .agents/skills/planetscale-codebase-sqlcommenter-instrumentation in your project. Codex loads it when a task matches its description.

Can I use Planetscale Codebase Sqlcommenter Instrumentation in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add planetscale/skills --skill planetscale-codebase-sqlcommenter-instrumentation -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/planetscale-codebase-sqlcommenter-instrumentation, .gemini/skills/planetscale-codebase-sqlcommenter-instrumentation, .github/skills/planetscale-codebase-sqlcommenter-instrumentation and .opencode/skills/planetscale-codebase-sqlcommenter-instrumentation in your project.

What does Planetscale Codebase Sqlcommenter Instrumentation need to run?

SKILL.md names no scripts, command-line tools or credentials: Planetscale Codebase Sqlcommenter Instrumentation is instructions for the agent only. Our summary lists: Python 3.

Does Planetscale Codebase Sqlcommenter Instrumentation access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Planetscale Codebase Sqlcommenter Instrumentation safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Planetscale Codebase Sqlcommenter Instrumentation use?

Planetscale Codebase Sqlcommenter Instrumentation is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Planetscale Codebase Sqlcommenter Instrumentation use?

About 1.2k tokens (SKILL.md is roughly 5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Planetscale Codebase Sqlcommenter Instrumentation?

Skills that share tags, products or a category with Planetscale Codebase Sqlcommenter Instrumentation: Database Fundamentals (DanielPodolsky/ownyourcode, 290 stars), DB Sculptor (EliasOulkadi/shokunin, 114 stars), Database Migrations (affaan-m/ECC, 274k stars) and Database Migrations (affaan-m/ECC, 274k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Planetscale Codebase Sqlcommenter Instrumentation?

planetscale (a GitHub organization, an official publisher) maintains it in planetscale/skills, which has 132 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on October 3, 2026.

Source: planetscale/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.