Npgsqlrest
NpgsqlRest/NpgsqlRest
Build and modify REST APIs with NpgsqlRest — exposing PostgreSQL as HTTP endpoints from two sources (database functions/procedures/tables/views, and plain .sql files), driven by SQL comment…
Query and analyze Logfire telemetry data — traces, logs, spans, metrics, summaries, and SQL results.
$ npx skills add pydantic/skills --skill logfire-query -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install pydantic/skills logfire-query --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/pydantic/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/logfire-query .claude/skills/logfire-query && rm -rf skills-srcUse ~/.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/
Install the "logfire-query" agent skill from https://github.com/pydantic/skills/tree/main/skills/logfire-query into .claude/skills/logfire-query/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "logfire-query", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/pydantic/skills/tree/main/skills/logfire-queryType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add pydantic/skills --skill logfire-query -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install pydantic/skills logfire-query --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pydantic/skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/logfire-query .agents/skills/logfire-query && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "logfire-query" agent skill from https://github.com/pydantic/skills/tree/main/skills/logfire-query into .agents/skills/logfire-query/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "logfire-query", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add pydantic/skills --skill logfire-query -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install pydantic/skills logfire-query --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pydantic/skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/logfire-query .cursor/skills/logfire-query && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "logfire-query" agent skill from https://github.com/pydantic/skills/tree/main/skills/logfire-query into .cursor/skills/logfire-query/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "logfire-query", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/pydantic/skills.git --path skills/logfire-query--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add pydantic/skills --skill logfire-query -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install pydantic/skills logfire-query --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pydantic/skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/logfire-query .gemini/skills/logfire-query && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "logfire-query" agent skill from https://github.com/pydantic/skills/tree/main/skills/logfire-query into .gemini/skills/logfire-query/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "logfire-query", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install pydantic/skills logfire-queryInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add pydantic/skills --skill logfire-query -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/pydantic/skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/logfire-query .github/skills/logfire-query && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "logfire-query" agent skill from https://github.com/pydantic/skills/tree/main/skills/logfire-query into .github/skills/logfire-query/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "logfire-query", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add pydantic/skills --skill logfire-query -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install pydantic/skills logfire-query --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pydantic/skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/logfire-query .opencode/skills/logfire-query && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "logfire-query" agent skill from https://github.com/pydantic/skills/tree/main/skills/logfire-query into .opencode/skills/logfire-query/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "logfire-query", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
logfire-queryQuery and analyze Logfire telemetry data — traces, logs, spans, metrics, summaries, and SQL results.
Logfire Query is an agent skill from pydantic/skills, published by the product's own GitHub organization. Query and analyze Logfire telemetry data — traces, logs, spans, metrics, summaries, and SQL results. Use this skill when the user asks to "query logfire", "search traces", "find logs", "query data", "search spans", "look up errors in logfire", "get metrics from logfire", "analyze telemetry", "summarize errors", "find root cause", or add Logfire querying capabilities to code. Do not use this skill for direct Logfire UI, browser, live-view, Explore-page, or link-opening requests; use logfire-ui instead. If "show"…
Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/client-usage.md` and `references/schema.md`).
It sits in Databases, covering Root cause analysis and SQL. It works with SQL and Model Context Protocol. The licence is MIT.
6 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 238d971. It shows what the files ask for, not the result of running them.
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.
No scripts in the folder and no shell commands in SKILL.md (its code samples are sql).
From the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
logfire-api.pydantic.devlogfire-us.pydantic.devlogfire-eu.pydantic.devFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Logfire Query loads about 2.2k tokens when it runs, and up to ~5.7k if it reads all its reference files. Until then it costs about 155 tokens; SKILL.md has 848 words of instructions outside code blocks.
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.
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.
The full file from pydantic/skills at commit 238d971, republished under its MIT licence (© pydantic). 848 words, ~2,248 tokens.
.claude/skills/logfire-query/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.Invoke this skill when:
Keep progress updates terse. Do not narrate route classification, local skill instructions, schema selection, or routine query setup. If an update is needed, use one short sentence focused on the action, such as "Querying recent Logfire errors."
Before using any query tool, classify the request.
logfire-ui; do not call query_run just to make a URL.Only query before opening Logfire UI when the user asks to open a specific unknown item that must be found first, such as "find the slowest trace and open it" or "open the latest error trace".
| Aspect | MCP query_run | REST API /v1/query |
|---|---|---|
| Best for | Interactive analysis in Codex | Adding query code to a project |
| Auth | OAuth via MCP session | Bearer read token |
| Setup | Already configured via plugin | Need a read token |
| Formats | JSON rows | JSON, CSV, Apache Arrow |
| Default window | Last 30 min | Last 24 hours |
| Max range | 14 days | 14 days |
| Row limit | Must be in SQL | Default 500, max 10,000 |
records table (spans and logs)Key columns for querying:
| Column | Type | Description |
|---|---|---|
start_timestamp | timestamp (UTC) | When span/log was created |
end_timestamp | timestamp (UTC) | When span/log completed |
duration | double (seconds) | Time between start and end; NULL for logs |
trace_id | string (32 hex) | Unique trace identifier |
span_id | string (16 hex) | Unique span identifier |
parent_span_id | string (16 hex) | Parent span; NULL for root spans |
span_name | string | Low-cardinality label for similar records |
message | string | Human-readable description with arguments filled in |
level | integer | Severity (supports level = 'error' string comparison) |
kind | string | span, log, span_event, or pending_span |
service_name | string | Service identifier |
is_exception | boolean | Whether an exception was recorded |
exception_type | string | Exception class name |
exception_message | string | Exception message |
exception_stacktrace | string | Full traceback |
attributes | JSON | Structured data; query with ->>'key' |
tags | string[] | Grouping labels; query with array_has(tags, 'x') |
http_response_status_code | integer | HTTP status code |
http_method | string | HTTP method |
http_route | string | HTTP route pattern |
otel_status_code | string | Span status |
metrics table| Column | Type | Description |
|---|---|---|
recorded_timestamp | timestamp (UTC) | When metric was recorded |
metric_name | string | Metric name |
metric_type | string | Type (gauge, counter, histogram) |
unit | string | Unit of measurement |
scalar_value | double | Metric value |
service_name | string | Service identifier |
attributes | JSON | Metric dimensions |
Full schema: references/schema.md
Logfire uses Apache DataFusion (Postgres-like). Key patterns:
-- Time filtering
WHERE start_timestamp > now() - interval '1 hour'
-- JSON attribute access
WHERE attributes->>'user_id' = '123'
SELECT attributes->>'http.url' as url FROM records
-- Nested JSON
attributes->'request'->>'method'
-- Array filtering
WHERE array_has(tags, 'production')
-- Level filtering (string comparison works)
WHERE level = 'error'
-- Case-insensitive matching
WHERE message ILIKE '%timeout%'
-- Time bucketing for aggregation
SELECT time_bucket(interval '5 minutes', start_timestamp) as bucket,
count(*) FROM records GROUP BY bucket ORDER BY bucketCall the query_run MCP tool:
query (required): SQL query stringproject (optional): target project (default: user's current project)min_timestamp / max_timestamp (optional): ISO timestamps for time windowDefault window is last 30 min. Max range is 14 days. Always include LIMIT in SQL.
-- Recent errors
SELECT start_timestamp, message, exception_type, exception_message
FROM records WHERE is_exception LIMIT 20
-- Slow spans
SELECT span_name, duration, start_timestamp
FROM records WHERE duration > 1.0 ORDER BY duration DESC LIMIT 20
-- Endpoint errors
SELECT start_timestamp, message, http_response_status_code
FROM records WHERE http_route = '/api/users' AND level = 'error' LIMIT 20
-- Full trace
SELECT span_name, message, duration, parent_span_id
FROM records WHERE trace_id = '<id>' ORDER BY start_timestamp
-- Error breakdown by service
SELECT service_name, count(*) as errors
FROM records WHERE is_exception GROUP BY service_name ORDER BY errors DESCIf the user explicitly asks for both analysis and a Logfire link, finish the query analysis first, then use a Logfire link only for the known result:
trace_id, use project_logfire_link(trace_id=trace_id, project=project, handoff=True) only when the user asked to open it immediately in the browser. Use project_logfire_link(trace_id=trace_id, project=project) for a durable or shareable URL.logfire-ui routing rules.For a span-count prompt, provide SQL like this when the user wants an aggregate query or analysis:
SELECT
time_bucket(interval '5 minutes', start_timestamp) AS bucket,
count(*) AS span_count
FROM records
WHERE kind = 'span'
GROUP BY bucket
ORDER BY bucket
LIMIT 200Endpoint: GET https://logfire-api.pydantic.dev/v1/query
Region variants:
https://logfire-us.pydantic.dev/v1/queryhttps://logfire-eu.pydantic.dev/v1/queryAuth: Authorization: Bearer <read_token>
Parameters:
sql (required): SQL querymin_timestamp / max_timestamp (optional): ISO timestampslimit (optional): row limit (default 500, max 10,000)Response formats (via Accept header):
application/json — column-oriented JSON (default)application/json with row_oriented=true param — row-oriented JSONtext/csv — CSVapplication/vnd.apache.arrow.stream — Apache ArrowPython clients: LogfireQueryClient (sync), AsyncLogfireQueryClient (async), logfire.db_api (PEP 249 / pandas).
Detailed examples: references/client-usage.md
min_timestamp/max_timestamp params for simple time windows instead of SQL WHEREservice_name, span_name, trace_id, is_exception are fast filters->>'key' for JSON attribute access (returns text); use -> for nested JSON objectsSELECT * — select only the columns you need© pydantic, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 2 other files (references) in skills/logfire-query of pydantic/skills.
Open the folder on GitHubat commit 238d971
Logfire Query 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Logfire Query this skillpydantic/skills | 140 | — | ~2.2k | Automated safety check: Pass | MIT | |
| NpgsqlrestNpgsqlRest/NpgsqlRest | 132 | — | ~7k | Automated safety check: Notes | MIT | |
| Sap Hana CLIsecondsky/sap-skills | 462 | — | ~3.1k | Automated safety check: Notes | GPL-3.0 | |
| Tidewave Integrationoliver-kriska/claude-elixir-phoenix | 565 | — | ~1.3k | Automated safety check: Pass | MIT | |
| AWS Storageaws/agent-toolkit-for-aws | 2.8k | — | ~5.8k | Automated safety check: Pass | Apache-2.0 | |
| StarRocks SQL Doc Auto-FixStarRocks/starrocks | 12k | — | ~7.6k | Automated safety check: Notes | Apache-2.0 |
NpgsqlRest/NpgsqlRest
Build and modify REST APIs with NpgsqlRest — exposing PostgreSQL as HTTP endpoints from two sources (database functions/procedures/tables/views, and plain .sql files), driven by SQL comment…
secondsky/sap-skills
Assists with SAP HANA Developer CLI (hana-cli) for database development and administration.
oliver-kriska/claude-elixir-phoenix
Tidewave MCP runtime tools — debugging, smoke testing, live state inspection, SQL queries, hex docs.
aws/agent-toolkit-for-aws
Selects, investigates, and compares AWS object, file, and block storage services, and answers cost, performance, configuration, security, and troubleshooting questions about storage services.
StarRocks/starrocks
Proposes verified fixes for failing SQL examples in StarRocks docs across three languages and several versions, then opens draft pull requests and never merges.
timescale/pg-aiguide
Explore an existing PostgreSQL database before answering questions about its data or writing SQL.
pydantic/skills
Monitor hosts, Docker containers, Kubernetes clusters, database/queue/cache servers, and cloud-provider metrics with Pydantic Logfire — no application code required.
pydantic/skills
Extend Pydantic AI agents with batteries-included capabilities from pydantic-ai-harness -- Code Mode (collapse many tool calls into one sandboxed Python execution), a filesystem and shell…
pydantic/skills
Build AI agents with Pydantic AI — tools, capabilities (including on-demand loading), structured output, streaming, testing, and multi-agent patterns.
pydantic/skills
Run offline Python (pydanticevals) or Node.js (logfire/evals) evaluations and review them in Logfire.
pydantic/skills
Add Pydantic Logfire observability to application code — traces, logs, metrics, and AI/agent spans.
pydantic/skills
Open or return Logfire project pages, live views, trace links, and Explore pages in the Codex browser without querying telemetry first.
Works with
Categories
Query and analyze Logfire telemetry data — traces, logs, spans, metrics, summaries, and SQL results. Logfire Query is an agent skill from pydantic/skills, published by the product's own GitHub organization. Query and analyze Logfire telemetry data — traces, logs, spans, metrics, summaries, and SQL results.
Logfire Query fits situations like: the user asks to query logfire; look up errors in logfire; get metrics from logfire; analyze telemetry.
Run `npx skills add pydantic/skills --skill logfire-query -a claude-code`. Or copy the skill folder (skills/logfire-query in pydantic/skills) into .claude/skills/logfire-query in your project. Claude Code loads it when a task matches its description.
Run `npx skills add pydantic/skills --skill logfire-query -a codex`. Or copy the skill folder (skills/logfire-query in pydantic/skills) into .agents/skills/logfire-query in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add pydantic/skills --skill logfire-query -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/logfire-query, .gemini/skills/logfire-query, .github/skills/logfire-query and .opencode/skills/logfire-query in your project.
SKILL.md names no scripts, command-line tools or credentials: Logfire Query is instructions for the agent only. Our summary lists: Python 3.
SKILL.md names 3 domains. In commands or code: logfire-api.pydantic.dev, logfire-us.pydantic.dev and logfire-eu.pydantic.dev; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.
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.
Logfire Query is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.2k tokens (SKILL.md is roughly 9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.5k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Logfire Query: Npgsqlrest (NpgsqlRest/NpgsqlRest, 132 stars), Sap Hana CLI (secondsky/sap-skills, 462 stars), Tidewave Integration (oliver-kriska/claude-elixir-phoenix, 565 stars) and AWS Storage (aws/agent-toolkit-for-aws, 2.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
pydantic (a GitHub organization, an official publisher) maintains it in pydantic/skills, which has 140 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 1, 2026.
Source: pydantic/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.