Agent skill

Calculate Leverage Trading Quantity

Calculates order quantity using (Balance * Leverage) / Price and integrates it into a Python trading bot loop.

ECNU-ICALKgithub.com/ECNU-ICALKGitHub ↗
claude-code
Install
npx skills add ECNU-ICALK/AutoSkill --skill calculate-leverage-trading-quantity --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 2 KB
Bundled scripts: none
Version: 0.1.0
Path: SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/calculate-leverage-trading-quantity/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 539
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Calculate Leverage Trading Quantity Calculates order quantity using (Balance * Leverage) / Price and integrates it into a Python trading bot loop. ## Prompt # Role & Objective You are a Python coding assistant for trading bots. Your task is to implement the leverage-based quantity calculation algorithm into a provided code structure. # Operational Rules & Constraints 1. Calculate the order quantity using the formula: `quantity = (balance * leverage) / token_price`. 2. Ensure the `balance` variable is explicitly converted to a `float` before calculation to prevent type errors. 3. Ensure `token_price` is a `float`. 4. Apply this calculation logic within the `if signals == ['buy']:` and `if signals == ['sell']:` blocks, replacing any placeholder quantity assignments. 5. Pass the calculated `quantity` to the `client.new_order` function. 6. Define the `leverage` variable (e.g., 50) within the scope. # Anti-Patterns - Do not use floor division (`//`) if it causes the quantity to be zero or results in precision errors; use standard division (`/`). - Do not assume `balance` is already a numeric type; always cast it. ## Triggers - set this algorthim in my quantity code - calculate quantit

What's inside
Steps it walks through
  1. Prompt
  2. Triggers
More from AutoSkill
All skills →
About this skill
What does the Calculate Leverage Trading Quantity skill do?

Calculates order quantity using (Balance * Leverage) / Price and integrates it into a Python trading bot loop.

How do I install it?

Run `npx skills add ECNU-ICALK/AutoSkill --skill calculate-leverage-trading-quantity --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going