coding-standards

Enforces Rust and TypeScript coding conventions for Anarchy development.

Updated Feb 6, 2026
One-click install
npx skills add https://github.com/MoriwakiYusuke/anarchy --skill coding-standards-moriwakiyusuke
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: coding-standards
Source: https://github.com/MoriwakiYusuke/anarchy/tree/main/.claude/skills/coding-standards
Command: npx skills add https://github.com/MoriwakiYusuke/anarchy --skill coding-standards-moriwakiyusuke

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents costly integration bugs and security regressions by enforcing consistent engineering conventions across Anarchy’s Rust (FRAME pallet/runtime), TypeScript (Next.js/PAPI), and Rust↔TS (Wasm bridge) boundaries.

Core Features & Use Cases

  • Language-agnostic conventions: establishes Japanese-first commenting, strict naming rules, i18n error message key patterns, and “write the why” guidance to reduce ambiguity during reviews.
  • Rust runtime/pallet guardrails: enforces no_std compliance, deterministic logging constraints for wasm, storage growth bounds via MaxEncodedLen, overflow-safe arithmetic, and unsafe prohibition with scoped justification.
  • TypeScript frontend safety & consistency: mandates strict TypeScript mode, disciplined React usage, stable identifiers, BigInt handling rules, and boundary error mapping to avoid leaking raw RPC messages to users.
  • Wasm bridge correctness: limits wasm_bindgen interfaces to safe primitives and string/JSON serialization, preventing incorrect bigint transfers.

Quick Start

Ask the AI to “Generate a Rust pallet change and its corresponding TypeScript calls that follow the Anarchy coding-standards for naming, Japanese doc comments, no_std constraints, checked arithmetic, and wasm/TS error mapping, and list exactly which rules were applied.”

Frequently Asked Questions about coding-standards

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

FAQPage Schema
How do I enforce no_std constraints and overflow-safe arithmetic in Rust pallets?

Enforce no_std constraints and overflow-safe arithmetic in Rust pallets by applying coding standards that prohibit unsafe operations, mandate checked math, and bound storage growth with MaxEncodedLen to ensure deterministic wasm runtime execution.

What is the best way to handle wasm_bindgen serialization and error mapping between Rust and TypeScript?

Handle wasm_bindgen serialization and error mapping by restricting boundary interfaces to safe primitives and string/JSON formats, preventing incorrect bigint transfers and ensuring raw RPC errors are mapped cleanly for frontend users.

How do I maintain strict TypeScript typing and React best practices in Next.js with PAPI?

Maintain strict TypeScript typing and React best practices by enforcing strict mode, stable identifiers, and disciplined BigInt handling rules across Next.js and PAPI frontend modifications to prevent runtime type errors.

Does FRAME pallet development require Japanese-first documentation and specific import ordering?

FRAME pallet development requires Japanese-first documentation, strict naming conventions, and specific import ordering to reduce ambiguity during code reviews and ensure consistent engineering conventions across the project.

How do I generate Rust pallet changes and TypeScript calls that follow cross-language coding conventions?

Generate Rust pallet changes and TypeScript calls following cross-language coding conventions by prompting the AI to apply naming rules, Japanese doc comments, checked arithmetic, and wasm boundary error mapping, then listing exactly which rules were applied.

Why do I need deterministic logging constraints for wasm in Substrate runtime development?

Deterministic logging constraints for wasm are needed in Substrate runtime development because non-deterministic logging can cause consensus failures, making strict coding standards essential to prevent runtime execution divergences across nodes.