[PR #38] feat: add repoUrl field to skills for GitHub/repository links #225

Open
opened 2026-02-15 17:16:22 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/openclaw/clawhub/pull/38
Author: @ScotTFO
Created: 1/26/2026
Status: 🔄 Open

Base: mainHead: feat/skill-repo-url


📝 Commits (2)

  • 1e6d9ca feat: add repoUrl field to skills for GitHub/repository links
  • 3c4316a validate repoUrl: only accept GitHub repo URLs

📊 Changes

3 files changed (+39 additions, -0 deletions)

View changed files

📝 convex/schema.ts (+1 -0)
📝 convex/skills.ts (+31 -0)
📝 src/components/SkillDetailPage.tsx (+7 -0)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/openclaw/clawhub/pull/38 **Author:** [@ScotTFO](https://github.com/ScotTFO) **Created:** 1/26/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/skill-repo-url` --- ### 📝 Commits (2) - [`1e6d9ca`](https://github.com/openclaw/clawhub/commit/1e6d9cab7ee27540f1fde671eed15293d8dfa5eb) feat: add repoUrl field to skills for GitHub/repository links - [`3c4316a`](https://github.com/openclaw/clawhub/commit/3c4316a58f298e03c3974f020ce4fc118722340b) validate repoUrl: only accept GitHub repo URLs ### 📊 Changes **3 files changed** (+39 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `convex/schema.ts` (+1 -0) 📝 `convex/skills.ts` (+31 -0) 📝 `src/components/SkillDetailPage.tsx` (+7 -0) </details> ### 📄 Description ## 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: ```yaml --- 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-15 17:16:22 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: openclaw/clawhub#225