od-contribute
Original:🇺🇸 English
Translated
11 scriptsChecked / no sensitive code detected
One-click contribution flow for Open Design (nexu-io/open-design) — even for non-coders. Pick one of four cards (ship a Skill or Design System you made with OD; translate docs; fix a typo / write a blog; report a bug), the agent validates and opens a PR (or issue) for you. Trigger words contribute to open design, ship my OD skill, ship my OD design system, translate OD docs, report an OD bug, od-contribute.
4installs
Sourcenexu-io/open-design
Added on
NPX Install
npx skill4agent add nexu-io/open-design od-contributeTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →od-contribute — first-contribution flow for Open Design
Locked to . Branches by contribution type, not by issue. Replaces the dev-loop with type-specific no-code validators. Designed so a product user with zero coding background can ship a real PR.
nexu-io/open-designLanguage
Mirror the user's language in every user-facing message — labels and descriptions, status updates, error explanations. Detect from their first message; when uncertain, default to English.
AskUserQuestionGenerated artifacts (PR titles, commit messages, PR/issue body files, branch names) MUST be English regardless of the user's chat language. GitHub conventions, maintainer review, and search all assume English. The templates under are already English — keep them that way when rendering.
templates/Scripts live under . Source the shared helpers from any script:
scripts/bash
source "$(dirname "$0")/config.sh"SKILL_DIRSKILL.mdStep 1 — Prereq check (always first)
bash
bash "$SKILL_DIR/scripts/check-prereqs.sh"- Exit 0: capture from stdout. Default
GH_USER=<login>.TARGET_FORK="${GH_USER}/open-design" - Exit 2: surface the printed install / auth hint verbatim and stop. Do not attempt token workarounds.
If fails, ask the user (one ) whether to fork now via . Default to yes.
gh repo view "$TARGET_FORK"AskUserQuestiongh repo fork nexu-io/open-design --clone=falseStep 2 — Pick contribution type
Single (header: "Contribution", multiSelect: false), four options. Translate option labels/descriptions into the user's chat language; the branch routing is unchanged.
AskUserQuestion- 🎨 Ship something I made with OD — a Skill, Design System, HyperFrame, or template I want to contribute upstream → branch
3a - 🌍 Translate OD docs — README / QUICKSTART / CONTRIBUTING into a new language → branch
3b - 📝 Fix docs / write a blog / fix a typo — typo fix, dead link, use-case writeup → branch
3c - 🐛 Report a bug — something broke; I'll help turn it into a high-quality issue → branch (issue path, no PR)
3d
Each branch below is self-contained. Steps 7–8 (preview + push) are shared across branches //. Branch skips them entirely.
3a3b3c3dStep 3a — OD product submission (Skill / Design System)
3a.1 Ask user: "What's the local path to the artifact you want to ship?" (single free-text, translated into the user's chat language). Common: a folder path (Skill) or a single file (Design System).
DESIGN.md3a.2 Sniff type:
bash
# Skill: folder containing SKILL.md with frontmatter.
# Design System: file matching DESIGN.md anatomy.If ambiguous, ask the user to confirm.
3a.3 Run setup:
bash
bash "$SKILL_DIR/scripts/setup-workspace.sh" skill <slug>
# or
bash "$SKILL_DIR/scripts/setup-workspace.sh" design-system <slug><slug>od::slugifynameWORKDIR3a.4 Copy artifact into workspace at the right target dir:
- Skill →
$WORKDIR/skills/<slug>/ - Design System → (+ any sibling assets in the same folder)
$WORKDIR/design-systems/<brand-slug>/DESIGN.md
3a.5 Validate:
bash
bash "$SKILL_DIR/scripts/validate-skill-submission.sh" "$WORKDIR/skills/<slug>"
# or, with 1-2 reference DESIGN.md files passed in:
bash "$SKILL_DIR/scripts/validate-design-system.sh" \
"$WORKDIR/design-systems/<slug>/DESIGN.md" \
--reference "$WORKDIR/design-systems/airbnb/DESIGN.md" \
--reference "$WORKDIR/design-systems/apple/DESIGN.md"If validation fails, surface the FAIL lines verbatim, ask the user to fix, retry. Never push a failing artifact.
3a.6 Ask 3 short questions via (translate the labels into the user's chat language):
AskUserQuestion- "What name should we credit you under in the PR?" — free-text
- "One-line pitch for this Skill / Design System?" — free-text
- "Path to a screenshot (optional)?" — free-text
3a.7 Render (or ) with substitutions:
templates/PR-BODY-skill.mdPR-BODY-design-system.md- ,
{{SKILL_NAME}}(or{{SKILL_SLUG}},{{BRAND_NAME}}){{BRAND_SLUG}} - (the one-line)
{{PITCH}} - (free-text — agent can offer to draft this from the skill body, but user confirms)
{{MOTIVATION}} - (a prompt they recommend trying — agent suggests a default, user confirms)
{{TRY_PROMPT}} - (Markdown image block if a screenshot path was given, else empty)
{{SCREENSHOT_BLOCK}} - from
{{DISCORD_INVITE}}$OD_DISCORD_INVITE
Write to .
$WORKDIR/.od-contrib/PR-BODY.md→ Jump to Step 7.
Step 3b — i18n translation
3b.1 Setup workspace (slug = if known, else ):
translate-<doc>-<lang>translatebash
bash "$SKILL_DIR/scripts/setup-workspace.sh" i18n translate
# capture WORKDIR3b.2 Discover gaps:
bash
bash "$SKILL_DIR/scripts/discover-i18n-gaps.sh" "$WORKDIR" > /tmp/od-i18n-gaps.jsonEach line is JSON. Rank by:
- first (missing language is highest leverage)
status: "missing" - then ordered by
status: "stale"descenglish_commits_since_translation - README family before QUICKSTART before CONTRIBUTING
3b.3 Take the top 3–4 gaps and present via (header: "Translation target"). Each option label like: / . Translate the header text into the user's chat language but keep the option labels descriptive (the language names belong in their native script).
AskUserQuestionREADME → 한국어 (Korean)QUICKSTART (zh-CN) refresh — 12 commits behind3b.4 Once user picks, rename branch to be specific:
bash
git -C "$WORKDIR" branch -m "od-contrib/i18n/<doc>-<lang>-<date>"(or pre-set the slug in step 3b.1 if the user confirmed earlier.)
3b.5 Translate. Read the English source. Translate structure-preserving:
- Code blocks: leave untranslated
- Brand / product names: leave untranslated
- Filenames in inline code: leave untranslated
- Image / link targets: leave untranslated; if a localized version of a linked doc exists, swap the link to the localized file
- Headings: translate, keep the heading depth identical
- Tables: translate cell text only, keep alignment / pipes
Write the result to (e.g. ). Show user a unified diff vs. the English source for visual sanity-check (line-count delta within ±15% is a healthy signal).
$WORKDIR/<TRANSLATED_PATH>QUICKSTART.es.md3b.6 Validate the translated file against the English source. The flag tells the validator to ignore relative refs that were already broken in the source — OD docs frequently link to website route slugs (e.g. ) that aren't files on disk; we don't want a structure-preserving translation to fail because of pre-existing dead refs.
--referenceskills/blog-post/bash
bash "$SKILL_DIR/scripts/validate-markdown.sh" \
"$WORKDIR/<TRANSLATED_PATH>" \
--reference "$WORKDIR/<ENGLISH_PATH>"If FAIL → surface verbatim, fix, retry.
3b.7 Render with , , , , , , (one paragraph from the agent: anything tricky, untranslated terms it kept, etc.), .
templates/PR-BODY-i18n.md{{DOC_NAME}}{{LANG_DISPLAY_NAME}}{{LANG_CODE}}{{TRANSLATED_PATH}}{{ENGLISH_PATH}}{{STATUS}}{{TRANSLATION_NOTES}}{{DISCORD_INVITE}}→ Step 7.
Step 3c — Docs / blog / typo
3c.1 Setup workspace (slug ):
docsbash
bash "$SKILL_DIR/scripts/setup-workspace.sh" docs <slug>3c.2 Ask user (one ):
AskUserQuestion- Auto-discover small fixes (run discover-doc-gaps, pick something)
- I have a specific fix in mind (free-text)
- I want to write a blog / case study (free-text — what's the use case?)
3c.3 (Auto-discover branch) Run:
bash
bash "$SKILL_DIR/scripts/discover-doc-gaps.sh" "$WORKDIR" > /tmp/od-doc-gaps.jsonGroup by (typo / deadlink / todo). Show the user up to 6 candidates via . Once picked, apply the fix in code (typo: replace word; deadlink: ask user for the new URL; todo: that's a proper task, ask user to write the missing prose).
kindAskUserQuestion3c.4 (Specific-fix branch) Read the file, apply user's described change. Confirm via diff.
3c.5 (Blog branch) First check whether OD has a blog directory:
bash
ls "$WORKDIR/docs" 2>/dev/nullIf a or similar exists, place the new post there. If not, ask the user where it should live, defaulting to . Generate an outline → user fills in user-specific bits (their use case, screenshots, the prompt they used, the rendered output) → agent stitches into a final Markdown.
docs/blog/docs/<slug>.md3c.6 Validate every changed/added file. For files that already exist in the repo (typo fix, dead-link fix, doc edit), pass pointing at HEAD's version so we only fail on relative refs the user introduced, not on pre-existing route slugs:
--referencebash
# For modifications to existing files:
git -C "$WORKDIR" show "HEAD:<path>" > "/tmp/od-contrib-orig-<basename>" 2>/dev/null
bash "$SKILL_DIR/scripts/validate-markdown.sh" \
"$WORKDIR/<changed-path>" \
--reference "/tmp/od-contrib-orig-<basename>"
# For brand-new files (e.g. a blog post the user is creating from scratch),
# omit --reference. The validator will skip the relative-ref check entirely
# (since it can't tell route slugs from real paths in isolation).3c.7 Render with , , , .
templates/PR-BODY-docs.md{{ONE_LINE_SUMMARY}}{{DETAILS}}{{FILES_LIST}}{{DISCORD_INVITE}}→ Step 7.
Step 3d — Bug report (issue path, no PR)
3d.1 Read OD's actual schema at runtime to make sure we mirror it:
bash
gh api "repos/${TARGET_REPO}/contents/.github/ISSUE_TEMPLATE/bug-report.yml" --jq .content | base64 -d > /tmp/od-bug-report.ymlIf the schema has drifted from the template (), regenerate the body to match.
templates/ISSUE-BODY-bug.md3d.2 Ask the user via , one structured prompt per critical field. Use plain language, not the YAML field names:
AskUserQuestion| Bug-report field | Prompt to user |
|---|---|
| "What went wrong? One sentence is fine." |
| "How can I reproduce it? Walk me through step by step." |
| "What did you expect to happen?" |
| "Which OD version are you running? (About menu, or |
| dropdown: macOS (Apple Silicon) / macOS (Intel) / Windows / Linux / Other |
| "Any error logs you can paste? Skip if you don't have them." |
| "Path to a screenshot? Skip if you don't have one." |
Translate every prompt above into the user's chat language at runtime.
3d.3 Auto-collect what we can (these don't need to ask the user):
- OS family from
uname - Node version from if relevant
node -v
3d.4 Dedupe: extract 3–5 keywords from the description, run:
bash
gh search issues "<keywords>" --repo "$TARGET_REPO" --state open --limit 5 --json number,title,urlIf matches exist, present them to the user via (translate to user's language): "These existing issues look related. Do you want to: (a) comment on an existing one, (b) open a new issue anyway, (c) cancel?"
AskUserQuestion3d.5 If proceeding with new issue, render and submit:
templates/ISSUE-BODY-bug.mdbash
bash "$SKILL_DIR/scripts/create-issue.sh" \
--title "$TITLE" \
--body-file "$WORKDIR_OR_TMP/.od-contrib/ISSUE-BODY.md" \
--dedupe-keywords "<keywords>"3d.6 Print the issue URL on its own line. Do not push branches or open PRs from this branch.
Step 7 — Preview + confirm (shared, PR branches only)
Show the user a clean summary:
text
About to commit:
Branch: od-contrib/<type>/<slug>-<date>
Files:
+ skills/foo/SKILL.md (1.2 KB)
+ skills/foo/preview.png (54 KB)
Push to: <fork or upstream>
Open PR: nexu-io/open-design:main ← <fork>:<branch>Then and a of the rendered PR body for visual sanity.
git -C "$WORKDIR" diff --stathead -40Required confirmation (translate to user's language): "Push this PR?" with three options:
AskUserQuestion- Ship it — proceed to Step 8
- Let me revise — return to the relevant Step 3 sub-step
- Cancel — leave the workspace on disk, tell the user the path so they can return later, exit
Never push without an explicit "Ship it".
Step 8 — Push & open PR
bash
bash "$SKILL_DIR/scripts/create-pr.sh" \
--workdir "$WORKDIR" \
--type "<skill|design-system|i18n|docs>" \
--title "<PR title from references/newcomer-tone.md>" \
--body-file "$WORKDIR/.od-contrib/PR-BODY.md"Print the PR URL on its own line. Done.
Safety rails (mandatory)
- Never push to /
main/master. The push scripts refuse.develop - Never push. Just don't.
--force - All workspace activity stays under (default
$OD_WORK_ROOT).$HOME/od-contrib-workenforces this.od::assert_in_workroot - Bug-report path always runs the dedupe search before .
gh issue create - Honor user memory: skip GitHub user from any contributor lookup ([[feedback_no_outreach_xxiaoxiong]]).
xxiaoxiong
When NOT to use this skill
- The user wants to fix a daemon / web bug or add a feature with code changes → use instead (it has the TDD loop). This skill deliberately doesn't run lint/typecheck/tests because content paths don't need them.
auto-github-contributor - The user wants to generate a Skill / Design System from scratch → that's Open Design itself. Run OD first, get an artifact, then come back here to ship it.