Skip to content
Back to skills

Archive Tasks

ASecurity

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

  • 88 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 23, 2026
ai-agentsbash

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 9, 2026

npx -y skills add fitlab-ai/agent-infra --skill archive-tasks --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Archive Tasks?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Archive Tasks
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/fitlab-ai-archive-tasks/badge)](https://www.skillsdirectory.com/skills/fitlab-ai-archive-tasks)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: archive-tasks
description: >
  归档已完成任务到按日期组织的目录。
  当已完成任务在 completed 目录堆积、需要整理归档时使用。
---

# 归档已完成任务

将 `<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
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 的路径

Files in this skill

  • SKILL.md1.5 KB
  • scripts/archive-tasks.sh11.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.