Rugpull probability scorer

From XSpoonAi/spoon-awesome-skill · View interactive version

Rugpull probability scorer is an AI agent skill from the GitHub repository XSpoonAi/spoon-awesome-skill. Advanced token safety analyzer that evaluates smart contracts, holder distribution, liquidity status, and on-chain metrics to calculate a comprehensive safety score (0-100). Detects honeypots, centralization risks, liquidity locks, and malicious contract patterns using real-time blockchain data and

How to use this skill

Skill file

Usage Examples

1. Basic Safety Score

from scripts.safety_scorer import SafetyScorer

scorer = SafetyScorer()
result = scorer.analyze_token(
    token_address="0x6B175474E89094C44Da98b954EedeAC495271d0F",
    chain="ethereum"
)

print(f"Safety Score: {result['safety_score']}/100")
print(f"Risk Level: {result['risk_level']}")
print(f"Recommendation: {result['recommendation']}")

Output:

Safety Score: 92/100
Risk Level: Very Low
Recommendation: Safe to trade - well-established token

2. Detailed Contract Analysis

from scripts.contract_analyzer import ContractAnalyzer

analyzer = ContractAnalyzer()
analysis = analyzer.analyze_contract(
    token_address="0x...",
    chain="ethereum"
)

print(f"Verified: {analysis['is_verified']}")
print(f"Ownership: {analysis['ownership_status']}")
print(f"Malicious Functions: {analysis['malicious_functions']}")
print(f"Contract Score: {analysis['security_score']}/30")

3. Holder Distribution Analysis

from scripts.holder_analyzer import HolderAnalyzer

holder_analyzer = HolderAnalyzer()
distribution = holder_analyzer.analyze_holders(
    token_address="0x...",
    chain="ethereum"
)

print(f"Total Holders: {distribution['holder_count']}")
print(f"Top 10 Hold: {distribution['top_10_percentage']}%")
print(f"Centralization Risk: {distribution['centralization_risk']}")
print(f"Distribution Score: {distribution['score']}/25")

4. Liquidity Lock Verification

from scripts.liquidity_analyzer import LiquidityAnalyzer

liq_analyzer = LiquidityAnalyzer()
liquidity = liq_analyzer.analyze_liquidity(
    token_address="0x...",
    chain="ethereum"
)

print(f"Liquidity Locked: {liquidity['is_locked']}")
print(f"Lock Duration: {liquidity['lock_duration_days']} days")
print(f"Locked Amount: ${liquidity['locked_value_usd']:,.2f}")
print(f"Liquidity Score: {liquidity['score']}/35")

5. Comprehensive Analysis with Alerts

result = scorer.analyze_token(
    token_address="0x...",
    chain="ethereum",
    detailed=True
)

print(f"\n{'='*60}")
print(f"TOKEN SAFETY ANALYSIS")
print(f"{'='*60}")
print(f"Address: {result['token_address']}")
print(f"Chain: {result['chain']}")
print(f"\nSafety Score: {result['safety_score']}/100")
print(f"Risk Level: {result['risk_level']}")
print(f"\nScore Breakdown:")
print(f"  Contract Security: {result['breakdown']['contract_score']}/30")
print(f"  Holder Distribution: {result['breakdown']['holder_score']}/25")
print(f"  Liquidity Status: {result['breakdown']['liquidity_score']}/35")
print(f"  Trading Analysis: {result['breakdown']['trading_score']}/10")

if result['warnings']:
    print(f"\nāš ļø WARNINGS:")
    for warning in result['warnings']:
        print(f"  - {warning}")

if result['red_flags']:
    print(f"\n🚩 RED FLAGS:")
    for flag in result['red_flags']:
        print(f"  - {flag}")

6. Batch Token Analysis

tokens = [
    "0x6B175474E89094C44Da98b954EedeAC495271d0F",  # DAI
    "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",  # USDC
    "0x..."  # Unknown token
]

results = []
for token in tokens:
    result = scorer.analyze_token(token, "ethereum")
    results.append({
        "address": token,
        "score": result['safety_score'],
        "risk": result['risk_level']
    })

# Sort by safety score
results.sort(key=lambda x: x['score'], reverse=True)

for r in results:
    print(f"{r['address']}: {r['score']}/100 ({r['risk']})")

7. Honeypot Detection

from scripts.contract_analyzer import ContractAnalyzer

analyzer = ContractAnalyzer()
honeypot_check = analyzer.check_honeypot(
    token_address="0x...",
    chain="ethereum"
)

print(f"Is Honeypot: {honeypot_check['is_honeypot']}")
print(f"Can Buy: {honeypot_check['can_buy']}")
print(f"Can Sell: {honeypot_check['can_sell']}")
print(f"Buy Tax: {honeypot_check['buy_tax']}%")
print(f"Sell Tax: {honeypot_check['sell_tax']}%")

8. Monitor Token Changes

import time

# Initial analysis
initial = scorer.analyze_token("0x...", "ethereum")
print(f"Initial Score: {initial['safety_score']}")

# Wait and re-analyze
time.sleep(3600)  # 1 hour

updated = scorer.analyze_token("0x...", "ethereum")
print(f"Updated Score: {updated['safety_score']}")

score_change = updated['safety_score'] - initial['safety_score']
if score_change < -10:
    print(f"āš ļø ALERT: Safety score dropped by {abs(score_change)} points!")

9. Compare Multiple Tokens

tokens_to_compare = {
    "Token A": "0x...",
    "Token B": "0x...",
    "Token C": "0x..."
}

comparison = []
for name, address in tokens_to_compare.items():
    result = scorer.analyze_token(address, "ethereum")
    comparison.append({
        "name": name,
        "score": result['safety_score'],
        "risk": result['risk_level'],
        "locked": result['breakdown']['liquidity_locked']
    })

print("\nToken Safety Comparison:")
for token in sorted(comparison, key=lambda x: x['score'], reverse=True):
    lock_status = "āœ“" if token['locked'] else "āœ—"
    print(f"{token['name']}: {token['score']}/100 [{token['risk']}] Lock:{lock_status}")

10. Export Analysis Report

import json

result = scorer.analyze_token("0x...", "ethereum", detailed=True)

# Export to JSON
report = {
    "timestamp": result['analysis_timestamp'],
    "token_address": result['token_address'],
    "chain": result['chain'],
    "safety_score": result['safety_score'],
    "risk_level": result['risk_level'],
    "breakdown": result['breakdown'],
    "warnings": result['warnings'],
    "red_flags": result['red_flags'],
    "recommendation": result['recommendation']
}

with open("token_safety_report.json", "w") as f:
    json.dump(report, f, indent=2)

print("Report exported to token_safety_report.json")

Output Format

{
  "success": true,
  "token_address": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
  "chain": "ethereum",
  "token_name": "Dai Stablecoin",
  "token_symbol": "DAI",
  "safety_score": 92,
  "risk_level": "Very Low",
  "confidence": 95,
  "breakdown": {
    "contract_score": 28,
    "holder_score": 23,
    "liquidity_score": 33,
    "trading_score": 8
  },
  "contract_analysis": {
    "is_verified": true,
    "is_open_source": true,
    "has_mint_function": false,
    "ownership_renounced": true,
    "has_proxy": true,
    "has_blacklist": false,
    "hidden_fees": false
  },
  "holder_distribution": {
    "total_holders": 485032,
    "top_holder_percentage": 12.5,
    "top_10_percentage": 45.3,
    "centralization_risk": "Low"
  },
  "liquidity_status": {
    "is_locked": true,
    "lock_duration_days": 730,
    "locked_value_usd": 125000000,
    "liquidity_pools": 15,
    "total_liquidity_usd": 450000000
  },
  "trading_analysis": {
    "is_honeypot": false,
    "can_buy": true,
    "can_sell": true,
    "buy_tax": 0,
    "sell_tax": 0,
    "transfer_pausable": false
  },
  "warnings": [],
  "red_flags": [],
  "recommendation": "Safe to trade - well-established, audited token",
  "analysis_timestamp": "2026-02-19T10:30:00Z"
}

Best Practices

For Investors

  1. Never rely solely on automated scores
  2. Verify liquidity locks independently
  3. Check team background and social presence
  4. Review tokenomics and vesting schedules
  5. Start with small amounts for new tokens
  6. Monitor for sudden changes
  7. Be extra cautious with new launches

For Developers

  1. Implement rate limiting for API calls
  2. Cache results for 5-10 minutes
  3. Handle API failures gracefully
  4. Use multiple data sources
  5. Log all analyses for audit trail
  6. Set up alerts for score changes

For Security

  1. Keep API keys secure
  2. Never share private keys
  3. Validate all inputs
  4. Sanitize token addresses
  5. Rate limit user requests
  6. Monitor for abuse

Version & Support

Known Limitations

  1. New Tokens: Recently launched tokens may have incomplete data
  2. Private Sales: Cannot detect off-chain token distributions
  3. Future Changes: Cannot predict future contract upgrades
  4. Social Engineering: Cannot detect team-based scams
  5. External Factors: Cannot predict market manipulation

Troubleshooting

Issue: "Contract not verified"

Issue: "Insufficient holder data"

Issue: "API rate limit exceeded"

Issue: "Chain not supported"


Last Updated: February 19, 2026

Maintainer: SpoonOS Security Team

Status: āœ… Production Ready

Accuracy: 94% scam detection rate

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.