Synthèse automatique
Cette compétence permet de gérer des abonnements récurrents sur la blockchain Solana en utilisant un portefeuille MPC dynamique, incluant la création de portefeuille, les vérifications de solde, les échanges SOL→USDC, et le cycle de vie complet pour abonnés et commerçants.
Points forts
- Création automatique du portefeuille MPC sans configuration manuelle préalable.
- Gère à la fois les flux abonnés (souscrire, annuler, visualiser) et commerçants (créer un plan, collecter, clôturer).
- Utilise un portefeuille MPC pour une sécurité renforcée des clés.
- Prend en charge les swaps SOL→USDC intégrés.
Limites
- Nécessite un financement manuel en SOL pour les frais de transaction.
- Dépend du service Dynamic.xyz pour la gestion des clés.
- Ne fonctionne que sur le réseau principal Solana (pas de testnet).
Utilisez cette compétence lorsque vous devez mettre en place ou interagir avec des paiements récurrents sur Solana, que ce soit en tant qu'abonné ou commerçant.
Ne l'utilisez pas pour des abonnements hors blockchain ou si vous avez besoin de paiements en monnaie fiduciaire.
Analyse de sécurité
PrudenceThe skill runs a Node.js script that performs Solana wallet operations including sending funds and creating subscriptions. All actions are legitimate and described, but the financial nature demands caution. No malicious patterns like exfiltration or remote execution were observed.
- •Handles irreversible fund transfers (send-all, send) which could lead to loss if misused.
- •Executes blockchain transactions via Bash, requiring careful input validation to avoid errors.
Exemples
Subscribe to the first plan offered by merchant address HXq3...abc on Solana.Cancel the subscription with PDA 9Yz2...def for plan HXq3...abc.Show my current Solana wallet balance and USDC balance.name: solana-subscriptions description: | Subscribe to Solana on-chain recurring payment plans using a Dynamic MPC wallet. Handles wallet creation, balance checks, SOL→USDC swaps, and the full lifecycle for both sides: subscribers (subscribe / cancel / view) and merchants (create-plan / collect / sunset / delete) — all from a single script. allowed-tools:
- Bash
- Read
Solana Subscriptions
Use this skill when the user asks to:
- Subscribe to a service, newsletter, or recurring payment plan on Solana
- Cancel a Solana subscription
- View their active subscriptions
- Send SOL or an SPL token to another address (or sweep the whole wallet)
- Create / publish a subscription plan (merchant flow)
- Collect payment from subscribers (merchant flow)
- Retire (sunset) or delete a plan (merchant flow)
- Set up a wallet for Solana subscriptions
The underlying script is subscriptions-skill.mjs in this directory. It signs every
transaction with a Dynamic MPC wallet. Sensitive secrets (the key share, API token,
and passphrases) are stored in the macOS Keychain when available — falling back to
.env otherwise — and are never logged.
Prerequisites
Only two manual steps — the wallet bootstraps itself after that.
-
Install dependencies once (from this directory):
pnpm install -
Configure credentials — copy
.env.example→.envand fill in:DYNAMIC_ENVIRONMENT_ID— from https://app.dynamic.xyz → SettingsDYNAMIC_AUTH_TOKEN— adyn_...token from the same page
That's it. Any command auto-creates the wallet on first use (you can still run
pnpm subs setup explicitly if you prefer). USDC can be sent directly or minted
from SOL with pnpm subs swap <amount_usdc>.
Wallet bootstrap & funding (important for the conversational flow)
The script handles its own prerequisites, so Claude should just run the command the user asked for and react to what it prints:
- No wallet yet? The command prints
No wallet configured yet — creating one…, creates the MPC wallet, and continues automatically. No separate setup step. - Wallet has no SOL? Any on-chain command stops before doing anything and
prints a funding prompt with the wallet address and the amount needed. When you
see this, relay the address to the user and ask them to send SOL (there is no
mainnet faucet — they fund it from an exchange or another wallet). After they
confirm, re-run the same command, or run
pnpm subs balanceto verify it landed.
So a typical first interaction is: run the command → it creates the wallet → it asks the user to fund the printed address → user funds it → re-run the command.
Step-by-step flow
1 — Discover plans
Ask the user for the merchant's Solana wallet address, then:
pnpm subs list-plans <merchant_address>
Output example:
[0] HXq3...abc 0.100000 USDC/1h (active)
metadata: https://cryptonfas.com/plans/weekly
[1] 9Yz2...def 5.000000 USDC/7d (active)
2 — Subscribe
pnpm subs subscribe <merchant_address> <plan_index>
The script will:
- Initialize a SubscriptionAuthority account if this is the user's first subscription
- Submit the
subscribetransaction - Print the subscription PDA for future reference
3 — Check subscriptions
pnpm subs subs
4 — Cancel
pnpm subs cancel <plan_pda> <sub_pda>
Cancellation queues the expiry at end of the current period — the user keeps access until then.
Send & sweep funds
Send SOL or any SPL token to another address:
pnpm subs send <recipient> <amount> [SOL|USDC|<mint>] # token defaults to SOL
pnpm subs send <recipient> all USDC # send the entire USDC balance
pnpm subs send-all <recipient> # sweep ALL SOL + USDC
Notes:
send-allmoves USDC first (it needs SOL to pay the fee and the recipient's token-account rent), then sweeps SOL. It leaves the rent-exempt minimum (~0.00089 SOL) behind, so the wallet ends up almost empty, not zero.- Sending an SPL token creates the recipient's associated token account if needed (the sender pays that one-time rent).
- ⚠️ Transfers are irreversible. Confirm the recipient address with the user before
sending, especially for
send-all.
Merchant flow
Create a plan
pnpm subs create-plan <amount_usdc> <period_hours> [metadata_uri]
# e.g. 0.50 USDC every 24h:
pnpm subs create-plan 0.50 24 https://example.com/plan.json
Prints the plan PDA. The calling wallet is the merchant, the authorized puller, and
the payout destination. Share <merchant_address> so subscribers can list-plans.
Collect payment
Within each billing period the merchant may pull up to the plan amount from a
subscriber. <delegator> is the subscriber's wallet:
pnpm subs collect <plan_pda> <sub_pda> <delegator> <amount_usdc>
If
collectfails withInvalid account ownerimmediately after asubscribe, the new accounts have not propagated to the RPC yet — wait a few seconds and retry.
Sunset a plan (stop new subscriptions)
pnpm subs sunset-plan <plan_pda> [end_in_minutes]
Sets the plan to Sunset: no new subscriptions, existing ones honored until the end
date. The protocol requires the end date to be at least one full billing period in
the future, so the command never sets it sooner. A plan is immutable once
sunset — this is a one-shot change.
Delete a plan (reclaim rent)
pnpm subs delete-plan <plan_pda>
Only works after a sunset plan's end date has passed (PLAN_NOT_EXPIRED
otherwise). Closes the plan account and returns its rent to the merchant.
Secrets & security
- At-rest secrets (key share, API token,
WALLET_BACKUP_PASSWORD) live in the macOS Keychain when available, not.env.setupwrites them there. setupbacks the share up to Dynamic (encrypted withWALLET_BACKUP_PASSWORD, auto-generated if unset) so it's recoverable.- The keystore passphrase is per-session and never stored —
setupprompts you to set one; signing reads it fromSUBS_KEYSTORE_PASSPHRASE(export it) or prompts. This keeps the decryption key in a different place than the share.
Helper commands:
pnpm subs secrets # move any secrets in .env into the Keychain & show locations
pnpm subs encrypt-shares # encrypt the key share if you created the wallet without a passphrase
- Never paste the keystore passphrase into chat or run signing commands unattended with it exported. Encryption protects secrets at rest, not against code in the session.
Handling common errors
| Error | Fix |
|---|---|
| Missing credentials | Copy .env.example → .env and fill in both values |
| Key shares are encrypted but SUBS_KEYSTORE_PASSPHRASE is not set | Export the passphrase used at setup before running |
| no record of a prior credit | Wallet needs SOL for gas — fund it |
| 0x205 alreadySubscribed | Treated as success — subscription already active |
| Invalid account owner (right after subscribe) | RPC lag — wait a few seconds and retry collect |
| custom program error: 0x1ff (INVALID_END_TS) | Sunset end date must be ≥ one billing period out; let the command default it |
| custom program error: 0x203 (PLAN_NOT_EXPIRED) | Can't delete until the sunset end date passes |
| Insufficient | Run swap to get USDC first |
Natural language examples
"Claude, use my Dynamic wallet to subscribe to Crypto NFAs weekly"
- Run
list-plans <merchant>to find the weekly plan index - Run
subscribe <merchant> <index>
"Subscribe me to this newsletter for 0.1 USDC/hour"
- Run
list-plans <merchant>to find the matching plan - Confirm price with user
- Run
subscribe <merchant> <index>
"Cancel my crypto newsletter subscription"
- Run
substo list active subscriptions - Identify the right one
- Run
cancel <plan_pda> <sub_pda>
"Create a plan that charges 5 USDC a month"
- Run
create-plan 5 720(720h ≈ 30 days) - Share the merchant wallet address so subscribers can find it via
list-plans
Du fichier au premier essai
Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.
Consulter la source et ses fichiers annexesCe téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.
1. Télécharger le fichier
Télécharger SKILL.mdDepuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/solana-subscriptions-mryiqgca/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.
Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.
mkdir -p '.skill-downloads/solana-subscriptions-mryiqgca' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/solana-subscriptions-mryiqgca/download' --output '.skill-downloads/solana-subscriptions-mryiqgca/SKILL.md.part' && mv '.skill-downloads/solana-subscriptions-mryiqgca/SKILL.md.part' '.skill-downloads/solana-subscriptions-mryiqgca/SKILL.md'2. Vérifier les prérequis
Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.
Extrait original : Prerequisites
Only two manual steps — the wallet bootstraps itself after that.
-
Install dependencies once (from this directory):
pnpm install -
Configure credentials — copy
.env.example→.envand fill in:DYNAMIC_ENVIRONMENT_ID— from https://app.dynamic.xyz → SettingsDYNAMIC_AUTH_TOKEN— adyn_...token from the same page
That's it. Any command auto-creates the wallet on first use (you can still run
pnpm subs setup explicitly if you prefer). USDC can be sent directly or minted
from SOL with pnpm subs swap <amount_usdc>.
Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.
3. Charger la skill
Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.
Claude Code
test -f '.skill-downloads/solana-subscriptions-mryiqgca/SKILL.md' && test -s '.skill-downloads/solana-subscriptions-mryiqgca/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/solana-subscriptions' && cp -R '.skill-downloads/solana-subscriptions-mryiqgca' '.claude/skills/solana-subscriptions'OpenSkills
OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.
Installation officielle d’OpenSkillsopenskills install './.skill-downloads/solana-subscriptions-mryiqgca'openskills read 'solana-subscriptions-mryiqgca'La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.
Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.
openskills syncMode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.
4. Faire un premier essai
Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :
Lis .skill-downloads/solana-subscriptions-mryiqgca/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.
Bonnes pratiques React Hook Form
Developpement
Maîtrisez React Hook Form : évitez les anti-patterns, gérez les abonnements, et traitez correctement reset, dirty state et entrées contrôlées.
Migration Emotion vers Mantine
Developpement
Migrer les styled-components Emotion vers des composants Mantine avec style props et modules CSS. Pour convertir .styled.tsx ou supprimer les imports @emotion.
Détecteur de dérive de périmètre
Developpement
Analyse les diffs git par rapport à une intention pour détecter la dérive de périmètre, fichiers non liés et PR trop larges, puis suggère de garder, diviser ou justifier.