Skip to content

x402agent/SolanaOS / skills/pumpfun-token-scanner

pumpfun-token-scanner

Verified

Scrapes pump.fun/board using Chrome browser automation to extract the top 100 trending Solana tokens and writes structured markdown for a trading agent to consume. Use this skill any time you need to: scan pump.fun for new tokens, refresh the pump.md token list, run the scheduled board scrape, collect Solana meme token data, or build/update a trading watchlist from pump.fun. Even if the user says something casual like "check pump" or "update the token list" or "what's trending on pump", use this skill. The output file path and format are configurable but default to /Users/8bit/solanaos/pump.md.

FileKindSize
SKILL.mdskill md26.5 KB
blocklist.jsonconfig987 B
scripts/blocklist_filter.pyscript2.6 KB
scripts/deploy_pipeline.pyscript9.5 KB
scripts/honcho_memory.pyscript11.2 KB
scripts/push_to_convex.pyexecutablescript3.7 KB
scripts/push_to_convex.py.bakexecutablescript3.7 KB
scripts/send_telegram.pyexecutablescript10.4 KB
scripts/send_tweet.pyscript5.6 KB
scripts/watch_pump.shexecutablescript2.5 KB

scripts/send_tweet.py

View on GitHub
#!/usr/bin/env python3
"""
Reads pump.md, picks 2 fresh snipers + 2 top movers + 1 highest MC,
formats a tweet (<= 280 chars), writes to tweet_draft.txt.
"""
import os, re, sys
from datetime import datetime, timezone

# Platform blocklist filter
try:
    from blocklist_filter import is_blocked, load_blocked_domains
except ImportError:
    import sys as _sys
    _sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
    from blocklist_filter import is_blocked, load_blocked_domains

PUMP_MD   = os.path.expanduser('~/Downloads/solanaos/pump.md')
DRAFT_OUT = os.path.expanduser('~/Downloads/solanaos/tweet_draft.txt')

def parse_mc(mc):
    s = mc.replace('$','').replace(',','')
    if s.endswith('M'): return float(s[:-1]) * 1e6
    if s.endswith('K'): return float(s[:-1]) * 1e3
    try:    return float(s)
    except: return 0.0

def parse_age_min(age):
    if not age or age == 'N/A': return None
    m = re.match(r'^(\d+)s ago$', age);  
    if m: return int(m.group(1)) / 60.0
    m = re.match(r'^(\d+)m ago$', age);  
    if m: return float(m.group(1))
    m = re.match(r'^(\d+)h ago$', age);  
    if m: return float(m.group(1)) * 60
    m = re.match(r'^(\d+)d ago$', age);  
    if m: return float(m.group(1)) * 1440
    return None

def parse_pct(pct):
    try:   return float(pct.replace('%',''))
    except: return 0.0

# ── Parse pump.md ──────────────────────────────────────────────────────────────
tokens = []
try:
    with open(PUMP_MD, encoding='utf-8') as f:
        for line in f:
            line = line.strip()
            if not line.startswith('|') or '---' in line:
                continue
            parts = [p.strip() for p in line.split('|')]
            parts = [p for p in parts if p]
            if len(parts) < 7: continue
            try: int(parts[0])
            except ValueError: continue
            idx, name, sym, mint, mc, age, pct = parts[:7]
            tokens.append({
                'name':    name,
                'sym':     sym,
                'mint':    mint.strip('`').strip(),
                'mc':      mc,
                'mc_val':  parse_mc(mc),
                'age':     age,
                'age_min': parse_age_min(age),
                'pct_val': parse_pct(pct),
                'pct':     pct,
            })
except FileNotFoundError:
    print(f"ERROR: {PUMP_MD} not found", file=sys.stderr); sys.exit(1)

if not tokens:
    print("ERROR: no tokens parsed", file=sys.stderr); sys.exit(1)

# ── Platform blocklist filter ──────────────────────────────────────────────────
_blocked = load_blocked_domains()
_pre = len(tokens)
tokens = [t for t in tokens if not is_blocked(f"{t['name']} {t['sym']}", _blocked)]
if _pre != len(tokens):
    print(f"🚫 Blocklist: filtered {_pre - len(tokens)} tokens from blocked platforms")

# ── Pick tokens ────────────────────────────────────────────────────────────────
# 2 fresh snipers: age ≤ 10 min, youngest first
fresh = sorted(
    [t for t in tokens if t['age_min'] is not None and t['age_min'] <= 10],
    key=lambda t: t['age_min']
)[:2]

used = {t['mint'] for t in fresh}

# 2 top movers: highest % gain, not already selected
movers = sorted(
    [t for t in tokens if t['mint'] not in used],
    key=lambda t: -t['pct_val']
)[:2]
used |= {t['mint'] for t in movers}

# 1 top MC: highest market cap, not already selected
top_mc_list = sorted(
    [t for t in tokens if t['mint'] not in used],
    key=lambda t: -t['mc_val']
)[:1]

# ── Format helpers ─────────────────────────────────────────────────────────────
def label(t, maxlen=16):
    s = t['sym'] if len(t['sym']) <= 8 else t['sym'][:7]+'…'
    n = t['name']
    raw = f"{s} ({n})"
    return raw if len(raw) <= maxlen else raw[:maxlen-1]+'…'

def age_str(t):
    m = t['age_min']
    if m is None: return ''
    return f"{int(m*60)}s" if m < 1 else f"{int(m)}m"

def pct_short(t):
    v = t['pct_val']
    return f"{v:.0f}%" if v >= 10 else f"{v:.1f}%"

# ── Build tweet ────────────────────────────────────────────────────────────────
now_utc = datetime.now(timezone.utc).strftime('%H:%M UTC')
parts = [f"🔍 pump.fun — {now_utc}", ""]

if fresh:
    parts.append("⚡ Fresh")
    for t in fresh:
        a = age_str(t)
        parts.append(f"• {label(t)} {t['mc']}{' ·'+a if a else ''}")
    parts.append("")

if movers:
    parts.append("🚀 Movers")
    for t in movers:
        parts.append(f"• {label(t)} {t['mc']} +{pct_short(t)}")
    parts.append("")

if top_mc_list:
    t = top_mc_list[0]
    parts.append(f"👑 {label(t)} {t['mc']}")
    parts.append("")

parts.append("not financial advice, -claude")

tweet = '\n'.join(parts).rstrip()

# Safety net: if still over 280 drop the last non-footer line
while len(tweet) > 280:
    lines = tweet.split('\n')
    # find last data line before footer
    for i in range(len(lines)-2, 0, -1):
        if lines[i].startswith('•'):
            lines.pop(i)
            break
    tweet = '\n'.join(lines).rstrip()
    if len(tweet) <= 280:
        break

print(f"Tweet ({len(tweet)} chars):\n")
print(tweet)

with open(DRAFT_OUT, 'w', encoding='utf-8') as f:
    f.write(tweet)

print(f"\n→ {DRAFT_OUT}")
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall