شعار Dot Cicd Diagnose

Dot Cicd Diagnose

مؤسسة
dotCMS
dot-cicd-diagnose

استخدم هذه المهارة عند فشل سير عمل GitHub Actions، أو تعطل بناء PR، أو رفض قائمة انتظار الدمج، أو الإبلاغ عن إخفاقات في التقارير الليلية، أو ذكر المستخدم إخفاقات اختبارات CI/CD في dotCMS/core. استخدمها أيضًا عند قول المستخدم: "تحقّق من البناء" أو "شخّص التشغيل" أو "لماذا فشل CI؟" أو "اختبار متقلب" أو "قائمة انتظار الدمج محظورة".

نظرة عامة

الناشرdotCMS
المستودعcore
اسم المهارةdot-cicd-diagnose
النجوم
971
التفريعات
487
الملفات المرفقة
17
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • الملفات المرفقة: 17

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

  • مفتوحة المصدر

    نشرها dotCMS على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Dot Cicd Diagnose في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/dotCMS/core/tree/main/.claude/skills/dot-cicd-diagnose
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/dotCMS/core.git /tmp/core
mkdir -p .claude/skills
cp -r /tmp/core/.claude/skills/dot-cicd-diagnose .claude/skills/dot-cicd-diagnose
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Dot Cicd Diagnose في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Dot Cicd Diagnose تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Dot Cicd Diagnose بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

CI/CD Build Diagnostics

Diagnose DotCMS GitHub Actions failures as a senior platform engineer. Use diagnostic scripts for structured evidence gathering, triage before deep-diving, and stop when confident.

Triage First (Critical — Baseline Gap)

Without this skill, agents dive straight into source code analysis — spending 20+ minutes and 100k+ tokens on what might be a known flaky test. Always triage before investigating.

Identify failure → Check known issues → THEN deep dive (only if needed)

Quick Win (30s-2min): Known issue? → Link and done.
Standard (2-10min):  Gather evidence → Hypothesize → Conclude.
Deep Dive (10+min):  Only for novel, unclear failures.

Failure type determines tools, not a fixed sequence:

Failure TypeStart WithSkip
Test assertionKnown issues search, then code changesExternal checks
Flaky testRun history, timing patternsCode deep-dive
Deployment/Authexternal_issues.py, WebSearchLog analysis
InfrastructureRecent runs, log patternsCode changes
Skipped/missing jobsAnnotations (workflow YAML errors)Logs

Workflow Types

  • cicd_1-pr.yml — PR validation with test filtering (subset may pass)
  • cicd_2-merge-queue.yml — Full suite before merge (catches filtered tests)
  • cicd_3-trunk.yml — Post-merge deployment (artifacts, no re-test)
  • cicd_4-nightly.yml — Scheduled full run (detects flaky tests)

PR passes + merge queue fails = test filtering discrepancy.

Prerequisites

This skill must be run from within a checkout of dotCMS/core (any worktree is fine). Requires Python 3.8+ and GitHub CLI (gh) authenticated.

diagnose.py runs preflight checks automatically and will fail with actionable errors if anything is missing.

Investigation Workflow

1. Gather Evidence

All operations go through diagnose.py. It handles preflight, workspace, caching, and structured output. All cached data is reused automatically on re-runs.

bash
# Full gather (default) — metadata, jobs, annotations, logs, error summary
python3 .claude/skills/dot-cicd-diagnose/diagnose.py <RUN_ID_OR_URL>

# Progressive subcommands — use when you need specific data or want to save tokens
python3 .claude/skills/dot-cicd-diagnose/diagnose.py <ID> --metadata      # Metadata + jobs + step detail
python3 .claude/skills/dot-cicd-diagnose/diagnose.py <ID> --jobs          # Jobs + step detail only
python3 .claude/skills/dot-cicd-diagnose/diagnose.py <ID> --annotations   # Workflow annotations only
python3 .claude/skills/dot-cicd-diagnose/diagnose.py <ID> --logs          # Download logs + error summary
python3 .claude/skills/dot-cicd-diagnose/diagnose.py <ID> --logs <JOB_ID> # Single job log + errors
python3 .claude/skills/dot-cicd-diagnose/diagnose.py <ID> --evidence      # Full evidence.py analysis
python3 .claude/skills/dot-cicd-diagnose/diagnose.py <ID> --evidence <ID> # evidence.py on single job

Recommended progression:

  1. Start with full gather (no flag) for most cases
  2. If the output is enough to diagnose → stop
  3. If you need deeper log analysis → --evidence or --evidence <JOB_ID>
  4. If you need to re-check just one thing → use the specific subcommand

Read the FULL output before proceeding to analysis. Key signals:

  • Steps marked FAIL <- likely caused job failure = primary root cause
  • Steps marked continue-on-error = masked secondary issues (real bugs, report separately)
  • ##[error] lines that don't match any failed step = errors from continue-on-error steps

Do NOT write inline python3 -c to parse jobs JSON or extract errors. diagnose.py already provides all of this. Ad-hoc parsing causes bugs and misses continue-on-error signals.

Do NOT run ad-hoc gh run view, gh api, or gh run list commands to re-fetch data that diagnose.py already provided. The job list, step details, and error summaries are all in the output. Running separate gh commands wastes tokens, triggers permission prompts, and often misses the structured signals (like continue-on-error detection) that diagnose.py provides. Only use direct gh commands for data that diagnose.py does not cover (e.g., comparing against other runs, checking PR info, searching issues).

2. Check Known Issues (Before Deep Dive!)

This is the step the baseline skipped. Search before re-investigating from scratch:

