Skip to content

Fix example code bugs, stale link labels, and duplicated reference content#41

Open
oceans404 wants to merge 2 commits into
stellar:mainfrom
oceans404:fix/skill-audit-example-code-and-dedup
Open

Fix example code bugs, stale link labels, and duplicated reference content#41
oceans404 wants to merge 2 commits into
stellar:mainfrom
oceans404:fix/skill-audit-example-code-and-dedup

Conversation

@oceans404

@oceans404 oceans404 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

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

  • SendPayment used config.networkPassphrase without importing config, so copying it fails at runtime. Added the import.
  • The lib/stellar.ts config example eagerly called requireEnv("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 returning undefined.

data

  • Same eager requireEnv problem in the network config example. Converted to lazy per-network factories with an unknown-network guard.

smart-contracts

  • development.md: the data-types example used symbol_short! and vec! without importing them. Added both to the import line.
  • testing.md: the auth-mocking example calls .into_val(&env) without the IntoVal trait in scope, so it fails to compile when copied. Added the import.

Content fixes

assets

  • SEP-10 and SEP-24 sections had TypeScript code blocks containing only placeholder comments, which read as runnable code. Converted to one-sentence prose with links to the SEP specs.
  • Added Draft status notes to SEP-45 and SEP-50, matching the labels in the standards skill.

standards

  • Part 3 pointed readers to "Part 2: Stellar Ecosystem below" when Part 2 is above. Corrected.
  • Deduplicated reference content that was listed two or three times:
    • Security tooling (Scout, OZ Security Detectors SDK, Certora Sunbeam, Komet) appeared in smart-contracts/security.md, standards Part 2, and standards Part 3. security.md is now canonical; Part 2 keeps a one-line-per-tool catalog with links, Part 3 keeps only the links security.md doesn't cover (HackerOne VDP, audited projects list, Veridise checklist, report archives).
    • Part 3 sections that fully duplicated Part 2 (Example Repositories, Data Indexers, Infrastructure anchors/disbursements, Project Directories & Funding) are collapsed into pointers, following the pointer pattern Part 3 already used for Ecosystem Projects and Builder Teams. Unique links (RPC provider list, Adoption Fund) were kept.

All skills

  • Link labels still referenced pre-restructure filenames (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.

Copilot AI review requested due to automatic review settings July 6, 2026 19:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 thread skills/dapp/SKILL.md
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 thread skills/standards/SKILL.md
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
Comment thread skills/data/SKILL.md
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> = {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants