connect

connect is a command for Claude Code from pydantic/skills. It costs 13 tokens per session (1,459 once invoked), scanned A, original, MIT.

A setup command for connecting Logfire's tool interface to Claude Code and optionally recording Claude sessions. Logfire is a service that can receive tool queries and telemetry.

In plain words
What is it for?
It is for enabling Logfire queries, session recording, or both, including the required authentication and connection checks.
Why use it?
It guides users through only the connection choices they need and avoids changing application monitoring or adding duplicate connections.

Command for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: mentions Claude Code.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the logfire plugin — 10 skills, 7 commands, 1 MCP server shipped together

Good fit It is for enabling Logfire queries, session recording, or both, including the required authentication and connection checks.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add pydantic/skills
Claude Code
/plugin install logfire

Made for: Claude Code.

Or install logfire, the plugin that ships this one along with the rest of its 10 skills, 7 commands, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for connect

README.md
[![agentmods](https://agentmods.dev/badge/commands/pydantic/skills/connect/github.svg)](https://agentmods.dev/commands/pydantic/skills/connect)
Your own site
<a href="https://agentmods.dev/commands/pydantic/skills/connect"><img src="https://agentmods.dev/badge/commands/pydantic/skills/connect/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for connect

Your own site · 80×15
<a href="https://agentmods.dev/commands/pydantic/skills/connect"><img src="https://agentmods.dev/badge/commands/pydantic/skills/connect.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,459 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00013 $0.01459
Opus 5.5 $0.00005 $0.00584
Sonnet 5.5 $0.00003 $0.00292
Haiku 4.5 $0.00001 $0.00146

Measured 21d ago against content hash 3e9f76dbf407, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

connect scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 21d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/logfire/commands/connect.md · 125 lines

How it starts

The opening of the file, as written. The whole thing — 125 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Connect Logfire

Guide the user through connection; execute setup for them rather than handing them a list of CLI commands. This command is for Claude Code. It does not instrument the user's application or enable an AI Gateway proxy.

Keep the conversation short

If the user's request does not already say, ask one question: "Would you like to query Logfire, record your Claude sessions, or both?" Honor an answer in the command arguments without asking again. Ask only for missing information, not the entire configuration at once. Explain what the next browser approval is for.

For query-only, finish after the MCP check; do not ask capture questions or install a runtime. For recording-only, skip MCP authentication: CLI login and an explicitly chosen project are sufficient. Offer MCP verification afterwards, but do not require read access just to send telemetry.

Connect MCP

The plugin already registers the hosted logfire HTTP MCP server. Inspect its actual endpoint and connection state with Claude's /mcp interface or claude mcp list. Do not add a second server. Ask for the intended region or self-hosted endpoint if it is not established by the user or current connection.

The default is https://logfire-us.pydantic.dev/mcp; EU uses https://logfire-eu.pydantic.dev/mcp. LOGFIRE_MCP_URL overrides the default. If a change is needed, offer to merge only that environment value into Claude's user settings, preserving all other settings. Confirm this user-wide change before editing. Inspect the resolved URL rather than assuming a shell export overrides saved user settings. Reload the plugin or restart Claude and verify the resolved endpoint before authenticating.

Use Claude's native OAuth flow (/mcp, select Logfire, authenticate), or claude mcp login with the exact registered server name. Never read Claude's credential store, request tokens in chat, or imply CLI login authenticates Claude's MCP client. Listing/getting an MCP server can exit successfully while its reported connection status is failed; exit code zero is not authentication proof. Verify with a small authenticated MCP read. MCP-only is a complete, supported connection; do not require a CLI installation for it.

Read the full file on GitHub · 125 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 21d ago First seen · 125 lines · 13 tokens per session scan A 3e9f76dbf407

Subscribe to this mod's changes

connect is a command published in the GitHub repository pydantic/skills (151 stars, last pushed 9d ago), licensed MIT. It adds 13 tokens to every session and 1,459 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-17.

Related

connect compared with commands from other repositories

connect next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
connectpydantic/skillsCommand1519d agoMITA13Claude Code
cost-optimizewshobson/agentsCommand42kyesterdayMITA26Claude Code
deploybutterbase-ai/butterbase-skillsCommand5356d agoMITA20Claude Code
envvercel/vercel-pluginCommand326yesterdaynoneA35Claude Code
firebase-publishPierry/harness-kitCommand41mo agoMITA20Claude Code
scanprajapatimehul/claude-aws-cost-saverCommand244mo agoMITA6Claude Code
migrationdatabayt/hogwartsCommand183d agononeA4Claude Code