bash
# Search by test name or error message
gh issue list --repo dotCMS/core --search "TestClassName" --state all --limit 10 \
  --json number,title,state,labels
gh issue list --repo dotCMS/core --label "Flakey Test" --state all --limit 20

If match found → link to issue, assess if new information, and stop.

For deployment/auth errors, check external services:

python
import sys; from pathlib import Path
sys.path.insert(0, str(Path(".claude/skills/dot-cicd-diagnose/utils")))
from external_issues import extract_error_indicators, format_external_issue_report, generate_search_queries
log_content = Path("$WORKSPACE/failed-job-$JOB_ID.txt").read_text(errors='ignore')
indicators = extract_error_indicators(log_content)
print(format_external_issue_report(indicators, generate_search_queries(indicators, "DATE"), []))

3. Present Evidence for Analysis

Use evidence.py to extract structured failure data from logs:

python
import sys; from pathlib import Path
sys.path.insert(0, str(Path(".claude/skills/dot-cicd-diagnose/utils")))
from evidence import present_complete_diagnostic, get_log_stats
LOG = Path("$WORKSPACE/failed-job-$JOB_ID.txt")
print(get_log_stats(LOG))
print(present_complete_diagnostic(LOG))

This extracts: failed tests, error messages, assertion failures, stack traces, timing indicators, infrastructure events, cascade detection, known issue matches.

4. Analyze (Evidence-Based)

Form competing hypotheses and evaluate each against evidence:

  • Code defect — New bug from recent PR changes?
  • Flaky test — Race condition, timing, shared state?
  • Infrastructure — Docker/DB/ES environment issue?
  • Test filtering — PR subset passed, full suite failed?
  • Cascading failure — One primary error causing secondary failures?

Before concluding root cause, verify the error actually failed the job. diagnose.py flags steps where continue-on-error is detectable from the API (step failed but later non-cleanup steps succeeded). Look at the step marked FAIL ← likely caused job failure for the actual root cause.

WARNING: continue-on-error steps may show conclusion: success in the API even when they have internal errors. GitHub masks the failure — the step reports success but error messages are still in the raw logs. For trunk deployment jobs, check WORKFLOWS.md for which steps have continue-on-error (notably CLI Deploy / deploy-jfrog). When you see ##[error] lines in logs that don't correspond to any failed step in diagnose.py output, that's a masked continue-on-error error. Report these as secondary findings — they are real bugs being hidden, not the cause of the run failure, but worth flagging.

Label each finding: FACT (logs show it), HYPOTHESIS (theory), CONFIDENCE (High/Medium/Low).

See REFERENCE.md for detailed diagnostic patterns (timing analysis, thread context, concurrency).

5. Compare Runs (If Needed)

python
from evidence import present_recent_runs
print(present_recent_runs("cicd_1-pr.yml", 20))  # Check if intermittent

6. Report

Write DIAGNOSIS.md to the diagnostic workspace directory (e.g., .claude/diagnostics/run-<RUN_ID>/DIAGNOSIS.md). Never write to the project root. Natural language, like a senior engineer writing to a colleague.

Always include: Executive Summary, Root Cause (with confidence), Evidence, Recommendations. Include when relevant: Known Issues, Timeline, Test Fingerprint, Impact Assessment, Competing Hypotheses.

Do not force sections that add no value. See REFERENCE.md for templates.

7. Create Issue (If Warranted)

Only when: not already tracked, new failure pattern, blocking development, actionable.

bash
gh issue create --repo dotCMS/core --title "[CI/CD] Brief description" \
  --label "bug,ci-cd,Flakey Test" --body "$(cat $WORKSPACE/DIAGNOSIS.md)"

Key Principles

  1. Triage first — Check known issues before deep investigation. Most failures are known.
  2. Adaptive depth — Stop when confident. A known flaky test needs 2 min, not 20.
  3. Evidence-driven — Present evidence to AI reasoning, don't hardcode classification rules.
  4. Context matters — Same error means different things in different workflows.
  5. Use the scripts — Workspace caching means re-runs are fast. Ad-hoc gh commands waste tokens.
  6. Never skip a failed step — If diagnose.py errors, diagnose why and fix it before continuing. Do not rationalize past it ("I'll just use gh directly", "I don't really need that data"). Proceeding without evidence produces guesswork, not diagnosis.

Reference Files

الملفات المرفقة

يقرأ النموذج هذه الملفات عند الحاجة ما دامت المهارة محمّلة. وهي متاحة للقراءة ولا تُنفّذ أبدًا.

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

ماذا تفعل مهارة الذكاء الاصطناعي Dot Cicd Diagnose؟

استخدم هذه المهارة عند فشل سير عمل GitHub Actions، أو تعطل بناء PR، أو رفض قائمة انتظار الدمج، أو الإبلاغ عن إخفاقات في التقارير الليلية، أو ذكر المستخدم إخفاقات اختبارات CI/CD في dotCMS/core. استخدمها أيضًا عند قول المستخدم: "تحقّق من البناء" أو "شخّص التشغيل" أو "لماذا فشل CI؟" أو "اختبار متقلب" أو "قائمة انتظار الدمج محظورة".

لماذا تستخدم Dot Cicd Diagnose على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Dot Cicd Diagnose عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Dot Cicd Diagnose في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/dotCMS/core/tree/main/.claude/skills/dot-cicd-diagnose. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Dot Cicd Diagnose؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Dot Cicd Diagnose؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Dot Cicd Diagnose معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Dot Cicd Diagnose مجانية؟

نشرها dotCMS على GitHub. راجع المستودع للاطلاع على شروط الترخيص. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