championship-lifecycle

Guides opening, running, closing, and awarding championships in the Primitivão betting app.

Updated May 6, 2026
One-click install
npx skills add https://github.com/BanePlayss/primitivao --skill championship-lifecycle-baneplayss
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: championship-lifecycle
Source: https://github.com/BanePlayss/primitivao/tree/main/.claude/skills/championship-lifecycle
Command: npx skills add https://github.com/BanePlayss/primitivao --skill championship-lifecycle-baneplayss

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It documents where each championship's data lives and how the soon→active→closed lifecycle works in the Primitivão app (apostas-app.jsx), so opening, closing, or awarding a championship (FIFA, MK, Golf, etc.) no longer requires rediscovering the data model every time. ## Core Features & Use Cases - Lifecycle management: Explains the status flip from soon to active, how 'closed' is computed via computeChampStandings, and how to transition between bettable championships in one operation. - Data model map: Details where each game stores results (cs.rounds for FIFA, json.mk for Mario Kart, interests.<id> for signups) and which fields are top-level Firestore fields. - Titles and trophies: Describes the predicate-based achievement system (ACH/ACHIEVEMENTS, earnedTitles latch) used to award champion, runner-up, last-place, and REI DAS APOSTAS titles without minting PC. - Use Case: When asked to close the Mario Kart championship and award trophies, follow the documented mkStatsFor/mkKoPodiumOrder path to derive winners and latch titles instead of hardcoding nicknames. ## Quick Start Ask the assistant to close the current championship and award the champion, runner-up, and REI DAS APOSTAS titles following this lifecycle guide.

Frequently Asked Questions about championship-lifecycle

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I close a championship and award trophies in the Primitivão app?▼

Derive the final standings from the game's data source (e.g., mkStatsFor for Mario Kart), then make the achievement predicates in ACH point to the real winners. Titles latch automatically into users' earnedTitles when each player logs in; no PC prizes are given without explicit request.

How does championship status work in apostas-app.jsx?▼

The CHAMPIONSHIPS array stores only 'active' or 'soon'; 'closed' is computed by champStatusFor via computeChampStandings. Currently only FIFA is fully supported, so other games need their data wired into that function to show as closed.

Where is each championship's data stored in Firestore?▼

FIFA results live in cs.rounds on the primitivao/state doc, Mario Kart data lives in json.mk on primitivao/apostas, and signups use top-level interests.<id> fields. Top-level fields are written with merge and never enter the json reducer.

Why doesn't a non-FIFA championship show as closed in the sidebar?▼

computeChampStandings only understands FIFA and returns 'soon' for other games, so champStatusFor never yields 'closed'. You must thread the game's data (e.g., mk.ko) into that function or use a module-level ref set by the App.

Can I open a new championship before its betting engine is ready?▼

No. Flipping status to active makes isBettableChamp true immediately, so the betting tab would show a bettable championship with nothing to bet on. Build the view, score launcher, standings, and markets first, then flip.