Claude-skill-registry api-fetch-with-auth

Create authenticated API fetch function in Next.js. Use for frontend API calls.

install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/api-fetch-with-auth" ~/.claude/skills/majiayu000-claude-skill-registry-api-fetch-with-auth && rm -rf "$T"
manifest: skills/data/api-fetch-with-auth/SKILL.md
safety · automated scan (low risk)
This is a pattern-based risk scan, not a security review. Our crawler flagged:
  • references API keys
Always read a skill's source content before installing. Patterns alone don't mean the skill is malicious — but they warrant attention.
source content

APIFetchWithAuth Instructions

Input: Endpoint, method, body. Output: Fetch function. Steps:

  1. Import getSession from better-auth/nextjs.
  2. Attach Bearer token. Example Code: import { getSession } from 'better-auth/nextjs'; async function apiFetch(url: string, method: string, body?: any) { const session = await getSession(); const token = session?.token; return fetch(url, { method, headers: { Authorization:
    Bearer ${token}
    }, body: body ? JSON.stringify(body) : undefined, }); }