home / skills / resciencelab / opc-skills / archive

archive skill

/skills/archive

This skill archives session learnings, debugging solutions, and deployment logs into .archive with indexed markdown and a searchable MEMORY.md.

npx playbooks add skill resciencelab/opc-skills --skill archive

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
2.1 KB
---
name: archive
description: "Archive session learnings, debugging solutions, and deployment logs to .archive/yyyy-mm-dd/ as indexed markdown with searchable tags. Use when completing a significant task, resolving a tricky bug, deploying, or when the user says \"archive this\". Maintains .archive/MEMORY.md index for cross-session knowledge reuse."
---

# Archive Skill

Capture, index, and reuse project knowledge across sessions.

## When to Archive

- After completing a significant task (deploy, migration, major feature)
- After resolving a tricky debugging session
- When the user says "archive this"
- After any multi-step process with learnings worth preserving

## When to Consult Archives

- Before debugging infrastructure, deploy, or CI issues
- Before repeating a process done in a past session
- When encountering an error that may have been solved before

**Search**: `grep -ri "keyword" .archive/`
**Index**: `.archive/MEMORY.md`

## Archive Workflow

1. Read `.archive/MEMORY.md` — check for related existing archives
2. Create `.archive/YYYY-MM-DD/` directory if needed
3. Write markdown file with YAML frontmatter (see `references/TEMPLATE.md`)
4. **Update `.archive/MEMORY.md`**: add one-line entry under the right category
5. If related archives exist, add `related` field in frontmatter

## Lookup Workflow

1. Read `.archive/MEMORY.md` to find relevant entries
2. Read the specific archive file for detailed context
3. Apply learnings to current task

## Categories

- **infrastructure** — AWS, ECS, IAM, networking, secrets, CloudWatch
- **release** — TestFlight, versioning, Git Flow, CHANGELOG
- **debugging** — Bug fixes, error resolution, gotchas
- **feature** — Feature design, implementation notes
- **design** — UI/UX, icons, visual design

## Rules

- `.archive/` must be in `.gitignore` — local-only notes
- Keep entries concise but reproducible
- Focus on **problems, fixes, and exact commands**
- Always update MEMORY.md after creating an archive
- Use descriptive filenames (e.g., `cloudwatch-logging.md` not `session.md`)
- Include YAML frontmatter with `tags`, `category`, and optional `related`

Overview

This skill captures and indexes session learnings, debugging solutions, and deployment logs into a local .archive/yyyy-mm-dd/ folder as searchable Markdown with tags. It maintains a central .archive/MEMORY.md index for quick cross-session lookup and reuse. Use it to preserve reproducible fixes, deployment notes, and multi-step lessons that save time later.

How this skill works

The skill inspects recent session context and prompts the user to create a new archive entry when a significant task completes or the user says "archive this." It writes a Markdown file with YAML frontmatter (tags, category, optional related links) into a dated .archive directory and appends a one-line entry to .archive/MEMORY.md for fast discovery. Existing related archives are detected and linked in the frontmatter.

When to use it

  • After completing a deployment, migration, or major feature delivery
  • When you resolve a tricky bug or discover a reproducible fix
  • At the end of a multi-step process with useful commands or gotchas
  • Whenever you say "archive this" to preserve session context
  • Before removing local debugging artifacts or rotating secrets

Best practices

  • Keep entries concise and reproducible: include exact commands and outputs
  • Use descriptive filenames (e.g., cloudwatch-logging.md) and clear categories
  • Always update .archive/MEMORY.md immediately after creating a file
  • Add related frontmatter links when similar archives exist to build context
  • Keep .archive/ in .gitignore so notes remain local and private

Example use cases

  • Record an ECS deploy troubleshooting session with commands and CloudWatch snippets
  • Save a resolved CI failure with the patch, test commands, and root cause
  • Archive release notes for TestFlight or versioning steps after a release
  • Capture a complex feature design decision and implementation notes for later reference
  • Log environment or secrets rotation steps that must be repeated for future deploys

FAQ

How do I find past archives quickly?

Search .archive/MEMORY.md for one-line entries, then open the dated file. You can also grep the .archive/ folder: grep -ri "keyword" .archive/.

What metadata should every archive include?

Include YAML frontmatter with title, date, category, tags, and optional related references. Keep the body focused on problem, exact fix, and commands.