sync-issue

A command that summarizes work on a task and posts the progress to its GitHub Issue comments. It reads task status and supporting workspace notes before producing the update.

In plain words
What is it for?
Use it to report completed analysis, planning, implementation, review, current progress, next steps, and related files for a workspace task.
Why use it?
It keeps the Issue understandable and traceable without requiring you to copy progress details manually.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/modelengine-group/fit-framework/sync-issue
Clone the repo
git clone --depth 1 https://github.com/ModelEngine-Group/fit-framework

Made for: Claude Code.

Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,105 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00015 $0.02105
Opus 5 $0.00008 $0.01052
Sonnet 5 $0.00003 $0.00421
Haiku 4.5 $0.00002 $0.00211

Measured 2d ago against content hash d734f2e2b5de, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

sync-issue scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/sync-issue.md · 279 lines

How it starts

The opening of the file, as written. The whole thing — 279 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Sync Issue Command

功能说明

将任务的处理进度摘要同步到对应的 GitHub Issue 评论板中,确保 Issue 中的信息有逻辑、完整且易于追踪。

执行流程

1. 验证任务存在

按以下优先级搜索任务:

  • 查找 .ai-workspace/active/{task-id}/task.md(优先)
  • 如果不存在,查找 .ai-workspace/blocked/{task-id}/task.md
  • 如果不存在,查找 .ai-workspace/completed/{task-id}/task.md
  • 如果都不存在,提示用户任务不存在

找到后记录任务状态(status)和任务目录路径。

注意:{task-id} 格式为 TASK-{yyyyMMdd-HHmmss},例如 TASK-20260205-202013

2. 读取任务信息

从任务文件中获取:

  • Issue 号码(issue_number 字段)
  • 任务标题和描述
  • 当前步骤(current_step
  • 任务状态(status
  • 创建和更新时间

3. 读取上下文文件

检查并读取以下文件(如果存在):

  • .ai-workspace/{status}/{task-id}/analysis.md - 需求分析
  • .ai-workspace/{status}/{task-id}/plan.md - 技术方案
  • .ai-workspace/{status}/{task-id}/implementation.md - 实现报告
  • .ai-workspace/{status}/{task-id}/review.md - 审查报告

4. 生成进度摘要

根据当前状态生成清晰的进度摘要:

基本格式

## 🤖 任务进度更新

**任务ID**: {task-id}
**更新时间**: {当前时间}
**当前状态**: {状态描述}

### ✅ 已完成

- [x] 需求分析 - {完成时间}
  - {核心要点摘要 1-2 条}
- [x] 技术方案设计 - {完成时间}
  - {方案选择和关键决策 1-2 条}
- [ ] 代码实现(进行中)
- [ ] 代码审查
- [ ] 最终提交

### 📋 当前进展

{当前步骤的详细说明}

### 🎯 下一步

{下一步计划}

### 📂 相关文件

- 任务文件: `.ai-workspace/{status}/{task-id}/task.md`
- 需求分析: `.ai-workspace/{status}/{task-id}/analysis.md`
- 技术方案: `.ai-workspace/{status}/{task-id}/plan.md`

---
*由 Claude Code 自动生成 - [任务管理系统](../.agents/README.md)*

摘要原则

  • 简洁:每个阶段只提取核心要点,避免冗长
  • 逻辑清晰:按时间顺序展示进展
  • 突出关键决策:技术方案选择、重要发现等
  • 面向人类阅读:避免技术细节,使用易懂的语言

5. 同步到 Issue

使用 gh 命令将摘要发布到 Issue:

gh issue comment {issue-number} --body "$(cat <<'EOF'
{生成的进度摘要}
EOF
)"

6. 更新任务状态

在任务文件中记录同步时间:

  • 添加或更新 last_synced_at 字段
  • 记录同步的 Issue 评论链接(如果 gh 返回)

7. 告知用户

输出格式:

✅ 任务进度已同步到 Issue #{issue-number}

**同步内容**:
- 已完成步骤: {数量}
- 当前状态: {状态}
- 下一步: {下一步说明}

**查看链接**:
https://github.com/{owner}/{repo}/issues/{issue-number}

参数说明

  • <task-id>: 任务ID,格式为 TASK-{yyyyMMdd-HHmmss}(必需)

使用示例

# 同步任务进度到对应的 Issue
/sync-issue TASK-20251227-104654

# 也可以简写
/sync-issue TASK-20251227-104654

Read the full file on GitHub · 279 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 279 lines · 15 tokens per session scan A d734f2e2b5de

Subscribe to this mod's changes

sync-issue is a command published in the GitHub repository ModelEngine-Group/fit-framework (2,117 stars, last pushed 5mo ago), licensed MIT. It adds 15 tokens to every session and 2,105 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.