About 1k-defi-module-integration
A development skill for tracing Earn and DeFi behavior in the OneKey app, from entry point through transaction and refresh. It helps developers identify the owning surface and verify changes against runtime behavior.
Key features
- 01Trace entry-to-refresh operation flows
- 02Locate service and surface owners
- 03Map portfolio actions to transactions
- 04Choose focused tests and runtime checks
Use cases
- 01Debug a borrow or staking flow
- 02Trace a portfolio action issue
- 03Verify a funding handoff to Swap
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ onekeyhq/ app-monorepo --skill 1k-defi-module-integrationAfter installing, type/1k-defi-module-integrationin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
agents/openai.yamlreferences/app-architecture.mdcode-map.mdoperation-flow.mdportfolio-actions-guide.mdvalidation.mdDetails
From the project READMEEarn / DeFi
Use this skill as a map to the owning surface and service contract. Derive product behavior from current code, server data, and the real runtime.
Quick Start
- Reproduce the real entry and affected platform.
- Trace
entry -> data/position -> action -> transaction -> status -> refresh. - Find the first owner whose identity, capability, or transition is wrong.
- Reuse a nearby pattern only when its protocol and operation semantics match; then verify the changed path and a relevant sibling.
Find The Owner
| Task | Start here | Read next |
|---|---|---|
| Earn home, list, recommendation, or detail | Earn view/state and its service request | Architecture, Code map |
| Borrow, staking, claim, withdraw, repay, or status | Operation owner and current service contract | Operation flow |
| Portfolio position or action | Position data, supported action, transaction builder | Portfolio actions |
| Native route, modal, event, or account switch | Discovery host and runtime owner | Architecture |
| External protocol website | Discovery/browser until an App-owned RPC begins | Architecture |
| Funding handoff to Swap | DeFi prefill before quote; Swap execution afterward | $1k-trade-swap-market |
Load Detail As Needed
- Architecture explains surfaces, hosts, runtimes, and cross-module boundaries.
- Code map gives stable directories and search anchors.
- Operation flow covers operation identity, setup, transaction, status, and refresh.
- Portfolio actions covers how visible positions, supported actions, and transaction building join.
- Validation helps choose focused tests and runtime evidence for the changed layer.
Finish
State the owning surface/service and the identities that matter. Run nearby tests and repository-required checks, then prove the affected route reaches the intended terminal and refresh state. Report unavailable runtime or server proof.
Related skills: $1k-trade-swap-market, $1k-state-management,
$1k-cross-platform, $1k-coding-patterns.