Skip to content

Conversation

@ScotTFO
Copy link

@ScotTFO ScotTFO commented Jan 26, 2026

Summary

Adds a repoUrl field to the skills table so published skills can link back to their GitHub repo (or any repository).

Changes

Schema (convex/schema.ts)

  • Added repoUrl: v.optional(v.string()) to the skills table

Backend (convex/skills.ts)

  • On publish (create): extracts homepage, repository, or repo from YAML frontmatter → saves as repoUrl
  • On publish (update): same extraction, falls back to existing repoUrl if frontmatter doesn't include one
  • Priority order: homepage > repository > repo

Frontend (src/components/SkillDetailPage.tsx)

  • Displays a clickable link in the skill hero section when repoUrl is present
  • GitHub-aware label: shows "🔗 GitHub" for github.com URLs, "🔗 Repository" otherwise
  • Opens in new tab with noopener noreferrer

How it works

Skill authors already include homepage in their SKILL.md YAML frontmatter:

---
name: my-skill
description: Does cool stuff
homepage: https://github.com/user/my-skill
---

This PR reads that field during publish and persists it on the skill record, then displays it on the detail page. Existing skills will get their repoUrl populated on their next publish.

No migration needed

The field is v.optional(v.string()), so existing skills simply show no link until they republish.

- Add repoUrl (optional string) to skills schema
- Populate from frontmatter homepage/repository/repo on publish (create + update)
- Display as clickable link on SkillDetailPage (GitHub-aware label)
- Existing skills get populated on next publish
@vercel
Copy link
Contributor

vercel bot commented Jan 26, 2026

@ScotTFO is attempting to deploy a commit to the Amantus Machina Team on Vercel.

A member of the Team first needs to authorize it.

@ScotTFO ScotTFO marked this pull request as draft January 26, 2026 07:32
- Add parseGitHubRepoUrl() that validates against https://github.com/owner/repo pattern
- Non-GitHub URLs are silently ignored (repoUrl stays undefined)
- Simplify UI label to always show '🔗 GitHub' since only GitHub URLs are accepted
@ScotTFO ScotTFO marked this pull request as ready for review January 26, 2026 07:40
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.

1 participant