Skip to content

Create skill.json#6

Open
Erdembeyx3 wants to merge 1 commit into
magicblock-labs:mainfrom
Erdembeyx3:patch-2
Open

Create skill.json#6
Erdembeyx3 wants to merge 1 commit into
magicblock-labs:mainfrom
Erdembeyx3:patch-2

Conversation

@Erdembeyx3

@Erdembeyx3 Erdembeyx3 commented Jun 29, 2026

Copy link
Copy Markdown

Summary by CodeRabbit

  • New Features
    • Added a new skill configuration for agentfx-magicblock-skill.
    • Introduced actions to fetch market data, create bot quotes, start and stop bot loops.
    • Added websocket support for streaming new token and trade events.
    • Included authentication and connection details needed to use the skill.

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

A new skill.json file is added under skills/agentfx/ defining the agentfx-magicblock-skill (v2.6.0) with x402 authentication, four HTTP actions (get_market_data, create_bot_quote, start_bot_loop, stop_bot_loop), and a websocket stream with new token and trade event subscriptions.

Changes

agentfx Skill Definition

Layer / File(s) Summary
Skill metadata, auth, actions, and websocket config
skills/agentfx/skill.json
Adds complete skill definition with identity fields, x402 auth (platform wallet, cost, duration), four HTTP action schemas, and websocket stream endpoint with two subscriptions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately matches the main change: adding a new skill.json file.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Warning

⚠️ This pull request has been flagged as potential spam (promotional) by CodeRabbit slop detection and should be reviewed carefully.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@skills/agentfx/skill.json`:
- Around line 45-56: Add an explicit market identifier to the start_bot_loop
request schema so the backend can trade a specific asset deterministically.
Update the request_body in skill.json to require a mint (or equivalent market
identifier) alongside wallet and strategy, and make sure the schema aligns with
the inputs expected by get_market_data and create_bot_quote. Verify any callers
of start_bot_loop are updated to pass the new field consistently.
- Around line 60-63: The stop_bot_loop endpoint is missing a selector to
identify which running loop to stop, while the start flow already scopes by
wallet; update the skill definition in stop_bot_loop to include the same loop
identity (for example wallet or another unique loop key) in its parameters or
request body so the backend can target the correct bot instance. Use the
existing stop_bot_loop and start-loop contract entries in skill.json as the
place to align the request shape and make the stop action unambiguous.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 67b1bb8f-e5b3-4005-b6ca-b1705903763a

📥 Commits

Reviewing files that changed from the base of the PR and between fe3c171 and d12a71a.

📒 Files selected for processing (1)
  • skills/agentfx/skill.json

Comment thread skills/agentfx/skill.json
Comment on lines +45 to +56
"request_body": {
"wallet": { "type": "string", "required": true },
"strategy": {
"type": "object",
"properties": {
"entryThreshold": { "type": "number", "default": 0.05 },
"exitThreshold": { "type": "number", "default": 0.1 },
"maxPositionUsd": { "type": "number", "default": 100 },
"takeProfitPct": { "type": "number", "default": 0.2 },
"stopLossPct": { "type": "number", "default": 0.1 }
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Add an explicit market identifier to start_bot_loop.

This request schema never tells the backend what asset the loop should trade. get_market_data and create_bot_quote both require mint, but Line 45-56 only send wallet and strategy, so callers cannot start a deterministic loop for a specific market.

Proposed fix
       "request_body": {
         "wallet": { "type": "string", "required": true },
+        "mint": { "type": "string", "required": true },
         "strategy": {
           "type": "object",
           "properties": {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"request_body": {
"wallet": { "type": "string", "required": true },
"strategy": {
"type": "object",
"properties": {
"entryThreshold": { "type": "number", "default": 0.05 },
"exitThreshold": { "type": "number", "default": 0.1 },
"maxPositionUsd": { "type": "number", "default": 100 },
"takeProfitPct": { "type": "number", "default": 0.2 },
"stopLossPct": { "type": "number", "default": 0.1 }
}
}
"request_body": {
"wallet": { "type": "string", "required": true },
"mint": { "type": "string", "required": true },
"strategy": {
"type": "object",
"properties": {
"entryThreshold": { "type": "number", "default": 0.05 },
"exitThreshold": { "type": "number", "default": 0.1 },
"maxPositionUsd": { "type": "number", "default": 100 },
"takeProfitPct": { "type": "number", "default": 0.2 },
"stopLossPct": { "type": "number", "default": 0.1 }
}
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skills/agentfx/skill.json` around lines 45 - 56, Add an explicit market
identifier to the start_bot_loop request schema so the backend can trade a
specific asset deterministically. Update the request_body in skill.json to
require a mint (or equivalent market identifier) alongside wallet and strategy,
and make sure the schema aligns with the inputs expected by get_market_data and
create_bot_quote. Verify any callers of start_bot_loop are updated to pass the
new field consistently.

Comment thread skills/agentfx/skill.json
Comment on lines +60 to +63
"name": "stop_bot_loop",
"description": "Triggers immediate teardown of the active on-chain trading loop.",
"path": "/bot/stop",
"method": "POST"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

stop_bot_loop needs a loop selector.

Line 60-63 define a stop action with no parameters or body, while Line 46 requires a wallet to start one. Unless the backend guarantees a single global loop, this contract cannot unambiguously target the running bot.

Proposed fix
     {
       "name": "stop_bot_loop",
       "description": "Triggers immediate teardown of the active on-chain trading loop.",
       "path": "/bot/stop",
-      "method": "POST"
+      "method": "POST",
+      "request_body": {
+        "wallet": { "type": "string", "required": true }
+      }
     }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"name": "stop_bot_loop",
"description": "Triggers immediate teardown of the active on-chain trading loop.",
"path": "/bot/stop",
"method": "POST"
"name": "stop_bot_loop",
"description": "Triggers immediate teardown of the active on-chain trading loop.",
"path": "/bot/stop",
"method": "POST",
"request_body": {
"wallet": { "type": "string", "required": true }
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skills/agentfx/skill.json` around lines 60 - 63, The stop_bot_loop endpoint
is missing a selector to identify which running loop to stop, while the start
flow already scopes by wallet; update the skill definition in stop_bot_loop to
include the same loop identity (for example wallet or another unique loop key)
in its parameters or request body so the backend can target the correct bot
instance. Use the existing stop_bot_loop and start-loop contract entries in
skill.json as the place to align the request shape and make the stop action
unambiguous.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant