本文へ移動
cccskills
無料GitHub で公開

task-coordination

Coordinate access to shared task directories using .processing marker files. Use before accessing a Worker's workspace to prevent conflicts when both Manager and Worker might modify files simultaneously.

インストール方法を見る

含まれるファイル(4)

  • SKILL.md4.4 KB
  • scripts/check-processing-marker.sh1.9 KB
  • scripts/create-processing-marker.sh1.1 KB
  • scripts/remove-processing-marker.sh488 B

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Task Coordination

This skill provides a general coordination mechanism for shared task directories. It prevents conflicts when both Manager and Workers need to access/modify the same task workspace.

Problem

When a Worker delegates work to Manager (e.g., git operations), the Manager modifies the Worker's workspace. During this time, the Worker might also be modifying files, causing potential conflicts.

Solution

Use .processing marker files to signal "work in progress". Any party (Worker or Manager) must check for this marker before modifying a task directory.


Task Directory Structure

tasks/{task-id}/
├── workspace/          # Code workspace (shared between Worker and Manager)
├── notes/              # Worker's notes, plan.md, memory (not synced by Manager)
├── meta.json           # Task metadata
└── .processing         # Processing marker file (created when work in progress)

The .processing Marker

Format

Location: tasks/{task-id}/.processing

{
  "processor": "manager",
  "started_at": "2026-02-25T10:30:00Z",
  "expires_at": "2026-02-25T10:45:00Z",
  "operation": "git-delegation"
}

Fields

FieldDescription
processorWho is processing: manager or worker name
started_atISO 8601 timestamp when processing started
expires_atISO 8601 timestamp when marker expires (15 min default)
operationWhat operation is in progress (optional)

Expiration

The marker auto-expires after 15 minutes (configurable). This prevents deadlocks if a process crashes without removing the marker.


Coordination Protocol

Before Modifying Task Directory

Always follow this sequence:

  1. Sync from MinIO first:

    mc mirror "${AGENTTEAMS_STORAGE_PREFIX}/shared/tasks/${task_id}/" "/root/agentteams-fs/shared/tasks/${task_id}/"
    
  2. Check for .processing:

    bash /opt/agentteams/agent/skills/task-coordination/scripts/check-processing-marker.sh "$task_id"
    
    • Exit code 0: Safe to proceed (no marker or expired)
    • Exit code 1: Processing in progress, do NOT modify
  3. If safe, create marker:

    bash /opt/agentteams/agent/skills/task-coordination/scripts/create-processing-marker.sh "$task_id" "manager"
    
  4. Perform modifications

  5. Remove marker:

    bash /opt/agentteams/agent/skills/task-coordination/scripts/remove-processing-marker.sh "$task_id"
    
  6. Sync to MinIO:

    mc mirror "/root/agentteams-fs/shared/tasks/${task_id}/" "${AGENTTEAMS_STORAGE_PREFIX}/shared/tasks/${task_id}/" --overwrite
    

Scripts

check-processing-marker.sh

Check if a task directory is being processed.

bash /opt/agentteams/agent/skills/task-coordination/scripts/check-processing-marker.sh <task-id>

Exit codes:

  • 0: No marker or marker expired (safe to proceed)
  • 1: Valid marker exists (do not modify)

create-processing-marker.sh

Create a processing marker for a task.

bash /opt/agentteams/agent/skills/task-coordination/scripts/create-processing-marker.sh <task-id> <processor-name> [timeout-mins]

Parameters:

  • task-id: Task identifier (e.g., task-20260225-103000)
  • processor-name: Who is processing (manager or worker name)
  • timeout-mins: (Optional) Expiration timeout in minutes (default: 15)

remove-processing-marker.sh

Remove the processing marker after work is done.

bash /opt/agentteams/agent/skills/task-coordination/scripts/remove-processing-marker.sh <task-id>

Integration Points

This coordination mechanism is used by:

  1. git-delegation-management: Manager creates marker before git ops, removes after
  2. git-delegation (Worker skill): Worker checks marker before modifying workspace

Best Practices

  1. Always sync first: Never assume local state is current
  2. Check before create: Don't blindly create markers; check first
  3. Remove promptly: Remove marker as soon as work completes
  4. Handle crashes: The expiration mechanism handles unexpected failures
  5. Respect the marker: Never modify a task directory with an active marker

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Use as a helper when the admin is assigning work but has not specified an existing Worker, so you need to search Nacos for a suitable Worker and ask whether to import it; also use when the admin explicitly says to import a Worker from the market or gives a direct nacos package URI.

日本語の概要は準備中です。原文の説明を表示しています。

agentscope-ai/AgentTeams5,7382026年10月12日 更新

Analyze current OpenClaw setup and generate a migration package (ZIP) for importing into AgentTeams as a managed Worker

日本語の概要は準備中です。原文の説明を表示しています。

agentscope-ai/AgentTeams5,7382026年10月12日 更新

Use when determining sender identity in any room, managing trusted contacts, configuring the admin's primary notification channel, handling first-contact from a new channel, or escalating to admin across channels.

日本語の概要は準備中です。原文の説明を表示しています。

agentscope-ai/AgentTeams5,7382026年10月12日 更新

将编码工作委托给 Manager 持有的 AI CLI 工具(Claude Code / Gemini CLI / qodercli)执行

日本語の概要は準備中です。原文の説明を表示しています。

agentscope-ai/AgentTeams5,7382026年10月12日 更新

Execute AI coding CLI tools (Claude Code / Gemini CLI / qodercli) on behalf of Workers. Use when a Worker sends a coding-request: message, asking Manager to run coding operations in their workspace.

日本語の概要は準備中です。原文の説明を表示しています。

agentscope-ai/AgentTeams5,7382026年10月12日 更新

Use before sending @mentions, deciding whether to reply, TASK_COMPLETED, BLOCKED, QUESTION, direct answers, loop prevention, or suppressing low-information acknowledgements.

日本語の概要は準備中です。原文の説明を表示しています。

agentscope-ai/AgentTeams5,7382026年10月12日 更新

agentscope-ai のスキルをすべて見る

このスキルの問題を報告する