Skip to content

fix: point ECOSYSTEM_CARDS copyValue at raw content, not GitHub's blob HTML page - #103

Open
Eras256 wants to merge 1 commit into
stellar:mainfrom
Eras256:fix-ecosystem-cards-blob-urls
Open

fix: point ECOSYSTEM_CARDS copyValue at raw content, not GitHub's blob HTML page#103
Eras256 wants to merge 1 commit into
stellar:mainfrom
Eras256:fix-ecosystem-cards-blob-urls

Conversation

@Eras256

@Eras256 Eras256 commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Summary

site/README.md's own documented convention for ECOSYSTEM_CARDS says copyValue should "point it directly at the raw SKILL.md so an agent can fetch it." Checked every current entry against that, not just the prose: 27 of 28 used a github.com/{owner}/{repo}/blob/{branch}/{path} URL, which serves content-type: text/html (GitHub's rendered page, starts with <!DOCTYPE html>), not the markdown itself.

$ curl -sI -L "https://github.com/OpenZeppelin/openzeppelin-skills/blob/main/skills/setup-stellar-contracts/SKILL.md" | grep -i content-type
content-type: text/html; charset=utf-8

This reaches the actual agent-facing artifact, not just the source. generate-llms-txt.mjs writes copyValue straight into public/llms.txt's "Community Built" section with no transform, and the deployed file confirms it in production:

$ curl -s https://skills.stellar.org/llms.txt | grep -c 'github.com.*blob'
27

For contrast, this repo's own first-party skills (SKILL_CARD_SOURCES) correctly serve raw content:

$ curl -sI https://skills.stellar.org/skills/smart-contracts/SKILL.md | grep -i content-type
content-type: text/markdown; charset=utf-8

Root cause: site/README.md's own copyValue example uses a blob URL, directly beneath the prose telling contributors to use raw content:

copyValue: "https://github.com/owner/repo/blob/main/path/to/SKILL.md",

copyValue is the full URL written to the clipboard when the user clicks the pill — point it directly at the raw SKILL.md so an agent can fetch it.

That likely explains the 27/28 hit rate: contributors most likely copied the literal example, which was wrong, rather than independently ignoring the rule written next to it.

Not a crash, not a security issue: most modern web-fetch tools handle GitHub's HTML fine via readability-style extraction, and the human-facing card UI is unaffected (a person clicking through gets GitHub's normal, fine rendered view). But it's a 100%-of-affected-entries deviation from the file's own stated purpose, worth fixing at the root rather than spot-fixing.

Changes

  1. site/src/data/skills.ts: all 27 GitHub-hosted copyValue entries rewritten from github.com/.../blob/... to raw.githubusercontent.com/.... The one non-GitHub entry (stellarlight.xyz) is untouched. Every rewritten URL verified live: 200, content-type: text/plain.
  2. site/README.md: fixed the example to match the prose, plus a note explaining why the distinction matters, so a future contributor following the doc gets it right.
  3. site/scripts/check-ecosystem-links.mjs (new): a static check, no network calls, failing CI if any future entry reintroduces a blob URL. Wired in as pnpm check:ecosystem-links, added to both deploy-pages.yml and preview-pr.yml right after the existing lint:ts step.

Test plan

  • pnpm lint passes
  • pnpm lint:ts passes
  • pnpm check:ecosystem-links passes (28 entries checked, 0 blob URLs)
  • Sanity-checked the new check script actually fails: reintroduced one blob URL in a throwaway copy, confirmed non-zero exit and correct offending-entry output, then reverted
  • pnpm build succeeds; built out/llms.txt's Community Built section has 0 github.com/.../blob/ links and 27 raw.githubusercontent.com links
  • All 27 new raw.githubusercontent.com URLs independently verified live (200, text/plain) before committing

🤖 Generated with Claude Code

…b HTML page

copyValue is written directly into public/llms.txt's "Community Built"
section and is the exact string an agent fetches to install a
community skill, so it needs to resolve to markdown. All 27
GitHub-hosted entries used github.com/.../blob/... instead, which
serves content-type: text/html (GitHub's rendered page), not the
SKILL.md content itself. Verified live against skills.stellar.org/llms.txt
before fixing: 27 of 28 Community Built links were blob URLs.

Root cause: site/README.md's own copyValue example used a blob URL,
directly under prose telling contributors to point at raw content.
Every affected entry likely copied the example literally rather than
ignoring the written rule next to it. Fixed the example alongside the
27 entries so the mistake doesn't recur for the next contributor who
follows the doc.

Adds check:ecosystem-links, a static check (no network calls) that
fails CI if a future ECOSYSTEM_CARDS entry reintroduces a blob URL,
wired into both deploy-pages.yml and preview-pr.yml right after the
existing lint:ts step.

Verified: all 27 rewritten raw.githubusercontent.com URLs return 200
+ content-type: text/plain live; pnpm lint, lint:ts, check:ecosystem-links,
and build all pass locally; the built out/llms.txt contains zero
blob URLs and 27 raw.githubusercontent.com URLs.

🤖 Generated with Claude Code
Copilot AI balanced review requested due to automatic review settings August 16, 2026 23:02

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

Note

Copilot was unable to run its full agentic suite in this review.

Updates ecosystem copyValue URLs to point to raw Markdown (instead of GitHub’s HTML blob viewer) and adds a CI guard to prevent regressions.

Changes:

  • Replaced github.com/.../blob/... copyValue links in ECOSYSTEM_CARDS with raw.githubusercontent.com/... equivalents.
  • Added a static validation script and wired it into package scripts + GitHub Actions.
  • Updated README guidance to use raw URLs and explain why.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
site/src/data/skills.ts Switches ecosystem copyValue links from blob-viewer URLs to raw content URLs.
site/scripts/check-ecosystem-links.mjs Adds a static check to fail CI if any copyValue uses github.com/.../blob/....
site/package.json Adds pnpm check:ecosystem-links script to run the new checker.
site/README.md Updates contributor instructions/examples to use raw.githubusercontent.com URLs.
.github/workflows/preview-pr.yml Runs the new link checker in PR preview workflow.
.github/workflows/deploy-pages.yml Runs the new link checker in deploy workflow.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +16 to +18
const BLOB_PATTERN = /^https:\/\/github\.com\/[^/]+\/[^/]+\/blob\//;

const offenders = ECOSYSTEM_CARDS.filter((c) => BLOB_PATTERN.test(c.copyValue));
@kaankacar

Copy link
Copy Markdown
Contributor

🤖 Automated message from Kaan's Automated Triage Bot.

👀 Picked this up — a review will follow shortly.

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.

3 participants