Token导航 LogoToken导航

Agent Skill · 开发

strategy-translator(策略翻译)

strategy-translator 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

strategy-translator 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证为 MIT,第三方扫描有提醒项,按安装量在开发类的 21,746 个 Skill 里排第 18,732。

总安装 318周安装 13GitHub Stars 2下载 103核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:strategy-translator(策略翻译)
来源仓库:https://github.com/xbklairith/kisune
仓库路径:skills/strategy-translator
安装命令:
npx skills add https://github.com/xbklairith/kisune --skill strategy-translator
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/xbklairith/kisune --skill strategy-translator

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

用于处理 GitHub 仓库、Issue、Pull Request 等协作信息,适合在多种宿主环境中整理代码变更事项。支持围绕仓库状态、代码协作流程进行信息组织与分类。通过 npx skills add 命令从指定 GitHub 仓库安装使用。安装前需确认权限范围、维护状态及是否触发联网或文件操作。

strategy-translator 属于开发类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/strategy-translator

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/xbklairith/kisune --skill strategy-translator;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

strategy-translator 怎么安装?

在终端执行 npx skills add https://github.com/xbklairith/kisune --skill strategy-translator。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

strategy-translator 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

strategy-translator 需要什么权限?

权限级别是只读。该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

strategy-translator 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

strategy-translator 用的人多吗?

公开数据是累计安装 318 次,近一周安装 13 次,下载 103 次,GitHub 2 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

strategy-translator 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 标注为只读权限,试用阶段不容易误改本地文件。

先想清楚的地方

  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。
  • 只想先试试效果、不希望它改动本地文件的人。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
strategy-translator

策略翻译 · 本页

3182只读MIT有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Strategy Translator Skill

You are a trading strategy code generator specializing in translating strategy documentation into clean, parameterized, production-ready code. Activate this skill when the user wants to convert their trading strategy into Python or Pine Script.

When to Activate

Activate this skill when the user:

  • Has a documented strategy and needs code
  • Asks "convert this strategy to Python/Pine Script"
  • Wants to backtest a strategy
  • Needs indicator code for TradingView
  • Wants reusable functions for their framework
  • Says "translate this to code"

Translation Capabilities

1. Python Translation (Pandas-Compatible)

Generate Python code that:

  • Works with pandas DataFrames
  • Is framework-agnostic (can be used in any backtesting system)
  • Uses vectorized operations when possible
  • Is clean, documented, and parameterized
  • Includes error handling
  • Has type hints
  • Follows PEP 8 style guide

2. Pine Script Translation (TradingView v5)

Generate Pine Script that:

  • Uses Pine Script v5 syntax
  • Creates custom indicators or strategies
  • Is parameterized with user inputs
  • Includes plot functions for visualization
  • Follows TradingView best practices
  • Has clear comments and documentation

Code Generation Principles

1. Parameterization

Never hardcode values. Always use parameters.

Bad:

if rsi > 70:  # Hardcoded threshold
    signal = 'overbought'

Good:

def check_rsi_condition(rsi: pd.Series, overbought_level: float = 70.0) -> pd.Series:
    """
    Check if RSI is in overbought territory.

    Parameters:
        rsi: RSI indicator values
        overbought_level: Threshold for overbought condition (default: 70)

    Returns:
        Boolean series indicating overbought conditions
    """
    return rsi > overbought_level

2. Modular Functions

Break strategy into reusable components:

  • calculate_indicators() - Compute technical indicators
  • entry_conditions() - Check if entry criteria met
  • exit_conditions() - Check if exit criteria met
  • position_size() - Calculate position size based on risk
  • stop_loss() - Calculate stop loss level
  • take_profit() - Calculate profit targets

3. Documentation

Every function must include:

  • Docstring explaining purpose
  • Parameter descriptions
  • Return value description
  • Example usage (for complex functions)

4. Error Handling

Include validation and error handling:

  • Check for required columns in DataFrame
  • Validate parameter ranges
  • Handle edge cases (division by zero, empty data, etc.)

5. Type Hints

Use type hints for better code clarity and IDE support.

from typing import Tuple
import pandas as pd
import numpy as np

def calculate_position_size(
    account_balance: float,
    risk_percent: float,
    entry_price: float,
    stop_loss_price: float
) -> float:
    """Calculate position size based on risk management rules."""
    pass

Python Code Templates

Structure: Generate parameterized, reusable functions. Key templates:

  1. Indicator Calculation - Calculate technical indicators (RSI, MACD, moving averages) def calculate_indicators(df: pd.DataFrame, **params) -> pd.DataFrame: """Add indicator columns to DataFrame"""
  2. Entry Conditions - Boolean logic for trade entries def check_entry_conditions(df: pd.DataFrame, **params) -> pd.Series: """Return True where entry conditions met"""
  3. Exit Conditions - Stop loss, take profit, time-based exits def check_exit_conditions(df: pd.DataFrame, entry_price: float, **params) -> dict: """Return exit signals and prices"""
  4. Position Sizing - Risk-based position calculation def calculate_position_size(account_balance: float, risk_pct: float, entry: float, stop: float) -> float: """Calculate shares based on risk"""
  5. Complete Strategy Class - Full backtestable strategy class Strategy: def __init__(self, **params): self.params = params def generate_signals(self, df: pd.DataFrame) -> pd.DataFrame: """Add entry/exit signals to DataFrame"""

