1k-coding-patterns

Enforce consistent React/TypeScript coding patterns across codebases.

Updated Apr 15, 2026
One-click install
npx skills add https://github.com/wanghaisheng/web3-scaffold-app-monorepo --skill 1k-coding-patterns-wanghaisheng
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: 1k-coding-patterns
Source: https://github.com/wanghaisheng/web3-scaffold-app-monorepo/tree/main/.claude/skills/1k-coding-patterns
Command: npx skills add https://github.com/wanghaisheng/web3-scaffold-app-monorepo --skill 1k-coding-patterns-wanghaisheng

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Enforces consistent coding patterns across React/TypeScript codebases.

Core Features & Use Cases

  • Promise handling: always await or use void for fire-and-forget, and enforce proper error handling.
  • React components: promote functional components, named imports, and proper hooks usage.
  • Restricted patterns: block problematic imports and locale-sensitive methods to ensure cross-platform consistency.

Quick Start

Use this Skill to audit and enforce coding patterns in your codebase to align with OneKey conventions.

Frequently Asked Questions about 1k-coding-patterns

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

FAQPage Schema
How do I enforce consistent coding patterns in a React and TypeScript codebase?

You can enforce consistent coding patterns by applying rules for functional components, named imports, and proper hooks usage. This guides developers through best practices to maintain codebase consistency and safer React apps.

What is the best way to handle promises in TypeScript to ensure code safety?

Handling promises safely requires always awaiting them or using void for fire-and-forget calls. You must also enforce proper error handling to prevent uncaught promise rejections in your TypeScript codebase.

How do I block problematic imports and locale-sensitive methods in React projects?

You can block problematic imports and locale-sensitive methods by applying restricted patterns. This practice ensures cross-platform consistency and prevents problematic dependencies in typical React projects.

Can I use this to audit existing React codebases for code-quality issues?

Yes, you can use this to audit and enforce coding patterns in your existing codebase. It checks for proper React component structures, promise handling, and restricted patterns to align with project conventions.

Do I need any external dependencies to apply these React and TypeScript best practices?

No external dependencies are required to apply these React and TypeScript best practices. The Skill operates independently using its internal references to guide developers through code-safety rules.