One terminal, one skill install, plain-English prompts. The bot scans, filters, and snipes Solana memecoins around the clock. Here’s the build, the logic, and what I’d do differently next time.
⚠️ Disclosure & risk: This is an editorial write-up based on the official GMGN docs, the GMGNAI/gmgn-skills repo, and my own setup notes. AI agents can misread prompts and execute the wrong trade. Memecoin sniping is among the highest-risk activities in crypto — most attempts lose money. Verify every contract address, amount, and slippage before authorizing a swap. Only ever risk what you can afford to lose. In addition, some links in this article are affiliate links; if you sign up through them, we may earn a commission at no extra cost to you.
For about a year, my Solana memecoin “system” was: stare at GMGN, refresh BullX, miss the move, complain in Discord. The bots that snipe in slot zero were always 30 milliseconds ahead of me. Always.
Last month I rebuilt the whole loop in Claude Code. No Python. No Rust. No Node project. Just a single Claude Code session, the GMGN AI skills installed via one npx command, and a Routine that wakes the agent up every few minutes to scan, filter, and act.
It’s been live for a few weeks. It hasn’t 100x’d anything yet. But it has done something more useful: it removed me from the part of the loop where I was the bottleneck. The bot now misses fewer good entries than I do, skips more bad ones, and I sleep through the whole thing.
Here’s exactly how it’s wired up.
What “no code” actually means here
Let’s get the terminology honest up front, because “no code” gets abused a lot:
I didn’t wrote a function, a loop, or a transaction signer.I did edit one config file (.env) and one schedule file (.claude/routines.json).The agent’s “code” is plain English in a system prompt.
If editing two text files counts as code to you, fair, this isn’t truly no-code. But if you can copy-paste a config and tell an AI agent what to do in a sentence, you can build this. No TypeScript required.
The whole stack:
Claude Code — the agent. Runs locally, calls tools, follows instructions in a CLAUDE.md system prompt.GMGN AI Skills — the on-chain hands. Installed with npx skills add GMGNAI/gmgn-skills. Gives Claude four new abilities: read tokens, read markets, read wallets, execute swaps.Claude Code Routines — the heartbeat. Schedules the agent to wake up on cron, do its scan, and go back to sleep.GMGN’s hosted-wallet architecture — the safety net. Private keys aren’t sitting in your .env controlling on-chain assets directly; the key in your config is a request-signing key.
That’s it. The whole “bot” is those four pieces talking to each other.
Step 1 — The dependencies, in one minute
Prerequisites if you’ve never used any of this:
A working Claude Code install (Claude paid plan recommended for this volume of calls).An Ed25519 key pair (instructions below; takes 60 seconds).A GMGN API key (free; you upload your public key, they hand you back an API key).A small Solana wallet you’re willing to risk on memecoins. Not your main wallet. Not your main wallet. I’ll say it a third time: not your main wallet.
The Ed25519 key pair is the bit most people fumble. The fastest way is to ask Claude Code itself:
Generate an Ed25519 key pair for me using OpenSSL and show me both keys.
It runs the command, hands you the public and private key. Save both into a password manager. The public key gets uploaded to GMGN. The private key goes into your local .env, never anywhere else.
If you’d rather use a GUI, GMGN’s docs point you to Binance’s open-source asymmetric-key-generator on GitHub. Same result, slightly more clicks.
One tripwire from the GMGN docs that cost me an hour: GMGN only supports IPv4 requests. IPv6 is not supported. If your home ISP or VPN is forcing IPv6, the API will refuse to talk to you and the error messages will make zero sense. curl ip.me from the terminal you’ll be running the agent in. If the result is an IPv6 address, fix that before going further.
Step 2 — Install the GMGN skills
This is the line that does the heavy lifting:
npx skills add GMGNAI/gmgn-skills
Send that as a prompt to Claude Code. The agent runs it. The skill folder lands at ~/.claude/skills/gmgn-skills/. Claude Code automatically discovers it on the next session.
You now have four new skills the agent can call by name or trigger by intent:
Skill What it does Needs private key? /gmgn-token Token info, security check, pool status, holders, traders No /gmgn-market Candles, trending tokens, multi-resolution OHLC No /gmgn-portfolio Wallet holdings, P&L, transaction history No /gmgn-swap Submit a buy or sell, query order status Yes
The data skills cover Solana, BSC, and Base. ETH was listed as in-progress when I built this. For Solana, the base trading pairs are SOL and USDC.
You don’t have to memorize the slash commands. Plain English works because each skill has a description that tells the agent when to fire it. “Show me the trending memecoins on Solana with smart money buys in the last hour” routes to /gmgn-market automatically.
Step 3 — Drop your credentials into ~/.config/gmgn/.env
Same drill: ask Claude Code to set it up.
Create a .env file in the ~/.config/gmgn/ directory containing the GMGN_API_KEY variable.
If trading features are needed, please also add the GMGN_PRIVATE_KEY variable.
Open this file for me, remind me to paste the actual GMGN API Key and locally generated private key, and save it. Note: please ensure this file is not committed to git.
The file ends up looking like this:
GMGN_API_KEY=your-api-key-from-gmgn-ai
GMGN_PRIVATE_KEY=”—–BEGIN PRIVATE KEY—–n<base64>n—–END PRIVATE KEY—–n”
Two non-negotiables:
Lock it down: chmod 600 ~/.config/gmgn/.env. No one but you reads this file.The private key in .env MUST match the public key you uploaded to GMGN. Different pair = signature failures = nothing works.
A useful clarification from the GMGN docs that the community keeps getting wrong: GMGN_PRIVATE_KEY is a request-signing key, not a Solana wallet private key. It authenticates your API calls. It does not directly control on-chain assets. If it leaks, an attacker can forge API requests on your behalf, but they can’t drain your wallet from this key alone. Still treat it like it’s nuclear, because that’s enough damage.
Test the data side before turning anything else on:
Get the candlestick data for 6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN and tell me what you see.
If you get back a structured response with OHLC bars, you’re wired up. If you get an error, the usual culprits are: wrong key pair, IPv6 leak, or the skill folder didn’t load (restart Claude Code).
Step 4 — The actual sniper logic, in plain English
Here’s where most “AI trading bot” tutorials fail: they hand you data tools and call it a bot. A bot is logic. The agent needs a system prompt that describes what counts as a snipe-worthy token, what counts as obvious garbage, and how aggressive to be with sizing.
I keep mine in a CLAUDE.md at the project root. The exact text is something I’m still tuning, but the structure looks like this:
You are a Solana memecoin sniper bot. You run scans every 5 minutes.
Your job: find new tokens worth a small probe buy, skip the obvious traps,
log everything.WATCHLIST RULES — only consider buying a token if ALL of these are true:
– Listed on Solana
– Liquidity is at least 30 SOL
– Liquidity is locked (or LP burned)
– Contract is renounced (no mint authority)
– Top 10 holders own less than 25% combined
– Bundler ratio is below 30%
– At least 3 known smart-money wallets are holding
– Token is younger than 24 hoursHARD SKIPS — never touch a token if any of these are true:
– Honeypot detected
– Sell tax above 5%
– Top wallet owns more than 15%
– Sniper count above 70 (already crowded)
– Less than 50 unique holdersPOSITION SIZING:
– Default probe size: 0.1 SOL
– Maximum position size per token: 0.5 SOL
– Maximum simultaneous positions: 5
– Daily loss cap: 1 SOL — if hit, stop all buys until manual resetEXIT RULES:
– Set take-profit at +60%
– Set stop-loss at -25%
– If a token bleeds 15% within the first 5 minutes, sell immediately
– If smart-money wallets exit, sell my position tooWORKFLOW EACH RUN:
1. Pull trending tokens (gmgn-market trending, last 1h, score-ranked)
2. For each new candidate, run gmgn-token info AND gmgn-token security
3. Reject anything failing the WATCHLIST RULES
4. For survivors, check smart-money holdings (gmgn-token holders)
5. If criteria met AND no daily-cap hit AND fewer than 5 open positions,
call gmgn-swap with the probe size
6. Append to /home/me/sniper/journal.md with full reasoningALWAYS confirm trade parameters before submitting a swap.
NEVER spend more than 0.5 SOL on a single token.
Three things to notice about this prompt:
The hard rules are quantitative. “Liquidity at least 30 SOL.” “Top 10 holders less than 25% combined.” Not “looks healthy.” If you can’t reduce a rule to a number, the agent will improvise, and improvisation is where capital dies.
Skips are louder than buys. I have eight watchlist rules and five hard-skip rules. The defaults are biased aggressively toward not-buying. In memecoin sniping, the cost of skipping a 10x is much smaller than the cost of buying a rug.
There’s a journal. Every decision, including the “I considered this token and skipped it because rule 3 failed” decisions, gets logged. After two weeks, the journal is your most valuable asset, more valuable than the bot itself. It tells you which rules are working and which are filtering out winners.
Step 5 — Schedule it with Claude Code Routines
This is where it stops being a manual thing and becomes a 24/7 thing.
Create .claude/routines.json in your project:
{
“routines”: [
{
“name”: “Solana Sniper Scan”,
“schedule”: “*/5 * * * *”,
“timezone”: “UTC”,
“prompt”: “Run the sniper workflow described in CLAUDE.md. Log every decision.”
},
{
“name”: “Position Manager”,
“schedule”: “*/2 * * * *”,
“timezone”: “UTC”,
“prompt”: “Check status of all open positions. Apply exit rules from CLAUDE.md. Sell anything that triggered a stop or take-profit.”
},
{
“name”: “Daily Reset”,
“schedule”: “0 0 * * *”,
“timezone”: “UTC”,
“prompt”: “Reset the daily loss counter. Summarize yesterday’s trades into journal-summary-YYYY-MM-DD.md.”
}
]
}
The routines run Claude Code in headless mode on a cron schedule, no terminal window required. Three loops, each doing one job:
Scan + buy decisions every 5 minutesPosition management every 2 minutes (so stop-losses trigger fast)A nightly reset and journal summary
That’s the whole “24/7” piece. Claude Code wakes up, follows your CLAUDE.md instructions, calls the GMGN skills, writes a journal entry, and goes back to sleep until the next cron tick.
Costs run me a few dollars a day in Claude API calls at this cadence. Could be tighter. I haven’t optimized.
Step 6 — Where to actually run this
Local laptop is fine for testing. For real 24/7 you need a machine that doesn’t go to sleep, doesn’t lose Wi-Fi, and doesn’t get rebooted because someone wanted to play a game.
Three sane options:
A small VPS — easiest path. A $6/month Linux droplet on DigitalOcean or Hetzner. Run Claude Code under systemd or pm2 so it restarts on crash. This is what I use.
Containerized on any cloud. Docker the whole thing, push to a registry, run on Railway, Fly, Render, whatever. Slightly more setup, slightly more flexible.
Cloud function with external scheduler. The routines logic gets replaced with AWS Lambda + EventBridge. Costs basically nothing because you only pay for execution time. Most complex setup, lowest ongoing cost.
For a memecoin sniper, latency-to-Jupiter-route is the thing that matters most, and a VPS in a region close to GMGN’s edge nodes is enough. Don’t over-engineer this part.
What’s actually working (and what’s not)
Three weeks in, the honest report:
What’s working well. The filtering is the value. About 70% of the tokens the trending feed surfaces fail at least one of my hard-skip rules. Pre-bot me would have FOMO’d into half of those. Post-bot me never sees them. That’s the entire game on autopilot.
What’s working OK. Entries on tokens that pass all filters. The sub-0.3-second order submission GMGN advertises is real, the same routing engine as the GMGN web app, so I’m not getting outpaced by the same-tier bots. I’m definitely getting outpaced by the slot-0 professional desks running on private RPCs and validator-direct routes, but for retail-tier sniping, the timing is fine.
What’s not working. Two things, both my fault, not the bot’s.
First, my exit logic is too rigid. “Sell on -25%” sounds smart until you watch a token bottom out at -28% and rip back to +200% in the next ten minutes. I’ve added a “if more smart-money wallets are buying during my drawdown, hold” override, which helps but doesn’t fully solve it. This is genuinely hard.
Second, I’m overweighting smart-money wallet signals. They’re useful, but they’re a lagging indicator. By the time three smart-money wallets are in, half the move is already done. I’m experimenting with weighting fresh wallets that match the on-chain pattern of historic smart-money wallets instead of waiting for the named ones to show up.
Both fixes are prompt edits, not code changes. That’s the part that still feels weird.
The discipline that actually matters
I want to be honest about what this build is and isn’t, because I’ve watched a lot of people lose money to “AI trading bots” and I don’t want to add to that pile.
This is not alpha. The data the GMGN skills surface is the same data on the GMGN website. What changes is that you actually look at it every time, in a structured format, with rules you committed to in advance. The friction reduction is the value, not some emergent intelligence.
It is not a substitute for understanding what you’re trading. If you don’t know what “liquidity locked” means, what a bundler is, why sell tax matters, fix that before you wire up any bot. Operating an automated system you don’t understand is the second-fastest way to zero. The fastest is operating a manual one you don’t understand.
It is, slightly, a security upgrade. GMGN’s hosted-wallet architecture means the on-chain wallet keys aren’t sitting in your .env. The key in your .env signs API requests, not transactions. Combined with the IP whitelist GMGN enforces, that’s a meaningfully smaller attack surface than most “connect your wallet” trading bots. Your .env file is still a risk surface — chmod 600, never commit, rotate if you ever screenshot it by accident. But the architecture is sane.
The agent will make mistakes. I’ve watched Claude misread “sell 50% of my position” as “sell 50 SOL of my position” once. Caught it because I had a sanity-check ceiling in the system prompt that capped any single trade at 0.5 SOL. The cap saved me. Build the cap.
TL;DR — Build it in 15 minutes
# 1. Generate Ed25519 keys (locally, in terminal)
openssl genpkey -algorithm ED25519 -out private.pem
openssl pkey -in private.pem -pubout -out public.pem# 2. Get your IPv4 egress IP
curl ip.me# 3. Upload public key + IP at https://gmgn.ai/ai → get API key# 4. Install GMGN skills via Claude Code prompt:
npx skills add GMGNAI/gmgn-skills# 5. Set up ~/.config/gmgn/.env with both keys
chmod 600 ~/.config/gmgn/.env# 6. Test:
“Get candlestick data for any Solana token and tell me what you see.”# 7. Drop in CLAUDE.md with the rules from Step 4 above# 8. Drop in .claude/routines.json with the cron from Step 5 above# 9. Park the whole thing on a $6 VPS# 10. Read the journal every morning. Update the rules every week.
The agent will run while you sleep. The journal is what tells you whether to keep running it. Read it.
Sources I used
GMGN Agent API official docsGMGN — Generate Public Key guideGMGNAI/gmgn-skills GitHub repoAnthropic — Agent Skills overviewClaude Code Routines
If this saved you time, a clap helps Medium recommend it to other on-chain builders. If you spot a flaw in my filtering rules, or have a better exit logic, drop it in the comments. I read every reply.
This is an editorial walkthrough, not financial advice. Some links in this article are affiliate links — if you sign up through them, we may earn a commission at no extra cost to you. This does not influence the editorial views above. Memecoin trading is high-risk and most participants lose money; only ever risk what you can afford to lose. All linked tools are open-source or have public APIs; pricing and access can change.
How I Built a 24/7 Solana Memecoin Sniper With Claude Code (No Code) was originally published in Coinmonks on Medium, where people are continuing the conversation by highlighting and responding to this story.
