Manages long-running remote tasks (>2 min) with checkpoint-based persistence, enabling agent rest and cross-session recovery via SSH job scripts.
Ships in external-gitcode-ascend-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
管理预计耗时>2分钟的远程任务,通过checkpoint机制支持agent休息和跨会话恢复。
使用connect/scripts/ssh-job.sh start启动任务,获取job_id后立即写入checkpoint:
bash connect/scripts/ssh-job.sh start <profile> "<command>"
# 输出: 任务已启动: job-20260306-143022-1234
bash long-task/scripts/checkpoint.sh write <profile> <job_id> \
--task "模型训练 epoch 50" \
--duration "~2h" \
--next "检查训练完成,下载模型权重,运行验证" \
--context "lr=0.001,batch=32"
产出: checkpoint文件 ~/.ssh-jobs/<job_id>/checkpoint.md
Agent输出:
✓ 任务已启动: job-20260306-143022-1234
✓ Checkpoint已保存,预计耗时 ~2h
你可以:
1. 稍后输入"检查任务 <job_id>"查看状态
2. 关闭会话,任务继续运行
3. 新会话中我会自动读取checkpoint恢复上下文
新会话或用户请求检查时:
bash long-task/scripts/checkpoint.sh read <profile> <job_id>
产出: 解析checkpoint内容(task, started, duration, next_steps, context)
根据预计耗时决定检查策略:
bash connect/scripts/ssh-job.sh status <profile> <job_id>
先查大小:
bash connect/scripts/ssh-job.sh status <profile> <job_id>
# 输出: stdout: 245KB, stderr: 1.2KB
按大小决策:
bash connect/scripts/ssh-job.sh output <profile> <job_id>bash connect/scripts/ssh-job.sh output <profile> <job_id> --tail 50bash connect/scripts/ssh-job.sh output <profile> <job_id> --grep 'error|fail|exception'任务完成后,按checkpoint中的next_steps继续: 逐步执行,每步完成后更新checkpoint或删除。
存储在 ~/.ssh-jobs/<job_id>/checkpoint.md:
job_id: job-20260306-143022-1234
profile: dev-server
task: "模型训练 epoch 50"
started: 2026-03-06T14:30:22
expected_duration: ~2h
next_steps:
- 检查训练完成状态
- 下载模型权重到本地
- 运行验证脚本
context: "learning_rate=0.001, batch_size=32"
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/external-gitcode-ascend-skills:external-gitcode-ascend-long-taskfrom external-gitcode-ascend-skills
npx claudepluginhub ascend-ai-coding/awesome-ascend-skills --plugin external-gitcode-ascend-skills91 skills in this plugin
/external-gitcode-ascend-analyse-coverage分析测试覆盖率盲区,生成覆盖率分析报告/external-gitcode-ascend-arxiv-recommendation-npu自动化推荐系统论文发现流水线。抓取 arxiv 推荐论文,检测源码,生成待迁移任务清单,由 npu-model-migration skill 完成 NPU 适配。/external-gitcode-ascend-ascendc-operator-code-gen根据设计文档生成 AscendC 算子完整代码实现并完成框架适配。TRIGGER when: 设计文档已完成,需要生成 op_host/op_kernel 代码、注册到 PyTorch 框架、编译测试。关键词:代码生成、op_host、op_kernel、tiling、kernel、框架适配、算子注册。Other plugins' skills for the same job