@laitszkin/apollo-toolkit 2.5.0 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +4 -0
- package/CHANGELOG.md +23 -0
- package/README.md +4 -0
- package/codex-memory-manager/SKILL.md +2 -0
- package/fix-github-issues/SKILL.md +5 -3
- package/jupiter-development/SKILL.md +89 -0
- package/jupiter-development/agents/openai.yaml +4 -0
- package/jupiter-development/references/official-docs.md +157 -0
- package/learn-skill-from-conversations/SKILL.md +13 -2
- package/marginfi-development/LICENSE +21 -0
- package/marginfi-development/README.md +31 -0
- package/marginfi-development/SKILL.md +125 -0
- package/marginfi-development/agents/openai.yaml +4 -0
- package/marginfi-development/references/official-development-notes.md +191 -0
- package/marginfi-development/references/source-index.md +31 -0
- package/openclaw-configuration/SKILL.md +98 -0
- package/openclaw-configuration/agents/openai.yaml +4 -0
- package/openclaw-configuration/references/best-practices.md +55 -0
- package/openclaw-configuration/references/config-reference-map.md +189 -0
- package/openclaw-configuration/references/official-docs.md +40 -0
- package/package.json +1 -1
- package/solana-development/SKILL.md +89 -0
- package/solana-development/agents/openai.yaml +4 -0
- package/solana-development/references/official-solana-rust.md +199 -0
package/AGENTS.md
CHANGED
|
@@ -32,17 +32,21 @@ This repository enables users to install and run a curated set of reusable agent
|
|
|
32
32
|
- Users can learn new or improved skills from recent Codex conversation history.
|
|
33
33
|
- Users can audit and maintain the skill catalog itself, including dependency classification and shared-skill extraction decisions.
|
|
34
34
|
- Users can summarize mistakes into a learning error book and render it to PDF.
|
|
35
|
+
- Users can build or review marginfi protocol integrations using official SDK, CLI, protocol, and The Arena documentation.
|
|
35
36
|
- Users can create or maintain `AGENTS.md` so project constraints stay aligned with the repository.
|
|
36
37
|
- Users can turn novel content into a loopable short-form video with generated assets.
|
|
37
38
|
- Users can publish structured GitHub issues or feature proposals with auth fallbacks.
|
|
38
39
|
- Users can prepare and open open-source pull requests from existing changes.
|
|
39
40
|
- Users can generate storyboard image sets from chapters, novels, articles, or scripts.
|
|
41
|
+
- Users can configure OpenClaw from official documentation, including `~/.openclaw/openclaw.json`, skills loading, SecretRefs, CLI edits, and validation or repair workflows.
|
|
40
42
|
- Users can record multi-account spending and balance changes in monthly Excel ledgers with summary analytics and charts.
|
|
41
43
|
- Users can review the current git change set from an unbiased reviewer perspective to find abstraction opportunities and simplification candidates.
|
|
42
44
|
- Users can process GitHub pull request review comments and resolve addressed threads.
|
|
43
45
|
- Users can perform repository-wide code reviews and publish confirmed findings as GitHub issues.
|
|
44
46
|
- Users can schedule a bounded project runtime window, stop it automatically, and analyze module health from captured logs.
|
|
47
|
+
- Users can build and maintain Solana programs and Rust clients using official Solana development workflows.
|
|
45
48
|
- Users can add focused observability to opaque workflows through targeted logs, metrics, traces, and tests.
|
|
49
|
+
- Users can build against Jupiter's official Solana swap, token, price, lending, trigger, recurring, and portfolio APIs with an evidence-based development guide.
|
|
46
50
|
- Users can debug software systematically by reproducing causes, validating fixes, and testing outcomes.
|
|
47
51
|
- Users can generate 30-60 second short videos directly from text prompts.
|
|
48
52
|
- Users can prepare and publish versioned releases with changelog and tag workflows.
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,29 @@ All notable changes to this repository are documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [v2.7.0] - 2026-03-20
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- Add `openclaw-configuration` for explaining, editing, validating, and troubleshooting OpenClaw configuration from the current official docs, including `~/.openclaw/openclaw.json`, skills config, secrets, and CLI workflows.
|
|
11
|
+
- Add bundled OpenClaw configuration references covering the official doc map, config option guide, and operational best practices.
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
- Update `fix-github-issues` to require temporary worktree and local branch cleanup as part of direct-push or PR completion, with explicit cleanup verification before finishing.
|
|
15
|
+
- Update `learn-skill-from-conversations` to treat post-completion cleanup or finalization follow-ups as evidence that the owning workflow's done criteria need tightening.
|
|
16
|
+
- Update the repository skill inventory and project capability docs to include OpenClaw configuration support.
|
|
17
|
+
|
|
18
|
+
## [v2.6.0] - 2026-03-20
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
- Add `jupiter-development` for building Jupiter-based Solana integrations from current official docs, including swap, token, price, lend, trigger, recurring, and portfolio surfaces.
|
|
22
|
+
- Add `marginfi-development` for building or reviewing marginfi integrations with official SDK, CLI, protocol, and The Arena references.
|
|
23
|
+
- Add `solana-development` for native Solana Rust programs and Rust client workflows grounded in official Solana documentation.
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
- Update `learn-skill-from-conversations` to prefer inventorying the current skill catalog, weighting user corrections and error-driven lessons more heavily, and tightening when to update an existing skill versus creating a new one.
|
|
27
|
+
- Update `codex-memory-manager` so memory reports include already-stored relevant preferences when users ask what memory exists or why a known preference was omitted.
|
|
28
|
+
- Refresh new protocol reference snapshots against current official Jupiter, marginfi, and Solana docs before release.
|
|
29
|
+
|
|
7
30
|
## [v2.5.0] - 2026-03-19
|
|
8
31
|
|
|
9
32
|
### Changed
|
package/README.md
CHANGED
|
@@ -21,19 +21,23 @@ A curated skill catalog for Codex, OpenClaw, and Trae with a managed installer t
|
|
|
21
21
|
- generate-spec
|
|
22
22
|
- harden-app-security
|
|
23
23
|
- improve-observability
|
|
24
|
+
- jupiter-development
|
|
24
25
|
- learn-skill-from-conversations
|
|
25
26
|
- learning-error-book
|
|
27
|
+
- marginfi-development
|
|
26
28
|
- maintain-project-constraints
|
|
27
29
|
- maintain-skill-catalog
|
|
28
30
|
- novel-to-short-video
|
|
29
31
|
- open-github-issue
|
|
30
32
|
- open-source-pr-workflow
|
|
31
33
|
- openai-text-to-image-storyboard
|
|
34
|
+
- openclaw-configuration
|
|
32
35
|
- record-spending
|
|
33
36
|
- resolve-review-comments
|
|
34
37
|
- review-change-set
|
|
35
38
|
- review-codebases
|
|
36
39
|
- scheduled-runtime-health-check
|
|
40
|
+
- solana-development
|
|
37
41
|
- systematic-debug
|
|
38
42
|
- text-to-short-video
|
|
39
43
|
- version-release
|
|
@@ -114,6 +114,8 @@ python3 ~/.codex/skills/codex-memory-manager/scripts/sync_memory_index.py \
|
|
|
114
114
|
- which categories were created or updated
|
|
115
115
|
- whether a new category was introduced
|
|
116
116
|
- whether the AGENTS memory index changed
|
|
117
|
+
- When the user asks what memory exists or asks why a known preference was not mentioned, include the already-stored preferences that are directly relevant to the question instead of summarizing only newly added entries.
|
|
118
|
+
- When a stable preference already existed and was still reinforced by recent chats, say that it remains stored and point to the category where it lives.
|
|
117
119
|
- If no durable preferences were found, say so explicitly and avoid creating placeholder memory files.
|
|
118
120
|
|
|
119
121
|
## Guardrails
|
|
@@ -16,8 +16,8 @@ description: Resolve issues from remote GitHub repositories via GitHub CLI (`gh`
|
|
|
16
16
|
|
|
17
17
|
- Evidence: Verify repository context, fetch remote issue details, and derive expected behavior from issue text before coding.
|
|
18
18
|
- Execution: Select the issue, open an isolated worktree by default, fix it through `systematic-debug`, validate locally, then hand off to the delivery workflow that matches the user's request.
|
|
19
|
-
- Quality: Keep scope limited to the selected issue, capture exact validation commands,
|
|
20
|
-
- Output: Finish with either a linked PR or a direct pushed commit, then clean up the temporary worktree
|
|
19
|
+
- Quality: Keep scope limited to the selected issue, capture exact validation commands, preserve issue linkage in the final PR or commit message, and treat temporary worktree cleanup as part of completion rather than an optional follow-up.
|
|
20
|
+
- Output: Finish with either a linked PR or a direct pushed commit, then clean up the temporary worktree plus any matching local branch before reporting completion.
|
|
21
21
|
|
|
22
22
|
## Overview
|
|
23
23
|
|
|
@@ -89,10 +89,12 @@ python3 scripts/list_issues.py --limit 50 --state open
|
|
|
89
89
|
- executed test commands and results
|
|
90
90
|
- Include issue-closing reference (for example, `Closes #<issue-number>`) whenever a PR is opened.
|
|
91
91
|
|
|
92
|
-
### 8) Clean up the temporary worktree after PR creation
|
|
92
|
+
### 8) Clean up the temporary worktree after PR creation or direct push
|
|
93
93
|
|
|
94
94
|
- Once the PR is opened or the direct push is complete and no more work is needed in that isolated tree, remove the worktree you created for the fix.
|
|
95
95
|
- Also clean up the matching local branch reference if it is no longer needed locally.
|
|
96
|
+
- Verify the cleanup with `git worktree list` and confirm the temporary path no longer appears before finishing.
|
|
97
|
+
- If the worktree cannot be removed because of uncommitted changes or a still-checked-out branch, resolve that state immediately instead of leaving cleanup for a later user request.
|
|
96
98
|
|
|
97
99
|
## Included Script
|
|
98
100
|
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: jupiter-development
|
|
3
|
+
description: Build integrations against Jupiter's official Solana APIs and SDKs, including Ultra Swap, Metis Swap, Tokens API V2, Price API V3, Lend, Trigger, Recurring, and Portfolio. Use when implementing Jupiter-based swaps, token search, pricing, lending, DCA, limit-order, or portfolio features, or when updating code that depends on Jupiter official developer docs.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Jupiter Development
|
|
7
|
+
|
|
8
|
+
## Dependencies
|
|
9
|
+
|
|
10
|
+
- Required: none.
|
|
11
|
+
- Conditional: none.
|
|
12
|
+
- Optional: none.
|
|
13
|
+
- Fallback: If official Jupiter docs are unavailable, stop and report the missing source instead of guessing endpoint behavior.
|
|
14
|
+
|
|
15
|
+
## Standards
|
|
16
|
+
|
|
17
|
+
- Evidence: Treat `https://dev.jup.ag/llms.txt` and linked official pages as the source of truth; re-check them when the task depends on current API behavior.
|
|
18
|
+
- Execution: Identify the exact Jupiter product first, then implement against the narrowest official API or SDK that fits the job.
|
|
19
|
+
- Quality: Prefer the default happy-path integrations before custom transaction assembly, and call out routing, auth, fee, and rate-limit tradeoffs explicitly.
|
|
20
|
+
- Output: Leave the user with working integration changes plus a short note covering which Jupiter surface was used and which official docs were followed.
|
|
21
|
+
|
|
22
|
+
## Goal
|
|
23
|
+
|
|
24
|
+
Implement Jupiter-backed Solana features safely by following the current official developer documentation instead of relying on stale examples or assumptions.
|
|
25
|
+
|
|
26
|
+
## Required Workflow
|
|
27
|
+
|
|
28
|
+
### 1) Reconfirm the official surface before coding
|
|
29
|
+
|
|
30
|
+
- Start from `https://dev.jup.ag/llms.txt` to discover the current product map and page URLs.
|
|
31
|
+
- Read only the product pages needed for the task.
|
|
32
|
+
- If the task depends on exact request or response fields, follow through to the linked API reference or OpenAPI page before editing code.
|
|
33
|
+
|
|
34
|
+
### 2) Choose the right Jupiter integration path
|
|
35
|
+
|
|
36
|
+
- For token swaps, default to Ultra Swap.
|
|
37
|
+
- Use `GET /ultra/v1/order` plus `POST /ultra/v1/execute` for the standard path with the least integration work.
|
|
38
|
+
- Use Metis Swap only when the app must own quote-to-transaction construction, compose instructions, or integrate through CPI/Flash Fill style flows.
|
|
39
|
+
- For token discovery and token metadata, use Tokens API V2.
|
|
40
|
+
- Use search for symbol, name, or mint lookup.
|
|
41
|
+
- Use tag/category/recent endpoints for discovery experiences such as verified lists, trending tokens, or newly tradable assets.
|
|
42
|
+
- For USD token pricing, use Price API V3.
|
|
43
|
+
- Expect `null` or missing prices for assets that Jupiter considers unreliable.
|
|
44
|
+
- Do not invent fallback prices without telling the user.
|
|
45
|
+
- For lending, use Jupiter Lend.
|
|
46
|
+
- Use the REST API for Earn when HTTP access is enough.
|
|
47
|
+
- Use `@jup-ag/lend` and `@jup-ag/lend-read` when the task needs instruction building, on-chain composition, flashloans, Borrow flows, or read-side analytics.
|
|
48
|
+
- For advanced trading automations, use the product-specific APIs instead of overloading Swap.
|
|
49
|
+
- Trigger for limit-order and stop-style flows.
|
|
50
|
+
- Recurring for DCA.
|
|
51
|
+
- Portfolio for wallet position aggregation.
|
|
52
|
+
|
|
53
|
+
### 3) Apply Jupiter-specific guardrails while implementing
|
|
54
|
+
|
|
55
|
+
- Treat Jupiter hostnames and auth rules as time-sensitive.
|
|
56
|
+
- Current official docs still show some `lite-api.jup.ag` quick-start examples.
|
|
57
|
+
- Current migration and Portal docs recommend `api.jup.ag` with `x-api-key`.
|
|
58
|
+
- Reconfirm the exact hostname and auth rule for the chosen product before coding.
|
|
59
|
+
- Respect Jupiter Portal rate limits and keep API keys in configuration rather than source control.
|
|
60
|
+
- Do not add optional swap parameters blindly.
|
|
61
|
+
- Payer, referral, fee, and router-selection fields can change routing, fee behavior, or gasless support.
|
|
62
|
+
- Re-read the exact product page before shipping these options.
|
|
63
|
+
- Match the fee model to the integration path.
|
|
64
|
+
- Ultra handles the quote and execution flow end to end.
|
|
65
|
+
- Metis gives more transaction control but also pushes more assembly responsibility onto the integrator.
|
|
66
|
+
- Treat Jupiter token and price data as curated but evolving.
|
|
67
|
+
- Tokens V2 responses can change as Jupiter improves the schema.
|
|
68
|
+
- Price V3 intentionally withholds unreliable prices.
|
|
69
|
+
- For Jupiter Lend advanced recipes, expect versioned transactions, address lookup tables, and sometimes extra compute budget.
|
|
70
|
+
- Never commit private keys. Use environment variables, wallet adapters, secure signers, or managed key systems.
|
|
71
|
+
|
|
72
|
+
### 4) Verify the integration path end to end
|
|
73
|
+
|
|
74
|
+
- Confirm the base URL, auth header, and required parameters match the official docs you used.
|
|
75
|
+
- Verify that any routing, payer, referral, or fee assumptions still hold after optional parameters are added.
|
|
76
|
+
- When building transactions manually, verify quote endpoint compatibility, instruction order, compute budget, address lookup tables, and signing flow.
|
|
77
|
+
- When the task involves on-chain actions, report any remaining environment needs clearly, such as API keys, RPC endpoints, or wallet secrets that were intentionally not embedded.
|
|
78
|
+
|
|
79
|
+
## Reference Files
|
|
80
|
+
|
|
81
|
+
- Read `references/official-docs.md` for the condensed official guidance and page map before diving into deeper Jupiter pages.
|
|
82
|
+
|
|
83
|
+
## Output Expectations
|
|
84
|
+
|
|
85
|
+
When finishing a Jupiter task:
|
|
86
|
+
|
|
87
|
+
- state which Jupiter product surface was used
|
|
88
|
+
- mention the main official pages consulted
|
|
89
|
+
- call out any known tradeoffs such as rate limits, routing restrictions, null prices, or SDK versus REST constraints
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "Jupiter Development"
|
|
3
|
+
short_description: "Build against Jupiter's official Solana APIs and SDKs."
|
|
4
|
+
default_prompt: "Use $jupiter-development to build or update this Jupiter integration by confirming the current official docs first, choosing the correct Jupiter API or SDK surface, and implementing with the right routing, auth, rate-limit, and transaction-construction guardrails."
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# Jupiter Official Docs Reference
|
|
2
|
+
|
|
3
|
+
Snapshot source: official Jupiter developer docs reviewed on 2026-03-20 from `https://dev.jup.ag/llms.txt` and linked first-party pages.
|
|
4
|
+
|
|
5
|
+
## 1. Always refresh from these official entry points
|
|
6
|
+
|
|
7
|
+
- Docs index: `https://dev.jup.ag/llms.txt`
|
|
8
|
+
- Get started: `https://dev.jup.ag/get-started`
|
|
9
|
+
- Developer portal and API keys: `https://dev.jup.ag/portal/setup.md`
|
|
10
|
+
- Rate limits: `https://dev.jup.ag/portal/rate-limit.md`
|
|
11
|
+
- Ultra docs root: `https://dev.jup.ag/docs/ultra-api`
|
|
12
|
+
- Swap docs root: `https://dev.jup.ag/docs/swap/index.md`
|
|
13
|
+
- Tokens docs root: `https://dev.jup.ag/docs/tokens/v2/token-information.md`
|
|
14
|
+
- Price docs root: `https://dev.jup.ag/docs/price/index.md`
|
|
15
|
+
- Lend docs root: `https://dev.jup.ag/docs/lend/index.md`
|
|
16
|
+
|
|
17
|
+
If a task depends on exact schemas, jump from those pages into the matching OpenAPI reference before coding.
|
|
18
|
+
|
|
19
|
+
## 2. Product selection cheatsheet
|
|
20
|
+
|
|
21
|
+
| Need | Official Jupiter surface | Notes |
|
|
22
|
+
| --- | --- | --- |
|
|
23
|
+
| Best default swap flow | Ultra API `/ultra/v1/order` + `/ultra/v1/execute` | Current get-started docs point new integrators here first. |
|
|
24
|
+
| Custom swap transaction or CPI composition | Metis Swap API | Use the lower-level swap docs only when the app must own quote/build behavior or compose instructions manually. |
|
|
25
|
+
| Token search, metadata, verification, discovery | Tokens API V2 | Search by symbol, name, mint, tag, category, or recency. |
|
|
26
|
+
| USD token prices | Price API V3 | Heuristic price engine; unreliable tokens may return `null`. |
|
|
27
|
+
| Deposit-and-earn yield | Jupiter Lend Earn API or SDK | REST is enough for simple Earn flows; SDK gives instruction-level control. |
|
|
28
|
+
| Borrow, repay, flashloan, or CPI lending | `@jup-ag/lend` plus `@jup-ag/lend-read` | Use SDK and product docs for instruction building and analytics. |
|
|
29
|
+
| Limit orders / TP-SL style automation | Trigger API | Trigger V2 uses JWT auth; Trigger V1 remains documented for legacy flows. |
|
|
30
|
+
| DCA | Recurring API | Time-based recurring orders. |
|
|
31
|
+
| Wallet position aggregation | Portfolio API | Beta status. |
|
|
32
|
+
|
|
33
|
+
## 3. Auth and operational rules
|
|
34
|
+
|
|
35
|
+
- Current official docs say `api.jup.ag` requires `x-api-key`.
|
|
36
|
+
- Current get-started examples still show public `lite-api.jup.ag` usage for some flows, while Jupiter's update/migration docs say deprecation was postponed and migration toward `api.jup.ag` is in progress.
|
|
37
|
+
- Treat hostname choice as a time-sensitive implementation detail and refresh the exact product page before coding.
|
|
38
|
+
- Generate keys at `https://portal.jup.ag`.
|
|
39
|
+
- Rate limits are per account, not per key.
|
|
40
|
+
- Free tier: 60 requests per 60 seconds.
|
|
41
|
+
- Pro tiers: 10-second sliding windows; the Price API gets its own bucket on Pro.
|
|
42
|
+
- Do not assume that creating more API keys increases throughput.
|
|
43
|
+
|
|
44
|
+
## 4. Ultra and Metis swap essentials
|
|
45
|
+
|
|
46
|
+
Primary docs:
|
|
47
|
+
|
|
48
|
+
- `https://dev.jup.ag/get-started`
|
|
49
|
+
- `https://dev.jup.ag/docs/ultra-api`
|
|
50
|
+
- `https://dev.jup.ag/docs/swap/index.md`
|
|
51
|
+
- `https://dev.jup.ag/docs/swap/get-quote`
|
|
52
|
+
- `https://dev.jup.ag/docs/swap/build-swap-transaction`
|
|
53
|
+
- `https://dev.jup.ag/docs/swap/build-swap-transaction#build-your-own-transaction-with-flash-fill-or-cpi`
|
|
54
|
+
|
|
55
|
+
### Default path: Ultra API
|
|
56
|
+
|
|
57
|
+
- Current get-started guidance points integrators to `GET /ultra/v1/order` and `POST /ultra/v1/execute`.
|
|
58
|
+
- Use this path for the least integration work and the official default trade flow.
|
|
59
|
+
|
|
60
|
+
### Advanced path: Metis Swap API
|
|
61
|
+
|
|
62
|
+
- Use the lower-level swap docs when the integrator must own quote handling, transaction assembly, CPI composition, or Flash Fill style flows.
|
|
63
|
+
- Reconfirm the current endpoint family on the exact swap page you use because Jupiter has been migrating between public and Portal-backed hosts.
|
|
64
|
+
|
|
65
|
+
### Routing and option guardrails
|
|
66
|
+
|
|
67
|
+
- Optional payer, referral, fee, or router-selection parameters are not neutral.
|
|
68
|
+
- Re-read the exact product page before enabling them because they can affect routing, fees, or gasless support.
|
|
69
|
+
- Do not assume all examples on older swap pages still describe the default production path.
|
|
70
|
+
|
|
71
|
+
## 5. Tokens API V2 essentials
|
|
72
|
+
|
|
73
|
+
Base URL: `https://api.jup.ag/tokens/v2`
|
|
74
|
+
|
|
75
|
+
Primary docs:
|
|
76
|
+
|
|
77
|
+
- `https://dev.jup.ag/docs/tokens/v2/token-information.md`
|
|
78
|
+
- `https://dev.jup.ag/docs/tokens/organic-score.md`
|
|
79
|
+
|
|
80
|
+
Important behaviors:
|
|
81
|
+
|
|
82
|
+
- Search supports symbol, name, and mint-address lookup.
|
|
83
|
+
- Tag queries support curated groups such as `verified` and `lst`.
|
|
84
|
+
- Category queries support discovery sets such as `toporganicscore`, `toptraded`, and `toptrending`.
|
|
85
|
+
- Recent tokens are keyed off first pool creation time, not token mint time.
|
|
86
|
+
- Responses include metadata and market-quality signals such as organic score, holder count, market cap, liquidity, and trading stats.
|
|
87
|
+
- The docs explicitly warn that the response schema may change as the API evolves.
|
|
88
|
+
|
|
89
|
+
Organic score is meant to represent genuine token activity and health using wallet, liquidity, and trading signals while filtering out bot-like or wash-trade patterns.
|
|
90
|
+
|
|
91
|
+
## 6. Price API V3 essentials
|
|
92
|
+
|
|
93
|
+
Base URL: `https://api.jup.ag/price/v3`
|
|
94
|
+
|
|
95
|
+
Primary docs:
|
|
96
|
+
|
|
97
|
+
- `https://dev.jup.ag/docs/price/index.md`
|
|
98
|
+
- `https://dev.jup.ag/docs/price/v3.md`
|
|
99
|
+
- `https://dev.jup.ag/guides/how-to-get-token-price.md`
|
|
100
|
+
|
|
101
|
+
Important behaviors:
|
|
102
|
+
|
|
103
|
+
- Price V3 derives prices from the last swapped price and validates them with liquidity and market-health heuristics.
|
|
104
|
+
- Up to 50 mint addresses can be queried per request according to the official guide.
|
|
105
|
+
- Missing or `null` prices are expected for tokens that fail Jupiter's reliability checks.
|
|
106
|
+
- Do not treat missing prices as transient transport errors by default.
|
|
107
|
+
|
|
108
|
+
## 7. Jupiter Lend essentials
|
|
109
|
+
|
|
110
|
+
Primary docs:
|
|
111
|
+
|
|
112
|
+
- `https://dev.jup.ag/docs/lend/index.md`
|
|
113
|
+
- `https://dev.jup.ag/docs/lend/api-vs-sdk.md`
|
|
114
|
+
- `https://dev.jup.ag/docs/lend/program-addresses.md`
|
|
115
|
+
- `https://dev.jup.ag/docs/lend/advanced/index.md`
|
|
116
|
+
|
|
117
|
+
Packages mentioned by the official docs:
|
|
118
|
+
|
|
119
|
+
- `@jup-ag/lend`
|
|
120
|
+
- `@jup-ag/lend-read`
|
|
121
|
+
- `@solana/web3.js`
|
|
122
|
+
|
|
123
|
+
Practical split:
|
|
124
|
+
|
|
125
|
+
- Use the REST API for straightforward Earn deposit and withdrawal flows.
|
|
126
|
+
- Use the SDK when you need Borrow flows, CPI, flashloans, batched operations, address lookup tables, or read-side analytics.
|
|
127
|
+
- For advanced recipes such as multiply, unwind, vault swap, and flashloans, expect large multi-instruction transactions and add compute budget when needed.
|
|
128
|
+
- Public RPC endpoints are not recommended for production; the docs suggest dedicated providers.
|
|
129
|
+
|
|
130
|
+
## 8. Other important Jupiter APIs
|
|
131
|
+
|
|
132
|
+
### Trigger
|
|
133
|
+
|
|
134
|
+
- Docs root: `https://dev.jup.ag/docs/trigger/index.md`
|
|
135
|
+
- Trigger V2 uses a challenge-response auth flow and returns a JWT for subsequent requests.
|
|
136
|
+
- Use it for single price orders, OCO, and OTOCO flows.
|
|
137
|
+
|
|
138
|
+
### Recurring
|
|
139
|
+
|
|
140
|
+
- Docs root: `https://dev.jup.ag/docs/recurring/index.md`
|
|
141
|
+
- Use it for time-based DCA orders.
|
|
142
|
+
- Jupiter keeper bots handle recurring execution after setup.
|
|
143
|
+
|
|
144
|
+
### Portfolio
|
|
145
|
+
|
|
146
|
+
- Docs root: `https://dev.jup.ag/docs/portfolio/index.md`
|
|
147
|
+
- Beta API for wallet positions across Solana protocols, including Jupiter-specific positions.
|
|
148
|
+
|
|
149
|
+
## 9. Implementation checklist
|
|
150
|
+
|
|
151
|
+
- Confirm the exact Jupiter product surface first.
|
|
152
|
+
- Confirm the latest official page and API version before editing code.
|
|
153
|
+
- Confirm whether the chosen host requires `x-api-key`, and keep any key out of source control.
|
|
154
|
+
- Preserve the default routing path unless the product requirement truly needs advanced payer, fee, or router controls.
|
|
155
|
+
- Treat `null` token prices as a valid product outcome.
|
|
156
|
+
- Use SDK flows for Jupiter Lend borrow, CPI, flashloan, and analytics work.
|
|
157
|
+
- Report any remaining API-key, RPC, or wallet requirements explicitly.
|
|
@@ -15,7 +15,7 @@ description: Learn and evolve the local skill library from recent Codex conversa
|
|
|
15
15
|
## Standards
|
|
16
16
|
|
|
17
17
|
- Evidence: Extract recent Codex session history first and derive reusable lessons only from actual conversation patterns.
|
|
18
|
-
- Execution:
|
|
18
|
+
- Execution: Inventory the current skill catalog before editing, prioritize repeated requests, user corrections, reported errors, and post-completion follow-up asks that reveal missing closure, then prefer a focused update to the strongest related skill or create a new skill only when the overlap is weak.
|
|
19
19
|
- Quality: Take no action when there are no recent sessions, avoid unrelated broad refactors, and validate every changed skill.
|
|
20
20
|
- Output: Report the analyzed sessions, extracted lessons, created or updated skills, and the reasoning behind each decision.
|
|
21
21
|
|
|
@@ -46,16 +46,27 @@ python3 ~/.codex/skills/learn-skill-from-conversations/scripts/extract_recent_co
|
|
|
46
46
|
### 2) Derive reusable lessons
|
|
47
47
|
|
|
48
48
|
- Identify repeated user needs, recurring friction, and repeated manual workflows.
|
|
49
|
+
- Give extra weight to moments where the user corrected the agent, rejected an earlier interpretation, or pointed out a missing preference or requirement.
|
|
50
|
+
- Give extra weight to user-reported errors, regressions, or avoidable mistakes, then ask how a skill can prevent repeating that failure mode.
|
|
51
|
+
- Treat a user follow-up that asks for cleanup or an omitted finalization step immediately after the assistant reported completion as evidence that the workflow's done criteria were incomplete.
|
|
52
|
+
- When that kind of follow-up recurs, tighten the owning skill's completion checklist before considering any new-skill extraction.
|
|
49
53
|
- Ignore one-off issues that do not provide reusable value.
|
|
54
|
+
- Distinguish between:
|
|
55
|
+
- repeated trigger intent that deserves a new skill
|
|
56
|
+
- repeated workflow fragments across multiple skills that should be extracted into a shared skill
|
|
57
|
+
- skill gaps that are better handled by tightening an existing skill's guardrails
|
|
50
58
|
|
|
51
59
|
### 3) Decide new skill vs existing skill (default: new skill)
|
|
52
60
|
|
|
61
|
+
- First read the relevant skills already present in the working repository so you do not create a duplicate under a different name.
|
|
53
62
|
- Prefer creating a new skill.
|
|
54
63
|
- Edit an existing skill only when the lesson is strongly related.
|
|
55
64
|
- Treat relation as strong only when all three conditions hold:
|
|
56
65
|
- Same primary trigger intent.
|
|
57
66
|
- At least 70% workflow overlap.
|
|
58
67
|
- The update does not dilute the existing skill's scope.
|
|
68
|
+
- When the recurring lesson is mainly about preventing a known mistake, prefer updating the existing skill that should have prevented it instead of creating a parallel skill.
|
|
69
|
+
- When several skills repeat the same narrow workflow fragment, prefer extracting that fragment into a dedicated shared skill instead of copying the same guidance again.
|
|
59
70
|
- If uncertain, create a new skill instead of expanding an old one.
|
|
60
71
|
|
|
61
72
|
### 4) Apply changes through skill-creator
|
|
@@ -76,7 +87,7 @@ python3 ~/.codex/skills/.system/skill-creator/scripts/quick_validate.py <skill-p
|
|
|
76
87
|
|
|
77
88
|
### 6) Report result
|
|
78
89
|
|
|
79
|
-
- Summarize analyzed sessions,
|
|
90
|
+
- Summarize analyzed sessions, repeated needs, user corrections, error-driven lessons, created/updated skills, and why each decision was made.
|
|
80
91
|
|
|
81
92
|
## Guardrails
|
|
82
93
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 LaiTszKin
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Marginfi Development
|
|
2
|
+
|
|
3
|
+
`marginfi-development` is a reusable skill for building or reviewing integrations on the marginfi protocol with official documentation as the source of truth.
|
|
4
|
+
|
|
5
|
+
It helps an agent:
|
|
6
|
+
|
|
7
|
+
1. Choose the correct marginfi development surface.
|
|
8
|
+
2. Reconfirm official addresses, groups, and environment details.
|
|
9
|
+
3. Implement or explain deposits, borrows, repayments, withdrawals, flash loans, liquidations, or permissionless banks.
|
|
10
|
+
4. Map raw `mfi-v2` instructions and errors when SDK helpers are not enough.
|
|
11
|
+
|
|
12
|
+
## Repository layout
|
|
13
|
+
|
|
14
|
+
- `SKILL.md`: trigger rules, workflow, and guardrails
|
|
15
|
+
- `agents/openai.yaml`: agent-facing metadata
|
|
16
|
+
- `references/official-development-notes.md`: condensed official development guidance
|
|
17
|
+
- `references/source-index.md`: quick source routing for official docs
|
|
18
|
+
|
|
19
|
+
## Main use cases
|
|
20
|
+
|
|
21
|
+
Use this skill for:
|
|
22
|
+
|
|
23
|
+
- marginfi SDK integration work
|
|
24
|
+
- Solana bots or backends that interact with marginfi
|
|
25
|
+
- bank configuration and The Arena permissionless-bank flows
|
|
26
|
+
- flash-loan or liquidation implementation reviews
|
|
27
|
+
- raw instruction or error mapping against `mfi-v2`
|
|
28
|
+
|
|
29
|
+
## License
|
|
30
|
+
|
|
31
|
+
MIT. See `LICENSE`.
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: marginfi-development
|
|
3
|
+
description: Build or analyze integrations on the Solana-based marginfi protocol using the official TypeScript SDK, Rust CLI, and protocol docs. Use when implementing or reviewing marginfi deposits, withdrawals, borrows, repayments, flash loans, liquidations, permissionless banks, bank configuration, account-health logic, or raw instruction mapping, and ground the work in official marginfi documentation before coding.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Marginfi Development
|
|
7
|
+
|
|
8
|
+
## Dependencies
|
|
9
|
+
|
|
10
|
+
- Required: none.
|
|
11
|
+
- Conditional: `answering-questions-with-research` when the user needs marginfi guidance combined with fresh external verification or local repository discovery.
|
|
12
|
+
- Optional: none.
|
|
13
|
+
- Fallback: If official docs do not confirm a requested parameter, address, or workflow, say so explicitly instead of guessing.
|
|
14
|
+
|
|
15
|
+
## Standards
|
|
16
|
+
|
|
17
|
+
- Evidence: Start from official marginfi docs and official source links, and re-check time-sensitive values before hardcoding them.
|
|
18
|
+
- Execution: Pick the correct integration surface first (TypeScript SDK, Rust CLI, or raw program instructions), then scope the exact bank, group, account, and environment involved.
|
|
19
|
+
- Quality: Preserve Solana and Anchor conventions, validate margin account health assumptions, and never invent bank config or oracle defaults.
|
|
20
|
+
- Output: Provide copy-pastable implementation steps, the exact official source pages consulted, and concrete caveats for unresolved risks.
|
|
21
|
+
|
|
22
|
+
## Goal
|
|
23
|
+
|
|
24
|
+
Build or review marginfi integrations with the smallest correct implementation that still respects the protocol's account model, bank risk parameters, oracle rules, and operational constraints.
|
|
25
|
+
|
|
26
|
+
## Workflow
|
|
27
|
+
|
|
28
|
+
### 1) Classify the task before coding
|
|
29
|
+
|
|
30
|
+
Map the request to one of these paths:
|
|
31
|
+
|
|
32
|
+
- application integration with the TypeScript SDK
|
|
33
|
+
- operational/admin work with the Rust CLI
|
|
34
|
+
- raw on-chain instruction work against `mfi-v2`
|
|
35
|
+
- permissionless bank creation in The Arena
|
|
36
|
+
- liquidations, health, or risk-model analysis
|
|
37
|
+
- flash loan composition
|
|
38
|
+
|
|
39
|
+
Then load only the matching reference sections from `references/official-development-notes.md`.
|
|
40
|
+
|
|
41
|
+
### 2) Reconfirm official docs when values can drift
|
|
42
|
+
|
|
43
|
+
Re-check live official docs when the task depends on:
|
|
44
|
+
|
|
45
|
+
- current program or group addresses
|
|
46
|
+
- package names or environment configs
|
|
47
|
+
- current bank parameters or listing rules
|
|
48
|
+
- The Arena flows or permissionless-bank requirements
|
|
49
|
+
|
|
50
|
+
Use `references/source-index.md` to jump to the right official page quickly.
|
|
51
|
+
|
|
52
|
+
### 3) Choose the correct development surface
|
|
53
|
+
|
|
54
|
+
#### TypeScript SDK
|
|
55
|
+
|
|
56
|
+
Use for frontends, bots, services, scripts, or integration tests.
|
|
57
|
+
|
|
58
|
+
- Start with `MarginfiClient.fetch(getConfig(...), wallet, connection)`.
|
|
59
|
+
- Fetch or create the authority's marginfi account before user actions.
|
|
60
|
+
- Resolve banks by token symbol, mint, or public key before depositing, borrowing, repaying, or withdrawing.
|
|
61
|
+
- Prefer SDK helpers for instruction construction, transaction processing, flash loans, and account reloads.
|
|
62
|
+
|
|
63
|
+
#### Rust CLI
|
|
64
|
+
|
|
65
|
+
Use for operator workflows, group or bank administration, and quick protocol interaction from the terminal.
|
|
66
|
+
|
|
67
|
+
- Configure the correct profile and environment first.
|
|
68
|
+
- Use the CLI for account creation, deposits, borrows, repayments, withdrawals, transfers, emissions setup, and bank-management flows.
|
|
69
|
+
- When creating or updating banks, provide explicit config values; do not infer hidden defaults.
|
|
70
|
+
|
|
71
|
+
#### Raw program work
|
|
72
|
+
|
|
73
|
+
Use when you need exact instruction names, account constraints, or error mapping.
|
|
74
|
+
|
|
75
|
+
- Read the `mfi-v2` instruction and error sections first.
|
|
76
|
+
- Keep flash-loan state transitions and end-instruction indexing exact.
|
|
77
|
+
- Map protocol errors back to the user-visible cause instead of returning opaque Solana failures.
|
|
78
|
+
|
|
79
|
+
### 4) Apply the task-specific playbook
|
|
80
|
+
|
|
81
|
+
#### Deposits / borrows / withdrawals / repayments
|
|
82
|
+
|
|
83
|
+
- Confirm the target group and bank.
|
|
84
|
+
- Load or create the user's marginfi account.
|
|
85
|
+
- Fetch fresh bank data and oracle-backed pricing before reasoning about health.
|
|
86
|
+
- Use SDK or CLI helpers instead of hand-writing instructions unless the task explicitly needs raw instruction control.
|
|
87
|
+
|
|
88
|
+
#### Flash loans
|
|
89
|
+
|
|
90
|
+
- Treat flash loans as a begin/end instruction pair or use the SDK helper that builds the full transaction.
|
|
91
|
+
- Ensure the end instruction index is correct and that every temporary borrow is repaid within the same transaction.
|
|
92
|
+
- Watch for flash-loan-specific errors such as illegal nesting or missing end instructions.
|
|
93
|
+
|
|
94
|
+
#### Permissionless banks / The Arena
|
|
95
|
+
|
|
96
|
+
- Collect the mint, oracle setup, risk tier, asset/liability weights, deposit and borrow limits, operational state, and rate configuration before coding.
|
|
97
|
+
- Use the official The Arena guidance and listing criteria as the source of truth.
|
|
98
|
+
- Surface any missing config explicitly; never invent safe-looking defaults.
|
|
99
|
+
|
|
100
|
+
#### Liquidations and health analysis
|
|
101
|
+
|
|
102
|
+
- Distinguish collateral, borrow-only, and isolated assets.
|
|
103
|
+
- Explain how asset weights, liability weights, utilization-based rates, and oracle staleness checks affect account health.
|
|
104
|
+
- Use official terminology when describing liquidatable states and liquidation flows.
|
|
105
|
+
|
|
106
|
+
### 5) Respect protocol guardrails
|
|
107
|
+
|
|
108
|
+
- marginfi relies on Pyth and Switchboard oracle feeds with confidence and staleness checks; do not assume any quoted price is always usable.
|
|
109
|
+
- Interest rates are utilization-based and piecewise; account economics depend on bank config, not just spot balances.
|
|
110
|
+
- Current docs describe verified builds, audits, fuzz testing, and bug-bounty coverage; do not bypass those assumptions when proposing deployment or upgrade steps.
|
|
111
|
+
|
|
112
|
+
### 6) Output expectations
|
|
113
|
+
|
|
114
|
+
When finishing marginfi work:
|
|
115
|
+
|
|
116
|
+
- name the exact official pages consulted
|
|
117
|
+
- state the chosen integration surface
|
|
118
|
+
- list the concrete accounts, banks, and env values the implementation needs
|
|
119
|
+
- call out any unverified addresses, parameters, or bank settings
|
|
120
|
+
- keep examples minimal and directly runnable when possible
|
|
121
|
+
|
|
122
|
+
## References
|
|
123
|
+
|
|
124
|
+
- `references/official-development-notes.md`: condensed marginfi development guidance from official docs.
|
|
125
|
+
- `references/source-index.md`: official page index and when to consult each source.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "Marginfi Development"
|
|
3
|
+
short_description: "Build or review integrations on the marginfi protocol"
|
|
4
|
+
default_prompt: "Use $marginfi-development to ground the task in official marginfi docs, choose the correct development surface (TypeScript SDK, Rust CLI, or raw program instructions), load the relevant reference sections, and then implement or explain the smallest correct marginfi integration without guessing bank config, oracle setup, or protocol addresses."
|