Skillpedia
برمجة عامة40k · #7399

repo-standardizer

ما الذي تفعله

هذا الوكيل يساعد على تنظيم مظهر مستودعات GitHub وتحسينه. يضيف ملفات الإعداد والتوثيق أو يحدّثها، مثل نماذج المشكلات وقوالب طلبات الدمج والتسميات وسير عمل CI، دون تغيير الكود نفسه.

متى تستخدمها

  • ✓عندما تنشئ مستودعًا جديدًا وتحتاج إلى إعداد أولي.
  • ✓عندما يبدو مستودع قائم فوضويًا أو ناقصًا.
  • ✓عندما تريد توحيد المظهر والقواعد عبر عدة مستودعات.

رابط المهارة

https://github.com/github/awesome-copilot/blob/main/skills/repo-standardizer/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/github/awesome-copilot/blob/main/skills/repo-standardizer/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“نظّم هذا المستودع في GitHub، وأضف القوالب والتسميات وسير عمل CI.”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

يتحقق الوكيل من الحالة الحالية للمستودع، ويحدد ما هو ناقص أو قديم، ثم يطبّق الإعدادات القياسية. ويفعل ذلك بأمان دون تعديل الكود الخاص بمشروعك.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

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: gh CLI (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 .login so the user knows which account will act.
  • Not logged in → STOP. Tell the user (do not guess):
    1. Run gh auth login (web/device flow), or
    2. Export a token: export GH_TOKEN=ghp_xxx — needs repo, workflow (for CI files) and, for org repos, admin:org (or admin: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 login is impossible in this environment (headless), suggest gh auth login --with-token reading from a file the user created.

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.md and 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.

…

الأسئلة الشائعة

ماذا يعني « idempotent »؟

يعني أنه يمكنك تشغيل الوكيل عدة مرات، وسيحصل دائمًا على النتيجة النهائية نفسها دون أن يسبب مشكلات أو يكرر المعلومات.

هل يغيّر كود مشروعي؟

لا، يعدّل فقط ملفات إعداد المستودع والتوثيق، مثل التسميات والقوالب وسير عمل CI. ويبقى كود مشروعك دون مساس.

هل أحتاج إلى تثبيت شيء؟

نعم، تحتاج إلى تثبيت بعض الأدوات على جهازك، مثل `gh` (أداة GitHub من سطر الأوامر)، و`git`، و`jq`، و`python3`، وأن تكون مسجلًا الدخول إلى حساب GitHub.

التفاصيل

الوصف الأصلي من المؤلف

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

الشعبية

نجوم GitHub
40k
الترتيب
#7399
الترخيص
MIT
آخر تحديث
15‏/10‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة