Add a Submit a skill entry to the Skills page (#470)

The Skills page intro gets a Submit a skill link, like the template
library's Submit video. It opens the new CONTRIBUTING.md section with a
paste-ready Agent brief for contributing a library skill as a draft PR.

Co-authored-by: zhanghuihua <zhanghuihua@huihuideMacBook-Pro.local>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
huihui-crypto
2026-11-16 21:42:13 +08:00
committed by GitHub
parent 931e86da18
commit 556bfb67d6
5 changed files with 65 additions and 12 deletions

View File

@@ -43,6 +43,29 @@ brief that also identifies the selected template; **Recreate template** copies o
the recreation brief. Paste either into your Agent to continue. These controls do
not upload media or create a pull request by themselves.
### Submit a skill with your Agent
Have a local folder with a `SKILL.md`, or a public repository with one? Share it with your Agent and paste this brief:
```text
Contribute the Agent skill I provide (a local SKILL.md folder or a public GitHub
repository) to OpenMotion. Read https://github.com/nexu-io/openmotion/blob/main/CONTRIBUTING.md
and library/ENTRY_TEMPLATE.md first. Confirm that I wrote the skill or that its
license allows redistribution; record the author, original URL or version and the
licenses of its code and media, and stop to ask me if any of this is unclear.
Fork nexu-io/openmotion and branch from the latest main. Put the skill at
library/skills/<name>/SKILL.md with name and description frontmatter, a clear
trigger, steps and a real usage example; keep its references and scripts in the
same folder and add a README.md from the entry checklist. Link the entry from the
Skills row of library/README.md. Do not change skills/, Studio, the MCP registry or
the distribution file list. Open a draft pull request against nexu-io/openmotion
with an English title and description that state the source and license, then send
me the link. Do not merge or publish anything.
```
Studio's **Submit a skill** button on the Skills page opens this section. It does not
upload files or create a pull request by itself.
Work from the repository root; read [AGENTS.md](AGENTS.md) and the [architecture](docs/product/architecture.md). Use the pinned CI Node version. Keep `package-lock.json` and `scripts/runtime-lock.json` in sync with any intentional dependency change.
Before opening a PR, follow the [local validation guidance](AGENTS.md#local-validation) and report the checks you actually ran. Studio unit tests use `npm run test:studio`. Model creation and visual acceptance require separate evidence. Do not overwrite real user data or host configuration to test an installer.

View File

@@ -181,7 +181,8 @@
"When to use": "什么时候用",
"Remove the AI look": "去 AI 味",
"Pick a skill, fill in the brief and copy the instruction. Your Agent builds an editable project in OpenMotion.": "挑一个 Skill,填好需求、复制指令,Agent 会通过 OpenMotion 做出可继续编辑的项目。",
"Cover source": "封面来源"
"Cover source": "封面来源",
"Submit a skill": "提交 Skill"
},
"ja": {
"Skills": "Skills",
@@ -365,7 +366,8 @@
"When to use": "使いどき",
"Remove the AI look": "AI っぽさを消す",
"Pick a skill, fill in the brief and copy the instruction. Your Agent builds an editable project in OpenMotion.": "Skill を選び、要件を入力して指示をコピーしましょう。Agent が OpenMotion で編集可能なプロジェクトを作成します。",
"Cover source": "カバーの出典"
"Cover source": "カバーの出典",
"Submit a skill": "Skill を投稿"
},
"ko": {
"Skills": "Skills",
@@ -549,7 +551,8 @@
"When to use": "이럴 때 사용",
"Remove the AI look": "AI 티 없애기",
"Pick a skill, fill in the brief and copy the instruction. Your Agent builds an editable project in OpenMotion.": "Skill을 고르고 요구 사항을 입력한 뒤 지침을 복사하세요. Agent가 OpenMotion에서 편집 가능한 프로젝트를 만듭니다.",
"Cover source": "커버 출처"
"Cover source": "커버 출처",
"Submit a skill": "Skill 제출"
},
"ru": {
"Skills": "Skills",
@@ -733,7 +736,8 @@
"When to use": "Когда использовать",
"Remove the AI look": "Убрать AI-шаблонность",
"Pick a skill, fill in the brief and copy the instruction. Your Agent builds an editable project in OpenMotion.": "Выберите Skill, заполните задачу и скопируйте инструкцию. Agent создаст в OpenMotion проект, который можно редактировать.",
"Cover source": "Источник обложки"
"Cover source": "Источник обложки",
"Submit a skill": "Отправить Skill"
},
"de": {
"Skills": "Skills",
@@ -917,7 +921,8 @@
"When to use": "Wann verwenden",
"Remove the AI look": "KI-Look entfernen",
"Pick a skill, fill in the brief and copy the instruction. Your Agent builds an editable project in OpenMotion.": "Wähle einen Skill, fülle die Anforderungen aus und kopiere die Anweisung. Dein Agent erstellt ein bearbeitbares Projekt in OpenMotion.",
"Cover source": "Quelle des Covers"
"Cover source": "Quelle des Covers",
"Submit a skill": "Skill einreichen"
},
"fr": {
"Skills": "Skills",
@@ -1101,7 +1106,8 @@
"When to use": "Quand l’utiliser",
"Remove the AI look": "Retirer l’effet IA",
"Pick a skill, fill in the brief and copy the instruction. Your Agent builds an editable project in OpenMotion.": "Choisissez un Skill, remplissez la demande et copiez les instructions. Votre Agent crée un projet modifiable dans OpenMotion.",
"Cover source": "Source de la couverture"
"Cover source": "Source de la couverture",
"Submit a skill": "Proposer un Skill"
},
"es": {
"Skills": "Skills",
@@ -1285,7 +1291,8 @@
"When to use": "Cuándo usarlo",
"Remove the AI look": "Quitar el aspecto de IA",
"Pick a skill, fill in the brief and copy the instruction. Your Agent builds an editable project in OpenMotion.": "Elige un Skill, completa los requisitos y copia las instrucciones. Tu Agent crea un proyecto editable en OpenMotion.",
"Cover source": "Origen de la portada"
"Cover source": "Origen de la portada",
"Submit a skill": "Enviar Skill"
},
"pt-BR": {
"Skills": "Skills",
@@ -1469,7 +1476,8 @@
"When to use": "Quando usar",
"Remove the AI look": "Tirar a cara de IA",
"Pick a skill, fill in the brief and copy the instruction. Your Agent builds an editable project in OpenMotion.": "Escolha uma Skill, preencha o briefing e copie a instrução. Seu Agent cria um projeto editável no OpenMotion.",
"Cover source": "Origem da capa"
"Cover source": "Origem da capa",
"Submit a skill": "Enviar Skill"
},
"it": {
"Skills": "Skill",
@@ -1653,7 +1661,8 @@
"When to use": "Quando usarla",
"Remove the AI look": "Togliere l’effetto AI",
"Pick a skill, fill in the brief and copy the instruction. Your Agent builds an editable project in OpenMotion.": "Scegli una Skill, compila il brief e copia le istruzioni. Il tuo Agent crea un progetto modificabile in OpenMotion.",
"Cover source": "Fonte della copertina"
"Cover source": "Fonte della copertina",
"Submit a skill": "Invia una Skill"
},
"tr": {
"Skills": "Skill’ler",
@@ -1837,6 +1846,7 @@
"When to use": "Ne zaman kullanılır",
"Remove the AI look": "AI görünümünü kaldır",
"Pick a skill, fill in the brief and copy the instruction. Your Agent builds an editable project in OpenMotion.": "Bir Skill seç, brief’i doldur ve talimatı kopyala. Agent’ın OpenMotion’da düzenlenebilir bir proje oluşturur.",
"Cover source": "Kapak kaynağı"
"Cover source": "Kapak kaynağı",
"Submit a skill": "Skill gönder"
}
}

