fix: point ECOSYSTEM_CARDS copyValue at raw content, not GitHub's blob HTML page - #103
Open
Eras256 wants to merge 1 commit into
Open
fix: point ECOSYSTEM_CARDS copyValue at raw content, not GitHub's blob HTML page#103Eras256 wants to merge 1 commit into
Eras256 wants to merge 1 commit into
Conversation
…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
Contributor
There was a problem hiding this comment.
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/...copyValuelinks inECOSYSTEM_CARDSwithraw.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)); |
Contributor
|
🤖 Automated message from Kaan's Automated Triage Bot. 👀 Picked this up — a review will follow shortly. |
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.
Summary
site/README.md's own documented convention forECOSYSTEM_CARDSsayscopyValueshould "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 agithub.com/{owner}/{repo}/blob/{branch}/{path}URL, which servescontent-type: text/html(GitHub's rendered page, starts with<!DOCTYPE html>), not the markdown itself.This reaches the actual agent-facing artifact, not just the source.
generate-llms-txt.mjswritescopyValuestraight intopublic/llms.txt's "Community Built" section with no transform, and the deployed file confirms it in production:For contrast, this repo's own first-party skills (
SKILL_CARD_SOURCES) correctly serve raw content:Root cause:
site/README.md's owncopyValueexample uses a blob URL, directly beneath the prose telling contributors to use raw content: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
site/src/data/skills.ts: all 27 GitHub-hostedcopyValueentries rewritten fromgithub.com/.../blob/...toraw.githubusercontent.com/.... The one non-GitHub entry (stellarlight.xyz) is untouched. Every rewritten URL verified live: 200,content-type: text/plain.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.site/scripts/check-ecosystem-links.mjs(new): a static check, no network calls, failing CI if any future entry reintroduces ablobURL. Wired in aspnpm check:ecosystem-links, added to bothdeploy-pages.ymlandpreview-pr.ymlright after the existinglint:tsstep.Test plan
pnpm lintpassespnpm lint:tspassespnpm check:ecosystem-linkspasses (28 entries checked, 0 blob URLs)pnpm buildsucceeds; builtout/llms.txt's Community Built section has 0github.com/.../blob/links and 27raw.githubusercontent.comlinksraw.githubusercontent.comURLs independently verified live (200,text/plain) before committing🤖 Generated with Claude Code