| name | contributor-pr-workflow |
| description | This skill should be used when a contributor wants to submit a new skill, edit an existing skill, or make any change to the Taiwan Architect KB repository. It guides the full lifecycle: clone/fetch, branch, create/edit, self-validate, and submit PR. |
| license | CC-BY-SA-4.0 |
| compatibility | claude-code,opencode,agent-skills |
| metadata | {"audience":"contributors","region":"taiwan","class":"A","status":"verified","data-currency":"2026-07-14"} |
Contributor PR Workflow
Guide a contributor through the end-to-end process of submitting a change to this KB.
Overview
This skill covers the full lifecycle from first clone to PR submission, with automated validation gates at each step. It prevents common mistakes: wrong directory structure, mismatched frontmatter, dirty files, broken links, and Simplified Chinese content.
How It Works
Phase 0: Environment Setup
-
Clone the repo (if first time):
git clone https://github.com/h30190/HJPLUS_Taiwan_Architect_KB.git
cd HJPLUS_Taiwan_Architect_KB
-
Sync with latest main:
git checkout main
git pull origin main
-
Create a feature branch:
git checkout -b feat/your-feature-description
-
Ask the contributor: "What are you contributing?"
- New skill → Phase 1
- Edit existing skill → Phase 2
- Rename / restructure → Phase 3
- Other (fix typo, add reference, translate) → Phase 4
Phase 1: Creating a New Skill
-
Choose the category: Look at raw/ subdirectories to find the right home (建築設計與規劃, 建築法規, 公共工程, etc.).
-
Copy the template:
cp -r 知識樣板/ raw/<category>/<chinese-entry-name>/
-
Name the entry directory (Traditional Chinese, intuitive name like 排煙窗法規檢討/).
-
Rename the skill directory (inside the Chinese entry, from skill-name-hyphenated/ to lowercase English hyphenated).
-
Clean up optional subdirectories: Delete assets/, references/, scripts/ if not needed.
-
Write SKILL.md:
- Frontmatter:
name MUST match the skill directory name
metadata.class is REQUIRED (A/B/C)
metadata.status is RECOMMENDED (verified/unverified/draft)
license and compatibility are RECOMMENDED
- Body in English, keep under 500 lines
- C-class skills MUST include MCP tool examples
-
Write domain.md:
- Traditional Chinese, NO frontmatter
- 使用情境、學習目標、實務應用
-
Update parent index.md:
- Open the parent directory's
index.md
- Add a new
* [Skill Name](path/SKILL.md) - description entry under ## Skills
- If no
index.md exists and the directory has 2+ children, create one per OKF v0.1
Phase 2: Editing an Existing Skill
-
Never delete SKILL.md or domain.md without a replacement.
-
Sync SKILL.md and domain.md: If you change one, update the other.
-
Preserve frontmatter: name must stay in sync with directory name.
-
If file is lowercase skill.md, rename to SKILL.md:
git mv <path>/skill.md <path>/SKILL.md
-
B-class skills: Keep <!-- TODO: Taiwan adaptation needed --> markers until adaptation is complete.
-
When adding or removing a skill, update the parent directory's index.md accordingly.
Phase 3: Renaming / Restructuring
-
Use git mv, not OS-level rename:
git mv <old-path> <new-path>
-
Scan the entire repo for stale references:
grep -r "<old-name>" raw/ --include="*.md"
Every reference must be updated.
-
Update all index.md entries that point to the old path.
-
Update frontmatter name if the skill directory name changed.
Phase 4: Other Changes (Typo, Reference, Translation)
- Make the change directly on your branch.
- If touching a skill AND its domain, keep both in sync.
- No special structure requirements.
Phase 5: Self-Validation (RUN BEFORE SUBMITTING)
Run ALL checks below. If any fails, fix it before proceeding.
Structure Checks
Frontmatter Checks
Content Checks
Index & Cross-Reference Checks
Phase 6: Submit
-
Stage and commit:
git add -A
git commit -m "type(scope): brief description"
Use Conventional Commits:
feat = new skill
fix = bug/correction
docs = documentation
refactor = restructure
-
Push:
git push origin feat/your-feature-description
-
Create PR via GitHub CLI:
gh pr create --title "<title>" --body "<description>"
-
Tell the contributor: "Your PR is submitted! A maintainer will review it. If changes are requested, the review comments will tell you exactly what to fix."
Troubleshooting
"I don't have gh (GitHub CLI)"
→ Push your branch, then open the PR manually at https://github.com/h30190/HJPLUS_Taiwan_Architect_KB/pulls
"I can't push (permission denied)"
→ You need to fork the repo first, then push to your fork and create a PR from there.
"I don't know what class my skill is"
→ A = International standard (no Taiwan adaptation). B = International → Taiwan (add TODO). C = Taiwan-specific code/regulation.
Related Skills