convez.ai
SkillDesign & UIIntermediário
hussainaljabri

Platforms Code — Skill para Claude Code

hussainaljabri/platformscode-skill

Gera UIs conformes ao design system DGA com qualidade garantida

Ver no GitHub
InicialPluginScore · de 0 a 100

Skill que permite gerar interfaces de usuário totalmente alinhadas com o Platforms Code, o sistema de design oficial da Autoridade de Governo Digital da Arábia Saudita (DGA). Suporta múltiplos frameworks (React, Vue, Angular, Svelte, HTML) com geração automática de CSS self-contained ou integração com pacotes oficiais, incluindo suporte para RTL e Arabic.

Instalação

$npx convez-ai hussainaljabri/platformscode-skill

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
1
Forks
2
Acompanhando
0
Saúde
28%
Último commit
há 4 meses
Versão
—
Issues abertas
0
Contribuidores
1

Casos de uso

  • Construir portais governamentais em conformidade com padrões DGA
  • Gerar componentes de interface bilíngues (EN/AR) com suporte RTL
  • Criar páginas web em qualquer stack (React, Vue, Angular, Svelte, HTML) com tokens de design verificados

Veredito

Skill bem estruturada e especializada para projetos governamentais sauditas que demandam conformidade rigorosa com Platforms Code. A abordagem dual (pacote React vs. CSS self-contained) oferece flexibilidade real, e a qualidade gate automatizada garante compliance — excelente para equipes que precisam acelerar desenvolvimento sem sacrificar padrões.

README

A tradução para o português deste README ainda está na fila.

Platforms Code — Claude-Code-Skill

Version License Status DGA: Platforms Code Claude Code RTL Frameworks

A Claude Code skill that lets any AI generate UI fully aligned with Platforms Code — the official design system of the Saudi Digital Government Authority (DGA) for government portals. Built around the official token values, the official component taxonomy, one rule file per element, and a built-in compliance quality gate. v2.1 adds stack-aware output: React projects get the official platformscode-new-react package; every other stack gets self-contained CSS extracted from the design system.

Author: Hussain Al-Jabri — Enterprise Applications Specialist · Saudi Arabia · GitHub Based on: Platforms Code by Saudi Digital Government Authority (SDGA / هيئة الحكومة الرقمية) and the @SDGA Figma library — the mandated design standard for Saudi government portals under Vision 2030. Status: Community-maintained. Not an official SDGA/DGA product. — مجتمعي المصدر، غير رسمي وليس تابع لهيئة الحكومة الرقمية.


Stack-aware. Two output modes, picked automatically per project:

StackModeWhat the skill does
React / Next.js📦 Official packageSuggests npm install platformscode-new-react (the DGA-maintained component library) and builds pages with its Dga* components — setup, component map, and API conventions ship in rules/packages/react.md. Declining the dependency falls back to CSS mode.
HTML, Vue, Angular, Svelte, anything else🎨 Self-contained CSSNo dependency on any Platforms Code package. The skill carries the full extracted styling of every element, section, and page — tokens, anatomy, states, layout CSS, and vanilla JS — so it designs and implements DGA-aligned UI on any stack.

In both modes the rule files (with their Figma sources and token specs) remain the visual source of truth — the package implements them for React; the raw CSS knowledge reproduces them everywhere else.

