🦾 ملاحظات د. وائل

📁 00-الترسانة
00-الفهرس
📁 00-الترسانة/الذاكرة-اليومية
2026-04-022026-04-172026-04-22-cost-optimization2026-04-22-oauth-setup2026-04-222026-04-23-skywork-apikey2026-04-24-deepseek-v42026-04-24-event-logs2026-04-24-valve-types2026-04-25-animate-scenes2026-04-25-crypto-replacement2026-04-25-jihan-video2026-04-25-windows-tuneup2026-04-252026-04-26-server-upgrade2026-04-26-windows-tuneup2026-04-27-crypto-report2026-04-27-salary-raise-request2026-04-27-turkey-investment2026-04-28-02342026-04-28-02442026-04-28-final-upgrade2026-04-28-morning-greeting2026-04-28-oauth-credentials2026-04-28-slow-replies2026-04-30-bitcoin-turkey-outlook2026-04-30-deepseek-setup2026-04-30-kiloclaw-backup2026-05-01-camoufox-removal2026-05-01-green-square2026-05-01-identity-reset2026-05-01-name-mixup2026-05-01-new-session2026-05-01-print-spooler2026-05-01-triangle-puzzle2026-05-02-event-analysis2026-05-02-halal-check2026-05-02-laplace-inverse2026-05-02-radius-puzzle2026-05-02-rainforest-alliance2026-05-02-skywork-integration2026-05-02-wsa-shutdown2026-05-02-wsa-update2026-05-03-tashbeeh-lesson2026-05-03-wsa-crash2026-05-032026-05-04-idle-timeout2026-05-04-wsa-diagnostics2026-05-042026-05-06-capabilities-review2026-05-06-storage-cleanup2026-05-06-wsa-fix2026-05-062026-05-072026-05-09-mega-session2026-05-092026-05-102026-05-112026-05-122026-05-132026-05-142026-05-152026-05-162026-05-172026-05-182026-05-192026-05-202026-05-212026-05-222026-05-232026-05-242026-05-252026-05-262026-05-272026-05-312026-06-012026-06-022026-06-032026-06-042026-06-052026-06-062026-06-072026-06-08-obsidian-syncthing-setup2026-06-082026-06-092026-06-102026-06-11-mcp-tools-fix2026-06-112026-06-122026-06-132026-06-142026-06-152026-06-162026-06-172026-06-182026-06-19-telegram-copy-fix2026-06-19-uncensored-models-study2026-06-202026-06-212026-06-222026-06-232026-06-242026-06-252026-06-262026-06-272026-06-282026-06-292026-06-302026-07-012026-07-022026-07-032026-07-042026-07-052026-07-062026-07-072026-07-082026-07-092026-07-102026-07-112026-07-122026-07-132026-07-142026-07-152026-07-162026-07-172026-07-182026-07-192026-07-202026-07-212026-07-222026-07-23-local-image-vpn-fix2026-07-232026-07-25_MEMORY-curated
📁 00-الترسانة/القواعد-الذهبية
DECISION_MATRIXECONOMIC_ARSENAL_MATRIXENGINEERING_ARSENAL_MATRIXENGINEERING_DISCIPLINES_MATRIXGOLDEN_PROMPTLEGAL_ARSENAL_MATRIXMEDICAL_ARSENAL_MATRIXSCIENCE_GRAPHICAL_AUDIO_MATRIX
📁 00-الترسانة/المرجعية
AGENTSAGREEMENTSCAPABILITIESDECISION_MATRIXDOMAIN_MODEL_RANKINGSGOLDEN_RULESGOLDEN_RULES_COREIDENTITYMEMORYMISTAKES_LEDGERMISTAKES_PATTERNSMODEL_REGISTRYSOULSTRATEGIESTOOLSUSER
📁 00-الترسانة/المهارات
1password3d-arsenal3d-generationacademic-researchacademic-shieldaccounting-advancedaccuracy-gateai-investment-analyzerai-web-automationalphafoldarabic-tashkeelaudd-recognizeautograderblogwatcherbridge-tunnel-enginebriefingcartesiacitation-validatorcivil-design-routercivil-methodology-enginecivil-networksclaims-engineeringcode-refactorercognee-memorycomputer-use-pluscomputer-useconstruction-assistantconstructioncontract-reviewcourse-pipelinecourtlistener-researchcrypto-marketcurriculum-ragcybersecurity-edudata-charts-visualizationdesign-to-bimdocument-ocr-arsenaleconomic-arsenaleconomic-calendar-fetcherelite-councilengineering-codesengineering-design-stackengineering-legal-economicengineering-ocr-blueprintsengineering-pack-2026-06-21entertainment-arsenalevolinkexif-geolocationfable-orchestratorfirecrawlforecasting-techniquesforesight-enginefree-llm-resourcesfrontier-videogemini-embedding-2gemini-live-translategenius-loopgenspark-agentgeospatial-arsenalgh-issuesgifgrepgithubgoggraph-memoryhive-vlmhyperframesidentity-charterin-depth-researchinvestment-analystkuwait-datalangfuselecture-builderlegal-advisorlegal-draftinglegal-encyclopedialegal-ragliberation-routerlive-translatormanus-agentmanusmarket-newsmath-foundationmathpix-ocrmcportermedia-editing-arsenalmedical-arsenalmedical-triagemicrosoft365minimax-music-2-6multi-discipline-engineeringmulti-model-consensusnotebooklm-researchocr-advancedollama-localonedriveopenai-realtime-translateopenclaw-memory-hygienep6-ai-plannerpaperclippascal-editorpdf-summarizerpika-videoplanet-satelliteportfolio-watcherproject-lifecycle-enginequantity-takeoff-enginequantum-computingrag-knowledge-basereal-estate-skillrealtime-voicereviewer-agentscience-arsenalself-improving-agentsentinel-hubsession-logsskywork-agentsmart-code-routersonjj-apistealth-browserstocks-enhancedstocksstructural-advancedsuno-musicsynergy-war-roomtavily-searchtext-humanizertmuxtradingview-webhookstranslateturkey-real-estatetwilioutility-identityv0-alternativesvapivercelvideo-framesvideo-gps-trackerweb-scraperweb-searchwhisperxwolfram-alphaxurl
📁 04-AI-Coding
Graphify-Code-MapsGraphify-MCP-Laptop-Setup
📁 graphify-graphs/arsenal-scripts
GRAPH_REPORT
📁 graphify-graphs/arsenal-scripts/obsidian
(M-038L5 fix 2026-06-01) R2 keys are MIXED some stored under 'kiloclaw' (ARSENAL_SRCAntigravity Managed Agent (Linux sandbox auto-provisioned). SYNC only (backgAttributed Question Answering (with citations).Calculate MD5 hash of file.Capability failures seen = min_count - candidate for a hardening skill.Check if path should be skipped.Computer Use (UI automation reasoning).Count replay_invalid events whose log line timestamp is within WINDOW_S.Create and upload a workspace backup tarball.Create authenticated R2 client.Deep Research agent via Interactions API. Variants - preview →Download a file from R2.ENG_SECTIONEPOCHSEmbodied Reasoning for robotics tasks.Empire vs Markowitz fundsExtract each ranked domain heading + its last-updated date + staleness.FLUTTER_HOMEForce-heal ONLY a genuinely-abandoned session (stale lock = engine dead). MGemini 2.5 Flash — رخيص. فشل = None (لا انهيار).Generate a presigned download URL (default 7 days = 604800s).HEAD a single object print 'OK size_bytes last_modified' or 'MISSING'.HOMEImage generation. Supported models - imagen-4.0-fast-generate-001 (JAVA_HOMEL1_healthchecks_ping.sh scriptL1_healthchecks_ping.shL1_pinger_daemon.pyL4_integrity_check.sh scriptL4_integrity_check.shL5_backup_verify.sh scriptL5_backup_verify.shL6_canary_check.sh scriptL6_canary_check.shL7_version_watchdog.sh scriptL7_version_watchdog.shLD_LIBRARY_PATHList objects in bucket.Most-recently-modified .jsonl that currently holds a .lock = the live session.Most-recently-modified locked .jsonl = the livestuck session.Music generation via generateContent (NOT predict). Models - lyria-3-NOTE happyhorse.py takes --image-url (URL) + --prompt, prints JSON with videoNPM_TOOLSOpen capability requests = explicit skill-gap signals.PATHPATH_1PATH_2PATH_4PATH_5Path_3Path_7Poll a background Interactions API job (e.g. Deep Research).Poll a long-running operation (Veo) until done.Re-inject the dropped user message into main via a one-shot cron systemEvent.Remove backups older than N days.Remove signature fields from one thinking block. Returns (block, changed).Return the most recent human user message text from the session.SECTIONSSL_CERT_DIRSSL_CERT_FILESSL_CERT_FILE_1SSL_CERT_FILE_2Smart Gemini call with KW→US fallback. Returns {ok bool, region_usedSource env.sh and grab the key.TG_CODETG_TITLETS()_3TUNNEL_TOKENTZText embeddings. Models - gemini-embedding-001 (stable, 3072-Text generation via new Interactions API (recommended for new code).Text-to-speech via generateContent. Models - gemini-2.5-flash-previewTextchat generation via generateContent.USDTRY rate from TCMB (Turkish Central Bank)Upload a single file to R2.Video generation (long-running operation). Returns operation name — poll witWeighted portfolio return + USD-adjusted_COMMUNITY_Community 0_COMMUNITY_Community 1_COMMUNITY_Community 10_COMMUNITY_Community 100_COMMUNITY_Community 101_COMMUNITY_Community 102_COMMUNITY_Community 103_COMMUNITY_Community 104_COMMUNITY_Community 105_COMMUNITY_Community 106_COMMUNITY_Community 107_COMMUNITY_Community 108_COMMUNITY_Community 109_COMMUNITY_Community 11_COMMUNITY_Community 110_COMMUNITY_Community 111_COMMUNITY_Community 112_COMMUNITY_Community 113_COMMUNITY_Community 114_COMMUNITY_Community 115_COMMUNITY_Community 116_COMMUNITY_Community 117_COMMUNITY_Community 118_COMMUNITY_Community 119_COMMUNITY_Community 12_COMMUNITY_Community 120_COMMUNITY_Community 121_COMMUNITY_Community 122_COMMUNITY_Community 123_COMMUNITY_Community 124_COMMUNITY_Community 125_COMMUNITY_Community 126_COMMUNITY_Community 127_COMMUNITY_Community 128_COMMUNITY_Community 129_COMMUNITY_Community 13_COMMUNITY_Community 130_COMMUNITY_Community 131_COMMUNITY_Community 132_COMMUNITY_Community 133_COMMUNITY_Community 134_COMMUNITY_Community 135_COMMUNITY_Community 136_COMMUNITY_Community 137_COMMUNITY_Community 138_COMMUNITY_Community 139_COMMUNITY_Community 14_COMMUNITY_Community 140_COMMUNITY_Community 141_COMMUNITY_Community 142_COMMUNITY_Community 143_COMMUNITY_Community 144_COMMUNITY_Community 145_COMMUNITY_Community 146_COMMUNITY_Community 147_COMMUNITY_Community 148_COMMUNITY_Community 149_COMMUNITY_Community 15_COMMUNITY_Community 150_COMMUNITY_Community 151_COMMUNITY_Community 152_COMMUNITY_Community 153_COMMUNITY_Community 154_COMMUNITY_Community 155_COMMUNITY_Community 16_COMMUNITY_Community 17_COMMUNITY_Community 18_COMMUNITY_Community 19_COMMUNITY_Community 2_COMMUNITY_Community 20_COMMUNITY_Community 21_COMMUNITY_Community 22_COMMUNITY_Community 23_COMMUNITY_Community 24_COMMUNITY_Community 25_COMMUNITY_Community 26_COMMUNITY_Community 27_COMMUNITY_Community 28_COMMUNITY_Community 29_COMMUNITY_Community 3_COMMUNITY_Community 30_COMMUNITY_Community 31_COMMUNITY_Community 32_COMMUNITY_Community 33_COMMUNITY_Community 34_COMMUNITY_Community 35_COMMUNITY_Community 36_COMMUNITY_Community 37_COMMUNITY_Community 38_COMMUNITY_Community 39_COMMUNITY_Community 4_COMMUNITY_Community 40_COMMUNITY_Community 41_COMMUNITY_Community 42_COMMUNITY_Community 43_COMMUNITY_Community 44_COMMUNITY_Community 45_COMMUNITY_Community 46_COMMUNITY_Community 47_COMMUNITY_Community 48_COMMUNITY_Community 49_COMMUNITY_Community 5_COMMUNITY_Community 50_COMMUNITY_Community 51_COMMUNITY_Community 52_COMMUNITY_Community 53_COMMUNITY_Community 54_COMMUNITY_Community 55_COMMUNITY_Community 56_COMMUNITY_Community 57_COMMUNITY_Community 58_COMMUNITY_Community 59_COMMUNITY_Community 6_COMMUNITY_Community 60_COMMUNITY_Community 61_COMMUNITY_Community 62_COMMUNITY_Community 63_COMMUNITY_Community 64_COMMUNITY_Community 65_COMMUNITY_Community 66_COMMUNITY_Community 67_COMMUNITY_Community 68_COMMUNITY_Community 69_COMMUNITY_Community 7_COMMUNITY_Community 70_COMMUNITY_Community 71_COMMUNITY_Community 72_COMMUNITY_Community 73_COMMUNITY_Community 74_COMMUNITY_Community 75_COMMUNITY_Community 76_COMMUNITY_Community 77_COMMUNITY_Community 78_COMMUNITY_Community 79_COMMUNITY_Community 8_COMMUNITY_Community 80_COMMUNITY_Community 81_COMMUNITY_Community 82_COMMUNITY_Community 83_COMMUNITY_Community 84_COMMUNITY_Community 85_COMMUNITY_Community 86_COMMUNITY_Community 87_COMMUNITY_Community 88_COMMUNITY_Community 89_COMMUNITY_Community 9_COMMUNITY_Community 90_COMMUNITY_Community 91_COMMUNITY_Community 92_COMMUNITY_Community 93_COMMUNITY_Community 94_COMMUNITY_Community 95_COMMUNITY_Community 96_COMMUNITY_Community 97_COMMUNITY_Community 98_COMMUNITY_Community 99_debounce_ok()_deliver()_dl()_http()_http()_1_is_us_primary()_key()_pcm_to_mp3()_point_line()_points()_request()_resolve_existing_key()_resolve_id()_run()_run_healer()_today()academic_model_gate.sh scriptacademic_model_gate.shacademic_path_healthcheck.sh scriptacademic_path_healthcheck.shacademic_purity_guard.sh scriptacademic_purity_guard.shacademic_shield.pyactive_locked_session()active_session()adjudicate()alert()alert()_1alert()_2analyze()analyze_portfolio()anthropic_spend_monitor.pyanthropic_spend_week()antigravity_agent()api_health_audit.sh scriptapi_health_audit.shaqa()ar()arrow()arsenal_drift_check.sh scriptarsenal_drift_check.sharsenal_health_check.sh scriptarsenal_health_check.sharsenal_health_digest.sh scriptarsenal_health_digest.shask()ask()_1ask_anthropic()ask_google()ask_openai()ask_xai()auto_regenerate()auto_rollback_check.sh scriptauto_rollback_check.shautorecover_daemon.sh scriptautorecover_daemon.shbackup_host_configs.sh scriptbackup_host_configs.shbanner_truth_guard.sh scriptbanner_truth_guard.shbench()build()build_recovery_point.sh scriptbuild_recovery_point.shbuild_report()c_g()c_r()c_y()call_anthropic()call_gemini()call_gemini()_1call_openai()capability_router.sh scriptcapability_router.shcaption()chat()check()check()_1check()_2check_cli()check_eq()check_exists()check_ge()check_hash()check_incomplete_turns()chg()chk()chk()_1chk_http()chk_retry()chunk_text()chunk_text()_1classify()classify()_1clean_nexos()cleanup()cloudflare_activation_watch.sh scriptcloudflare_activation_watch.shcmd_backup()cmd_browse()cmd_cleanup()cmd_crawl()cmd_download()cmd_head()cmd_list()cmd_list()_1cmd_list()_2cmd_map()cmd_now()cmd_presign()cmd_prune()cmd_read()cmd_restore()cmd_scrape()cmd_search()cmd_send()cmd_show()cmd_status()cmd_status()_1cmd_upload()coding_toolchain_env.sh scriptcoding_toolchain_env.shcollect_error_patterns()compare_property_vs_investment()compute()computer_use()concat_mp3()config_valid()context_cap_guard.sh scriptcontext_cap_guard.shcontinuity_checkpoint.pycouncil scriptcouncilcouncil_health_guard.sh scriptcouncil_health_guard.shcpu_hog_guard.sh scriptcpu_hog_guard.shcron_session_cleanup.pycurrent()current_interval()daemons_keepalive.sh scriptdaemons_keepalive.shdecide()deep_research()digest()dns_propagation_watch.sh scriptdns_propagation_watch.shdo_restart()dolphin_liberation_test.pydolphin_venice_liberation_test.pydraw n small ticks perpendicular to segment ab at its midpoint.draw_rect()draw_semi()dump_context()elite_council.pyembed_text()emergency_recover.sh scriptemergency_recover.shensure()ensure_state()ensure_state()_1env()env()_1eqn()errors_summary()esc()evtx_analyze.pyevtx_dump.pyexisting_skills()extract()fable_orchestrator_guard.sh scriptfable_orchestrator_guard.shfallback_health_check.sh scriptfallback_health_check.shfile_md5()find_auth()fmt()free_gateway_port()fsfugu_availability_watch.sh scriptfugu_availability_watch.shfull_recovery_snapshot.sh scriptfull_recovery_snapshot.shfull_server_backup.sh scriptfull_server_backup.shfull_server_secure_backup.sh scriptfull_server_secure_backup.shfull_server_snapshot.sh scriptfull_server_snapshot.shgateway_alive()gateway_error_guard.sh scriptgateway_error_guard.shgateway_stable_pid()gateway_truly_hung()gemini_call()gemini_pcm()gemini_with_fallback.pygen_with_engine()generate_capabilities_index.sh scriptgenerate_capabilities_index.shgenerate_image()generate_music()generate_speech()generate_text()generate_text_interactions()generate_video()get()get_bucket()get_client()get_content()get_crypto()get_gold_silver()get_inflation()get_kt_funds()get_log_path()get_usd_try()get_usd_try()_1gf_codeonly.pygh_pr_merged()git_vault_autocommit.sh scriptgit_vault_autocommit.shgit_velocity()gmail_api()gmail_helper.pygolden_chain_diagram.pygolden_gate.sh scriptgolden_gate.shgolden_prompt_guard.sh scriptgolden_prompt_guard.shgoogle_rollout_watch.sh scriptgoogle_rollout_watch.shgraphify_map.sh scriptgraphify_map.shgrep_arsenal.sh scriptgrep_arsenal.shgrok45_region_watch.sh scriptgrok45_region_watch.shguard_map()guard_run_watcher.sh scriptguard_run_watcher.shhandle()has_signatures()hdr()heal()heal_active()heal_file()heal_idle()heal_thinking_signatures.pyhermes_arabic_font_fix.sh scripthermes_arabic_font_fix.shhermes_forward.pyhermes_tunnel_run.sh scripthermes_tunnel_run.shhttp()httpsincomplete_turn_auto_recover.sh scriptincomplete_turn_auto_recover.shincomplete_turn_autorecover.sh scriptincomplete_turn_autorecover.shincomplete_turn_daemon.sh scriptincomplete_turn_daemon.shincomplete_turn_guard.sh scriptincomplete_turn_guard.shinotify_nexos_guard.sh scriptinotify_nexos_guard.shinotify_wrapper_guard.sh scriptinotify_wrapper_guard.shinstallation_drift_check.sh scriptinstallation_drift_check.shinventory_delta()is_openclaw_alive()is_thinking()json_escape()kt_funds_tracker.pyl3_loop_daemon.sh scriptl3_loop_daemon.shlabel_pt()last_user_message()liberation_guard.pyliberation_route.pylinear_velocity()lint_cron_payload.sh scriptlint_cron_payload.shlip_happyhorse()live()load_env()load_env()_1load_lines()load_state()local_llm_bench_after_backup.sh scriptlocal_llm_bench_after_backup.shlog()log()_1log()_10log()_11log()_12log()_13log()_14log()_15log()_16log()_17log()_18log()_19log()_2log()_20log()_21log()_3log()_4log()_5log()_6log()_7log()_8log()_9log_compliance.sh scriptlog_compliance.shlog_rotation.sh scriptlog_rotation.shlog_section()long_video.sh scriptlong_video.shmain()main()_1main()_10main()_11main()_12main()_13main()_14main()_15main()_16main()_17main()_18main()_19main()_2main()_20main()_21main()_22main()_23main()_24main()_25main()_3main()_4main()_5main()_6main()_7main()_8main()_9main_loop()make_recommendations()maybe_keepalive_safety_net()mcp_call.pymcp_probe.pymedia_failover.pymedia_say.sh scriptmedia_say.shmeta_guard_test.sh scriptmeta_guard_test.shmiss()monitor_m033_leaks.sh scriptmonitor_m033_leaks.shmorning_report.sh scriptmorning_report.shmulti_flagship_verify.pynew_ax()newest_main_session()nexos_guard.sh scriptnexos_guard.shnightly_batch_processor.sh scriptnightly_batch_processor.shnotify()notify()_1notify()_2notify()_3notify()_4notify()_5notify()_6notify()_7notify_restart_if_new()now()now()_1now()_2now()_3now_iso()now_iso()_1ok()ollama_autostart.sh scriptollama_autostart.shollama_big_ondemand.sh scriptollama_big_ondemand.shopenclaw_host_recovery.sh scriptopenclaw_host_recovery.shopenclaw_proc_alive()openclaw_watchdog.sh scriptopenclaw_watchdog.shopenclaw_watchdog_v2.sh scriptopenclaw_watchdog_v2.shoxylabs_tool.pyp6_parse.pyparse()parse()_1parse_domains()parse_feature_requests()parse_xer()parse_xml()path_6pcm_to_mp3()pika_effects_probe.sh scriptpika_effects_probe.shping_openai_compat()pipe()poll_interaction()poll_operation()portal_add_entertainment.pypost_reboot_arsenal_recovery.sh scriptpost_reboot_arsenal_recovery.shpost_restart_channel_check.sh scriptpost_restart_channel_check.shpre_reply_lint.sh scriptpre_reply_lint.shpre_xer_check.sh scriptpre_xer_check.shprev_merged()price_for()primary_now()probe()probe()_1publish_crons_doc.sh scriptpublish_crons_doc.shpublish_guards_status.sh scriptpublish_guards_status.shpull()pull_uncensored_models.sh scriptpull_uncensored_models.shpyrun.sh scriptpyrun.shquery()r2_manager.pyrc_section_analysis.pyread_text()recent_poison_count()record_restart()recover_session()recovery_drill_ab.sh scriptrecovery_drill_ab.shrecovery_drill_c_extract.sh scriptrecovery_drill_c_extract.shrect_area_video.pyrecurring_errors()refresh_last_good.sh scriptrefresh_last_good.shrender_scene()replay_invalid_guard.sh scriptreplay_invalid_guard.shreplay_invalid_repair.pyreplay_poison_healer.pyreplay_recovery.pyreplay_selfheal.sh scriptreplay_selfheal.shreplay_selfheal_daemon.sh scriptreplay_selfheal_daemon.shreplay_selfheal_loop.sh scriptreplay_selfheal_loop.shresolve()resolve_live_log()resolve_log()resolve_openclaw_log()resolve_openclaw_log.sh scriptresolve_openclaw_log.shresolve_openclaw_log_newest()resource_pressure_check.sh scriptresource_pressure_check.shrestarts_last_hour()robotics_er()rotate_compliance_log.sh scriptrotate_compliance_log.shrows_from()run()run_chain()run_healer()run_panel()s()safe_config_patch.sh scriptsafe_config_patch.shsafe_cp()safe_media_send.sh scriptsafe_media_send.shsafe_update.sh scriptsafe_update.shsafe_write_path()save_continuity()save_state()say()scan_dir()scene1()scene2()scene3()scene4()scene5()scene6()sec()self_audit.pyselftest()send_wake()session_key()sessions_subagent_cleanup.pyshould_skip()signature_fix_watch.sh scriptsignature_fix_watch.shsnapshot()snapshot_retention.sh scriptsnapshot_retention.shsnapshots_retention.sh scriptsnapshots_retention.shsota_benchmark.pyspawn_openclaw()sqlite_tune.sh scriptsqlite_tune.shstale_lock_cleanup.sh scriptstale_lock_cleanup.shstall_watchdog.sh scriptstall_watchdog.shstart_if_dead()start_watchdog_daemons.sh scriptstart_watchdog_daemons.shstatus()stop()storage_cleanup.sh scriptstorage_cleanup.shstrip_block()strip_model()stt_transcribe.pysummarize()sync_obsidian_vault.sh scriptsync_obsidian_vault.shtelegram_stall_guard.sh scripttelegram_stall_guard.shtest_fallback_chain.sh scripttest_fallback_chain.shtext_of()text_of()_1tg_code.sh scripttg_code.shthinking_signature_guard.sh scriptthinking_signature_guard.shtick_on()timemachine.sh scripttimemachine.shtimemachine_freshness_guard.sh scripttimemachine_freshness_guard.shtranscribe()transcribe_groq()transcribe_openai()ts()ts()_1ts()_2ts()_4ts()_5ts()_6ts()_7tts_chain_selftest.sh scripttts_chain_selftest.shtts_charon_chunked.pytts_cli_adapter.sh scripttts_cli_adapter.shtts_elevenlabs()tts_gemini()tts_gemini25()tts_minimax()tts_openai()tts_unified.pytts_xai()uncensored_local.sh scriptuncensored_local.shuncensored_online.sh scriptuncensored_online.shupstream_replay_watch.sh scriptupstream_replay_watch.shvenice.sh scriptvenice.shverify_agreements.sh scriptverify_agreements.shverify_arsenal_loaded.sh scriptverify_arsenal_loaded.shverify_context_load.sh scriptverify_context_load.shverify_domain_chains.sh scriptverify_domain_chains.shverify_google_dualkey.pyverify_host_daemon.sh scriptverify_host_daemon.shverify_rule_compliance.sh scriptverify_rule_compliance.shverify_toolchain.sh scriptverify_toolchain.shversion_drift_guard.sh scriptversion_drift_guard.shvid_grok15()vid_seedance()voice_archiver.sh scriptvoice_archiver.shwatchdog_unified.sh scriptwatchdog_unified.shweekly_arsenal_audit.sh scriptweekly_arsenal_audit.shweekly_compliance_report.sh scriptweekly_compliance_report.shweekly_disk_cleanup.sh scriptweekly_disk_cleanup.shweekly_full_audit.sh scriptweekly_full_audit.shweekly_investment_advisor.pyweekly_memory_merge.sh scriptweekly_memory_merge.shweekly_recovery_point.sh scriptweekly_recovery_point.shweekly_report.jsweekly_snapshot_and_email.sh scriptweekly_snapshot_and_email.shweekly_software_update.sh scriptweekly_software_update.shweekly_velocity_report.pywhatsapp_health_guard.sh scriptwhatsapp_health_guard.shwhatsapp_number_guard.sh scriptwhatsapp_number_guard.shworking_indicator.sh scriptworking_indicator.shwrite_audit()yday_utc()من logs أنماط الأخطاء فقط (errorfailexception) — لا محتوى خام حسّاس.نداء واحد مع إعادة واحدة فقط على الأخطاء العابرة (no infinite loop).يشغّل اللوحة بالتوازي تحت مهلة جدارية صارمة. أي future لم يكتمل = فشل مهلة.يولّد كل المقاطع بمحرّك واحد (صوت متّصل). يرجع True فقط لو نجحت كل المقاطع.

--- name: gh-issues description: "Fetch GitHub issues, spawn sub-agents to implement fixes and open PRs, then monitor and address PR review comments. Usage: /gh-issues [owner/repo] [--label bug] [--limit 5] [--milestone v1.0] [--assignee @me] [--fork user/repo] [--watch] [--interval 5] [--reviews-only] [--cron] [--dry-run] [--model glm-5] [--notify-channel -1002381931352]" user-invocable: true metadata: { "openclaw": { "requires": { "bins": ["curl", "git", "gh"] }, "primaryEnv": "GH_TOKEN", "install": [ { "id": "brew", "kind": "brew", "formula": "gh", "bins": ["gh"], "label": "Install GitHub CLI (brew)", }, ], }, } ---

gh-issues — Auto-fix GitHub Issues with Parallel Sub-agents

You are an orchestrator. Follow these 6 phases exactly. Do not skip phases.

IMPORTANT — No gh CLI dependency. This skill uses curl + the GitHub REST API exclusively. The GH_TOKEN env var is already injected by OpenClaw. Pass it as a Bearer token in all API calls:


curl -s -H "Authorization: Bearer $GH_TOKEN" -H "Accept: application/vnd.github+json" ...

---

Phase 1 — Parse Arguments

Parse the arguments string provided after /gh-issues.

Positional:

git remote get-url origin Extract owner/repo from the URL (handles both HTTPS and SSH formats). - HTTPS: https://github.com/owner/repo.git → owner/repo - SSH: git@github.com:owner/repo.git → owner/repo If not in a git repo or no remote found, stop with an error asking the user to specify owner/repo.

Flags (all optional): | Flag | Default | Description | |------|---------|-------------| | --label | _(none)_ | Filter by label (e.g. bug, enhancement) | | --limit | 10 | Max issues to fetch per poll | | --milestone | _(none)_ | Filter by milestone title | | --assignee | _(none)_ | Filter by assignee (@me for self) | | --state | open | Issue state: open, closed, all | | --fork | _(none)_ | Your fork (user/repo) to push branches and open PRs from. Issues are fetched from the source repo; code is pushed to the fork; PRs are opened from the fork to the source repo. | | --watch | false | Keep polling for new issues and PR reviews after each batch | | --interval | 5 | Minutes between polls (only with --watch) | | --dry-run | false | Fetch and display only — no sub-agents | | --yes | false | Skip confirmation and auto-process all filtered issues | | --reviews-only | false | Skip issue processing (Phases 2-5). Only run Phase 6 — check open PRs for review comments and address them. | | --cron | false | Cron-safe mode: fetch issues and spawn sub-agents, exit without waiting for results. | | --model | _(none)_ | Model to use for sub-agents (e.g. glm-5, zai/glm-5). If not specified, uses the agent's default model. | | --notify-channel | _(none)_ | Telegram channel ID to send final PR summary to (e.g. -1002381931352). Only the final result with PR links is sent, not status updates. |

Store parsed values for use in subsequent phases.

Derived values:

If --reviews-only is set: Skip directly to Phase 6. Run token resolution (from Phase 2) first, then jump to Phase 6.

If --cron is set:

---

Phase 2 — Fetch Issues

Token Resolution: First, ensure GH_TOKEN is available. Check environment:


echo $GH_TOKEN

If empty, read from config:


cat ~/.openclaw/openclaw.json | jq -r '.skills.entries["gh-issues"].apiKey // empty'

If still empty, check /data/.clawdbot/openclaw.json:


cat /data/.clawdbot/openclaw.json | jq -r '.skills.entries["gh-issues"].apiKey // empty'

Export as GH_TOKEN for subsequent commands:


export GH_TOKEN="<token>"

Build and run a curl request to the GitHub Issues API via exec:


curl -s -H "Authorization: Bearer $GH_TOKEN" -H "Accept: application/vnd.github+json" \
  "https://api.github.com/repos/{SOURCE_REPO}/issues?per_page={limit}&state={state}&{query_params}"

Where {query_params} is built from:

IMPORTANT: The GitHub Issues API also returns pull requests. Filter them out — exclude any item where pull_request key exists in the response object.

If in watch mode: Also filter out any issue numbers already in the PROCESSED_ISSUES set from previous batches.

Error handling:

> "GitHub authentication failed. Please check your apiKey in the OpenClaw dashboard or in ~/.openclaw/openclaw.json under skills.entries.gh-issues." Parse the JSON response. For each issue, extract: number, title, body, labels (array of label names), assignees, html_url.

---

Phase 3 — Present & Confirm

Display a markdown table of fetched issues:

| # | Title | Labels | | --- | ----------------------------- | ------------- | | 42 | Fix null pointer in parser | bug, critical | | 37 | Add retry logic for API calls | enhancement |

If FORK_MODE is active, also display:

> "Fork mode: branches will be pushed to {PUSH_REPO}, PRs will target {SOURCE_REPO}"

If --dry-run is active:

If --yes is active:

Otherwise: Ask the user to confirm which issues to process:

Wait for user response before proceeding.

Watch mode note: On the first poll, always confirm with the user (unless --yes is set). On subsequent polls, auto-process all new issues without re-confirming (the user already opted in). Still display the table so they can see what's being processed.

---

Phase 4 — Pre-flight Checks

Run these checks sequentially via exec:

1. Dirty working tree check:


   git status --porcelain
   

If output is non-empty, warn the user:

> "Working tree has uncommitted changes. Sub-agents will create branches from HEAD — uncommitted changes will NOT be included. Continue?" > Wait for confirmation. If declined, stop.

2. Record base branch:


   git rev-parse --abbrev-ref HEAD
   

Store as BASE_BRANCH.

3. Verify remote access: If FORK_MODE: - Verify the fork remote exists. Check if a git remote named fork exists:


     git remote get-url fork
     
If it doesn't exist, add it:

     git remote add fork https://x-access-token:$GH_TOKEN@github.com/{PUSH_REPO}.git
     
- Also verify origin (the source repo) is reachable:

     git ls-remote --exit-code origin HEAD
     

If not FORK_MODE:


   git ls-remote --exit-code origin HEAD
   

If this fails, stop with: "Cannot reach remote origin. Check your network and git config."

4. Verify GH_TOKEN validity:


   curl -s -o /dev/null -w "%{http_code}" -H "Authorization: Bearer $GH_TOKEN" https://api.github.com/user
   

If HTTP status is not 200, stop with:

> "GitHub authentication failed. Please check your apiKey in the OpenClaw dashboard or in ~/.openclaw/openclaw.json under skills.entries.gh-issues."

5. Check for existing PRs: For each confirmed issue number N, run:


   curl -s -H "Authorization: Bearer $GH_TOKEN" -H "Accept: application/vnd.github+json" \
     "https://api.github.com/repos/{SOURCE_REPO}/pulls?head={PUSH_REPO_OWNER}:fix/issue-{N}&state=open&per_page=1"
   

(Where PUSH_REPO_OWNER is the owner portion of PUSH_REPO) If the response array is non-empty, remove that issue from the processing list and report:

> "Skipping #{N} — PR already exists: {html_url}"

If all issues are skipped, report and stop (or loop back if in watch mode).

6. Check for in-progress branches (no PR yet = sub-agent still working): For each remaining issue number N (not already skipped by the PR check above), check if a fix/issue-{N} branch exists on the push repo (which may be a fork, not origin):


   curl -s -o /dev/null -w "%{http_code}" \
     -H "Authorization: Bearer $GH_TOKEN" \
     "https://api.github.com/repos/{PUSH_REPO}/branches/fix/issue-{N}"
   

If HTTP 200 → the branch exists on the push repo but no open PR was found for it in step 5. Skip that issue:

> "Skipping #{N} — branch fix/issue-{N} exists on {PUSH_REPO}, fix likely in progress"

This check uses the GitHub API instead of git ls-remote so it works correctly in fork mode (where branches are pushed to the fork, not origin).

If all issues are skipped after this check, report and stop (or loop back if in watch mode).

7. Check claim-based in-progress tracking: This prevents duplicate processing when a sub-agent from a previous cron run is still working but hasn't pushed a branch or opened a PR yet.

Read the claims file (create empty {} if missing):


   CLAIMS_FILE="/data/.clawdbot/gh-issues-claims.json"
   if [ ! -f "$CLAIMS_FILE" ]; then
     mkdir -p /data/.clawdbot
     echo '{}' > "$CLAIMS_FILE"
   fi
   

Parse the claims file. For each entry, check if the claim timestamp is older than 2 hours. If so, remove it (expired — the sub-agent likely finished or failed silently). Write back the cleaned file:


   CLAIMS=$(cat "$CLAIMS_FILE")
   CUTOFF=$(date -u -d '2 hours ago' +%Y-%m-%dT%H:%M:%SZ 2>/dev/null || date -u -v-2H +%Y-%m-%dT%H:%M:%SZ)
   CLAIMS=$(echo "$CLAIMS" | jq --arg cutoff "$CUTOFF" 'to_entries | map(select(.value > $cutoff)) | from_entries')
   echo "$CLAIMS" > "$CLAIMS_FILE"
   

For each remaining issue number N (not already skipped by steps 5 or 6), check if {SOURCE_REPO}#{N} exists as a key in the claims file.

If claimed and not expired → skip:

> "Skipping #{N} — sub-agent claimed this issue {minutes}m ago, still within timeout window"

Where {minutes} is calculated from the claim timestamp to now.

If all issues are skipped after this check, report and stop (or loop back if in watch mode).

---

Phase 5 — Spawn Sub-agents (Parallel)

Cron mode (--cron is active):


  CURSOR_FILE="/data/.clawdbot/gh-issues-cursor-{SOURCE_REPO_SLUG}.json"
  # SOURCE_REPO_SLUG = owner-repo with slashes replaced by hyphens (e.g., openclaw-openclaw)
  

Read the cursor file (create if missing):


  if [ ! -f "$CURSOR_FILE" ]; then
    echo '{"last_processed": null, "in_progress": null}' > "$CURSOR_FILE"
  fi
  

- last_processed: issue number of the last completed issue (or null if none) - in_progress: issue number currently being processed (or null)

- Issue number > last_processed (if last_processed is set) - AND issue is not in the claims file (not already in progress) - AND no PR exists for the issue (checked in Phase 4 step 5) - AND no branch exists on the push repo (checked in Phase 4 step 6) 1. Mark it as in_progress in the cursor file 2. Spawn a single sub-agent for that one issue with cleanup: "keep" and runTimeoutSeconds: 3600 3. If --model was provided, include model: "{MODEL}" in the spawn config 4. If --notify-channel was provided, include the channel in the task so the sub-agent can notify 5. Do NOT await the sub-agent result — fire and forget 6. Write claim: After spawning, read the claims file, add {SOURCE_REPO}#{N} with the current ISO timestamp, and write it back 7. Immediately report: "Spawned fix agent for #{N} — will create PR when complete" 8. Exit the skill. Do not proceed to Results Collection or Phase 6.

Normal mode (--cron is NOT active): For each confirmed issue, spawn a sub-agent using sessions_spawn. Launch up to 8 concurrently (matching subagents.maxConcurrent: 8). If more than 8 issues, batch them — launch the next agent as each completes.

Write claims: After spawning each sub-agent, read the claims file, add {SOURCE_REPO}#{N} with the current ISO timestamp, and write it back (same procedure as cron mode above). This covers interactive usage where watch mode might overlap with cron runs.

Sub-agent Task Prompt

For each issue, construct the following prompt and pass it to sessions_spawn. Variables to inject into the template:

When constructing the task, replace all template variables including {notify_channel} with actual values.


You are a focused code-fix agent. Your task is to fix a single GitHub issue and open a PR.

IMPORTANT: Do NOT use the gh CLI — it is not installed. Use curl with the GitHub REST API for all GitHub operations.

First, ensure GH_TOKEN is set. Check: echo $GH_TOKEN. If empty, read from config: GH_TOKEN=$(cat ~/.openclaw/openclaw.json 2>/dev/null | jq -r '.skills.entries["gh-issues"].apiKey // empty') || GH_TOKEN=$(cat /data/.clawdbot/openclaw.json 2>/dev/null | jq -r '.skills.entries["gh-issues"].apiKey // empty')

Use the token in all GitHub API calls: curl -s -H "Authorization: Bearer $GH_TOKEN" -H "Accept: application/vnd.github+json" ...

<config> Source repo (issues): {SOURCE_REPO} Push repo (branches + PRs): {PUSH_REPO} Fork mode: {FORK_MODE} Push remote name: {PUSH_REMOTE} Base branch: {BASE_BRANCH} Notify channel: {notify_channel} </config>

<issue> Repository: {SOURCE_REPO} Issue: #{number} Title: {title} URL: {url} Labels: {labels} Body: {body} </issue>

<instructions> Follow these steps in order. If any step fails, report the failure and stop.

0. SETUP — Ensure GH_TOKEN is available:

export GH_TOKEN=$(node -e "const fs=require('fs'); const c=JSON.parse(fs.readFileSync('/data/.clawdbot/openclaw.json','utf8')); console.log(c.skills?.entries?.['gh-issues']?.apiKey || '')")


If that fails, also try:

export GH_TOKEN=$(cat ~/.openclaw/openclaw.json 2>/dev/null | node -e "const fs=require('fs');const d=JSON.parse(fs.readFileSync(0,'utf8'));console.log(d.skills?.entries?.['gh-issues']?.apiKey||'')")


Verify: echo "Token: ${GH_TOKEN:0:10}..."

1. CONFIDENCE CHECK — Before implementing, assess whether this issue is actionable:

  • Read the issue body carefully. Is the problem clearly described?
  • Search the codebase (grep/find) for the relevant code. Can you locate it?
  • Is the scope reasonable? (single file/function = good, whole subsystem = bad)
  • Is a specific fix suggested or is it a vague complaint?
Rate your confidence (1-10). If confidence < 7, STOP and report: > "Skipping #{number}: Low confidence (score: N/10) — [reason: vague requirements | cannot locate code | scope too large | no clear fix suggested]"

Only proceed if confidence >= 7.

1. UNDERSTAND — Read the issue carefully. Identify what needs to change and where.

2. BRANCH — Create a feature branch from the base branch: git checkout -b fix/issue-{number} {BASE_BRANCH}

3. ANALYZE — Search the codebase to find relevant files:

  • Use grep/find via exec to locate code related to the issue
  • Read the relevant files to understand the current behavior
  • Identify the root cause
4. IMPLEMENT — Make the minimal, focused fix:
  • Follow existing code style and conventions
  • Change only what is necessary to fix the issue
  • Do not add unrelated changes or new dependencies without justification
5. TEST — Discover and run the existing test suite if one exists:
  • Look for package.json scripts, Makefile targets, pytest, cargo test, etc.
  • Run the relevant tests
  • If tests fail after your fix, attempt ONE retry with a corrected approach
  • If tests still fail, report the failure
6. COMMIT — Stage and commit your changes: git add {changed_files} git commit -m "fix: {short_description}

Fixes {SOURCE_REPO}#{number}"

7. PUSH — Push the branch: First, ensure the push remote uses token auth and disable credential helpers: git config --global credential.helper "" git remote set-url {PUSH_REMOTE} https://x-access-token:$GH_TOKEN@github.com/{PUSH_REPO}.git Then push: GIT_ASKPASS=true git push -u {PUSH_REMOTE} fix/issue-{number}

8. PR — Create a pull request using the GitHub API:

If FORK_MODE is true, the PR goes from your fork to the source repo:

  • head = "{PUSH_REPO_OWNER}:fix/issue-{number}"
  • base = "{BASE_BRANCH}"
  • PR is created on {SOURCE_REPO}
If FORK_MODE is false:
  • head = "fix/issue-{number}"
  • base = "{BASE_BRANCH}"
  • PR is created on {SOURCE_REPO}
curl -s -X POST \ -H "Authorization: Bearer $GH_TOKEN" \ -H "Accept: application/vnd.github+json" \ https://api.github.com/repos/{SOURCE_REPO}/pulls \ -d '{ "title": "fix: {title}", "head": "{head_value}", "base": "{BASE_BRANCH}", "body": "## Summary\n\n{one_paragraph_description_of_fix}\n\n## Changes\n\n{bullet_list_of_changes}\n\n## Testing\n\n{what_was_tested_and_results}\n\nFixes {SOURCE_REPO}#{number}" }'

Extract the html_url from the response — this is the PR link.

9. REPORT — Send back a summary:

  • PR URL (the html_url from step 8)
  • Files changed (list)
  • Fix summary (1-2 sentences)
  • Any caveats or concerns
10. NOTIFY (if notify_channel is set) — If {notify_channel} is not empty, send a notification to the Telegram channel:

Use the message tool with:

{title}

{pr_url}

Files changed: {files_changed_list}"


</instructions>

<constraints>

  • No force-push, no modifying the base branch
  • No unrelated changes or gratuitous refactoring
  • No new dependencies without strong justification
  • If the issue is unclear or too complex to fix confidently, report your analysis instead of guessing
  • Do NOT use the gh CLI — it is not available. Use curl + GitHub REST API for all GitHub operations.
  • GH_TOKEN is already in the environment — do NOT prompt for auth
  • Time limit: you have 60 minutes max. Be thorough — analyze properly, test your fix, don't rush.
</constraints>

Spawn configuration per sub-agent:

Timeout Handling

If a sub-agent exceeds 60 minutes, record it as:

> "#{N} — Timed out (issue may be too complex for auto-fix)"

---

Results Collection

If --cron is active: Skip this section entirely — the orchestrator already exited after spawning in Phase 5.

After ALL sub-agents complete (or timeout), collect their results. Store the list of successfully opened PRs in OPEN_PRS (PR number, branch name, issue number, PR URL) for use in Phase 6.

Present a summary table:

| Issue | Status | PR | Notes | | --------------------- | --------- | ------------------------------ | ------------------------------ | | #42 Fix null pointer | PR opened | https://github.com/.../pull/99 | 3 files changed | | #37 Add retry logic | Failed | -- | Could not identify target code | | #15 Update docs | Timed out | -- | Too complex for auto-fix | | #8 Fix race condition | Skipped | -- | PR already exists |

Status values:

End with a one-line summary:

> "Processed {N} issues: {success} PRs opened, {failed} failed, {skipped} skipped."

Send notification to channel (if --notify-channel is set): If --notify-channel was provided, send the final summary to that Telegram channel using the message tool:


Use the message tool with:
  • action: "send"
  • channel: "telegram"
  • target: "{notify-channel}"
  • message: "✅ GitHub Issues Processed
Processed {N} issues: {success} PRs opened, {failed} failed, {skipped} skipped.

{PR_LIST}"

Where PR_LIST includes only successfully opened PRs in format: • #{issue_number}: {PR_url} ({notes})

Then proceed to Phase 6.

---

Phase 6 — PR Review Handler

This phase monitors open PRs (created by this skill or pre-existing fix/issue- PRs) for review comments and spawns sub-agents to address them.

When this phase runs:

Cron review mode (--cron --reviews-only): When both --cron and --reviews-only are set:

1. Run token resolution (Phase 2 token section) 2. Discover open fix/issue- PRs (Step 6.1) 3. Fetch review comments (Step 6.2) 4. Analyze comment content for actionability (Step 6.3) 5. If actionable comments are found, spawn ONE review-fix sub-agent for the first PR with unaddressed comments — fire-and-forget (do NOT await result) - Use cleanup: "keep" and runTimeoutSeconds: 3600 - If --model was provided, include model: "{MODEL}" in the spawn config 6. Report: "Spawned review handler for PR #{N} — will push fixes when complete" 7. Exit the skill immediately. Do not proceed to Step 6.5 (Review Results).

If no actionable comments found, report "No actionable review comments found" and exit.

Normal mode (non-cron) continues below:

Step 6.1 — Discover PRs to Monitor

Collect PRs to check for review comments:

If coming from Phase 5: Use the OPEN_PRS list from Results Collection.

If --reviews-only or subsequent watch cycle: Fetch all open PRs with fix/issue- branch pattern:


curl -s -H "Authorization: Bearer $GH_TOKEN" -H "Accept: application/vnd.github+json" \
  "https://api.github.com/repos/{SOURCE_REPO}/pulls?state=open&per_page=100"

Filter to only PRs where head.ref starts with fix/issue-.

For each PR, extract: number (PR number), head.ref (branch name), html_url, title, body.

If no PRs found, report "No open fix/ PRs to monitor" and stop (or loop back if in watch mode).

Step 6.2 — Fetch All Review Sources

For each PR, fetch reviews from multiple sources:

Fetch PR reviews:


curl -s -H "Authorization: Bearer $GH_TOKEN" -H "Accept: application/vnd.github+json" \
  "https://api.github.com/repos/{SOURCE_REPO}/pulls/{pr_number}/reviews"

Fetch PR review comments (inline/file-level):


curl -s -H "Authorization: Bearer $GH_TOKEN" -H "Accept: application/vnd.github+json" \
  "https://api.github.com/repos/{SOURCE_REPO}/pulls/{pr_number}/comments"

Fetch PR issue comments (general conversation):


curl -s -H "Authorization: Bearer $GH_TOKEN" -H "Accept: application/vnd.github+json" \
  "https://api.github.com/repos/{SOURCE_REPO}/issues/{pr_number}/comments"

Fetch PR body for embedded reviews: Some review tools (like Greptile) embed their feedback directly in the PR body. Check for:


curl -s -H "Authorization: Bearer $GH_TOKEN" -H "Accept: application/vnd.github+json" \
  "https://api.github.com/repos/{SOURCE_REPO}/pulls/{pr_number}"

Extract the body field and parse for embedded review content.

Step 6.3 — Analyze Comments for Actionability

Determine the bot's own username for filtering:


curl -s -H "Authorization: Bearer $GH_TOKEN" https://api.github.com/user | jq -r '.login'

Store as BOT_USERNAME. Exclude any comment where user.login equals BOT_USERNAME.

For each comment/review, analyze the content to determine if it requires action:

NOT actionable (skip):

IS actionable (requires attention):

- "this test needs to be updated" - "please fix", "change this", "update", "can you", "should be", "needs to" - "will fail", "will break", "causes an error" - Mentions of specific code issues (bugs, missing error handling, edge cases) - Critical issues or breaking changes - Test failures expected - Specific code that needs attention - Confidence scores with concerns

Parse embedded review content (e.g., Greptile): Look for sections marked with <!-- greptile_comment --> or similar. Extract:

Build actionable_comments list with:

If no actionable comments found across any PR, report "No actionable review comments found" and stop (or loop back if in watch mode).

Step 6.4 — Present Review Comments

Display a table of PRs with pending actionable comments:


| PR | Branch | Actionable Comments | Sources |
|----|--------|---------------------|---------|
| #99 | fix/issue-42 | 2 comments | @reviewer1, greptile |
| #101 | fix/issue-37 | 1 comment | @reviewer2 |

If --yes is NOT set and this is not a subsequent watch poll: ask the user to confirm which PRs to address ("all", comma-separated PR numbers, or "skip").

Step 6.5 — Spawn Review Fix Sub-agents (Parallel)

For each PR with actionable comments, spawn a sub-agent. Launch up to 8 concurrently.

Review fix sub-agent prompt:


You are a PR review handler agent. Your task is to address review comments on a pull request by making the requested changes, pushing updates, and replying to each comment.

IMPORTANT: Do NOT use the gh CLI — it is not installed. Use curl with the GitHub REST API for all GitHub operations.

First, ensure GH_TOKEN is set. Check: echo $GH_TOKEN. If empty, read from config: GH_TOKEN=$(cat ~/.openclaw/openclaw.json 2>/dev/null | jq -r '.skills.entries["gh-issues"].apiKey // empty') || GH_TOKEN=$(cat /data/.clawdbot/openclaw.json 2>/dev/null | jq -r '.skills.entries["gh-issues"].apiKey // empty')

<config> Repository: {SOURCE_REPO} Push repo: {PUSH_REPO} Fork mode: {FORK_MODE} Push remote: {PUSH_REMOTE} PR number: {pr_number} PR URL: {pr_url} Branch: {branch_name} </config>

<review_comments> {json_array_of_actionable_comments}

Each comment has:

  • id: comment ID (for replying)
  • user: who left it
  • body: the comment text
  • path: file path (for inline comments)
  • line: line number (for inline comments)
  • diff_hunk: surrounding diff context (for inline comments)
  • source: where the comment came from (review, inline, pr_body, greptile, etc.)
</review_comments>

<instructions> Follow these steps in order:

0. SETUP — Ensure GH_TOKEN is available:

export GH_TOKEN=$(node -e "const fs=require('fs'); const c=JSON.parse(fs.readFileSync('/data/.clawdbot/openclaw.json','utf8')); console.log(c.skills?.entries?.['gh-issues']?.apiKey || '')")


Verify: echo "Token: ${GH_TOKEN:0:10}..."

1. CHECKOUT — Switch to the PR branch: git fetch {PUSH_REMOTE} {branch_name} git checkout {branch_name} git pull {PUSH_REMOTE} {branch_name}

2. UNDERSTAND — Read ALL review comments carefully. Group them by file. Understand what each reviewer is asking for.

3. IMPLEMENT — For each comment, make the requested change:

  • Read the file and locate the relevant code
  • Make the change the reviewer requested
  • If the comment is vague or you disagree, still attempt a reasonable fix but note your concern
  • If the comment asks for something impossible or contradictory, skip it and explain why in your reply
4. TEST — Run existing tests to make sure your changes don't break anything:
  • If tests fail, fix the issue or revert the problematic change
  • Note any test failures in your replies
5. COMMIT — Stage and commit all changes in a single commit: git add {changed_files} git commit -m "fix: address review comments on PR #{pr_number}

Addresses review feedback from {reviewer_names}"

6. PUSH — Push the updated branch: git config --global credential.helper "" git remote set-url {PUSH_REMOTE} https://x-access-token:$GH_TOKEN@github.com/{PUSH_REPO}.git GIT_ASKPASS=true git push {PUSH_REMOTE} {branch_name}

7. REPLY — For each addressed comment, post a reply:

For inline review comments (have a path/line), reply to the comment thread: curl -s -X POST \ -H "Authorization: Bearer $GH_TOKEN" \ -H "Accept: application/vnd.github+json" \ https://api.github.com/repos/{SOURCE_REPO}/pulls/{pr_number}/comments/{comment_id}/replies \ -d '{"body": "Addressed in commit {short_sha} — {brief_description_of_change}"}'

For general PR comments (issue comments), reply on the PR: curl -s -X POST \ -H "Authorization: Bearer $GH_TOKEN" \ -H "Accept: application/vnd.github+json" \ https://api.github.com/repos/{SOURCE_REPO}/issues/{pr_number}/comments \ -d '{"body": "Addressed feedback from @{reviewer}:\n\n{summary_of_changes_made}\n\nUpdated in commit {short_sha}"}'

For comments you could NOT address, reply explaining why: "Unable to address this comment: {reason}. This may need manual review."

8. REPORT — Send back a summary:

  • PR URL
  • Number of comments addressed vs skipped
  • Commit SHA
  • Files changed
  • Any comments that need manual attention
</instructions>

<constraints>

  • Only modify files relevant to the review comments
  • Do not make unrelated changes
  • Do not force-push — always regular push
  • If a comment contradicts another comment, address the most recent one and flag the conflict
  • Do NOT use the gh CLI — use curl + GitHub REST API
  • GH_TOKEN is already in the environment — do not prompt for auth
  • Time limit: 60 minutes max
</constraints>

Spawn configuration per sub-agent:

Step 6.6 — Review Results

After all review sub-agents complete, present a summary:


| PR | Comments Addressed | Comments Skipped | Commit | Status |
|----|-------------------|-----------------|--------|--------|
| #99 fix/issue-42 | 3 | 0 | abc123f | All addressed |
| #101 fix/issue-37 | 1 | 1 | def456a | 1 needs manual review |

Add comment IDs from this batch to ADDRESSED_COMMENTS set to prevent re-processing.

---

Watch Mode (if --watch is active)

After presenting results from the current batch:

1. Add all issue numbers from this batch to the running set PROCESSED_ISSUES. 2. Add all addressed comment IDs to ADDRESSED_COMMENTS. 3. Tell the user: > "Next poll in {interval} minutes... (say 'stop' to end watch mode)" 4. Sleep for {interval} minutes. 5. Go back to Phase 2 — Fetch Issues. The fetch will automatically filter out: - Issues already in PROCESSED_ISSUES - Issues that have existing fix/issue-{N} PRs (caught in Phase 4 pre-flight) 6. After Phases 2-5 (or if no new issues), run Phase 6 to check for new review comments on ALL tracked PRs (both newly created and previously opened). 7. If no new issues AND no new actionable review comments → report "No new activity. Polling again in {interval} minutes..." and loop back to step 4. 8. The user can say "stop" at any time to exit watch mode. When stopping, present a final cumulative summary of ALL batches — issues processed AND review comments addressed.

Context hygiene between polls — IMPORTANT: Only retain between poll cycles:

Do NOT retain issue bodies, comment bodies, sub-agent transcripts, or codebase analysis between polls.