xiaohongshu
xiaohongshu
archive-work
Archive completed scratchpads and session logs to project history. Invoke when user says "archive this work", "clean up scratchpad", "archive scratchpad", or after PR is merged.
Full skill instructions
Archive completed scratchpads and development artifacts to maintain clean project roots while preserving work history for future reference. This skill organizes completed work into a structured archive.
This skill activates when the user says things like:
Execute these searches in parallel for faster detection:
Find Scratchpads:
Glob: SCRATCHPAD_*.md in project rootFind Session Logs:
Glob: SESSION_LOG_*.md in project rootFind Other Related Files:
Check Git Status:
After parallel detection, verify completion:
Default Structure:
docs/dev/cc-archive/
└── {YYYYMMDDHHMM}-{issue-number}-{brief-description}/
├── SCRATCHPAD_{issue_number}.md
├── session-log.md (if exists)
└── README.md (summary)
Timestamp Prefix: Archives use YYYYMMDDHHMM prefix for chronological ordering.
This ensures archives sort by completion date, not ticket number.
Check Project Conventions:
docs/dev/cc-archive/ existsGenerate Timestamp and Directory Name:
# Generate timestamp prefix
TIMESTAMP=$(date +%Y%m%d%H%M)
ARCHIVE_DIR="${TIMESTAMP}-{issue-number}-{description}"
Create Archive Directory:
mkdir -p docs/dev/cc-archive/${ARCHIVE_DIR}
Generate Archive Summary:
Create README.md in archive folder:
# Issue #{issue_number} - {title}
**Archived:** {date}
**PR:** #{pr_number} (if applicable)
**Status:** {Completed/Merged/Abandoned}
## Summary
{Brief description of what was accomplished}
## Key Decisions
{Extract from scratchpad Decisions Made section}
## Files Changed
{List of files that were modified}
## Lessons Learned
{Any notable insights from Work Log}
Move Files (using git mv for proper tracking):
git mv SCRATCHPAD_{issue_number}.md docs/dev/cc-archive/${ARCHIVE_DIR}/
Important: Use git mv instead of mv to ensure both the addition to
archive AND the removal from project root are tracked in the same commit.
AskUserQuestion:
question: "Ready to archive this work?"
header: "Archive"
options:
- "Yes, archive and commit"
description: "Move files to archive and create commit"
- "Archive without commit"
description: "Move files but don't commit yet"
- "Show me what will be archived"
description: "Preview the archive operation"
- "Cancel"
description: "Keep scratchpad in current location"
Move Files (with git tracking):
# Use git mv to track both addition and removal in same commit
git mv SCRATCHPAD_{issue_number}.md docs/dev/cc-archive/${ARCHIVE_DIR}/
# Move session logs (created by PreCompact hook)
# These are untracked, so use mv then git add
for log in SESSION_LOG_*.md; do
if [ -f "$log" ]; then
mv "$log" docs/dev/cc-archive/${ARCHIVE_DIR}/
fi
done
git add docs/dev/cc-archive/${ARCHIVE_DIR}/SESSION_LOG_*.md 2>/dev/null || true
git add docs/dev/cc-archive/${ARCHIVE_DIR}/README.mdCommit Archive: If user opted to commit:
Skill: commit-changes
# Commit message will be:
# 📚🗃️ chore(docs): Archive work for issue #{issue_number}
#
# Completed work archived to docs/dev/cc-archive/
# PR: #{pr_number}
The commit will include:
✓ Work archived successfully!
📁 Archive location:
docs/dev/cc-archive/{YYYYMMDDHHMM}-{issue-number}-{description}/
📄 Files archived:
- SCRATCHPAD_{issue_number}.md
- SESSION_LOG_*.md (if any existed)
- README.md (summary generated)
🗑️ Cleaned up:
- Removed scratchpad from project root (tracked via git mv)
- Removed session logs from project root
{If committed}
📝 Committed: {commit hash}
- Added: archive directory with scratchpad, session logs, README
- Removed: SCRATCHPAD_{issue_number}.md from project root
- Removed: SESSION_LOG_*.md from project root
If user prefers not to keep history:
AskUserQuestion:
question: "How to handle the scratchpad?"
options:
- "Archive (keep history)"
- "Delete (no history)"
- "Keep in place"
Allow user to specify different archive location:
AskUserQuestion:
question: "Archive to default location?"
options:
- "Yes, use docs/dev/cc-archive/"
- "Specify custom location"
ℹ️ No scratchpad found to archive.
Looking for: SCRATCHPAD_*.md in project root
⚠️ Scratchpad has incomplete tasks:
- {unchecked task 1}
- {unchecked task 2}
Archive anyway?
1. Yes, archive incomplete work
2. No, continue working first
⚠️ Archive already exists for issue #{number}
Options:
1. Overwrite existing archive
2. Create numbered version (archive-2/)
3. Cancel
ℹ️ No PR found for this work.
Archive anyway?
1. Yes, archive without PR reference
2. No, create PR first
Invoked by:
do-work skill - After completing all tasksInvokes:
commit-changes skill - To commit archiveReads from:
docs/
└── dev/
└── cc-archive/
├── 202512281430-42-add-authentication/
│ ├── SCRATCHPAD_42.md
│ └── README.md
├── 202512281545-43-fix-login-bug/
│ ├── SCRATCHPAD_43.md
│ ├── SESSION_LOG_1.md
│ └── README.md
└── 202512290900-44-refactor-api/
├── SCRATCHPAD_44.md
├── SESSION_LOG_1.md
├── SESSION_LOG_2.md
└── README.md
{YYYYMMDDHHMM}-{issue-number}-{slugified-description}/
Format breakdown:
YYYYMMDDHHMM - Timestamp when archived (enables chronological sorting){issue-number} - GitHub issue number for reference{slugified-description} - Brief description from issue titleExamples:
202512281430-42-add-user-authentication/202512290915-123-fix-payment-bug/202512271000-7-initial-project-setup/Why timestamp prefix?
git mv to move scratchpads (tracks removal properly)mv for tracked files (leaves unstaged deletion)Version: 1.3.0 Last Updated: 2025-12-31 Maintained By: Escapement Changelog:
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience