Skip to content
Development
Skill

/navi-lending

Integrate Navi lending protocol on Sui. Use when the user mentions Navi or wants to lend or borrow on Sui via Navi.

From plugin
suiperpower
1360 skills1 MCP

Claude Code

$ npx -y skills add pivyme/suiperpower --skill navi-lending --agent claude-code

SKILL.md

navi-lending.SKILL.md
name: navi-lending
description: Integrate Navi lending protocol on Sui. Use when the user mentions Navi or wants to lend or borrow on Sui via Navi.

Preamble (run first)

# Suiperpower telemetry. Routes through the CLI so projects.json + Convex stay in sync.
# Silent on failure so the skill never blocks. Opt out: SUIPERPOWER_TELEMETRY=off.
#
# AGENT NOTE: when this skill finishes, run the matching completion command:
#   suiperpower track navi-lending build completed
# Or use "failed" / "aborted" if it ended that way.
command -v suiperpower >/dev/null 2>&1 && suiperpower track navi-lending build started >/dev/null 2>&1 &
true

If `TEL_PROMPTED` is `no`, before doing real work, ask the user:

> Help suiperpower get better. We track which skills get used and how long they take. No code, no file paths, no PII. Change anytime in `~/.suiperpower/config.json`. > > A) Sure, anonymous > B) No thanks

Write the answer to `~/.suiperpower/config.json` `telemetryTier` field and create `~/.suiperpower/.telemetry-prompted`. Then continue.

What this skill does

Integrates NAVI Protocol lending into the project. Sets up the `@naviprotocol/lending` SDK (PTB-native, no standalone client class), walks through deposit, borrow, repay, and withdraw flows, adds health factor monitoring, and optionally wires up flash loans. Verifies a real lending operation executes on mainnet before declaring done.

When to use it

  • Building a lending frontend, yield aggregator, liquidation bot, or DeFi app that needs lending primitives on Sui.
  • The user wants flash loans for arbitrage or liquidation flows.
  • The user needs E-Mode for higher LTV on correlated asset pairs (e.g., vSUI/SUI).
  • The user is targeting the DeFi & Payments track at Sui Overflow 2026.

When NOT to use it

  • For Scallop lending, use `scallop-money-market` instead. Both are production protocols. NAVI uses PTB-native functions with coin type identifiers. Scallop uses sCoins receipt tokens and a builder pattern (`depositQuick`). Pick based on asset coverage and API preference.
  • For token swaps or AMM liquidity, use `cetus-swap` or `deepbook-orderbook`.
  • For DeFi research without implementation, use `defillama-sui`.
  • If the user has not scaffolded a project, use `scaffold-project` first.

Inputs

  • A Sui project (Move package and/or TS frontend).
  • Optional: `.suiperpower/build-context.md` from `scaffold-project`. Read it if present.
  • Which operations: deposit only, deposit + borrow, flash loans.
  • Which assets: SUI, USDC, USDT, WETH, etc. (35 supported assets total).

If unclear, interview the user for:

  • Deposit only, or deposit plus borrow?
  • Which collateral asset, which borrow asset?
  • Need flash loans?
  • Who manages the position: end user via wallet, or app keeper?

Outputs

  • NAVI SDK integration code with PTB-based deposit, borrow, repay, withdraw.
  • Health factor check before any borrow.
  • Optional: flash loan flow with `flashloanPTB` + `repayFlashLoanPTB`.
  • Append to `.suiperpower/build-context.md`:
  ## navi-lending session, <timestamp>
  - markets: <list of asset symbols>
  - operations: deposit | borrow | repay | withdraw | flash-loan
  - sample tx digest: <digest>
  - health factor: <value>
  - oracle: Pyth + Supra (15s validity)
  - open issues: <list>

The skill never deletes files outside the integration source path without explicit user confirmation.

Workflow

1. **Context gathering**

  • Read `.suiperpower/build-context.md` if it exists.
  • Confirm which assets the user needs and the flow shape (deposit only, deposit + borrow, flash loan).
  • Verify the target assets are in NAVI's 35 supported assets. Check via `getPools()`.

