← 返回 Skills 市场
kaigegao1110

Archive Project

作者 KaigeGao · GitHub ↗ · v1.2.5 · MIT-0
cross-platform ✓ 安全检测通过
184
总下载
0
收藏
1
当前安装
19
版本数
在 OpenClaw 中安装
/install archive-project
功能描述
Organize completed projects into searchable archives with session transcript backup.
使用说明 (SKILL.md)

Installation

Option 1: ClawhHub CLI (recommended)

openclaw skills install archive-project
# or
clawhub install archive-project

Option 2: From GitHub

# Clone the repo
git clone https://github.com/KaigeGao1110/ArchiveProject.git ~/.openclaw/skills/archive-project

# Or download directly
curl -L https://github.com/KaigeGao1110/ArchiveProject/archive/refs/heads/main.zip -o /tmp/archive-project.zip
unzip /tmp/archive-project.zip -d ~/.openclaw/skills/
mv ~/.openclaw/skills/ArchiveProject-main ~/.openclaw/skills/archive-project

Archive Project Skill

Organize a completed project into a complete, long-term searchable archive.

Data Privacy: Archived data (session transcripts, project files) never leaves the internal workspace unless you explicitly approve a publish step. The sanitize script is applied automatically before any archival.


Trigger Conditions

Archive is triggered only when you say "archive this" or "can we archive this". This is the only trigger — you always decide when a project is done.

Trigger 2: Slash command

Type //archive followed by your project name to activate the Archive skill. Example: "//archive cureforge-hr-assessment"

However, in these scenarios, I will prompt but not execute:

  • A delivery action just happened (email sent, demo link generated, all subagents done, code committed)
  • You start a new project or say "next task" / "different topic"

I will NOT prompt when:

  • Project is still in active development
  • Task is ongoing operations
  • Waiting on external feedback (48h+ silence)

Archive Flow

Step 1: Create project archive directory

workspace/projects/\x3Cproject-name>/
  ARCHIVE.md
  session_transcript.jsonl
  subagent_sessions/
  deliverables/
  decisions.md

Step 2: Collect session transcripts

Subagent sessions (important — must collect):

# Directory containing session transcripts (configurable via SESSION_TRANSCRIPT_PATH)
# Default: ~/.openclaw/agents/main/sessions/ (standard for all users)
# Override: set SESSION_TRANSCRIPT_PATH to a custom path (e.g., EFS mount)
SESSION_DIR="${SESSION_TRANSCRIPT_PATH:-$HOME/.openclaw/agents/main/sessions/}"

# Find main session transcript using explicit session key (from session label or passed argument)
# Use the session key/label to match the exact transcript file
SESSION_KEY="${1:-}"  # Pass session key as argument or extract from context
if [ -n "$SESSION_KEY" ]; then
  MAIN_SESSION_PATH=$(grep -l "$SESSION_KEY" "${SESSION_DIR}"*.jsonl 2>/dev/null | head -1)
fi
# Fallback: if no key provided or not found, use most recent transcript
if [ -z "$MAIN_SESSION_PATH" ] || [ ! -f "$MAIN_SESSION_PATH" ]; then
  MAIN_SESSION_PATH=$(ls -t "${SESSION_DIR}"*.jsonl 2>/dev/null | head -1)
fi

# Create project archive directory
mkdir -p workspace/projects/\x3Cproject-name>/subagent_sessions/

# Copy main session transcript
cp "$MAIN_SESSION_PATH" "workspace/projects/\x3Cproject-name>/session_transcript.jsonl"

Child subagent transcripts:

# Child subagent session IDs are listed in the main session JSONL
# Look for "childSessions" array in the session metadata
# Copy each child session transcript to subagent_sessions/
# Pattern: {SESSION_DIR}/{child-id}.jsonl

Step 3: Sanitize transcripts (CRITICAL — must do before archiving)

Before archiving, remove:

  • API keys, tokens, and authentication credentials
  • Personal contact information (emails, phone numbers)
  • Internal infrastructure details (hostnames, IPs)
  • Any sensitive environment variables

Use the sanitization script:

python3 scripts/sanitize_transcript.py \
  workspace/projects/\x3Cproject-name>/session_transcript.jsonl \
  -o workspace/projects/\x3Cproject-name>/session_transcript_sanitized.jsonl

The script redacts:

  • API keys (GitHub tokens, OpenAI keys, AWS credentials, etc.)
  • Email addresses
  • Phone numbers
  • IP addresses (IPv4 and IPv6)
  • Internal hostnames and AWS EC2 DNS names
  • Generic secrets and high-entropy tokens

