auth-preflight

auth-preflight is a skill for Claude Code from ai-analyst-lab/ai-analyst. It costs 186 tokens per session (2,855 once invoked), scanned B, original, MIT.

A startup check for Google Workspace sign-in before work involving Google Docs, Google Slides, or Google Drive. Google Workspace is Google's set of document, presentation, and file-storage services.

In plain words
What is it for?
Use it before calling Google Workspace tools, uploading files to Drive, creating documents or slides, or running other Google-dependent agents.
Why use it?
Authentication failures discovered halfway through a workflow waste time and often produce unclear errors. This checks access first so problems can be identified before other work begins.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths; mentions Claude Code.

Good fit Use it before calling Google Workspace tools, uploading files to Drive, creating documents or slides, or running other Google-dependent agents.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ai-analyst-lab/ai-analyst/auth-preflight
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ai-analyst-lab/ai-analyst --skill auth-preflight
Clone the repo
git clone --depth 1 https://github.com/ai-analyst-lab/ai-analyst

Made for: Claude Code.

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 auth-preflight

README.md
[![agentmods](https://agentmods.dev/badge/skills/ai-analyst-lab/ai-analyst/auth-preflight/github.svg)](https://agentmods.dev/skills/ai-analyst-lab/ai-analyst/auth-preflight)
Your own site
<a href="https://agentmods.dev/skills/ai-analyst-lab/ai-analyst/auth-preflight"><img src="https://agentmods.dev/badge/skills/ai-analyst-lab/ai-analyst/auth-preflight/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 auth-preflight

Your own site · 80×15
<a href="https://agentmods.dev/skills/ai-analyst-lab/ai-analyst/auth-preflight"><img src="https://agentmods.dev/badge/skills/ai-analyst-lab/ai-analyst/auth-preflight.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 186 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,855 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00186 $0.02855
Opus 5 $0.00093 $0.01427
Sonnet 5 $0.00037 $0.00571
Haiku 4.5 $0.00019 $0.00285

Measured 2d ago against content hash 24b9dfc6c463, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-13, from the pricing page.

Security

Grade B, and why

auth-preflight scanned grade B with 1 finding 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 2d 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.

Reads MCP configurationmediumAgent snooping

mcp.json carries server URLs and auth tokens; reading it lets a mod discover and abuse other integrations.

cat .mcp.json | grep -A3 google
.claude/skills/auth-preflight/SKILL.md · 298 lines

How it starts

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

Skill: Auth Preflight

Purpose

Verify Google Workspace MCP authentication BEFORE beginning any Google-dependent work. Catches auth issues in <30 seconds instead of discovering them after 5-10 minutes of chart generation, narrative writing, or deck building.

Core principle: Fail fast with clear guidance, not slow with cryptic errors mid-workflow.

When to Apply

Trigger this skill immediately when:

  • The task involves Google Docs, Slides, or Drive
  • Any mcp__google-* tool will be called
  • The user mentions "Google Doc", "Google Slides", "upload to Drive", "create a deck", "export to Google", "share on Drive"
  • Before running google-slides-creator, google-slides-reviewer, gdoc-builder, or any Google-dependent agent

Critical timing: Run auth preflight as your FIRST action, before exploring data, generating charts, parsing narratives, or any other substantive work.


Preflight Workflow

Step 1: Detect MCP Configuration

Read .mcp.json to discover which Google MCP server(s) are configured:

cat .mcp.json | grep -A3 google

Look for entries like:

  • google-docs → Google Docs + Drive MCP server (most common)
  • google-workspace → Full workspace MCP (Docs, Slides, Drive)
  • google-slides → Slides-specific MCP server

Extract:

  • Server name (JSON key, e.g., "google-docs")
  • Command path (where the executable lives)
  • Args (to identify server type)

Why this matters: Different MCP implementations store credentials in different locations. Detecting configuration first ensures you check the right paths.

If no Google MCP found: Report:

Auth: FAILED — No Google MCP server configured in .mcp.json
To use Google Docs/Slides, add a Google MCP server to .mcp.json

Step 2: Check Stored Credentials

Based on MCP type from Step 1, check credentials in ALL possible locations (some setups use non-standard paths):

Priority 1: MCP-specific locations
# For google-docs MCP
ls ~/.claude/mcp-servers/google-docs-mcp-server/

# For google-workspace MCP
ls ~/.google_workspace_mcp/credentials/

# For google-slides MCP
ls ~/.claude/mcp-servers/google-slides-mcp-server/

Read the full file on GitHub · 298 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. 2d ago First seen · 298 lines · 186 tokens per session scan B 24b9dfc6c463

Subscribe to this mod's changes

auth-preflight is a skill published in the GitHub repository ai-analyst-lab/ai-analyst (298 stars, last pushed 3d ago), licensed MIT. It adds 186 tokens to every session and 2,855 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it B with 1 finding (reads mcp configuration). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-12.