2. **SDK setup**

  • Install: `npm install @naviprotocol/lending` (peer dep: `@mysten/sui >=1.25.0`).
  • The old `navi-sdk` package is deprecated. Do NOT use it.
  • There is no standalone client class. All operations are PTB functions: `depositCoinPTB(tx, identifier, coinObj, opts)`.
  • AssetIdentifier: a coin type string (e.g., `'0x2::sui::SUI'`), a Pool object, or a numeric asset ID.
  • Options pattern: `{ env: 'prod', accountCap, market: 'main' }`.
  • Two markets: Main (id: 0, key: `'main'`) and Ember (id: 1, key: `'ember'`). Default is Main.

3. **Pool queries**

  • `getPools()` returns all pool data (rates, capacity, LTV, oracle prices, APY, liquidation params).
  • `getPool(identifier)` returns a single pool by coin type, asset ID, or Pool object.
  • `getStats()` returns aggregate protocol stats.
  • Document pool parameters (LTV, liquidation threshold, borrow cap) in `build-context.md`.

4. **Core operations**

  • Deposit: `depositCoinPTB(tx, identifier, coinObject, { amount })`. Merge coins first with `mergeCoinsPTB()`.
  • Borrow: `borrowCoinPTB(tx, identifier, amount, { accountCap })`. A 0.3% borrow fee is applied at borrow time.
  • Withdraw: `withdrawCoinPTB(tx, identifier, amount, { accountCap })`.
  • Repay: `repayCoinPTB(tx, identifier, coinObject, { amount, accountCap })`.
  • All return or modify a `Transaction` that must be signed and executed.

5. **Health monitoring**

  • `getHealthFactor(address)` returns current health factor. Below 1.0 triggers liquidation.
  • `getSimulatedHealthFactor(address, identifier, operations)` predicts the impact of a new borrow.
  • Always check health factor before submitting a borrow. Refuse to submit if simulated HF would drop below a safe threshold (recommend >= 1.5).
  • Liquidation: 35% close factor, 5-15% bonus depending on asset.

6. **Flash loans (optional)**

  • `flashloanPTB(tx, identifier, amount)` returns `[balance, receipt]`.
  • `repayFlashLoanPTB(tx, identifier, receipt, coinObject)` repays the flash loan.
  • Both MUST be in the same PTB transaction. If the transaction fails, the flash loan reverts.
  • Fee is asset-dependent. Query available assets via `getAllFlashLoanAssets()`.
  • Not all pools support flash loans. Verify first.

7. **Writeba

Read more
@pivyme
Ships withsuiperpower

Build something meaningful, on Sui. A superpower for AI coding agents to ship real products on Sui. Your AI coding agent has never written Move before. Suiperpower fixes that.

1360 skills1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
13
Star history of pivyme/suiperpower on GitHub, a chart by star-history.com

Other skills on suiperpower.

brand-design

brand-design

Pick a brand name, color palette, or typography for a Sui product. Use when the user wants to name or brand a Sui project.

@pivyme@pivymeInstall Skill
build-ai-agent

build-ai-agent

Build an AI agent that signs Sui transactions or runs onchain actions. Use when the user wants an AI agent on Sui.

@pivyme@pivymeInstall Skill
build-data-pipeline

build-data-pipeline

Build a Sui data indexer or analytics pipeline. Use when the user wants to index Sui events, build a pipeline, or query Sui RPC…

@pivyme@pivymeInstall Skill
build-mobile-sui

build-mobile-sui

Build a mobile Sui app with React Native or the Sui Mobile SDK. Use when the user wants iOS, Android, or mobile Sui flows.

@pivyme@pivymeInstall Skill
build-with-claude

build-with-claude

Pair with a coding agent to build a Sui MVP step by step. Use when the user wants to build the MVP iteratively with an agent.

@pivyme@pivymeInstall Skill
build-with-move

build-with-move

Author Sui Move modules and packages with a senior Move dev as your pair. Use when the user wants to write, build, author, add,…

@pivyme@pivymeInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills12d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc13d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2d252k
@facebook@facebookInstall Skill

Questions about navi-lending.

Which coding agents can use navi-lending?
navi-lending installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.