setup-oauth

setup-oauth is a skill for Claude Code, Codex from feniix/pi-extensions. It costs 16 tokens per session (464 once invoked), scanned A, original, MIT.

A setup guide for connecting Notion to an agent through OAuth, the browser-based permission process.

In plain words
What is it for?
Use it when connecting to Notion or fixing a missing connection, then verify access before searching, reading, or changing workspace content.
Why use it?
It removes the manual work of starting authorization, receiving the callback, and registering Notion tools.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

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.

agentmods
npx agentmods add skills/feniix/pi-extensions/setup-oauth
Any agent
npx skills add feniix/pi-extensions --skill setup-oauth
Clone the repo
git clone --depth 1 https://github.com/feniix/pi-extensions

Made for: Claude Code, Codex.

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 setup-oauth

README.md
[![agentmods](https://agentmods.dev/badge/skills/feniix/pi-extensions/setup-oauth.svg)](https://agentmods.dev/skills/feniix/pi-extensions/setup-oauth)
Your own site
<a href="https://agentmods.dev/skills/feniix/pi-extensions/setup-oauth"><img src="https://agentmods.dev/badge/skills/feniix/pi-extensions/setup-oauth.svg" alt="Measured on agentmods" height="20"></a>
Per session 16 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 464 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00016 $0.00464
Opus 5 $0.00008 $0.00232
Sonnet 5 $0.00003 $0.00093
Haiku 4.5 $0.00002 $0.00046

Measured 6d ago against content hash f446210fc7e0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

setup-oauth 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 6d 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.

packages/pi-notion/skills/setup-oauth/SKILL.md · 80 lines

What it actually says

Setup Notion MCP

Connect pi to Notion using the official MCP (Model Context Protocol) server with OAuth.

When to Use

Use this skill when the user:

  • Wants to connect pi to Notion
  • Says "setup notion", "connect notion", "notion oauth", or similar
  • Gets errors about Notion not being configured
  • Asks to search or access their Notion workspace

OAuth Flow

The /notion command handles the full OAuth flow automatically:

  1. Starts a local callback server on an available port
  2. Opens Notion's authorization page in your browser
  3. You approve access in the browser
  4. Receives the authorization code via callback
  5. Exchanges the code for access token
  6. Discovers and registers available MCP tools

Quick Start

Step 1: Check Current Status

Use notion_mcp_status to check if already connected.

Step 2: Connect

Run the /notion command to start the OAuth flow.

Step 3: Verify

Use notion_mcp_status to verify the connection.

After Connecting

Once connected, use the workspace-explorer skill to learn how to:

  • Search for pages and databases
  • Read page content
  • Query databases
  • Create and update pages

Troubleshooting

Issue Solution
Connection failed Try again - OAuth may have timed out
Token expired Run /notion to re-authenticate
Need to switch workspace Disconnect first, then reconnect

Available Tools

Local tools (always available)

  • notion_mcp_connect — Connect to Notion via OAuth
  • notion_mcp_disconnect — Disconnect and clear saved credentials
  • notion_mcp_status — Check connection status

MCP tools (auto-discovered after connecting)

These are registered dynamically from Notion's MCP server. Run notion_mcp_status to see available tools after connecting.

Disconnect

Use notion_mcp_disconnect to disconnect from Notion MCP.
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. 6d ago First seen · 80 lines · 16 tokens per session scan A f446210fc7e0

Subscribe to this mod's changes

setup-oauth is a skill published in the GitHub repository feniix/pi-extensions (23 stars, last pushed yesterday), licensed MIT. It adds 16 tokens to every session and 464 once invoked, about $0.0001 per session on Opus 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-08-30.

Related

Other skills, from other repositories

codebase-memory

Use the codebase knowledge graph for structural code queries. Triggers on: explore the codebase, understand the architecture, what functions exist, show me the structure, who calls this function, what does X call, trace the call chain, find callers of, show dependencies, impact analysis, dead code, unused functions…

narumiruna/pi-extensions · 98 tokens

using-pi-subagents

Operate pi-subagents jobs safely, including direct-work decisions, least-privilege tool selection, thinking-level selection, delegation, bidirectional messaging, parallel starts, timeout selection, waiting, cancellation, result handling, verification, and writer isolation.

narumiruna/pi-extensions · 54 tokens

code-design

TypeScript conventions, code design principles (SOLID, self-documenting code, file organization), structural design heuristics (dependency width, LoD, output arguments), pnpm rules, ES2024 target, Pi SDK patterns, and Biome/ESLint conflict workarounds. Load during implementation, refactoring, or code review.

gotgenes/pi-anthropic-auth · 72 tokens

pi-package-sandbox-test

Use when verifying that published Pi packages install and load for normal users, including pi.dev package compatibility checks, release validation, Daytona sandbox tests, and package installability audits.

spences10/my-pi · 40 tokens

pi-primitive-check

Use when evaluating proposed Pi customisation work against built-in Pi primitives before implementation, especially extensions, packages, slash commands, and workflow ideas.

spences10/my-pi · 33 tokens

review-harness

Use when reviewing implementation work that ran through a /tmp Pi task harness. Checks contract drift, unsafe shortcuts, validation evidence, and status honesty.

spences10/my-pi · 33 tokens