Skip to content
Back to skills

Multi Game Codes Hub

ASecurity

Generate a Next.js Roblox codes page from validated JSON using a reusable TSX template. Use when creating or regenerating a single game's active/expired codes page with metadata, copy controls, optional supplied redemption/FAQ content, and breadcrumb schema.

  • 321 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added May 26, 2026
developmentpythonbashnextjsgit

Works with

  • cli

Security analysis

A100/100

Pro scans all 9 files and shows the line behind each finding

Scanned September 22, 2026

npx -y skills add kennyzir/7deer_skills --skill multi-game-codes-hub --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Multi Game Codes Hub?

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

Security grade badge for Multi Game Codes Hub
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/kennyzir-multi-game-codes-hub/badge)](https://www.skillsdirectory.com/skills/kennyzir-multi-game-codes-hub)

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: multi-game-codes-hub
description: Generate a Next.js Roblox codes page from validated JSON using a reusable TSX template. Use when creating or regenerating a single game's active/expired codes page with metadata, copy controls, optional supplied redemption/FAQ content, and breadcrumb schema.
metadata:
  keywords: roblox codes, promo codes, game codes, nextjs page generator, faq schema
---

# Multi-Game Codes Hub

Generate one Next.js codes page from explicit game data. The included generator renders a TSX template; it does not discover, monitor, translate, or validate codes against Roblox.

## Implemented resources

- [resources/generate_code_page.py](resources/generate_code_page.py): validates JSON and renders a page.
- [resources/templates/codes_page.tsx](resources/templates/codes_page.tsx): Next.js page template for active/expired codes, metadata, breadcrumbs, and optional supplied redemption/FAQ content.
- [resources/components/CopyButton.tsx](resources/components/CopyButton.tsx): client-side copy control with a fallback.
- [resources/components/CodeTable.tsx](resources/components/CodeTable.tsx): optional reusable code table.
- [resources/schemas/faq_schema.ts](resources/schemas/faq_schema.ts): FAQ, breadcrumb, and item-list schema helpers.
- [USAGE.md](USAGE.md): concise CLI reference.

The generated template imports `@/components/CopyButton`; copy the included component into that alias or change the import for the target project.

## Input contract

```json
{
  "gameName": "Your Bizarre Adventure",
  "gameSlug": "yba",
  "baseUrl": "https://example.com",
  "activeCodes": [
    {
      "code": "CODE123",
      "reward": "50 Spins",
      "expiryDate": "2026-04-30",
      "conditions": "Optional"
    }
  ],
  "expiredCodes": [
    {
      "code": "OLDCODE",
      "reward": "25 Spins"
    }
  ],
  "redemptionSteps": [
    "Open the game's menu.",
    "Enter a supplied code in the code field."
  ],
  "faq": [
    {
      "question": "Where is the code field?",
      "answer": "The supplied source says it is in the game menu."
    }
  ]
}
```

Required top-level fields:

- `gameName`: non-empty string.
- `gameSlug`: lowercase letters/digits separated by single hyphens.
- `baseUrl`: absolute HTTP(S) site URL without credentials, query, or fragment. A trailing slash is normalized away.

Optional top-level fields:

- `activeCodes` and `expiredCodes`: arrays; each entry supports only `code`, `reward`, `expiryDate`, and `conditions`. `code` and `reward` are required non-empty strings.
- `redemptionSteps`: array of non-empty strings. The section is omitted when the array is absent or empty.
- `faq`: array of objects containing only non-empty `question` and `answer` strings. The FAQ section and FAQ schema are omitted when absent or empty.

Unknown top-level, code-entry, or FAQ-entry fields are errors; the generator never silently ignores input.

`baseUrl` drives canonical and breadcrumb URLs. Never reuse an example domain for a real site.

## Generate a page

From the Skill directory:

```bash
python3 resources/generate_code_page.py \
  --input resources/examples/yba_codes.json \
  --output /tmp/yba-codes-page.tsx
```

The default template is resolved relative to this Skill, so the command also works when the script is invoked from another current working directory. `--input`, `--output`, and an explicitly supplied `--template` retain normal CLI semantics: relative paths resolve from the caller's current directory and absolute paths remain absolute.

To use a custom template:

```bash
python3 resources/generate_code_page.py \
  --input ./game.json \
  --output ./page.tsx \
  --template ./custom-codes-page.tsx
```

Generation uses the current UTC month, year, and date. It fails before writing output if the JSON is invalid, required values are missing, URLs are invalid, or any `{{templateVariable}}` remains unresolved.

## Template variables

- `{{gameNameJson}}`
- `{{gameSlugJson}}`
- `{{baseUrlJson}}`
- `{{rewardsJson}}`
- `{{activeCodesData}}`
- `{{expiredCodesData}}`
- `{{redemptionStepsData}}`
- `{{faqItemsData}}`
- `{{generatedDateJson}}`
- `{{currentMonthJson}}`
- `{{currentYearJson}}`
- `{{redemptionSection}}`
- `{{faqSchemaDefinition}}`
- `{{faqSchemaScript}}`
- `{{faqSection}}`

## Verification

After generation:

1. Confirm the output contains the target `baseUrl` and no unrelated domain.
2. Confirm no `{{...}}` placeholder remains.
3. Copy or adapt the required component imports.
4. Run the target Next.js project's typecheck, lint, and build.
5. Review codes and any supplied redemption/FAQ content against a cited primary source; the generator does not verify factual accuracy.

## Roadmap and boundaries

Discord/Twitter monitoring, automatic code validity checks, automatic expiry updates, multilingual generation, community submissions, and deployment automation are not implemented. Treat them as roadmap items only; do not invoke nonexistent scripts such as `discord_code_monitor.py`, `code_validator.py`, `update_codes.py`, or `generate_multilingual.py`.

Files in this skill

  • SKILL.md16.2 KB
  • USAGE.md4.4 KB
  • resources/components/CodeTable.tsx2.1 KB
  • resources/components/CopyButton.tsx1.1 KB
  • resources/examples/kaizen_codes.json469 B
  • resources/examples/yba_codes.json658 B
  • resources/generate_code_page.py5.2 KB
  • resources/schemas/faq_schema.ts2.2 KB
  • resources/templates/codes_page.tsx9.4 KB

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.