用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/OneKeyHQ/app-monorepo --skill 1k-coding-patterns命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Analyze accumulated bug fix cases and propose updates to the self-testing checklist. Use periodically (weekly/monthly) to evolve quality checks based on real issues.
OneKey i18n and Lokalise workflow for searching, adding, updating, pulling, and using translation keys. Verify the target project and full locale coverage; never edit generated translation files.
Review OneKey PRs and diffs for security, correctness, concurrency, React/RN pitfalls, and repository-specific regressions. Use for code review or 审查 PR.
基于 SOC 职业分类
正在显示 SKILL.md
| name | 1k-coding-patterns |
| description | OneKey coding patterns for TypeScript, React, promises, date formatting, and error handling. |
| 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 |
| Date formatting | date-formatting.md | Use OneKey dateUtils, not native date formatting |
| Error handling | error-handling.md | Preserve errors across RPC/runtime boundaries |
// ❌ 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-i18n - Internationalization and translations/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