# Exchange Github Oauth Code

> >

- **Type:** Skill
- **Install:** `agentstack add skill-jnzader-repoforge-github-oauth`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [JNZader](https://agentstack.voostack.com/s/jnzader)
- **Installs:** 0
- **Category:** [Developer Tools](https://agentstack.voostack.com/c/developer-tools)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [JNZader](https://github.com/JNZader)
- **Source:** https://github.com/JNZader/repoforge/tree/main/.claude/skills/backend/github_oauth
- **Website:** https://repoforge.javierzader.com

## Install

```sh
agentstack add skill-jnzader-repoforge-github-oauth
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 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.

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

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [JNZader](https://github.com/JNZader)
- **Source:** [JNZader/repoforge](https://github.com/JNZader/repoforge)
- **License:** MIT
- **Homepage:** https://repoforge.javierzader.com

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-jnzader-repoforge-github-oauth
- Seller: https://agentstack.voostack.com/s/jnzader
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
