Split soroban skill, rebrand prose, add concrete ZK toolchain walkthroughs#32
Split soroban skill, rebrand prose, add concrete ZK toolchain walkthroughs#32kaankacar wants to merge 4 commits into
Conversation
…lchain walkthroughs - Split skills/soroban/SKILL.md (2,578 lines) into a slim entry point plus development.md, testing.md, and security.md; condensed content that LLMs already know and replaced niche detail with doc links - Rebranded prose mentions of Soroban to Stellar smart contracts across skills, README, site, and plugin manifests; crate names, URLs, and official SEP/CAP/tool names are unchanged - Rewrote skills/zk-proofs/SKILL.md around concrete Circom, Noir, and RISC Zero walkthroughs grounded in the official groth16_verifier example, with a curve/proof-system support matrix - Site: copy-skills.mjs now mirrors whole skill directories so companion files are served, and llms.txt indexes them as nested entries; Soroban filter tab renamed to Smart Contracts
|
There was a problem hiding this comment.
Pull request overview
This PR restructures and refreshes the developer-facing “Soroban” documentation into a “Stellar smart contracts” entry point with companion deep-dive guides, expands the ZK proof skill with concrete toolchain walkthroughs, and updates the site build/indexing scripts so the new multi-file skills are correctly served and discoverable.
Changes:
- Split the Soroban skill into
SKILL.md(entry point) plusdevelopment.md,testing.md, andsecurity.md, while rebranding prose to “Stellar smart contracts”. - Expanded
skills/zk-proofs/SKILL.mdwith a capability matrix and step-by-step Circom/Noir/RISC Zero integration guidance. - Updated site scripts to mirror whole skill directories to
public/and to index companion markdown files inllms.txt, plus UI filter rename “Soroban” → “Smart Contracts”.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| skills/zk-proofs/SKILL.md | Adds availability matrix + concrete proving toolchain walkthroughs and patterns. |
| skills/standards/SKILL.md | Updates headings/links and rebrands ecosystem/tool descriptions. |
| skills/soroban/SKILL.md | Slim entry point + routing to new companion guides; rebranding. |
| skills/soroban/development.md | New: storage/auth/events/errors/upgrades/factories/troubleshooting deep dive. |
| skills/soroban/testing.md | New: layered testing guidance (unit → fork/mutation) and examples. |
| skills/soroban/security.md | New: threat model + vulnerability classes + checklists/tooling. |
| skills/data/SKILL.md | Rebrands Soroban references to smart contracts in the data/RPC skill. |
| skills/dapp/SKILL.md | Rebrands client “Soroban invocation” wording to smart contract invocation. |
| skills/assets/SKILL.md | Rebrands SAC/Soroban terminology to smart-contract/SEP-41 terminology. |
| skills/agentic-payments/SKILL.md | Rebrands Soroban SAC terminology to SAC / smart contract language. |
| site/src/data/skills.ts | Renames category/filter from “Soroban” to “Smart Contracts” for the UI. |
| site/scripts/copy-skills.mjs | Copies full skill directories into public/ so companion files are served. |
| site/scripts/generate-llms-txt.mjs | Adds nested llms.txt entries for companion markdown files. |
| site/CLAUDE.md | Updates contribution guidance to use “Smart Contracts” category name. |
| README.md | Updates repo overview and examples to “Stellar smart contracts”. |
| .claude-plugin/plugin.json | Updates plugin description to “smart contracts (Rust, soroban-sdk)”. |
| .claude-plugin/marketplace.json | Updates marketplace listing description wording. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| #[test] | ||
| fn test_with_auth() { | ||
| fn test_increment() { | ||
| let env = Env::default(); | ||
|
|
||
| // Mock all authorizations automatically | ||
| env.mock_all_auths(); | ||
|
|
||
| let contract_id = env.register(TokenContract, ()); | ||
| let client = TokenContractClient::new(&env, &contract_id); | ||
|
|
||
| let admin = Address::generate(&env); | ||
| let user1 = Address::generate(&env); | ||
| let user2 = Address::generate(&env); | ||
|
|
||
| // Initialize and mint | ||
| client.initialize(&admin); | ||
| client.mint(&user1, &1000); | ||
|
|
||
| // Transfer (requires auth from user1) | ||
| client.transfer(&user1, &user2, &100); | ||
|
|
||
| assert_eq!(client.balance(&user1), 900); | ||
| assert_eq!(client.balance(&user2), 100); | ||
|
|
||
| // Verify which auths were required | ||
| let auths = env.auths(); | ||
| assert_eq!(auths.len(), 1); | ||
| // auths[0] contains (address, contract_id, function, args) | ||
| } | ||
| ``` | ||
|
|
||
| ### Testing with Specific Auth Requirements | ||
|
|
||
| ```rust | ||
| #[test] | ||
| fn test_specific_auth() { | ||
| let env = Env::default(); | ||
| let contract_id = env.register(Contract, ()); | ||
| let client = ContractClient::new(&env, &contract_id); | ||
|
|
||
| let user = Address::generate(&env); | ||
|
|
||
| // Mock auth only for specific address | ||
| env.mock_auths(&[MockAuth { | ||
| address: &user, | ||
| invoke: &MockAuthInvoke { | ||
| contract: &contract_id, | ||
| fn_name: "transfer", | ||
| args: (&user, &other, &100i128).into_val(&env), | ||
| sub_invokes: &[], | ||
| }, | ||
| }]); | ||
| let contract_id = env.register(CounterContract, (admin.clone(),)); | ||
| let client = CounterContractClient::new(&env, &contract_id); | ||
|
|
||
| client.transfer(&user, &other, &100); | ||
| assert_eq!(client.increment(), 1); | ||
| assert_eq!(client.get_count(), 1); |
| // Copy the whole skill directory, not just the SKILL.md: skills may | ||
| // split deep-dive content into companion files (e.g. | ||
| // skills/soroban/development.md) referenced by relative links, and | ||
| // those must be served at the same paths. | ||
| mkdirSync(dirname(dest), { recursive: true }); | ||
| cpSync(src, dest, { dereference: false }); | ||
| cpSync(dirname(src), dirname(dest), { recursive: true, dereference: false }); | ||
| } |
There was a problem hiding this comment.
Fixed in the latest commit. isFresh now uses a newestMtimeInDir helper that recursively scans the skill directory and compares the newest mtime across all files (src vs dest), so edits to companion files like testing.md will correctly invalidate the cached check and trigger a re-copy during pnpm dev.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
ElliotFriend
left a comment
There was a problem hiding this comment.
couple small nitpicks, and one note you can choose what to do with. looks great!
| - Complex transfer logic (royalties, fees, restrictions) | ||
| - Custom authorization schemes | ||
| - Non-standard token behaviors | ||
| - Integration with custom DeFi contracts | ||
| - NFTs or semi-fungible tokens |
There was a problem hiding this comment.
i might tend to "soften" this list a little bit. in general, the guidance has been to use custom contract tokens (open zeppelin, or other) as a bit of a "last resort." you can achieve a lot of these same features (royalties, for example) with an "SAC Admin" contract that can invoke the mint, burn, etc. functions of the SAC, without giving up the "ecosystem compatibility" that comes with a regular, issued Asset.
that might be more my opinion, though. you can take it or leave it.
There was a problem hiding this comment.
maybe a dumb question: why leave the directory as skills/soroban? a lot of this PR looks like it's removing references to "Soroban" and replacing with something like "Stellar smart contracts." would it make sense to rename this directory to something like skills/smart-contracts?
|
|
||
| ## Unit testing | ||
|
|
||
| #![cfg(test)] |
There was a problem hiding this comment.
| #![cfg(test)] | |
| ```rust | |
| #![cfg(test)] |
|
|
||
| ```bash | ||
| stellar contract invoke --id CONTRACT_ID --source alice --network testnet \ | ||
| --sim-only -- function_name --arg value |
There was a problem hiding this comment.
--sim-only has been deprecated. replace with --send=no
|
hey @kaankacar! I noticed that after the rename, the "Stellar Smart Contracts" skill no longer appears under the "Smart Contracts" tag filter, just the "All" filter. Can you fix that? |
Part of #27 (items 2–5 of the feedback list).
skills/soroban/SKILL.md(2,578 lines) into a slim entry point plusdevelopment.md,testing.md, andsecurity.md(886 lines total)zk-proofswith a curve/proof-system support matrix and concrete walkthroughs: Circom (on-chain verifiable today via BLS12-381 + the officialgroth16_verifierexample), Noir and RISC Zero (attestation pattern until CAP-0074 lands)copy-skills.mjsnow mirrors whole skill directories so the companion files are served on skills.stellar.org,llms.txtindexes them as nested entries, and the "Soroban" filter tab is now "Smart Contracts"pnpm lint,pnpm lint:ts, andpnpm buildall pass.