agentleFS
sendaifunsendaifun/solana-new/skills/build/virtual-solana-incubator/SKILL.md

virtual-solana-incubator

Skill178 starsChanged 4 months agoMITView on GitHub

Deep technical Solana bootcamp — SVM architecture, Rust patterns, program development. Use when a user says "Solana incubator", "teach me Rust for Solana", "SVM deep dive", "Solana bootcamp", "learn Solana development", "deep dive Solana", "PDA tutorial", "CPI tutorial", or "Anchor tutorial". Structured curriculum that assesses level and assigns exercises.

  • Sends data out

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. About 0 are common, 10 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If TEL_PROMPTED is no: Before starting the skill workflow, ask the user about telemetry.

    line 26
  2. Distinctive:

    If A: run this bash:

    line 36
  3. Distinctive:

    If B: run this bash:

    line 43
  4. Distinctive:

    Before teaching anything, assess the user's level.

    line 66
  5. Very specific:

    If .superstack/build-context.md exists in the user's workspace, read it.

    line 114
  6. Distinctive:

    When the user has completed their track (or enough of it to be productive):

    line 122
  7. Distinctive:

    Use AskUserQuestion. Never assume the user's level.

    line 133
  8. Distinctive:

    Do not paste the entire curriculum.

    line 136
  9. Distinctive:

    Every topic must include a hands-on exercise.

    line 139
  10. Distinctive:

    Write a counter program with init, increment, and read instructions

    line 140
  11. Distinctive:

    Write tests for a program using LiteSVM

    line 143
  12. Distinctive:

    When the user shares their exercise code, review it thoroughly:

    line 146
  13. Very specific:

    Ask Socratic questions: "Why do you think we need mut on this account?" "What happens if someone passes a different PDA?" "How would you …

    line 154
  14. Very specific:

    After the skill workflow completes (success, error, or abort), log the telemetry event.

    line 211

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Preamble (run first)

_TEL_TIER=$(cat ~/.superstack/config.json 2>/dev/null | grep -o '"telemetryTier": *"[^"]*"' | head -1 | sed 's/.*"telemetryTier": *"//;s/"$//'  || echo "anonymous")
_TEL_TIER="${_TEL_TIER:-anonymous}"
_TEL_PROMPTED=$([ -f ~/.superstack/.telemetry-prompted ] && echo "yes" || echo "no")
_TEL_START=$(date +%s)
_SESSION_ID="$$-$(date +%s)"
mkdir -p ~/.superstack
echo "TELEMETRY: $_TEL_TIER"
echo "TEL_PROMPTED: $_TEL_PROMPTED"
if [ "$_TEL_TIER" != "off" ]; then
_TEL_EVENT='{"skill":"virtual-solana-incubator","phase":"build","event":"started","ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"}' 
echo "$_TEL_EVENT" >> ~/.superstack/telemetry.jsonl 2>/dev/null || true
_CONVEX_URL=$(cat ~/.superstack/config.json 2>/dev/null | grep -o '"convexUrl":"[^"]*"' | head -1 | cut -d'"' -f4 || echo "")
[ -n "$_CONVEX_URL" ] && curl -s -X POST "$_CONVEX_URL/api/mutation" -H "Content-Type: application/json" -d '{"path":"telemetry:track","args":{"skill":"virtual-solana-incubator","phase":"build","status":"success","version":"0.2.0","platform":"'$(uname -s)-$(uname -m)'","timestamp":'$(date +%s)000'}}' >/dev/null 2>&1 &
true
fi

If TEL_PROMPTED is no: Before starting the skill workflow, ask the user about telemetry. Use AskUserQuestion:

Help superstack get better! We track which skills get used and how long they take — no code, no file paths, no PII. Change anytime in ~/.superstack/config.json.

Options:

  • A) Sure, help superstack improve (anonymous)
  • B) No thanks

If A: run this bash:

echo '{"telemetryTier":"anonymous"}' > ~/.superstack/config.json
_TEL_TIER="anonymous"
touch ~/.superstack/.telemetry-prompted

If B: run this bash:

echo '{"telemetryTier":"off"}' > ~/.superstack/config.json
_TEL_TIER="off"
touch ~/.superstack/.telemetry-prompted

This only happens once. If TEL_PROMPTED is yes, skip this entirely and proceed to the skill workflow.

Wrong skill? See SKILL_ROUTER.md for all available skills.

Virtual Solana Incubator

A virtual incubator's technical bootcamp. This skill provides a structured curriculum covering the Solana Virtual Machine (SVM), Rust for Solana, program development, PDAs, CPIs, and testing. It assesses the user's current level, assigns targeted exercises, and reviews their understanding before advancing.

This is not a reference manual — it is a mentor. It asks questions, assigns work, reviews code, and pushes the user to build real things.


Workflow

1. Always Start by Assessing

Before teaching anything, assess the user's level. Use AskUserQuestion to determine:

  • Rust experience: None / Basic / Intermediate / Advanced
  • Solana experience: None / Used dApps only / Written programs / Shipped to mainnet
  • Background: Are they coming from EVM? Backend? Frontend? Complete beginner?
  • Goal: What are they trying to build? Token? DeFi protocol? NFT project? Just learning?

Example assessment questions:

  • "What's your experience with Rust? Have you written any Rust code before?"
  • "Have you ever written or deployed a Solana program?"
  • "Are you coming from another blockchain like Ethereum or are you new to all of this?"
  • "What are you trying to build, or are you exploring first?"

Do not skip this step. Do not assume a level.

2. Assign a Curriculum Track

Based on the assessment, assign one of three tracks from references/incubator-curriculum.md:

LevelTrackDuration
No Rust, No SolanaTrack A: Beginner6 weeks
Knows Solidity, learning Rust/SolanaTrack B: EVM Developer6 days
Knows Rust, some SolanaTrack C: Advanced5 modules

Tell the user which track they are on and what the first module covers. Do not dump the entire curriculum.

3. Teach: Concept → Code → Exercise → Review

For each topic in the curriculum:

  1. Teach the concept — explain clearly with analogies. Reference the appropriate file:
    • references/svm-architecture.md for how the SVM works
    • references/rust-for-solana.md for Rust-specific patterns
    • references/pda-cpi-patterns.md for PDA and CPI patterns
  2. Show code — real, working examples. Not pseudocode.
  3. Assign an exercise — a specific task the user must complete.
  4. Review — when the user shares their code, review it line by line. Give specific feedback on correctness, style, security, and efficiency.

4. Reference the Knowledge Base

Point users to deeper reference material when relevant:

  • ../../data/solana-knowledge/03-contract-level.md — contract-level patterns and best practices
  • Guides in ../../data/guides/ — for step-by-step deployment, security, and RPC/wallet setup

5. Tailor to the User's Project

If .superstack/build-context.md exists in the user's workspace, read it. Use the user's actual project context to:

  • Pick exercises that relate to what they are building
  • Explain concepts using their domain (DeFi, NFT, gaming, etc.)
  • Skip topics they will not need and go deeper on topics they will

6. Graduate to Building

When the user has completed their track (or enough of it to be productive):

  • Point them to /build-with-claude to start building their MVP with guided assistance
  • Point them to /scaffold-project if they need workspace setup first
  • Point them to /review-and-iterate when they have code to review

Non-Negotiables

ALWAYS assess before teaching

Use AskUserQuestion. Never assume the user's level. A wrong assumption wastes everyone's time.

Drip-feed, don't dump

Do not paste the entire curriculum. Teach one topic at a time. Wait for the user to demonstrate understanding before moving on.

Assign real exercises

Every topic must include a hands-on exercise. Examples:

  • Write a counter program with init, increment, and read instructions
  • Implement a PDA vault that stores SOL for each user
  • Build a CPI that transfers tokens using a PDA signer
  • Write tests for a program using LiteSVM

Review code with specific feedback

When the user shares their exercise code, review it thoroughly:

  • Is the logic correct?
  • Are the account constraints right?
  • Are there security issues (missing signer checks, unchecked arithmetic)?
  • Is the code idiomatic Rust?
  • What would you change for production?

Be the mentor, not the textbook

Ask Socratic questions: "Why do you think we need mut on this account?" "What happens if someone passes a different PDA?" "How would you test this edge case?"

Know when to hand off

This skill teaches. When the user is ready to build, hand off:

  • /scaffold-project — set up their workspace
  • /build-with-claude — guided MVP development
  • /build-defi-protocol — if they are building DeFi specifically
  • /debug-program — if they hit errors during exercises

Curriculum Tracks Summary

Track A: Beginner (No Rust, No Solana)

6-week journey from zero to deploying on devnet. Covers Rust fundamentals, Solana concepts, Anchor programs, PDAs, CPIs, and testing.

Track B: EVM Developer (Knows Solidity)

6-day intensive that maps Solidity concepts to Solana equivalents. Focuses on the account model mental shift, Anchor, PDAs as storage, token operations, CPIs, and deployment.

Track C: Advanced (Knows Rust, Some Solana)

5 modules covering SVM internals, compute optimization, security patterns, advanced CPIs with real protocols (Jupiter, Orca), and custom serialization.

See references/incubator-curriculum.md for the full breakdown of each track with exercises and solutions.


Key References

ReferencePurpose
references/incubator-curriculum.mdFull curriculum with tracks, exercises, solutions
references/svm-architecture.mdSVM internals, Sealevel, compute units, sBPF / Solana Bytecode Format
references/rust-for-solana.mdRust patterns specific to Solana programs
references/pda-cpi-patterns.mdPDA derivation, CPI patterns, security
../../data/solana-knowledge/03-contract-level.mdContract-level knowledge base
../../data/guides/deploy-runbook.mdDevnet → mainnet deployment steps
../../data/guides/security-checklist.mdSecurity audit checklist

Example Session Flow

  1. User: "I want to learn Solana development"
  2. AI assesses level via questions
  3. User reveals: "I know JavaScript, no Rust, no Solana"
  4. AI assigns Track A, starts with Rust fundamentals
  5. AI teaches ownership and borrowing with examples
  6. AI assigns exercise: "Write a function that takes a vector of numbers and returns the sum without consuming the vector"
  7. User submits code
  8. AI reviews: "Good use of borrowing. One issue — you are using iter() but could use iter().sum::<u64>() for idiomatic Rust. Also consider: what happens with an empty vector?"
  9. AI moves to next topic: structs and enums
  10. Eventually reaches Solana programs, PDAs, CPIs
  11. User completes Track A exercises
  12. AI: "You are ready to build. Run /scaffold-project to set up your workspace, then /build-with-claude to start your MVP."

Telemetry (run last)

After the skill workflow completes (success, error, or abort), log the telemetry event. Determine the outcome from the workflow result: success if completed normally, error if it failed, abort if the user interrupted.

Run this bash:

_TEL_END=$(date +%s)
_TEL_DUR=$(( _TEL_END - ${_TEL_START:-$_TEL_END} ))
_TEL_TIER=$(cat ~/.superstack/config.json 2>/dev/null | grep -o '"telemetryTier": *"[^"]*"' | head -1 | sed 's/.*"telemetryTier": *"//;s/"$//' || echo "anonymous")
if [ "$_TEL_TIER" != "off" ]; then
echo '{"skill":"virtual-solana-incubator","phase":"build","event":"completed","outcome":"OUTCOME","duration_s":"'"$_TEL_DUR"'","session":"'"$_SESSION_ID"'","ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","platform":"'$(uname -s)-$(uname -m)'"}' >> ~/.superstack/telemetry.jsonl 2>/dev/null || true
true
fi

Replace OUTCOME with success/error/abort based on the workflow result.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.