View File

@@ -2,7 +2,7 @@
import { act, useState } from 'react';
import { createRoot, type Root } from 'react-dom/client';
import { afterEach, beforeEach, expect, it, vi } from 'vitest';
import { SkillsPage } from './SkillsPage';
import { SkillsPage, skillSubmissionUrl } from './SkillsPage';
import { motionSkills, skillPrompt } from './skillCatalog';
import { readWorkspacePage, workspacePageHref } from './workspacePageRouting';
import { isWorkspaceSettingsPage } from '../../../shared/workspace-url';
@@ -182,3 +182,16 @@ it('ignores a late copy failure after the brief has changed', async () => {
expect(instruction.textContent).toContain('Duration: 30s');
expect(instruction.dataset.manual).toBe('false');
});
it('opens the contribution guide section for submitting a skill, like the template library', async () => {
act(() => root.render(<Host />));
const link = [...container.querySelectorAll<HTMLAnchorElement>('.om-skills-intro a')].find(node => node.textContent?.includes('Submit a skill'))!;
expect(link.href).toBe(skillSubmissionUrl);
expect(link.target).toBe('_blank');
const { default: guide } = await import('../../../CONTRIBUTING.md?raw');
const section = guide.slice(guide.indexOf('### Submit a skill with your Agent'));
expect(skillSubmissionUrl.endsWith('#submit-a-skill-with-your-agent')).toBe(true);
expect(section).toContain('library/skills/<name>/SKILL.md');
expect(section).toContain('nexu-io/openmotion');
expect(section).toContain('draft pull request');
});

View File

@@ -12,6 +12,9 @@ import { setupGuideUrl, type IntegrationInfo } from '../../../shared/integration
import { Popover } from '../components/ui/Popover';
import './skills.css';
/** The contribution guide section with the paste-ready Agent brief for a new library Skill. */
export const skillSubmissionUrl = 'https://github.com/nexu-io/openmotion/blob/main/CONTRIBUTING.md#submit-a-skill-with-your-agent';
/** Cards lead with the task, like the template library; the upstream project name stays verbatim as the source. */
const displayNameOf = (t: (text: string) => string) => (skill: MotionSkill) => t(skill.title);
@@ -79,7 +82,10 @@ export function SkillsPage({ skillId, onSkillChange }: { skillId: string | null;
</div>
</div>
<main className={styles.results}>
<section className={`${styles.intro} om-skills-intro`}><span className={styles.eyebrow}>{t('Pick a skill. Let your Agent make it.')}</span><h1>{t('Teach your Agent new moves.')}</h1><p>{t('Pick a skill, fill in the brief and copy the instruction. Your Agent builds an editable project in OpenMotion.')}</p></section>
<section className={`${styles.intro} om-skills-intro`}><span className={styles.eyebrow}>{t('Pick a skill. Let your Agent make it.')}</span><h1>{t('Teach your Agent new moves.')}</h1><p>{t('Pick a skill, fill in the brief and copy the instruction. Your Agent builds an editable project in OpenMotion.')}</p>
{/* Same as the template library's Submit video: open the contribution guide, whose Agent brief does the packaging and the pull request. */}
<div className={styles.introActions}><a className={styles.submitVideo} href={skillSubmissionUrl} target="_blank" rel="noopener noreferrer">{t('Submit a skill')}<MotionIcon name="arrow-up-right" size={15} /></a></div>
</section>
<div className={`${styles.grid} om-skills-grid`}>
{visible.map(skill => <SkillCard key={skill.id} skill={skill} name={displayName(skill)} useWhen={t(skill.useWhen)} category={t(skill.category)} selected={skill.id === skillId} onSelect={() => open(skill)} />)}
</div>

View File

@@ -125,3 +125,4 @@
.om-skills-intro.om-skills-intro { min-height: 0; max-width: 640px; padding: var(--motion-space-8) 0 var(--motion-space-24); }
.om-skills-intro.om-skills-intro h1 { max-width: none; }
.om-skills-intro.om-skills-intro p { max-width: 560px; margin-bottom: 0; }
.om-skills-intro.om-skills-intro > div { margin-top: var(--motion-space-16); }