repoforge: Skill for Claude Code

.claude/skills/backend/github_oauth/SKILL.md

exchange-github-oauth-code is a skill for Claude Code from JNZader/repoforge. It costs 31 tokens per session (438 once invoked), scanned A, original, MIT.

Guidance for GitHub OAuth helper functions that create and check a temporary state value during sign-in. OAuth is a way for an application to let users sign in through another service such as GitHub.

In plain words
What is it for?
Use it when starting GitHub OAuth and when handling the redirect back from GitHub to validate the returned state.
Why use it?
Checking this state value helps ensure that the callback came from the sign-in flow the application started and helps prevent cross-site request forgery attacks.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is JNZader/repoforge's own configuration. It tells Claude Code how to work on repoforge itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything repoforge configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python repoforge/cli.py.

Reuse

Borrowing it

Nothing to install: this file belongs to JNZader/repoforge. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/JNZader/repoforge/main/.claude/skills/backend/github_oauth/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/JNZader/repoforge

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 exchange-github-oauth-code

README.md
[![agentmods](https://agentmods.dev/badge/skills/jnzader/repoforge/github_oauth/github.svg)](https://agentmods.dev/skills/jnzader/repoforge/github_oauth)
Your own site
<a href="https://agentmods.dev/skills/jnzader/repoforge/github_oauth"><img src="https://agentmods.dev/badge/skills/jnzader/repoforge/github_oauth/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 exchange-github-oauth-code

Your own site · 80×15
<a href="https://agentmods.dev/skills/jnzader/repoforge/github_oauth"><img src="https://agentmods.dev/badge/skills/jnzader/repoforge/github_oauth.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 438 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.00031 $0.00438
Opus 5.5 $0.00012 $0.00175
Sonnet 5.5 $0.00006 $0.00088
Haiku 4.5 $0.00003 $0.00044

Measured 1mo ago against content hash 855a2ab8f5ef, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

exchange-github-oauth-code 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 1mo 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.

.claude/skills/backend/github_oauth/SKILL.md · 83 lines

What it actually says

exchange-github-oauth-code

This skill covers the implementation of GitHub OAuth helper functions.

Trigger: Load this skill when handling GitHub OAuth processes.

Quick Reference

Task Pattern
Generate OAuth state generate_state()
Validate OAuth state validate_state()

Critical Patterns (Summary)

  • Generate OAuth state: Create a unique state parameter for OAuth flow.
  • Validate OAuth state: Ensure the state parameter matches the expected value.

Critical Patterns (Detailed)

Generate OAuth state

This function creates a unique state parameter to prevent CSRF attacks during the OAuth flow.

from apps.server.app.services.github_oauth import generate_state

state = generate_state()

Validate OAuth state

This function checks if the provided state matches the expected value to ensure the integrity of the OAuth process.

from apps.server.app.services.github_oauth import validate_state

is_valid = validate_state(received_state, expected_state)

When to Use

  • When initiating the GitHub OAuth flow to generate a state parameter.
  • When validating the state parameter after the user is redirected back from GitHub.

Commands

docker-compose up
python repoforge/cli.py

Anti-Patterns

Don't: Use hardcoded state values

Hardcoding state values can lead to security vulnerabilities and CSRF attacks.

# BAD
state = "fixed_state_value"
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. 1mo ago First seen · 83 lines · 31 tokens per session scan A 855a2ab8f5ef

Subscribe to this mod's changes

exchange-github-oauth-code is a skill published in the GitHub repository JNZader/repoforge (5 stars, last pushed 24d ago), licensed MIT. It adds 31 tokens to every session and 438 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-08-31.

Related

Other skills, from other repositories

groq-inference

Ultra-fast LLM inference on custom LPU hardware. OpenAI-compatible API at api.groq.com. Lowest latency in the industry (500-1000+ tok/s). Supports chat completions, vision, audio (Whisper STT + TTS), tool calling, JSON mode, and streaming. Free tier available. Inference only — no training.

synthetic-sciences/openscience · 77 tokens

opensrc

Fetch dependency source code to give AI agents deeper implementation context. Use when the agent needs to understand how a library works internally, read source code for a package, fetch implementation details for a dependency, or explore how an npm/PyPI/crates.io package is built. Triggers include "fetch source for"…

vercel-labs/opensrc · 103 tokens

bun-file-io

Use this when you are working on file operations like reading, writing, scanning, or deleting files. It summarizes the preferred file APIs and patterns used in this repo. It also notes when to use filesystem helpers for directories.

synthetic-sciences/openscience · 49 tokens

protocolsio-integration

Integration with protocols.io API for managing scientific protocols. This skill should be used when working with protocols.io to search, create, update, or publish protocols; manage protocol steps and materials; handle discussions and comments; organize workspaces; upload and manage files; or integrate protocols.io…

synthetic-sciences/openscience · 85 tokens

arkcli-infer-endpoint

A manager for inference endpoints, the online addresses used to send requests to deployed AI models. It can work with endpoints created by the current SSO sub-user, which is a separately identified account user.

volcengine/ark-cli · 258 tokens

arkcli-api-explorer

Inspect or invoke locally registered ArkCLI actions when product commands cannot cover a task. Use for registry errors or exact raw payloads. Not for public API catalogs or OpenAPI schemas.

volcengine/ark-cli · 42 tokens