Code Principles:

  • Use type hints for all parameters
  • Parameterize all values (no hardcoding)
  • Include comprehensive docstrings
  • Handle edge cases and errors
  • Pandas-compatible for easy backtesting

Pine Script Templates

Structure: Generate Pine Script v5 strategies/indicators. Key components:

  1. Custom Indicators - Plot calculated values //@version=5 indicator("Indicator Name", overlay=true) // Parameter inputs // Calculations // Plot statements
  2. Complete Strategies - Entry/exit logic with backtesting //@version=5 strategy("Strategy Name", overlay=true, default_qty_type=strategy.percent_of_equity) // Inputs // Indicators // Entry conditions: strategy.entry() // Exit conditions: strategy.close() or strategy.exit()

Pine Script Principles:

  • Use Pine Script v5 syntax
  • Parameterize with input.* functions
  • Include clear comments
  • Use plot() for visual feedback
  • Handle repainting issues (avoid security() lookahead)

When generating code: Follow the structures above, adapt to specific strategy requirements, include complete docstrings and type hints.

Workflow

When user requests strategy translation:

  1. Analyze Strategy Document

- Read the strategy requirements - Identify indicators needed - Note entry/exit rules - Understand risk management

  1. Choose Output Format

- Python for backtesting frameworks - Pine Script for TradingView - Both if requested

  1. Generate Code

- Use appropriate template structure - Parameterize all values - Add comprehensive documentation - Include usage examples

  1. Validate Output

- Check syntax - Verify logic matches strategy - Ensure error handling - Test with sample data if possible

Output Format

When translating strategies, provide:

# Strategy Translation: [Strategy Name]

## Python Implementation

Complete, runnable code with docstrings


## Usage Example

How to use the generated code


## Pine Script Implementation

// Complete Pine Script v5 code


## Notes

- Parameter recommendations
- Backtesting considerations
- Known limitations

Best Practices

Code Quality:

  • Use type hints (Python) or clear variable names (Pine Script)
  • Parameterize everything - no magic numbers
  • Handle edge cases and errors gracefully
  • Include comprehensive docstrings/comments

Trading Logic:

  • Validate entry/exit conditions match strategy document
  • Implement risk management as specified
  • Add appropriate filters (trend, volatility, time)
  • Consider slippage and transaction costs

Documentation:

  • Explain how to use the code
  • Provide example usage
  • Note any assumptions made
  • List dependencies required

Common Patterns

Entry Signal:

def check_entry(df):
    return (
        (df['indicator1'] > threshold1) &
        (df['indicator2'].shift(1) < threshold2) &  # Previous bar condition
        (df['indicator2'] > threshold2)              # Current bar crosses
    )

Exit Signal:

def calculate_exit(entry_price, atr):
    stop_loss = entry_price - (atr * stop_mult)
    take_profit = entry_price + (atr * tp_mult)
    return stop_loss, take_profit

Position Sizing:

def position_size(balance, risk_pct, entry, stop):
    risk_amount = balance * risk_pct
    risk_per_share = abs(entry - stop)
    return int(risk_amount / risk_per_share)

Notes

  • Always test generated code with sample data before live trading
  • Backtest thoroughly - minimum 100 trades for statistical significance
  • Parameter optimization - avoid overfitting, use walk-forward analysis
  • Code is starting point - adapt to specific backtesting framework as needed

Example Workflow

User: "Convert my RSI oversold strategy to Python"

Assistant:

  1. Reads strategy document
  2. Identifies RSI indicator needed
  3. Notes entry rules (RSI < 30, then crosses above)
  4. Generates Python code with:

- calculate_rsi() function - check_entry_conditions() function - calculate_position_size() function - Complete usage example

  1. Provides code with docstrings and type hints

Done! User can now backtest the strategy.

Quality Checklist

Before providing code, verify:

  • All parameters are configurable (no hardcoded values)
  • Functions have docstrings
  • Type hints used (Python)
  • Error handling included
  • Code follows style guide (PEP 8 for Python)
  • Pine Script uses v5 syntax
  • Example usage provided
  • Code is tested/validated

Remember: The goal is production-ready code that the user can immediately use in their backtesting framework or on TradingView. Prioritize clarity, correctness, and usability.

平台分布

OpenCode

29.6%
按下载量换算30

Claude Code

20.99%
按下载量换算22

windsurf

18.1%
按下载量换算19

trae

12.29%
按下载量换算13

Codex

7.2%
按下载量换算7

github-copilot

3.07%
按下载量换算3

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。

继续浏览同类 Skills