1k architecture

From OneKeyHQ/app-monorepo · View interactive version

1k architecture is an AI agent skill from the GitHub repository OneKeyHQ/app-monorepo. OneKey monorepo architecture, project structure, package relationships, and import hierarchy rules.

How to use this skill

Skill file

OneKey Architecture Overview

Platform Structure

Core Packages

Key Architectural Patterns

Code Organization

File Naming Conventions

Import Patterns

Import Hierarchy Rules - STRICTLY ENFORCED

CRITICAL: Violating these rules WILL break the build and cause circular dependencies.

HIERARCHY (NEVER violate this order):

BEFORE ADDING ANY IMPORT:

  1. Verify the import respects the hierarchy above
  2. Check if the import creates a circular dependency
  3. If unsure, find an alternative approach that respects the hierarchy

COMMON VIOLATIONS TO AVOID:

Component Structure

Deep Analysis & Architecture Consistency Framework

Pre-Modification Analysis Protocol

MANDATORY ANALYSIS STEPS (Execute BEFORE any code changes):

  1. Scope Impact Assessment
  1. Pattern Consistency Verification
  1. Architecture Integrity Check
  1. Performance Impact Evaluation

Code Pattern Recognition Framework

WHEN ADDING NEW FUNCTIONALITY:

  1. Find Similar Examples: Search codebase for similar implementations
  2. Extract Patterns: Identify common approaches, naming, structure
  3. Follow Conventions: Mirror existing patterns exactly
  4. Validate Consistency: Ensure new code looks like existing code

WHEN MODIFYING EXISTING CODE:

  1. Understand Context: Read surrounding code and imports
  2. Preserve Patterns: Maintain existing architectural decisions
  3. Consistent Style: Match existing code style and structure
  4. Validate Integration: Ensure changes integrate seamlessly

Architecture Validation Checklist

BEFORE COMMITTING ANY CHANGES:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.