App-side OneKey DeFi guide for Earn, native Discovery-hosted Earn, Borrow, Staking, DeFi Portfolio actions, vaults, lending, protocol integrations, ABI-backed operations, native/provider-backed operations, pending transactions, history, route handoffs, risk display, and DeFi regression review.
63
75%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Medium
Suggest reviewing before use
Fix and improve this skill with Tessl
tessl review fix ./.skillshare/skills/1k-defi-module-integration/SKILL.mdUse this skill when App code touches Earn, Borrow, Staking, vault/lending/yield protocols, operation modals, pending/history, or protocol-specific DeFi flows.
This is an App development skill. It should guide implementation and review from current repository code and App behavior, not from external workflow details.
The canonical DeFi App path is:
host/route -> home -> list/detail -> operation modal -> transaction sequence -> pending refresh -> history -> cross-surface handoff
Most requirements are not "add a protocol" only. They are route, data, operation, pending, and platform integration requirements.
For DeFi portfolio one-click actions such as withdraw, claim, claimWithdrawal, or removeLiquidity, read portfolio-actions-guide.md before changing action visibility, build-transaction payloads, or post-action refresh.
When an Earn/DeFi task comes from Jira, Slack, a review thread, or a local todo ledger, treat the title as a routing clue only. Before changing code, verify the current source-of-truth packet:
If source evidence conflicts, stop and name the conflict before picking a fix
shape. Use 1k-earn-bugfix only as historical risk input; this skill remains
the App implementation owner for Earn/DeFi flow changes.
For a sufficiently clear feature or bug request, recover the source packet, fill the operation capability packet, implement, test, and validate without waiting for a human to map the App. Read autonomous-feature-workflow.md before editing and use feature-packet.md.
Run the readiness check first:
node .skillshare/skills/1k-defi-module-integration/scripts/check-readiness.mjsThe check fails when current stable anchors or required eval assets are missing, or when pre-existing uncommitted domain code makes intake ambiguous. Reconcile current client and server contracts, code maps, and tests before implementation; do not bypass it. Use runtime-boundaries.md for any background service, event, persistence, restart, account-switch, native-host, or crash path and test-map.md for exact validation lanes.
Autonomy does not authorize inventing product behavior, silently resolving source conflicts, using unavailable secrets, making irreversible external writes, or claiming runtime proof from static checks.
Classify the change first:
If the scenario is unclear, map its operation contract before choosing UI structure.
main, bg,
native/web resource, JS-copy, and initialization ownership.| Need | Reference |
|---|---|
| Understand Earn/Borrow/Staking flow | app-architecture.md |
| Execute a feature end to end | autonomous-feature-workflow.md |
| Fill the implementation capability packet | feature-packet.md |
| Find current repo anchors | code-map.md |
| Reason about main/bg/persistence/init timing | runtime-boundaries.md |
| Define operation and transaction contracts | operation-flow.md |
| DeFi Portfolio one-click action contracts | portfolio-actions-guide.md |
| Route, state, pending, history, and platform ownership | state-and-routing.md |
| Prevent common integration failures | checklists.md |
| Run exact focused test lanes | test-map.md |
| Prove route/platform/runtime behavior | validation.md |
Use these drills to judge whether the skill can guide fast protocol integration:
/wallet/v1/portfolio/positions, /earn/v1/defi/supported-protocols, and /earn/v1/defi/build-transaction without dropping grouped source metadata?If a drill cannot be completed from the references, improve the abstraction before implementing.
/1k-i18n./1k-i18n for translation keys and generated locale workflow./1k-coding-patterns for React and TypeScript patterns./1k-state-management for Jotai and state ownership./1k-cross-platform for platform-specific routing and layout./1k-trade-swap-market for Swap-assisted funding or repay flows.3cff1b4
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.