Marginfi
Apps & AutomationmarginfiMarginfi is an Agent Skill for apps & automation published in the alsk1992/CloddsBot repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
MarginFi — Solana lending and borrowing
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/alsk1992/CloddsBot/blob/HEAD/src/skills/bundled/marginfi/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/marginfi, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
MarginFi
MarginFi is a lending and borrowing protocol on Solana. Deposit collateral, borrow assets, and monitor your health factor to avoid liquidation.
Commands
Lending
/marginfi deposit <amount> <token> Deposit collateral
/marginfi withdraw <amount|all> <token> Withdraw collateral
/marginfi borrow <amount> <token> Borrow assets
/marginfi repay <amount|all> <token> Repay borrowed assets
Account
/marginfi account View positions (deposits & borrows)
/marginfi health Check health factor & liquidation risk
Markets
/marginfi banks List all lending pools with APY
/marginfi rates View supply/borrow interest rates table
Examples
/marginfi deposit 100 USDC
/marginfi borrow 1 SOL
/marginfi health
/marginfi repay all SOL
/marginfi withdraw all USDC
/marginfi banks
/marginfi rates
Configuration
export SOLANA_PRIVATE_KEY="your-base58-private-key"
export SOLANA_RPC_URL="https://api.mainnet-beta.solana.com" # Optional
See Also
/kamino— Kamino Finance lending + liquidity vaults/solend— Solend lending protocol/jup— Jupiter DEX aggregator/bags— Portfolio overview