archive · resciencelab — Claude Code skill: what it does, how to install
Archives debugging solutions, deploy logs, and session takeaways into local markdown files. Keeps an indexed MEMORY.md file for cross-session agent reuse.
npx skills add ReScienceLab/opc-skills --skill archive -a claude-codeWhat archive does
The skill creates dated markdown files inside .archive/YYYY-MM-DD/ and updates .archive/MEMORY.md with one-line summaries. Every entry includes YAML frontmatter with tags, an optional related field, and a category: infrastructure, release, debugging, feature, or design. When debugging infrastructure or repeating past work, the agent inspects the index or runs grep -ri "keyword" .archive/ before writing code.
The .archive/ directory must be placed in .gitignore to keep logs and session notes strictly local. Each document focuses on exact commands, specific errors, and applied fixes rather than narrative summaries.
What it helps with
- preserve tricky debugging fixes across separate coding sessions
- log deployment steps, migration commands, and release workflows
- search past infrastructure notes using grep
- maintain a searchable project memory index in markdown
Example prompts for the agent
- Archive this debugging session with category debugging and tags ecs, iam
- Check .archive/MEMORY.md before troubleshooting the deployment pipeline
- Save the migration steps and commands to the archive
How to install archive
1Skills CLI (Vercel)
npx skills add ReScienceLab/opc-skills --skill archive -a claude-code2Manually: put the files in place
~/.claude/skills/archive/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/archive/
1Skills CLI (Vercel)
npx skills add ReScienceLab/opc-skills --skill archive -a codex2Manually: put the files in place
.agents/skills/archive/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add ReScienceLab/opc-skills --skill archive -a cursor2Manually: put the files in place
.cursor/skills/archive/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install ReScienceLab/opc-skills archive2Manually: put the files in place
.github/skills/archive/SKILL.md1Skills CLI (Vercel)
npx skills add ReScienceLab/opc-skills --skill archive -a gemini-cli2Platform CLI
gemini skills install https://github.com/ReScienceLab/opc-skills --path skills/archiveManually: put the files in place
.devin/skills/archive/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add ReScienceLab/opc-skills --skill archive -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about archive
How to install archive in Claude Code?
Run npx skills add ReScienceLab/opc-skills --skill archive -a claude-code. Alternatively, copy the skill definition directly to ~/.claude/skills/archive/SKILL.md.
What does the archive skill do?
It records session findings, bug fixes, and deploy logs as structured markdown files inside .archive/, updating .archive/MEMORY.md for fast lookups.
Why must .archive/ be added to .gitignore?
The skill rules require keeping session notes and logs local to your environment instead of checking them into git repositories.
Source text
SKILL.md · Apache-2.0
--- 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`
© ReScienceLab · Apache-2.0 · ReScienceLab/opc-skills
Similar skills
All skills for Agent setup: memory, context, orchestration →archive by other authors comes first.