@platform-kit-next/cli
v1.0.14
Published
Platform Kit - AI-Agent Rules and Skills for Software Projects
Readme
@platform-kit-next/cli
Platform Kit installs reusable AI-agent rules and skills into software projects so developers do not need to repeatedly explain architecture, security, SEO, API, testing, performance, i18n, and related engineering standards to AI agents.
Compatible with GitHub Copilot, Cursor, Claude Code, Gemini Code Assist, Antigravity, and all AI coding assistants supporting markdown agent guidelines.
🚀 Quick Start
Run directly with npx:
npx @platform-kit-next/cli initOr install globally:
npm install -g @platform-kit-next/cli
platform-kit init🛠️ CLI Commands
platform-kit init
Initializes AI-agent rules and skills into the current project:
- Detects project type (Next.js, React, Node/TypeScript, generic).
- Creates
AGENTS.mdin the project root. - Installs 10 authoritative engineering rules into
.agents/rules/. - Installs 13 executable agent skills into
.agents/skills/<name>/SKILL.md. - Creates a minimal
.platform/config.json. - Preserves existing user-owned files unless
--forceis specified.
platform-kit init
# Or force overwrite:
platform-kit init --forceplatform-kit skills
Lists all available and installed agent skills with their operational objectives:
platform-kit skills
# Or output as JSON:
platform-kit skills --jsonplatform-kit doctor
Validates that the project correctly complies with Platform Kit AI Agent standards:
- Verifies
AGENTS.mdentrypoint exists and is non-empty. - Verifies all 10 required rule files exist in
.agents/rules/. - Verifies all 13 required skill files exist with valid YAML frontmatter in
.agents/skills/. - Verifies cross-references between
AGENTS.md, rules, and skills resolve. - Verifies
.platform/config.jsonvalidity.
platform-kit doctor
# Or output as JSON:
platform-kit doctor --jsonplatform-kit update
Refreshes Platform Kit-managed rules and skills from latest templates while preserving application-owned files:
platform-kit update
# Or force overwrite:
platform-kit update --force📋 Core Rules (.agents/rules/)
| Rule | Description |
|---|---|
| architecture.md | Clean Architecture, domain purity (0 framework deps in domain), inward dependency flow. |
| security.md | Zero client secrets, strict CSP and HTTP security headers, timing-safe auth, bounded payloads. |
| api.md | Versioned REST routes (/api/v1), { data, meta } response envelope, DTO mapping. |
| validation.md | Schema-first validation at all trust boundaries before business logic execution. |
| testing.md | Deterministic unit tests, layer boundary tests, test pyramid and isolation. |
| seo.md | Server-rendered metadata, canonical links, OpenGraph tags, robots.txt, sitemap.xml. |
| ssr.md | Server-First rendering, server components by default, client components isolated to leaves. |
| performance.md | Core Web Vitals budgets (LCP, INP, CLS), dynamic imports, image optimization. |
| i18n.md | Server-side translations, 100% dictionary key parity, RTL layout support. |
| agent-behavior.md | AI coding agent operational guidelines, non-destructive editing, verification before completion. |
🧰 Reusable Agent Skills (.agents/skills/)
| Skill | Objective |
|---|---|
| create-feature | Generates vertical application features adhering to Clean Architecture. |
| create-api | Creates versioned REST route handlers returning standard { data, meta } envelopes. |
| create-domain-model | Defines pure business entities and value objects with zero framework dependencies. |
| database-change | Applies database migrations and schema updates safely without data loss. |
| architecture-review | Reviews layer boundaries and enforces inward dependencies across modules. |
| security-review | Audits security baseline, timing-safe authentication, and restrictive CSP headers. |
| api-contract-review | Verifies API envelope consistency, status codes, and prevents database entity leakage. |
| testing-review | Audits test coverage, determinism, isolation, and edge-case handling. |
| seo-review | Verifies canonical tags, localized metadata, robots.txt, and sitemap.xml. |
| ssr-review | Guarantees public pages are server-rendered and isolates client components. |
| performance-review | Tracks and enforces Core Web Vitals performance budgets and bundle size. |
| i18n-review | Enforces server-rendered translations, key parity, and RTL layouts. |
| dependency-upgrade | Upgrades dependencies with security advisory verification against known vulnerabilities. |
📄 License
MIT
