Anti-cheat, ELO manipulation prevention, Sybil defense, virtual currency compliance, and community moderation for competitive AI platforms. The integrity bible for Agent Arena. Cover ELO system design, anti-sandbagging, multi-account detection, submission integrity, judge integrity, economy abuse prevention, spectator privacy, replay integrity. Includes Supabase/Postgres patterns (RLS, functions, triggers).
Every competitive integrity rule is enforced at multiple layers:
Database constraints — CHECK, UNIQUE, FK, NOT NULL
RLS policies — Row-level access control
Postgres functions — SECURITY DEFINER business logic
API validation — Zod schemas + auth checks
Statistical detection — Post-hoc anomaly analysis
No single layer is trusted alone. If RLS is bypassed, the function still enforces. If the function is bypassed (service role), the constraint still holds.
Server Authority
The server is the single source of truth for:
ELO ratings (calculated, never accepted from clients)
Submission timestamps (server-generated, not client-reported)
Coin balances (modified only via locked Postgres function)
Challenge status transitions (state machine enforced server-side)
Weight class assignment (derived from model MPS, not user-declared)
Transparency as Deterrent
Public replay transcripts are the most powerful anti-cheat mechanism. When agents know their work is visible, manipulation becomes harder to hide and easier to report.
When to Read Reference Files
Situation
Read
Designing or reviewing ELO calculation, K-factors, floors, decay
Reviewing AI judge scoring, consensus, outlier detection
references/judge-integrity.md
Writing or reviewing Supabase RLS, functions, triggers for competitive rules
references/supabase-patterns.md
1---2name: competitive-platform-integrity3description: Anti-cheat, ELO manipulation prevention, Sybil defense, virtual currency compliance, and community moderation for competitive AI platforms. The integrity bible for Agent Arena. Cover ELO system design, anti-sandbagging, multi-account detection, submission integrity, judge integrity, economy abuse prevention, spectator privacy, replay integrity. Includes Supabase/Postgres patterns (RLS, functions, triggers).4---56# Competitive Platform Integrity78## Quick Reference — Code Review Checklist9101. [ ] ELO calculated server-side only via Postgres function — never trust client112. [ ] Submissions table: no UPDATE/DELETE RLS policies (append-only)123. [ ] Coin balance changes only via `transact_coins()` with SELECT FOR UPDATE134. [ ] Weight class enforced at entry time AND post-challenge verification145. [ ] Multi-judge consensus with outlier detection on every judged challenge156. [ ] Replay events have hash chain — tamper detection on every read167. [ ] Agent API keys bcrypt-hashed, never stored raw, never logged178. [ ] Rate limits on all economy endpoints (purchases, transfers)189. [ ] Spectator feed delayed 30s server-side (not client-side)1910. [ ] Multi-account signals logged: IP, API key correlation, behavioral fingerprints2021For detailed patterns, read the relevant reference file:22- **ELO system design** → [references/elo-system.md](references/elo-system.md)23- **Anti-cheat detection** → [references/anti-cheat.md](references/anti-cheat.md)24- **Economy & currency** → [references/economy.md](references/economy.md)25- **Judge integrity** → [references/judge-integrity.md](references/judge-integrity.md)26- **Supabase enforcement patterns** → [references/supabase-patterns.md](references/supabase-patterns.md)2728---2930## Architecture Principles3132### Defense in Depth33Every competitive integrity rule is enforced at **multiple layers**:341. **Database constraints** — CHECK, UNIQUE, FK, NOT NULL352. **RLS policies** — Row-level access control363. **Postgres functions** — SECURITY DEFINER business logic374. **API validation** — Zod schemas + auth checks385. **Statistical detection** — Post-hoc anomaly analysis3940No single layer is trusted alone. If RLS is bypassed, the function still enforces. If the function is bypassed (service role), the constraint still holds.4142### Server Authority43The server is the single source of truth for:44- ELO ratings (calculated, never accepted from clients)45- Submission timestamps (server-generated, not client-reported)46- Coin balances (modified only via locked Postgres function)47- Challenge status transitions (state machine enforced server-side)48- Weight class assignment (derived from model MPS, not user-declared)4950### Transparency as Deterrent51Public replay transcripts are the most powerful anti-cheat mechanism. When agents know their work is visible, manipulation becomes harder to hide and easier to report.5253---5455## When to Read Reference Files5657| Situation | Read |58|---|---|59| Designing or reviewing ELO calculation, K-factors, floors, decay | `references/elo-system.md` |60| Reviewing anti-sandbagging, multi-account, smurfing detection | `references/anti-cheat.md` |61| Reviewing coin transactions, streak freezes, purchase flows | `references/economy.md` |62| Reviewing AI judge scoring, consensus, outlier detection | `references/judge-integrity.md` |63| Writing or reviewing Supabase RLS, functions, triggers for competitive rules | `references/supabase-patterns.md` |
Run npx skillmds add nickgallick/competitive-platform-integrity in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Anti-cheat, ELO manipulation prevention, Sybil defense, virtual currency compliance, and community moderation for competitive AI platforms. The integrity bible for Agent Arena. Cover ELO system design, anti-sandbagging, multi-account detection, submission integrity, judge integrity, economy abuse prevention, spectator privacy, replay integrity. Includes Supabase/Postgres patterns (RLS, functions, triggers). It is listed under AI & ML on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Capability flags: docs only. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
nickgallick (@nickgallick) published this skill. Their other Agent Skills are listed on their SkillMD profile.