用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/ascend-ai-coding/awesome-ascend-skills --skill external-gitcode-ascend-long-task命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | external-gitcode-ascend-long-task |
| description | 长耗时任务管理,支持checkpoint记忆、agent休息与恢复 |
| original-name | ssh-dev-suite/long-task |
| synced-from | https://gitcode.com/Ascend/agent-skills |
| synced-date | 2026-05-26 |
| synced-commit | 1f7666e7768a0ceb21bb1d40ce4b5179fcb6f1d6 |
| license | UNKNOWN |
管理预计耗时>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"