Skillpedia
الوكلاء7.1k · #13593

sub-agent

ما الذي تفعله

تفوّض هذه المهارة مهمة برمجية إلى مساعد برمجة منفصل يعمل من دون تفاعل في الخلفية. وهي موجهة إلى المطورين الذين يريدون إنجاز ميزة أو مراجعة أو إعادة هيكلة بينما يواصلون عملهم.

متى تستخدمها

  • ✓عندما تريد أن يُنجز مساعد برمجة آخر في الخلفية ميزة مستقلة تمامًا.
  • ✓عندما تحتاج مراجعة كود أو إعادة هيكلة إلى استكشاف كثير من الملفات.
  • ✓عندما تريد تشغيل مساعد برمجة في الوضع غير التفاعلي حتى ينتهي من دون أسئلة.

رابط المهارة

https://github.com/TokenRhythm/opensquilla/blob/main/src/opensquilla/skills/bundled/sub-agent/SKILL.md

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

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

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

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

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

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

“هل يمكنك تسليم إعادة هيكلة وحدة الفواتير إلى مساعد برمجة في الخلفية، والتحقق من تقدمه لاحقًا؟”

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

كيف تعمل

يبدأ وكيلك مساعد البرمجة المختار بأمر غير تفاعلي ومهمة واضحة، ثم يتابع العملية في الخلفية حتى تنتهي. ويستخدم أدوات العمليات للتحقق من التقدم وجمع النتائج.

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

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

Sub-Agent (opensquilla process tools)

Generic "spawn a sub-Agent" entry point for delegating self-contained tasks to Codex / Claude Code / OpenCode / Pi via background process. Use this playbook for self-contained coding and file-editing tasks.

Use OpenSquilla's exec_command and process tools for coding agent work. exec_command starts both short and long commands; use yield_time_ms=0 for a long run and keep the returned execution handle. OpenSquilla does not expose a bash tool; do not use the legacy bash tool-call DSL.

Non-Interactive CLI Mode

OpenSquilla's process tools do not expose a pty parameter. Prefer non-interactive command modes that run and exit cleanly:

# ✅ Correct for Codex/Pi/OpenCode
exec_command(command="codex exec 'Your prompt'")

For Claude Code (claude CLI), use --print --permission-mode bypassPermissions instead. --dangerously-skip-permissions with PTY can exit after the confirmation dialog. --print mode keeps full tool access and avoids interactive confirmation:

# ✅ Correct for Claude Code (no PTY needed)
cd /path/to/project && claude --permission-mode bypassPermissions --print 'Your task'

# For background execution: use exec_command(yield_time_ms=0, ...)

# ❌ Wrong for Claude Code
exec_command(command="claude --dangerously-skip-permissions 'task'")

OpenSquilla Tool Parameters

Tool Key parameters Description
exec_command command, workdir, timeout, yield_time_ms Start a shell command; use yield_time_ms=0 for a long run and keep the returned execution handle.
process action, session_id, data, offset, limit Poll, log, write to, or stop a background process.

Process Tool Actions (for background sessions)

Action Description
list List all running/recent sessions
poll Check if session is still running
log Get session output (with optional offset/limit)
write Send raw data to stdin
submit Send data + newline (like typing and pressing Enter)
eof Close stdin
remove Remove a finished session from the process list
kill Terminate the session

Quick Start: One-Shot Tasks

For quick prompts/chats, create a temp git repo and run:

# Quick chat (Codex needs a git repo!)
SCRATCH=$(mktemp -d) && cd $SCRATCH && git init && codex exec "Your prompt here"

# Or in a real project
exec_command(workdir="~/Projects/myproject", command="codex exec 'Add error handling to the API calls'")

Why git init? Codex refuses to run outside a trusted git directory. Creating a temp repo solves this for scratch work.


The Pattern: workdir + exec_command + process

For longer tasks, use exec_command(yield_time_ms=0, ...):

# Start agent in target directory.
exec_command(yield_time_ms=0, workdir="~/project", command="codex exec --full-auto 'Build a snake game'")
# Returns an execution handle (the current compatibility field is `session_id`)

# Wait for it to finish — blocks until the process exits (or the timeout
# elapses, in which case just call wait again). Prefer this over polling in a
# loop: a looped process(action="poll") burns a full turn + tokens each time.
process(action="wait", session_id="XXX")

# Peek at output without blocking (optional, for progress)
process(action="log", session_id="XXX")

# Send input (if agent asks a question)
process(action="write", session_id="XXX", data="y")

# Submit with Enter (like typing "yes" and pressing Enter)
process(action="submit", session_id="XXX", data="yes")

# Kill if needed
process(action="kill", session_id="XXX")

Why workdir matters: Agent wakes up in a focused directory, doesn't wander off reading unrelated files (like your soul.md 😅).


Codex CLI

Model: gpt-5.2-codex is the default (set in ~/.codex/config.toml)

Flags

Flag Effect
exec "prompt" One-shot execution, exits when done
--full-auto Sandboxed but auto-approves in workspa
الأسئلة الشائعة

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

تذكر المهارة Codex وClaude Code وOpenCode وPi.

هل تحتاج إلى طرفية تفاعلية؟

لا. تستخدم المهارة أوضاعًا غير تفاعلية تعمل ثم تنتهي بشكل نظيف.

هل تستطيع تشغيل مهمة طويلة؟

نعم. يمكنها تشغيل أمر طويل الأمد والاحتفاظ بمقبضه للتحقق لاحقًا.

التفاصيل

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

Delegate a self-contained task to a coding assistant through a non-interactive background process. Use for feature development, code review, refactoring, and tasks requiring substantial file exploration.

repo: TokenRhythm/opensquilla

الشعبية

نجوم GitHub
7.1k
الترتيب
#13593
الترخيص
Apache-2.0
آخر تحديث
2‏/11‏/2026

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

0

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

التعليقات

  • …

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

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