agentleFS
fitlab-aifitlab-ai/agent-infra/.agents/skills/archive-tasks/SKILL.md

archive-tasks

Skill88 starsChanged 20 days agoMITView on GitHub

归档已完成任务到按日期组织的目录。 当已完成任务在 completed 目录堆积、需要整理归档时使用。

The file

Files
SKILL.md

归档已完成任务

将 <task-workspace>/completed/ 中的已完成任务归档到 <task-workspace>/archive/YYYY/MM/DD/TASK-xxx/local/,并重建三级归档索引。TASK 本地材料位于 local/,含按路径排序的 contents.sha256;TASK 根目录不存放普通文件。

  • 根 manifest:<task-workspace>/archive/manifest.md
  • 年 manifest:<task-workspace>/archive/YYYY/manifest.md
  • 月 manifest:<task-workspace>/archive/YYYY/MM/manifest.md

执行流程

1. 验证环境

确认 <task-workspace>/completed/ 存在,并根据用户输入选择以下四种调用方式之一:

  • 无参数:归档全部已完成任务
  • --days N:保留最近 N 天,仅归档更早的任务
  • --before YYYY-MM-DD:仅归档指定日期之前的任务
  • TASK-ID...:仅归档指定任务

2. 运行归档脚本

执行以下命令:

bash .agents/skills/archive-tasks/scripts/archive-tasks.sh [--days N | --before YYYY-MM-DD | TASK-ID...]

脚本负责:

  • 解析 task.md frontmatter 中的 completed_at(缺失时回退到 updated_at)
  • 按 YYYY/MM/DD/TASK-xxx/local/ 保存任务本地材料,不压缩
  • 跳过已归档、缺少元数据或不存在的任务
  • 全量重建根 / 年 / 月三级 manifest
  • 输出归档与跳过摘要

3. 告知用户

向用户汇报:

  • 本次归档的任务数量
  • 跳过的任务数量和原因
  • 根 manifest 的路径

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.