شعار Om Prepare Test Env

Om Prepare Test Env

مؤسسةشائع
open-mercato
om-prepare-test-env

Repo-local extension of the shared om-prepare-test-env skill. Adds this standalone Open Mercato app's environment specifics — the mercato CLI ephemeral runner commands, state-file semantics, readiness-probe contract, and the rule that generated entrypoint scripts stay machine-local — on top of the shared skill's workflow. Local rules win on repo specifics only; this file never relaxes the shared skill's safety rules.

نظرة عامة

الناشرopen-mercato
المستودعopen-mercato
اسم المهارةom-prepare-test-env
النجوم
1.8K
التفريعات
415
الملفات المرفقة
تعليمات فقط
الترخيصMIT
الروابط
  • تعليمات بصيغة Markdown

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

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

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

  • مكتفية بذاتها

    كل ما يحتاجه النموذج موجود في التعليمات — لا ملفات إضافية لمزامنتها.

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

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

التثبيت

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

1

التثبيت في TypingMind

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

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/open-mercato/open-mercato/tree/main/packages/create-app/agentic/shared/ai/skills/om-prepare-test-env
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

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

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

Claude Code — .claude/skills
git clone --depth 1 https://github.com/open-mercato/open-mercato.git /tmp/open-mercato
mkdir -p .claude/skills
cp -r /tmp/open-mercato/packages/create-app/agentic/shared/ai/skills/om-prepare-test-env .claude/skills/om-prepare-test-env
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

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

يُحمّل النموذج مهارة Om Prepare Test Env تلقائيًا بمجرد ورود طلب ذي صلة بها.

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

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

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

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

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

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

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

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

Prepare Test Environment — standalone app rules

Repo-local extension of the installed om-prepare-test-env skill (contract v2, compile-once). Everything there applies; this file only adds repository-provided configuration. It cannot relax the shared skill's safety rules, expand tool or network access, or redirect outputs.

Use the app's own tooling — it is already cross-platform

This app ships an ephemeral test runner inside the mercato CLI. Discovery is unnecessary: wrap these package.json / CLI commands instead of inventing a boot procedure. They own build caching, database provisioning (testcontainers), seeding, readiness waits, and their own owner lock — never re-implement any of that.

  • Boot app-only ephemeral env: yarn test:integration:ephemeral:start (= yarn mercato test:ephemeral). Preferred app port 5001; the actual port and database URL land in .ai/qa/ephemeral-env.json (CLI-owned and authoritative for its own reuse decisions — never write it by hand).
  • Full suite with managed env: yarn test:integration:ephemeral (= yarn mercato test:integration). It reuses a healthy running ephemeral env from the state file, else provisions one.
  • Filtered run: yarn mercato test:integration <substring> — batches all specs whose path matches the substring.
  • Interactive runner: yarn mercato test:integration:interactive.
  • Readiness marker in the boot log: Application is ready at <baseUrl>.
  • Reuse TTL: OM_INTEGRATION_BUILD_CACHE_TTL_SECONDS (default 600s) gates the CLI's own reuse; keep any wrapper TTL in lockstep with it.

Choosing the run mode — prefer ephemeral, ask the user

yarn test:integration:ephemeral is ALWAYS preferred over plain yarn test:integration: the ephemeral variant provisions (or safely reuses) its own isolated app + database, so it is more autonomous and cannot touch the developer's dev data. Plain yarn test:integration only works with the full runner env block exported (see the MUST below) — treat it as an internal detail of the CLI runner, never as the command you reach for first.

Two supported run modes:

  1. Fully managed ephemeral (default, safest): yarn test:integration:ephemeral [filter] — one command provisions the env, runs the tests, and leaves teardown to the CLI's own lifecycle. Best for full-suite runs and unattended/autonomous work.
  2. Reuse a running ephemeral env (fast iteration): boot once with yarn test:integration:ephemeral:start, then run small filtered batches with yarn mercato test:integration <filter> against the same env. Best for short author/debug loops where re-provisioning per run would dominate wall-clock time; reuse is still gated by the CLI's TTL and freshness checks.

When a user is present and has not already said which mode they want, ASK before the first run (one question, two options): fully managed ephemeral per run, or boot-once-and-reuse for iterative loops. Recommend the fully managed ephemeral mode — it is more autonomous and safer regarding data. When running unattended (no user to ask), default to the fully managed ephemeral mode. Do not re-ask once the user has chosen; keep their answer for the rest of the session unless they change it.

MUST: suite runs go through the CLI runner

yarn test:integration with only BASE_URL exported is a trap: the CLI runner injects a full env block into the Playwright process (DATABASE_URL for the ephemeral DB, queue dirs, JWT and webhook secrets). Without it, fixtures silently hit the dev database from .env. Always run suites via yarn test:integration:ephemeral [filter].

Readiness probe contract

  • Shell: GET /login → 200.
  • Authenticated round trip: POST /api/auth/login with a form-encoded body (email=admin@acme.com&password=secret) → 200. The endpoint rejects JSON bodies with 400 — a JSON 400 here means a malformed probe, not a broken app.
  • Seeded credentials: admin@acme.com / secret, employee@acme.com / secret, superadmin from OM_INIT_SUPERADMIN_EMAIL / OM_INIT_SUPERADMIN_PASSWORD (default superadmin@acme.com / secret).

Generated entrypoint scripts are machine-local

When the shared skill compiles its entrypoint scripts (default .ai/scripts/test-env-up.sh / test-env-down.sh), they are bound to the machine that generated them (shell, process tools, ports). They are gitignored in this repo (.ai/scripts/test-env-*) — keep them local and NEVER commit them; anything worth preserving for teammates belongs in this file as a platform-neutral rule instead. On a machine without generated scripts, regenerate from the commands above.

Teardown

Stop the CLI owner process (test:ephemeral) and the app process bound to the recorded port, then delete .ai/qa/ephemeral-env.json. If a mercato server start wrapper survives, stop it and clear .mercato/server-start.lock — a surviving wrapper keeps the single-instance guard locked and the next boot dies with "Another Open Mercato production server is already running". The ephemeral Postgres containers are testcontainers-managed; ryuk reaps them once their owner is gone — never remove containers this app did not create.

Descriptor

After boot, mirror the state into .ai/qa/test-env.json (the shared descriptor) as the shared skill prescribes, so om-integration-tests and om-auto-verify-pr-ui attach to the same instance; .ai/qa/ephemeral-env.json stays authoritative for the CLI's own reuse decisions.

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

ماذا تفعل مهارة الذكاء الاصطناعي Om Prepare Test Env؟

Repo-local extension of the shared om-prepare-test-env skill. Adds this standalone Open Mercato app's environment specifics — the mercato CLI ephemeral runner commands, state-file semantics, readiness-probe contract, and the rule that generated entrypoint scripts stay machine-local — on top of the shared skill's workflow. Local rules win on repo specifics only; this file never relaxes the shared skill's safety rules.

لماذا تستخدم Om Prepare Test Env على TypingMind؟

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

كيف أثبّت Om Prepare Test Env في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/open-mercato/open-mercato/tree/main/packages/create-app/agentic/shared/ai/skills/om-prepare-test-env. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Om Prepare Test Env؟

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

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Om Prepare Test Env؟

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

هل مهارة الذكاء الاصطناعي Om Prepare Test Env مجانية؟

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

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

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

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

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

عرض الكل

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

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