repo-standardizer
Skill này làm gì
Agent AI này giúp sắp xếp và cải thiện diện mạo của kho lưu trữ GitHub. Nó thêm hoặc cập nhật các tệp cấu hình và tài liệu, như biểu mẫu issue, mẫu PR, nhãn và quy trình CI, mà không thay đổi chính mã nguồn.
Khi nào nên dùng
- ✓Khi tạo một kho lưu trữ mới và cần thiết lập ban đầu.
- ✓Khi một kho lưu trữ hiện có trông lộn xộn hoặc chưa đầy đủ.
- ✓Để chuẩn hóa giao diện và quy tắc trên nhiều kho lưu trữ.
Liên kết skill
https://github.com/github/awesome-copilot/blob/main/skills/repo-standardizer/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Hãy sắp xếp kho lưu trữ GitHub này, thêm mẫu, nhãn và quy trình CI.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent kiểm tra tình trạng hiện tại của kho lưu trữ, xác định những gì còn thiếu hoặc đã lỗi thời, rồi áp dụng các cấu hình chuẩn. Nó làm việc này an toàn, không sửa mã dự án thực sự của bạn.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
GitHub Repo Standardizer
Detect a repository's current state, then polish its surface: issue forms, PR template, label taxonomy, CI, CODEOWNERS, rulesets, docs. Works on repo metadata and config files only — code logic is never touched. Idempotent — safe to re-run; fills gaps and reconciles drift without duplicating or clobbering.
When to use
- User says "standardize / tidy up / professionalize this repo"
- A new repo was just created and needs templates, labels, CI, and rules from day one
- A repo looks bare: no templates, no labels, no CI, no branch protection
Preflight (mandatory, in order)
Requires:
ghCLI (authenticated),git,jq,python3— verify they exist before starting (which gh git jq python3).
1. Authenticate — check gh login first
gh auth status 2>/dev/null || echo "NOT_LOGGED_IN"
- Logged in → continue; print
gh api user -q .loginso the user knows which account will act. - Not logged in → STOP. Tell the user (do not guess):
- Run
gh auth login(web/device flow), or - Export a token:
export GH_TOKEN=ghp_xxx— needsrepo,workflow(for CI files) and, for org repos,admin:org(oradmin:repo_hook/ org membership admin) scopes.
- Never paste tokens into chat, logs, or files. If the user pastes a token in chat, advise them to revoke it and re-issue.
- If
gh auth loginis impossible in this environment (headless), suggestgh auth login --with-tokenreading from a file the user created.
- Run
Verify the acting account can write to the target:
# user repos: no extra check needed beyond token scopes
# org repos: must be a member/admin of the org
gh api "orgs/ORG/memberships/$(gh api user -q .login)" -q .role 2>/dev/null || echo "NO_ORG_ACCESS"
admin/member→ OK.404→ stop and ask the user to add the account to the org first.
2. Detect repository type
gh repo view OWNER/REPO --json name,owner,visibility,defaultBranchRef,isArchived,isFork \
-q '{name:.name, ownerType:.owner.type, visibility:.visibility, defaultBranch:.defaultBranchRef.name, archived:.isArchived, fork:.isFork}'
| Field | Meaning | Consequence |
|---|---|---|
ownerType |
User = personal, Organization = org |
Org repos can also use org-level rulesets; both support repo-level rulesets |
visibility |
PUBLIC / PRIVATE / INTERNAL |
Private: skip public-facing docs pressure, keep CI secrets minimal; public: README badges + CONTRIBUTING/SECURITY matter |
archived / fork |
Read-only / fork | Skip write modules; report why |
If the repo was not explicitly named by the user, confirm before touching an org or private repository.
3. Audit current state
gh label list --repo OWNER/REPO --limit 200
gh api repos/OWNER/REPO/contents/.github -q '.[].path' 2>/dev/null || echo "no .github dir"
gh api repos/OWNER/REPO/contents/.github/workflows -q '.[].name' 2>/dev/null || echo "no workflows"
gh api repos/OWNER/REPO/rulesets -q '.[] | {name:.name, enforcement:.enforcement}' 2>/dev/null || echo "no rulesets"
gh api repos/OWNER/REPO/branches -q '.[].name' 2>/dev/null
for f in README.md CONTRIBUTING.md SECURITY.md LICENSE .gitignore; do
gh api "repos/OWNER/REPO/contents/$f" -q .name 2>/dev/null || echo "missing: $f"
done
4. Detect test framework (for CI module)
Check for these signals (first match wins):
gh api repos/OWNER/REPO/contents/package.json -q .name 2>/dev/null # node → templates/ci-node.yml
gh api repos/OWNER/REPO/contents/pyproject.toml -q .name 2>/dev/null # python → templates/ci-python.yml
gh api repos/OWNER/REPO/contents/go.mod -q .name 2>/dev/null # go → templates/ci-go.yml
gh api repos/OWNER/REPO/contents/Cargo.toml -q .name 2>/dev/null # rust → templates/ci-rust.yml
No signal → propose the generic CI (or ask the user whether CI is wanted at all).
5. Ask about language (before planning)
- Ask the user which language
CONTRIBUTING.mdand the PR template should be written in (default: English, or the project's primary language for local projects). Translate the templates accordingly when generating — never assume a language. - (README languages are asked separately in Module F.)
6. Ask about automation (decides the Governance labels)
Ask the user whether the repo has any automation bots or AI writers running on it — e.g. dependabot, a Stale bot, ClawSweeper, or an AI coding agent that auto-files PRs / auto-fixes issues.
…
Câu hỏi thường gặp
“Idempotent” nghĩa là gì?
Nghĩa là bạn có thể chạy agent nhiều lần và nó luôn cho ra cùng một kết quả cuối cùng mà không gây lỗi hoặc lặp lại thông tin.
Nó có thay đổi mã dự án của tôi không?
Không, nó chỉ sửa các tệp cấu hình và tài liệu của kho lưu trữ, như nhãn, mẫu và quy trình CI. Mã dự án của bạn vẫn không bị động đến.
Tôi có cần cài đặt gì không?
Có, bạn cần cài một số công cụ trên máy, như `gh` (công cụ dòng lệnh của GitHub), `git`, `jq` và `python3`, đồng thời đăng nhập vào tài khoản GitHub của mình.
Chi tiết
Mô tả gốc của tác giả
Polish any GitHub repository's surface — labels (emoji rating tiers, P0–P3 priority, impact severity), issue forms, PR template, CI workflows, CODEOWNERS, rulesets, docs. Repo meta & config only — no code logic touched. Use when creating a new repo or polishing an existing one.
repo: github/awesome-copilot
Độ phổ biến
- Sao GitHub
- 40k
- Vị trí xếp hạng
- #7399
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
acquire-codebase-knowledge
40kGiúp agent của bạn hiểu và ghi tài liệu cho một dự án mã nguồn có sẵn. Hữu ích khi đón thành viên mới hoặc nắm tổng quan về kiến trúc.
acreadiness-assess
40kGiúp agent của bạn đánh giá mức độ sẵn sàng cho AI của dự án và tạo báo cáo. Hữu ích để biết dự án đã sẵn sàng dùng công cụ AI đến đâu.
acreadiness-generate-instructions
40kGiúp agent của bạn tạo hướng dẫn cho công cụ AI dựa trên kết quả đánh giá. Hữu ích để cải thiện cách AI làm việc với mã và khắc phục các khoảng trống.
acreadiness-policy
40kGiúp agent của bạn xác định hoặc áp dụng chính sách đánh giá dự án bằng AI. Hữu ích để chuẩn hóa cách đánh giá dự án và đảm bảo tuân thủ.
Skill tương tự
diffs
394kGiúp agent của bạn tạo một diff có thể chia sẻ về các chỉnh sửa, dưới dạng liên kết xem hoặc file ảnh, thay vì một bản tóm tắt viết tay.
coding-agent
394kGiúp agent của bạn giao một việc lập trình lớn cho Codex, Claude Code hoặc OpenCode chạy nền, rồi theo dõi tiến độ của nó.
gh-issues
394kGiúp agent của bạn tìm issue trên GitHub, chọn những issue cần xử lý và mở pull request với bản sửa, kể cả theo dõi nhận xét đánh giá.