Design-system-accurate. v2.0 tokens verified against design.dga.gov.sa (الإصدار 1.0): official SA green ramp (#1B8354), gold & lavender secondary palettes, official type scale, spacing scale, breakpoints, and elevation.

Compliance-aware. Ships the official DGA implementation checklist and a scored 0–100 quality gate that runs after every generated page.

Open source. MIT licensed.


Showcase

Output generated by prompting Claude: "Build a government portal login page — Platforms Code compliant, split layout, RTL Arabic support, bilingual EN/AR"

Login page — skill output


What You Get

  • Official design tokens — colors (SA green, neutral, gold, lavender, semantic, gradients, chart palette), typography, spacing, widths, breakpoints, radius, elevation
  • Official React package integration — install/setup guide, full Dga* component inventory mapped to the visual specs, and the package's API conventions (onOnClick events, config/tabsList/buttonsList objects, sx prop, grid, @platformscode/icons)
  • 41 per-element component specs in the official taxonomy: actions (button, chip, dropdown, link, FAB) · forms (input, textarea, number input, checkbox, radio, switch, slider, Hijri/Gregorian date picker, file uploader, steps) · content (card, accordion, carousel, list, quote, divider, code snippet) · feedback (alert, modal, toast, SweetAlert2 theme) · data (tag, avatar, featured icon, table, charts/KPI) · loading (spinner, progress bar, skeleton, radial stepper) · navigation & shell (header, footer, breadcrumbs, tabs, menu, pagination, slide-out, drawer, table of contents)
  • 16 page templates — Home, Service, Form, Contact, Help, FAQ, Search, Content, About, Sitemap, 404, Chatbot, e-Participation, National Day, Founding Day, Hajj & Umrah
  • Required government sections — Government Verification Stamp and Cookies Banner, enforced on every page
  • Guidelines — RTL/Arabic, accessibility (WCAG 2.1 AA + per-component ARIA map), responsive/mobile
  • Compliance layer — the official DGA checklist criteria + a scored quality gate with blockers

Install

Option 1 — Git clone (recommended)

Mac / Linux

git clone https://github.com/hussainaljabri/platformscode-skill ~/.claude/skills/platformscode

Windows PowerShell

git clone https://github.com/hussainaljabri/platformscode-skill "$env:USERPROFILE\.claude\skills\platformscode"

Option 2 — Manual download

  1. Code → Download ZIP → extract
  2. Rename the folder to platformscode
  3. Move it to ~/.claude/skills/platformscode/ (Mac/Linux) or %USERPROFILE%\.claude\skills\platformscode\ (Windows)

Restart Claude Code — the skill is live.


Usage

Describe what you want in natural language:

Build a service page for a municipal license — Platforms Code compliant, Arabic RTL

Create an approval dashboard: KPI cards, data table with pagination, create-request slide-out

Generate a multi-step application form with a Hijri date picker and file uploader

The skill will:

  • Detect your stack — React projects are offered the official platformscode-new-react package; other stacks get self-contained CSS
  • Ask its pre-flight questions (brand palette; login layout when relevant)
  • Apply the Government Verification Stamp and Cookies Banner automatically
  • Use IBM Plex Sans Arabic, official Saudi green #1B8354, and CSS custom-property tokens only
  • Support RTL via dir="rtl" with logical CSS properties
  • Run the compliance quality gate and report the score with the result

You can also target a rule file directly:

Using rules/components/data/table.md, build a requests table with sorting and bulk selection

Skill Structure (one file per element)

platformscode/
├── SKILL.md                          ← Router: stack detection, pre-flight, critical rules, routing tables
└── rules/
    ├── packages/                     ← react (official platformscode-new-react: setup · component map · API)
    ├── foundations/                  ← colors · typography · spacing · elevation · radius · iconography
    ├── components/
    │   ├── actions/                  ← button · chip · dropdown · link · floating-button
    │   ├── forms/                    ← form-anatomy · input · textarea · number-input · checkbox ·
    │   │                               radio · switch · slider · date-picker · file-uploader · steps
    │   ├── content/                  ← card · accordion · carousel · list · quote · divider · code-snippet
    │   ├── feedback/                 ← alert · modal · notification · sweetalert
    │   ├── data/                     ← tag · avatar · featured-icon · table · charts
    │   ├── loading/                  ← spinner · progress-bar · skeleton · radial-stepper
    │   └── navigation/               ← header · footer · breadcrumbs · tabs · menu · pagination ·
    │                                   slide-out · navigation-drawer · table-of-content
    ├── sections/                     ← ⚑ gov-stamp · 🍪 cookies-banner · feedback-section · rating-section
    ├── pages/                        ← 16 page templates (home, service, form, faq, 404, hajj, …)
    ├── guidelines/                   ← rtl · accessibility · responsive
    └── compliance/                   ← checklist (official criteria) · quality-gate (scored 0–100)

Claude loads SKILL.md first, then pulls only the rule files the task needs — smaller context, more accurate output.


AI Tool Compatibility

ToolSupport
Claude Code (CLI)✅ Full — place in ~/.claude/skills/platformscode/
Claude.ai (Projects)✅ Upload rule files as project knowledge
Cursor✅ Place in .cursor/rules/ and reference from .cursorrules
OpenAI Codex CLI✅ Reference rule files from AGENTS.md
GitHub Copilot⚠️ Partial — copy key rule files into .github/copilot-instructions.md
Any AI with file context✅ Attach relevant .md files to your prompt

What "Platforms Code compliant" means

Color — official palette via tokens, never hardcoded

/* ✅ correct */
color: var(--colors-primary-sa-flag-600);   /* #1B8354 — official SA 600 */
background: var(--background-primary);

/* ❌ wrong */
color: #1f7a4f;        /* off-spec green */
color: green;
background: #ffffff;   /* hardcoded */

The only primary brand color is the official SA green #1B8354. Success states use the separate Success palette (#079455) — never the brand green. Gold (#DBA102) and Lavender (#80519F) are secondary accents.

Typography — IBM Plex Sans Arabic only

One face for Latin + Arabic. Display styles for headings, Text styles for body/UI. Saudi Font is restricted to approved national headings.

Radius by element type

ElementRadius
Buttons, inputs, badges4px
Panels, dropdowns, alerts8px
Cards, modals, sheets16px

Page stacking — stamp, banner, header

z-index: 300 │ Government Verification Stamp  ← sticky top, FIRST element in <body>
z-index: 200 │ Cookies Banner                 ← fixed bottom, slides up
z-index:  99 │ Site Header (72px)             ← sticky, top set by recalcLayout()
             │ Page content

RTL and Arabic

<html lang="ar" dir="rtl"> + logical CSS properties throughout — layouts, icons, sliders, and drawers mirror automatically.

Compliance disclaimer

The skill aligns output with Platforms Code guidelines and mirrors DGA's published assessment criteria — it does not grant official DGA certification, which requires formal review by DGA (DS-DGA@dga.gov.sa).


Updating

cd ~/.claude/skills/platformscode
git pull

Contributing

Pull requests welcome. Each rule file is self-contained Markdown — edit the relevant file, open a PR. Found a missing token or component in the official sources? Open an issue with the design.dga.gov.sa or Figma link.


Changelog

v2.1.0 — 2026-07-11

Stack-aware output modes

  • React package mode — when the project is React/Next.js, the skill now suggests installing the official DGA package platformscode-new-react and builds with its components. New rule file rules/packages/react.md: install & setup, full Dga* component inventory mapped to the visual spec files, API conventions (onOnClick, DgaHeader config, DgaModal name+buttonsList, DgaTabs tabsList, sx prop, 12-col grid), @platformscode/icons usage, page skeleton, and the @platformscode/core web-components fallback for plain HTML on request
  • Self-contained CSS mode — unchanged default for every non-React stack (and for React when the dependency is declined): the skill keeps the full extracted styling (tokens, per-element CSS, layout, vanilla JS) and all Figma source links, so no package is ever required
  • Pre-flight now asks React users to choose package vs self-contained; stack is detected from package.json when a project is present
  • Quality gate & checklist updated: official platformscode-* packages are permitted in React package mode; any other UI library or CDN import remains a blocker. Gov stamp and cookies banner are still hand-built from the section rules in both modes

v1 leftover cleanup (15 pages + 4 support files)

  • All 15 v1-era page templates and the feedback/rating sections now carry an explicit BUILD MODES block: self-contained CSS is the default path (mapped to the per-element spec files); the React template is labeled package mode only. Their <dga-*> web-components templates were removed — that path lives once in rules/packages/react.md, on explicit request
  • guidelines/rtl.md rewritten: logical-properties/CSS-mode guidance first (including LTR embeds for numbers/phones and directional-icon mirroring), package RTL props scoped to package mode
  • foundations/iconography.md: added self-contained inline-SVG icon rules alongside the package usage
  • sections/cookies-banner.md: HTML template converted from web components to self-contained HTML/CSS/JS; implementation checklist split by mode

v2.0.0 — 2026-07-07

Token accuracy (breaking)

  • Corrected the full SA green ramp to the official values — primary is now #1B8354 (was #1f7a4f); neutral grays, semantic palettes (error #D92D20, warning #DC6803, info #1570EF, success #079455), type scale, spacing names (xxs–11xl), breakpoints (600/960/1280), and elevation all verified against design.dga.gov.sa الإصدار 1.0
  • Added official Gold and Lavender secondary palettes, gradient palette, and the official monochromatic-green chart palette
  • Removed the leftover React sx-prop/DgaGrid guidance that contradicted the no-library rule

Structure (breaking)

  • One rule file per element: split form-fields, feedback, data-display, navigation, layout, and foundations into focused files under foundations/, components/{actions,forms,content,feedback,data,loading,navigation}/, sections/, pages/, guidelines/, compliance/ — mirroring the official DGA taxonomy
  • SKILL.md rewritten as a slim router with per-category routing tables

New components (24)

  • Chip, link, floating button · textarea, number input, slider, Hijri/Gregorian date picker, file uploader, steps/wizard · carousel, list, quote, code snippet · toast notification · data table, charts & KPI cards · progress bar, skeleton, radial stepper · footer, menu, pagination, slide-out, navigation drawer, table of contents

New content

  • Service page template (the most common government page type)
  • Accessibility guideline (WCAG 2.1 AA + per-component ARIA map) and responsive/mobile guideline
  • Compliance checklist derived from the official DGA implementation checklist
  • Quality gate — scored 0–100 self-audit with blockers, run after every generated page
  • Explicit "never claim official DGA compliance" guardrail

v1.2.0 — 2026-06-02

  • Fix: no longer suggests installing @platformscode/core or any npm package
  • Feature: pre-flight color palette question; pre-flight login layout question
  • Feature: SweetAlert2 rule — full CSS theme override, presets, RTL

v1.0.0 — 2026-05-30

Initial release: 30 rule files, gov stamp + cookies banner enforcement, full RTL support.


License

MIT

Ver o original no GitHub

Bom para

Relacionados