Verify before proceeding:

# Run built-in tests to confirm redaction works
python3 scripts/sanitize_transcript.py --test

# Manual spot-check (look for any remaining sensitive data)
grep -iE '(token|key|password|email|phone|@|192\.168|10\.)' \
  workspace/projects/\x3Cproject-name>/session_transcript_sanitized.jsonl || echo "No sensitive data found"

After verification, replace the original with the sanitized version:

mv workspace/projects/\x3Cproject-name>/session_transcript_sanitized.jsonl \
   workspace/projects/\x3Cproject-name>/session_transcript.jsonl

Step 4: Write ARCHIVE.md

Use the template below. Fill in decision rationale — this is the most valuable part for future retrospectives.

Step 5: Update MEMORY.md

Add a one-line summary to MEMORY.md: project name + status + link.

Step 6: Delete EFS session files (requires approval)

Before deleting any session files from EFS, ask the user:

"Can I delete the EFS session files for this project? They are already backed up in the archive."

Only proceed if the user explicitly approves. Never auto-delete without asking.

If approved:

# Remove the main session transcript from EFS
rm -f "${SESSION_DIR}$(basename "$MAIN_SESSION_PATH")"

# Remove any child subagent session transcripts from EFS
for CHILD_ID in \x3Cchild-session-ids>; do
  rm -f "${SESSION_DIR}${CHILD_ID}.jsonl"
done

If not approved, leave the EFS session files as-is.

Step 7: Git commit (internal workspace only)

cd workspace
git add projects/\x3Cproject-name>/
git commit -m "Archive: \x3Cproject-name>"

Keep project data private. Archive data is for internal reference only.


ARCHIVE.md Template

# \x3CProject Name> — Project Archive

_Created: \x3Cdate> | Owner: \x3Cowner> | Status: \x3Cstatus>_

---

## One-Line Summary

\x3C1-2 sentences: what this project does, who it's for, its core value>

---

## Project Background

### Client
\x3CName + contact info — after archiving, record only what is needed for future reference>

### Source Materials
| File | Content |
|------|---------|
| \x3Cfile1> | \x3Cdescription> |
| \x3Cfile2> | \x3Cdescription> |

---

## Deliverables

### Code / Product
| Path | Description |
|------|-------------|
| \x3Cpath> | \x3Cdescription> |

### Reports / Docs
| File | Description |
|------|-------------|
| \x3Cfile> | \x3Cdescription> |

### Demo / Links
| Link | Description |
|------|-------------|
| \x3CURL> | \x3Cdescription> |

---

## Timeline

| Date | Event |
|------|-------|
| YYYY-MM-DD | \x3Cevent> |
| YYYY-MM-DD | \x3Cdelivery> |

---

## Key Decisions

### N. \x3CDecision Title>
**Options:** A vs B (chose A)
**Rationale:** \x3Cwhy this choice>
**Outcome:** \x3Cwhat happened>

---

## Open Items

| Item | Description | Priority |
|------|-------------|----------|
| \x3Citem> | \x3Cdescription> | High/Med/Low |

---

## Lessons Learned

### N. \x3CLesson Title>
\x3CWhat was learned, what to do differently next time>

---

## Git Commits (Internal)

| Stage | Commit | Description |
|-------|--------|-------------|
| Initial | \x3Chash> | \x3Cdescription> |
| Delivery | \x3Chash> | \x3Cdescription> |

---

## Reconstruction Guide

```bash
\x3Creconstruction commands>

---

## decisions.md Template

```markdown
# Key Decisions — \x3Cproject-name>

## Decision N
- Date:
- Problem:
- Options:
  - A: \x3Cdescription>
  - B: \x3Cdescription>
- Decision: \x3Cwhat was chosen>
- Rationale: \x3Cwhy>

Sanitization Script Reference

The scripts/sanitize_transcript.py script provides deterministic, audited redaction of sensitive data from session transcripts.

What it redacts

Category Examples Replacement
GitHub tokens ghp_xxx, github_pat_xxx [REDACTED-GITHUB-TOKEN]
OpenAI keys sk-xxx, sk-proj-xxx [REDACTED-OPENAI-KEY]
Anthropic keys sk-ant-xxx [REDACTED-ANTHROPIC-KEY]
AWS credentials AKIAxxx, aws_access_key_id=xxx [REDACTED]
Email addresses [email protected] [REDACTED-EMAIL]
Phone numbers +1 555-123-4567 [REDACTED-PHONE]
IPv4 addresses 192.168.1.1, 10.0.0.1 [REDACTED-IP]
IPv6 addresses 2001:db8::1 [REDACTED-IPV6]
Internal hostnames ip-10-0-1-43.local [REDACTED-HOSTNAME]
AWS EC2 DNS ec2-xxx.amazonaws.com [REDACTED-AWS-HOST]
Generic secrets High-entropy base64/hex strings [REDACTED-SECRET]

