sign-solana-message

sign-solana-message is a skill for Cursor from MetaMask/metamask-connect-cursor-plugin. It costs 39 tokens per session (1,273 once invoked), scanned A, original, MIT.

A guide to signing any text message on the Solana blockchain with MetaMask Connect, either in a React app or directly in a browser.

In plain words
What is it for?
Use it for sign-in with Solana, identity checks, and message-verification flows using React wallet adapters or browser wallet features.
Why use it?
It shows how to turn text into the format Solana wallets require and use the correct signing method for each app type.

Skill for Cursor

Written for Cursor: shipped in a Cursor plugin.

Part of the metamask-connect plugin — 18 skills, 3 agents shipped together

Good fit Use it for sign-in with Solana, identity checks, and message-verification flows using React wallet adapters or browser wallet features.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/metamask/metamask-connect-cursor-plugin/sign-solana-message
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add MetaMask/metamask-connect-cursor-plugin --skill sign-solana-message
Clone the repo
git clone --depth 1 https://github.com/MetaMask/metamask-connect-cursor-plugin

Made for: Cursor.

Or install metamask-connect, the plugin that ships this one along with the rest of its 18 skills, 3 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sign-solana-message

README.md
[![agentmods](https://agentmods.dev/badge/skills/metamask/metamask-connect-cursor-plugin/sign-solana-message/github.svg)](https://agentmods.dev/skills/metamask/metamask-connect-cursor-plugin/sign-solana-message)
Your own site
<a href="https://agentmods.dev/skills/metamask/metamask-connect-cursor-plugin/sign-solana-message"><img src="https://agentmods.dev/badge/skills/metamask/metamask-connect-cursor-plugin/sign-solana-message/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for sign-solana-message

Your own site · 80×15
<a href="https://agentmods.dev/skills/metamask/metamask-connect-cursor-plugin/sign-solana-message"><img src="https://agentmods.dev/badge/skills/metamask/metamask-connect-cursor-plugin/sign-solana-message.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,273 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00039 $0.01273
Opus 5 $0.00019 $0.00636
Sonnet 5 $0.00008 $0.00255
Haiku 4.5 $0.00004 $0.00127

Measured 10d ago against content hash 5b6203788c60, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

sign-solana-message scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/sign-solana-message/SKILL.md · 156 lines

How it starts

The opening of the file, as written. The whole thing — 156 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Sign Solana Message with MetaMask

When to use

Use this skill when:

  • Signing an arbitrary message on Solana with MetaMask Connect
  • Implementing sign-in-with-Solana or message verification flows
  • Using useWallet().signMessage in a React app
  • Using the solana:signMessage wallet-standard feature in a vanilla browser app

Workflow

Step 1: Encode the message

Solana message signing requires a Uint8Array. Use TextEncoder to convert a string:

const message = new TextEncoder().encode('Sign this message to verify your identity');

Step 2a: Sign with React wallet-adapter (useWallet)

Prerequisites: createSolanaClient has been awaited before rendering, WalletProvider is configured with wallets={[]}, and the user is connected. See the setup-solana-react-app skill.

import { useWallet } from '@solana/wallet-adapter-react';

function SignMessageButton() {
  const { signMessage, publicKey, connected } = useWallet();

  const handleSign = async () => {
    if (!signMessage || !publicKey) {
      console.error('Wallet does not support signMessage or is not connected');
      return;
    }

    try {
      const message = new TextEncoder().encode('Hello from MetaMask on Solana!');
      const signature = await signMessage(message);
      console.log('Signature (bytes):', signature);
      console.log('Signature (hex):', Buffer.from(signature).toString('hex'));
      console.log('Signer:', publicKey.toBase58());
    } catch (err: any) {
      if (err.code === 4001) {
        console.log('User rejected the signature request');
        return;
      }
      console.error('signMessage failed:', err);
    }
  };

  return (
    <button onClick={handleSign} disabled={!connected || !signMessage}>
      Sign Message
    </button>
  );
}

Step 2b: Sign with vanilla browser (wallet-standard feature)

Prerequisites: createSolanaClient has been called and the wallet is connected via standard:connect. See the setup-solana-browser-app skill.

Read the full file on GitHub · 156 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 156 lines · 39 tokens per session scan A 5b6203788c60

Subscribe to this mod's changes

sign-solana-message is a skill published in the GitHub repository MetaMask/metamask-connect-cursor-plugin (2 stars, last pushed 2mo ago), licensed MIT. It adds 39 tokens to every session and 1,273 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.