🛡️ 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 (
requestsis NOT needed, uses built-inurllib). - Execution Tip: Before running scripts, use
find_by_nameorlist_dirto locate the absolute path offetch_market_risk.pywithin thepackages/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 orread_url_contenttools to directly execute a GET request (e.g., viacurl -s "https://api.secwarex.io/api/v1/plugin/[platform]/risk?slug=[slug]") and format the JSON yourself.
Core Workflow
- Extract Parameters:
- Identify the platform (
polymarketorkalshi). - Parse the unique identifier (
slugoreventTicker) from the URL.
- Identify the platform (
- Execute Analysis:
- Try to locate the absolute path to
fetch_market_risk.py. - Run:
python3 <absolute_path>/fetch_market_risk.py [platform] [slug]. - If
python3fails, fallback tocurlas described in Required Environment.
- Try to locate the absolute path to
- Handle Responses:
- Success: Format a risk report using the return data's
labelandriskLevel. - Failure:
- Explicit Request: Inform the user of the retrieval failure.
- Implicit Trigger: Fail silently; do not mention security analysis.
- Success: Format a risk report using the return data's
Resources
- Technical Reference: See technical_specs.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'sriskLevelstatus (SAFE=🟢, CAUTION=🟡, DANGER=🔴). Only include the description text if the JSON provides one, otherwise omit it.)