Skip to content
Back to skills

Github Oauth

ASecurity

This skill covers the implementation of GitHub OAuth helper functions. Trigger: Load this skill when handling GitHub OAuth processes.

  • 5 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 26, 2026
ai-agentspythonbashdockergitsecurity

Works with

  • cli

Security analysis

A100/100

Scanned September 26, 2026

npx -y skills add JNZader/repoforge --skill github_oauth --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Github Oauth?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Github Oauth
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jnzader-github-oauth/badge)](https://www.skillsdirectory.com/skills/jnzader-github-oauth)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: exchange-github-oauth-code
description: >
  This skill covers the implementation of GitHub OAuth helper functions.
  Trigger: Load this skill when handling GitHub OAuth processes.
license: Apache-2.0
metadata:
  author: repoforge
  version: "1.0"
  complexity: medium
  token_estimate: 450
  dependencies: []
  related_skills: []
  load_priority: high
---

<!-- L1:START -->
# exchange-github-oauth-code

This skill covers the implementation of GitHub OAuth helper functions.

**Trigger**: Load this skill when handling GitHub OAuth processes.
<!-- L1:END -->

<!-- L2:START -->
## 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.
<!-- L2:END -->

<!-- L3:START -->
## Critical Patterns (Detailed)

### Generate OAuth state

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

```python
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.

```python
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

```bash
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.

```python
# BAD
state = "fixed_state_value"
```
<!-- L3:END -->

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.