Usage

# Basic usage — output to stdout
python3 scripts/sanitize_transcript.py input.jsonl > sanitized.jsonl

# Explicit output file
python3 scripts/sanitize_transcript.py input.jsonl -o sanitized.jsonl

# Read from stdin
cat input.jsonl | python3 scripts/sanitize_transcript.py > sanitized.jsonl

# Run built-in tests
python3 scripts/sanitize_transcript.py --test

Properties

  • Deterministic: Same input always produces identical output
  • Non-destructive: Original file is never modified
  • Structure-preserving: JSON/JSONL structure is maintained; only string values are redacted
  • Testable: Built-in test mode verifies redaction patterns
安全使用建议
This skill is coherent with its purpose: it reads your session transcripts, runs a local sanitization script, writes an archive into your workspace, and can (with your permission) remove originals. Before installing: (1) Confirm you are comfortable the skill will read files under ~/.openclaw/agents/main/sessions/ (or any path you set via SESSION_TRANSCRIPT_PATH). (2) Note the registry metadata doesn't declare that config path or the SESSION_TRANSCRIPT_PATH env var — ask the publisher to correct the manifest so access requirements are explicit. (3) Review scripts/sanitize_transcript.py to ensure its redaction rules meet your needs and test it on sample transcripts (the skill provides a --test mode). (4) Be aware it will run git commit in your workspace and copy transcripts into workspace/projects/, so verify where that workspace is stored and that commits are acceptable. (5) Only approve deletions when you have confirmed sanitized backups exist. If you need stronger guarantees, run the sanitize script yourself on a copy of transcripts before giving the skill any file-access or invoking it.
功能分析
Type: OpenClaw Skill Name: archive-project Version: 1.2.5 The archive-project skill is designed to organize and back up project session transcripts into a structured local archive. It includes a comprehensive Python script (scripts/sanitize_transcript.py) that uses regex patterns to redact sensitive information such as API keys (GitHub, OpenAI, AWS, etc.), PII, and internal network details before storage. The skill's instructions in SKILL.md explicitly require user approval before deleting original files and ensure data remains within the internal workspace, demonstrating a clear focus on data privacy and security without any evidence of malicious intent or exfiltration.
能力评估
Purpose & Capability
The SKILL.md declares a required config path (~/.openclaw/agents/main/sessions/) and runtime use of session transcripts, which is consistent with the archive purpose — but the registry metadata lists 'Required config paths: none'. This mismatch between declared metadata and runtime instructions is an incoherence that should be resolved (the skill does need access to session files).
Instruction Scope
Runtime instructions explicitly read session transcripts, copy them into workspace/projects/<project-name>/, run the local sanitization script, git-commit the workspace, and optionally delete original session files only with user approval. Reading and processing session transcripts is expected for this skill. The instructions reference an environment variable (SESSION_TRANSCRIPT_PATH) and recommend grep/verification steps — those references are reasonable but grant the skill access to potentially sensitive local transcripts, so users should confirm they are comfortable with that scope.
Install Mechanism
No install spec / no remote downloads — instruction-only with a local sanitization script. This is low-risk from an install perspective (nothing written to disk by an installer beyond what the user does when cloning).
Credentials
Registry metadata lists no required environment variables, but SKILL.md and README use SESSION_TRANSCRIPT_PATH to locate transcripts. The skill will read files from the user's session directory by default. Asking for broad credentials is not present, which is good, but the undeclared env var/config-path usage is an inconsistency that should be documented in the manifest.
Persistence & Privilege
always:false and normal autonomous invocation; the skill performs workspace file writes and git commits (expected for archiving). It does not request permanent platform-wide privileges or modify other skills' configurations. Deletion of original session files is gated by explicit user approval in the instructions.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install archive-project
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /archive-project 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.2.5
- Removed the `required` section for environment variables and binaries from SKILL.md. - Eliminated tool dispatch configuration (`command-dispatch`, `command-tool`, and `command-arg-mode`) from SKILL.md. - The overall skill functionality and usage remain unchanged; this update only affects configuration metadata.
v1.2.4
archive-project v1.2.4 - SKILL.md installation instructions updated: removed "Option 3" (local workspace copy). - No changes to functionality or code—documentation only.
v1.2.3
- Added an Installation section with step-by-step instructions for installing via ClawhHub CLI, GitHub, or local copy. - Introduced a new dependencies field (currently empty) in the skill metadata. - Updated and clarified several sections to improve setup and usability guidance. - No changes to workflow, permissions, or core archive functionality.
v1.3.0
archive-project v1.3.0 - Added a "homepage" field with a link to the project repository. - Enhanced configPaths by providing a structured path object and description for session transcript access. - No core logic changes; documentation and metadata improvements only.
v1.2.2
- Documentation updated in SKILL.md with minor changes. - No functional or behavioral changes to the skill's operation. - Version bump from 1.2.1 to 1.2.2 for documentation maintenance.
v1.2.1
archive-project 1.2.1 - Added python3 to required binaries for sanitization. - Declared SESSION_TRANSCRIPT_PATH as a configurable environment variable, with path description and default. - Added configPaths field pointing to the default session transcript location. - Expanded permissions to explicitly cover python3 sanitization script execution and clarified transcript path access. - No changes to core features or archive workflow; environment configurability improved.
v1.2.0
archive-project 1.2.0 - Updated SKILL.md and README.md content. - No functional code or flow changes noted. - Documentation may have corrections or clarifications.
v1.1.2
**Summary:** Improved transcript selection for archiving by enabling session key matching. - Added ability to locate main session transcript using an explicit session key or label. - Fallback to most recent transcript if no session key is provided or found. - Declared required dependency on the `git` binary. - No changes to user-facing commands or workflow.
v1.1.1
archive-project 1.1.1 - Updated scripts/sanitize_transcript.py to improve or fix transcript sanitization. - No changes to skill configuration or documented usage. - All other functionality remains the same.
v1.1.0
archive-project 1.1.0 - Updated scripts/sanitize_transcript.py. - Improvements or changes to transcript sanitization logic implemented.
v1.0.9
archive-project 1.0.9 - Declared command-dispatch mode and "archive-project-start" as the main tool entry point in SKILL.md. - Added documentation for slash-command triggers (e.g., "//archive <project>") and usage examples. - Clarified that project archiving can now be triggered by a structured slash command as well as natural language. - Updated SKILL.md metadata for tool invocation and argument mode.
v1.0.8
archive-project 1.0.8 changelog - Updated SKILL.md to clarify internal data privacy for archived projects. - Added explicit warnings to keep project data private and for internal reference only in git commit section. - Removed obsolete or GitHub/public publishing instructions from documentation. - No changes to logic or code; documentation only.
v1.0.7
Fix: use standard ~/.openclaw path instead of EFS-specific path
v1.0.5
Security fix: manifest declaration, configurable path, audited sanitizer script, data stays internal
v1.0.4
Rewrite credential sanitization section with generic privacy language to avoid suspicious flag
v1.0.3
Remove personal name from trigger conditions - generic now
v1.0.2
Added subagent session collection and credential sanitization step
v1.0.1
Archive-project skill 1.0.1 adds a robust, structured workflow for archiving completed projects. - Archive is triggered only by explicit requests ("archive this" or "can we archive this"), preventing accidental archives. - Prompts (but does not execute) archiving after key delivery actions or new project transitions. - Detailed archive directory structure and content specified, with strong emphasis on decision rationale for retrospectives. - Includes templates for ARCHIVE.md and decisions.md to standardize documentation. - Final report summarizes project status, archive location, transcript size, and commit information.
v1.0.0
- Initial release of archive-project skill. - Provides a systematic process for archiving completed projects, including creation of an archive directory, backup of session transcripts, and structured documentation. - Triggered only by explicit instruction: "可以 archive 了". - Includes clear instructions and templates for ARCHIVE.md and decisions.md (both in English). - Offers proactive but non-intrusive reminders to archive at key project milestones.
元数据
Slug archive-project
版本 1.2.5
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 19
常见问题

Archive Project 是什么?

Organize completed projects into searchable archives with session transcript backup. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 184 次。

如何安装 Archive Project?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install archive-project」即可一键安装,无需额外配置。

Archive Project 是免费的吗?

是的,Archive Project 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Archive Project 支持哪些平台?

Archive Project 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Archive Project?

由 KaigeGao(@kaigegao1110)开发并维护,当前版本 v1.2.5。

💬 留言讨论