ワンクリックで
1k-coding-patterns
Coding patterns and best practices — React components, promise handling, and TypeScript conventions.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Coding patterns and best practices — React components, promise handling, and TypeScript conventions.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Analytics event tracking for OneKey. Use when adding tracking events, logging to server, user behavior tracking, or business metrics. Covers the @LogToServer decorator pattern, logger scope/scene architecture, and common pitfalls. Triggers on "埋点", "统计", "打点", "数据追踪", "日志", "analytics", "tracking event", "Mixpanel", "LogToServer", "trackEvent", "defaultLogger".
Create test versions to verify app auto-update functionality and version migration.
Release branch management — checkout from release, prepare builds, pre-release diff checks, publish tracking, and sync back to x. Use this skill when managing release branches, creating branches for bundle releases, running pre-release diff checks, finalizing releases, or syncing release changes to x. Triggers on "bundle release", "release diff", "release publish", "release sync", "release checkout", "发布管理", "release 分支", "release management", "bundle-release", "bundle branch".
Code quality standards — lint (eslint/oxlint), type check (tsc), pre-commit hooks, and comment conventions. All comments must be in English.
Comprehensive PR code review for OneKey monorepo. Use when reviewing PRs, code changes, or diffs — covers security (secrets/PII leakage, supply-chain, AuthN/AuthZ), code quality (hooks, race conditions, null safety, concurrent requests), and OneKey-specific patterns (Fabric crashes, MIUI, BigNumber). Triggers on "review PR", "review this PR", "code review", "check this diff", "审查 PR", "代码审查", "review
Creates a Pull Request from current changes for OneKey app-monorepo. Use when user wants to create PR, submit changes, or merge feature branch. Handles branch creation, commit, push, and PR creation with conversation context extraction for code review AI.
| name | 1k-coding-patterns |
| description | Coding patterns and best practices — React components, promise handling, and TypeScript conventions. |
| allowed-tools | Read, Grep, Glob, Write, Edit |
| Topic | Guide | Key Points |
|---|---|---|
| Promise handling | promise-handling.md | Always await or use void, never floating promises |
| React components | react-components.md | Named imports, functional components, no FC type |
| Restricted patterns | restricted-patterns.md | Forbidden: toLocaleLowerCase, direct hd-core import |
// ❌ FORBIDDEN - floating promise
apiCall();
// ✅ CORRECT
await apiCall();
// or
void apiCall(); // intentionally not awaited
// ❌ FORBIDDEN
import React, { FC } from 'react';
const MyComponent: FC<Props> = () => {};
// ✅ CORRECT
import { useState, useCallback } from 'react';
function MyComponent({ prop }: { prop: string }) {}
// ❌ FORBIDDEN
string.toLocaleLowerCase()
import { x } from '@onekeyfe/hd-core';
import { localDbInstance } from '...';
// ✅ CORRECT
string.toLowerCase()
const { x } = await CoreSDKLoader();
import { localDb } from '...';
/1k-date-formatting - Date and time formatting/1k-i18n - Internationalization and translations/1k-error-handling - Error handling patterns/1k-cross-platform - Platform-specific code/1k-code-quality - Linting and code quality/1k-performance - Performance optimization/1k-state-management - Jotai atom patterns/1k-architecture - Project structure and import rules/1k-code-quality - Lint fixes, pre-commit tasks