onekeyhq/app-monorepo73 installs
1k-coding-patterns
OneKey coding patterns for TypeScript, React, promises, date formatting, and error handling.
How do I install this agent skill?
npx skills add https://github.com/onekeyhq/app-monorepo --skill 1k-coding-patternsIs this agent skill safe to install?
- Gen Agent Trust Hubpass
This skill provides static coding guidelines and best practices for TypeScript and React development. It contains no executable scripts, external dependencies, or malicious patterns.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
- Runlayerwarn
4/4 files flagged
What does this agent skill do?
OneKey Coding Patterns and Best Practices
Quick Reference
| 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 |
Critical Rules Summary
Promise Handling
// ❌ FORBIDDEN - floating promise
apiCall();
// ✅ CORRECT
await apiCall();
// or
void apiCall(); // intentionally not awaited
React Components
// ❌ FORBIDDEN
import React, { FC } from 'react';
const MyComponent: FC<Props> = () => {};
// ✅ CORRECT
import { useState, useCallback } from 'react';
function MyComponent({ prop }: { prop: string }) {}
Restricted Patterns
// ❌ FORBIDDEN
string.toLocaleLowerCase()
import { x } from '@onekeyfe/hd-core';
import { localDbInstance } from '...';
// ✅ CORRECT
string.toLowerCase()
const { x } = await CoreSDKLoader();
import { localDb } from '...';
Related Skills
/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
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/onekeyhq/app-monorepo/1k-coding-patterns">View 1k-coding-patterns on skillZs</a>