game-automation
ما الذي تفعله
تتيح هذه المهارة لوكيلك التحكم في لعبة تعمل على Windows لاختبار التغييرات. وهي مناسبة للمعدّلين الذين يريدون فحص عملهم داخل اللعبة الحقيقية بدلاً من التخمين.
متى تستخدمها
- ✓عندما تريد التحقق من أن التعديل يعمل داخل اللعبة الفعلية.
- ✓عندما تحتاج إلى لقطة شاشة لنافذة اللعبة بعد تغيير.
- ✓عندما تريد أن يتنقل الوكيل بين القوائم ويقرأ سجلات اللعبة أثناء الاختبار.
رابط المهارة
https://github.com/rehan-remade/universal-modder/blob/main/.agents/skills/game-automation/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“شغّل لعبتي، واذهب إلى القائمة الرئيسية، والتقط لقطة شاشة، وأخبرني إن كان نص تعديلي يظهر.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يشغّل وكيلك اللعبة، ويضبط نافذتها على حجم ثابت، ويستخدم لقطات الشاشة والنقرات وضغطات المفاتيح وقراءة السجلات للتصرف والملاحظة. ويستطيع أيضاً تشغيل مشهد اختبار مبرمج.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
Game automation: the agent's hands and eyes
The real game is the oracle. The loop is launch → navigate → set up the scene → act → screenshot and read logs → decide. Build it once per game, then every change you make can be checked in a minute.
Windows (native or from WSL): um win
um win setup # once: PowerShell tools + an ffmpeg with gfxcapture, picks NVENC/AMF/QSV/x264
um win ps # windowed processes: pid, name, title
um win launch --steam 105600 # or: um win launch "C:\Games\Foo\Foo.exe" -- -windowed
um win shot --exe Terraria.exe shot.png --scale 0.33 # full frame + a 1/3 copy that's cheap to look at
um win drive --proc Terraria "focus" "click 640 360" "key 0x1B" "type hello" "hold 0x44 1500"
um win drive --proc Terraria "hold 0x20 150" "sleep 200" "hold 0x20 150" # sleep <ms> pauses between steps
um win drive --proc Terraria idle # seconds since the user last touched mouse/keyboard (does not wait)
um win kill <pid> # exact PID only
um win reg get "HKCU\Software\..." # registry (reg set backs the key up first)
From Python (for longer scripts), from um.win import Drive, shot, Recorder, then d = Drive("AoE2DE_s"),
d.focus(), d.click(x, y), d.key("0x0D").
WinDrive commands (um/ps1/WinDrive.ps1; stdin protocol, one reply per line). Coordinates are in
the game window's client area.
- Mouse:
move x y,click x y [right],mdown/mup,drag x0 y0 x1 y1,rel dx dy(FPS cameras / raw input),wheel 120. - Keyboard:
key <vk> [tap|down|up],hold <vk> <ms>,type <text>,scanmode on(DirectInput / raw-input games that ignore virtual-key events). - Window:
focus,rect,size <w> <h>(sets the client size),title,fg,idle,untop. - Timing:
sleep <ms>waits between steps in one call. Eachum win drivecall starts PowerShell (1-2 s), so put timed combos in one call. - Virtual-key codes: Esc 0x1B, Enter 0x0D, Space 0x20, W/A/S/D 0x57/0x41/0x53/0x44, F1 0x70, Shift 0x10, Ctrl 0x11, arrows 0x25-0x28.
Rules of the road
- Never focus a game with an online mode while the human is typing. It happened with GTA V: the agent
focused GTA to click Story Mode, the human's keystrokes hit GTA's landing page, and GTA warned about
"accessing GTA Online servers with an altered version". ScriptHookV blocked it; don't rely on that.
Check
idle, ask the human to click, and launch with the anti-cheat off so online can't start. Seeknowledge/techniques/driving-real-games-safely.md. - Input only goes to the game. WinDrive refuses to send while another app is in the foreground. The one exception is when nothing is and the cursor is over the game, which windowed games cause by dropping the foreground on clicks.
- The user may be at the PC. If
idleis under a minute, ask before driving, and keep sessions short. Unattended runs are fine once the user says so. - Screenshots cost tokens. Look at
--scale 0.33copies. Multiply coordinates back ×3 for clicks, and keep a table of menu click points in MODLOG.md, measured once. - Why gfxcapture: GPU-rendered games come out black with GDI capture. gfxcapture (Windows.Graphics.Capture) grabs one window's real frames, even when covered. It can't capture minimized windows.
- HDR displays: with Windows Auto HDR on for an SDR game, captures come out washed out (2-3x brighter,
cyan-shifted), so colours can't be judged.
um win shot/recordwarn when it's on; turn it off for the game while capturing (Settings > System > Display > Graphics > the game > Auto HDR), and back on after if the user wants.
Make the window predictable
- Windowed mode at a fixed client size. Every game hides this setting somewhere:
- an ini (
[/Script/Engine.GameUserSettings]in UEGameUserSettings.ini, Unity'sScreenmanager Fullscreen mode/Resolutionregistry values underHKCU\Software\<company>\<product>); - a launch flag (
-windowed -w 1920 -h 1080, Unity-screen-fullscreen 0 -screen-width 1920 -screen-height 1080, Source-sw -w 1920 -h 1080); - or the game's own registry (AoE2:
Mode Display0 +Windowed Width/Height). um win drive --proc X "size 1920 1080"also resizes most windowed games.
- an ini (
- Skip intros: launch flags (
-skipintro,-nosplash, Unity-popupwindow), or delete/rename intro videos in a **
الأسئلة الشائعة
على أي أنظمة تعمل؟
صُممت للعمل على Windows، بما في ذلك عندما يعمل الوكيل من WSL.
هل تستطيع إغلاق عملية اللعبة؟
نعم، لكن فقط معرّف العملية الذي بدأته، لا كل العمليات التي تحمل الاسم نفسه.
هل تقرأ سجلات اللعبة؟
نعم. قراءة السجلات من الخطوات المستخدمة للتحقق مما فعلته اللعبة.
التفاصيل
الوصف الأصلي من المؤلف
Launch, see and drive a real game so an agent can test its own mods. Covers launching via Steam or the exe, windowed mode at a fixed size, screenshots of the game window (GPU-safe capture), clicking and typing into menus, holding keys, relative mouse, crash-reporter cleanup, killing by PID, reading logs, scripted test scenes, and an in-game JSON bridge that lets an agent observe and act. Windows-first (also from WSL), with notes for Linux and macOS. Use when a mod must be verified in game, when navigating menus automatically, or when building a repeatable test or demo scene.
الشعبية
- نجوم GitHub
- 9.3k
- الترتيب
- #12285
- الترخيص
- MIT
- آخر تحديث
- 2/11/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
asset-pipeline
9.3kيساعد وكيلك على تحويل الفن المولَّد أو المرسوم يدوياً إلى الحجم وتخطيط الإطارات ولوحة الألوان وصيغة الملف التي يحمّلها محرك اللعبة.
blitz3d-decomp
9.3kيساعد وكيلك على تفكيك لعبة Blitz3D إلى شيفرة مقروءة وتخطيط نقلها إلى محرك آخر، مع الاحتفاظ باللعبة الأصلية مرجعاً.
fal-assets
9.3kيساعد وكيلك على توليد فن الألعاب والأصوات والموسيقى ونماذج ثلاثية الأبعاد عبر fal.ai، من السبرايت إلى أصوات الشخصيات.
game-recon
9.3kيساعد وكيلك على إيجاد لعبة مثبتة ومعرفة إمكانية تعديلها، مثل محركها وإصدارها ومكافحة الغش فيها ومسار التعديل المناسب.
مهارات مشابهة
test-driven-development
311kيعلّم وكيلك كتابة اختبار فاشل أولًا، ثم رؤيته يفشل، ثم كتابة أصغر شيفرة تنجحه، قبل بناء أي ميزة أو إصلاح.
verification-before-completion
311kيعلّم وكيلك تشغيل فحوصات حقيقية وقراءة نتائجها قبل أن يقول إن المهمة أو الإصلاح أو البناء مكتمل أو ناجح.
migrate-to-shoehorn
310kيستبدل تأكيدات النوع الخطرة في ملفات الاختبار بمكتبة shoehorn، حتى تتمكن الاختبارات من استخدام بيانات جزئية وتجتاز فحوص الأنواع.