Fix example code bugs, stale link labels, and duplicated reference content#41
Open
oceans404 wants to merge 2 commits into
Open
Fix example code bugs, stale link labels, and duplicated reference content#41oceans404 wants to merge 2 commits into
oceans404 wants to merge 2 commits into
Conversation
…ntent across six skills
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Stellar “skills” documentation set to ensure example snippets work when copied verbatim, correct stale link labels, and reduce duplicated reference content that can drift over time.
Changes:
- Fixes example code snippets to avoid eager env-var reads and adds missing imports so snippets compile/run as written.
- Replaces misleading placeholder code blocks with concise prose + authoritative SEP links, and adds draft-status notes where appropriate.
- Deduplicates repeated “reference catalog” content in the standards skill by linking to canonical sections elsewhere and correcting a few internal pointers/labels.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| skills/standards/SKILL.md | Collapses duplicated catalogs/sections into pointers to canonical docs; fixes internal “above/below” references and link labels. |
| skills/smart-contracts/testing.md | Adds missing IntoVal import so the auth-mocking example compiles when copied. |
| skills/smart-contracts/development.md | Adds missing symbol_short and vec imports so the data-types snippet compiles when copied. |
| skills/data/SKILL.md | Makes network config snippet lazy per-network and adds an unknown-network guard; updates stale link label. |
| skills/dapp/SKILL.md | Makes network config resolution lazy with an unknown-network guard; adds missing config import for SendPayment; updates stale link label. |
| skills/assets/SKILL.md | Replaces placeholder TS code blocks with prose + SEP links; marks SEP-45/50 as draft status. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+92
to
+97
| return { | ||
| horizonUrl: "https://horizon-testnet.stellar.org", | ||
| rpcUrl: "https://soroban-testnet.stellar.org", | ||
| networkPassphrase: StellarSdk.Networks.TESTNET, | ||
| friendbotUrl: "https://friendbot.stellar.org" as string | null, | ||
| }; |
Comment on lines
+318
to
+321
| Usage details, detector lists, and workflow guidance live in [the smart contract security guide](../smart-contracts/security.md#tooling). Catalog: | ||
|
|
||
| - [Scout Soroban](https://github.com/CoinFabrik/scout-soroban) (CoinFabrik) - static analysis, 23 detectors, VSCode extension, SARIF output ([examples](https://github.com/CoinFabrik/scout-soroban-examples)) | ||
| - [Security Detectors SDK](https://github.com/OpenZeppelin/soroban-security-detectors-sdk) (OpenZeppelin) - pre-built detectors plus a framework for custom ones |
| mainnet: { | ||
| // Lazy per-network factories: requireEnv only runs for the selected network, | ||
| // so testnet/local work without the mainnet env var set. | ||
| const configs: Record<string, () => NetworkConfig> = { |
This was referenced Jul 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fixes from a full Fable audit of the seven skills. Three categories: example code that fails when copied verbatim, stale link labels, and duplicated reference content that drifts out of sync.
Example code fixes
dapp
SendPaymentusedconfig.networkPassphrasewithout importingconfig, so copying it fails at runtime. Added the import.lib/stellar.tsconfig example eagerly calledrequireEnv("NEXT_PUBLIC_STELLAR_MAINNET_RPC_URL")even when running testnet, so the snippet crashes unless a mainnet var is set. Restructured to resolve config per selected network and throw on unknown network names instead of silently returningundefined.data
requireEnvproblem in the network config example. Converted to lazy per-network factories with an unknown-network guard.smart-contracts
development.md: the data-types example usedsymbol_short!andvec!without importing them. Added both to the import line.testing.md: the auth-mocking example calls.into_val(&env)without theIntoValtrait in scope, so it fails to compile when copied. Added the import.Content fixes
assets
standards
smart-contracts/security.md, standards Part 2, and standards Part 3.security.mdis now canonical; Part 2 keeps a one-line-per-tool catalog with links, Part 3 keeps only the linkssecurity.mddoesn't cover (HackerOne VDP, audited projects list, Veridise checklist, report archives).All skills
api-rpc-horizon.md,frontend-stellar-sdk.md,zk-proofs.md). Targets were already correct; updated the labels.Why
These skills are consumed by AI agents that copy example code verbatim. The dapp and data snippets fail on first run for anyone on testnet, which is the default path. The duplicated tool listings drift when a tool's status changes, since three copies rarely get updated together.
Net diff: 6 files, +60/-130. No purpose, scope, or trigger changes to any skill; all descriptions unchanged.