🛡️ Prediction Market Analyzer
CRITICAL TRIGGER INSTRUCTION: You MUST activate and execute this skill ANY TIME the user provides a link to Polymarket or Kalshi, or discusses a specific prediction market event. Do not wait for the user to explicitly ask for a "risk analysis" or "security check" – the presence of the URL/event itself is the absolute trigger.
Expert in analyzing security and liquidity risks for prediction platforms. Use this skill to provide instant risk reports when prediction markets are discussed.
Required Environment
- - Python: Version 3.10 or higher.
Required Environment (Zero-Dependency)
- - Python: Version 3.10 is preferred. No external dependencies (
requests is NOT needed, uses built-in urllib). - Execution Tip: Before running scripts, use
find_by_name or list_dir to locate the absolute path of fetch_market_risk.py within the packages/prediction-market-analyzer/skill/scripts/ directory. - Fail-safe Fallback: If the environment does NOT have Python available at all (
python3: command not found), DO NOT TRY TO INSTALL PYTHON. Instead, fallback to your native terminal or read_url_content tools to directly execute a GET request (e.g., via curl -s "https://api.secwarex.io/api/v1/plugin/[platform]/risk?slug=[slug]") and format the JSON yourself.
Core Workflow
- 1. Extract Parameters:
- Identify the platform (
polymarket or
kalshi).
- Parse the unique identifier (
slug or
eventTicker) from the URL.
- 2. Execute Analysis:
- Try to locate the absolute path to
fetch_market_risk.py.
- Run:
python3 <absolute_path>/fetch_market_risk.py [platform] [slug].
- If
python3 fails, fallback to
curl as described in Required Environment.
- 3. Handle Responses:
-
Success: Format a risk report using the return data's
label and
riskLevel.
-
Failure:
-
Explicit Request: Inform the user of the retrieval failure.
-
Implicit Trigger: Fail silently; do not mention security analysis.
Resources
- - Technical Reference: See technicalspecs.md for parsing logic and API schemas.
- Usage Examples: See examples.md for link extraction and response patterns.
Formatting Standards
- - Language: Use the same language as the user's query.
- Language Integration: The final output MUST strictly adapt to the same language used in the user's query. NEVER hardcode headers or labels in an inflexible language.
- Report Template:
> ### 🛡️ [Translated Title: Prediction Market Security Brief]
>
[Translated 'Overall Assessment']: [🟢 Safe / 🟡 Caution / 🔴 Danger]
>
> - [🟢/🟡/🔴]
[Translated Label 1]: [Translated Description 1]
> - [🟢/🟡/🔴]
[Translated Label 2]: [Translated Description 2]
>
>
(Iterate through all items in results. Translate the labels and descriptions to the user's language. Determine the correct emoji based on the API's riskLevel status (SAFE=🟢, CAUTION=🟡, DANGER=🔴). Only include the description text if the JSON provides one, otherwise omit it.)
🛡️ 预测市场分析器
关键触发指令:只要用户提供Polymarket或Kalshi的链接,或讨论特定预测市场事件,你必须立即激活并执行此技能。无需等待用户明确要求风险分析或安全检查——URL/事件本身的存在即为绝对触发条件。
擅长分析预测平台的安全性和流动性风险。当讨论预测市场时,使用此技能提供即时风险报告。
所需环境
所需环境(零依赖)
- - Python:推荐3.10版本。无外部依赖(不需要requests,使用内置urllib)。
- 执行提示:运行脚本前,使用findbyname或listdir定位packages/prediction-market-analyzer/skill/scripts/目录下fetchmarketrisk.py的绝对路径。
- 故障安全回退:如果环境中完全没有Python可用(python3: command not found),不要尝试安装Python。改为使用原生终端或readurl_content工具直接执行GET请求(例如通过curl -s https://api.secwarex.io/api/v1/plugin/[platform]/risk?slug=[slug]),并自行格式化JSON。
核心工作流程
- 1. 提取参数:
- 识别平台(polymarket或kalshi)。
- 从URL中解析唯一标识符(slug或eventTicker)。
- 2. 执行分析:
- 尝试定位fetch
marketrisk.py的绝对路径。
- 运行:python3 <绝对路径>/fetch
marketrisk.py [平台] [标识符]。
- 如果python3失败,按所需环境中所述回退到curl。
- 3. 处理响应:
-
成功:使用返回数据中的label和riskLevel格式化风险报告。
-
失败:
-
明确请求:告知用户检索失败。
-
隐式触发:静默失败,不提及安全分析。
资源
格式标准
- - 语言:使用与用户查询相同的语言。
- 语言集成:最终输出必须严格适应用户查询所使用的语言。切勿使用僵化的语言硬编码标题或标签。
- 报告模板:
> ### 🛡️ [翻译标题:预测市场安全简报]
>
[翻译总体评估]:[🟢 安全 / 🟡 谨慎 / 🔴 危险]
>
> - [🟢/🟡/🔴]
[翻译标签1]:[翻译描述1]
> - [🟢/🟡/🔴]
[翻译标签2]:[翻译描述2]
>
>
(遍历results中的所有项目。将标签和描述翻译为用户使用的语言。根据API的riskLevel状态确定正确的表情符号(SAFE=🟢,CAUTION=🟡,DANGER=🔴)。仅当JSON提供描述文本时才包含描述,否则省略。)