Agent skill

Archive Analysis

by ai-analyst-lab in ai-analyst-lab/ai-analyst

Save completed analyses to the knowledge system's analysis archive for future reference.

MITAuto-check passedKnowledge Management

Install Archive Analysis

skills CLI
$ npx skills add ai-analyst-lab/ai-analyst --skill archive-analysis -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ai-analyst-lab/ai-analyst archive-analysis --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ai-analyst-lab/ai-analyst.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/archive-analysis .claude/skills/archive-analysis && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
archive-analysis
GitHub stars
304
Token cost
~2.7k tokens
SKILL.md length
1,121 words
Files
1
Skills in repo
43
Repo updated
First seen
Licence
MIT

At a glance

Save completed analyses to the knowledge system's analysis archive for future reference.

  • Works in 7 steps: Determine Mode → Gather Analysis Metadata from Session… → Create Archive Entry → …
  • Explicitly says save this analysis
  • SKILL.md covers Purpose, When to Use, Instructions and Verification Mode, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Archive Analysis is an agent skill from ai-analyst-lab/ai-analyst. Save completed analyses to the knowledge system's analysis archive for future reference. Use this skill after completing any L3+ analysis, when /run-pipeline completes, when the user explicitly says "save this analysis" or "archive this", or automatically at the end of Step 18 (Close the Loop) in the analysis workflow. This skill captures key findings, metrics used, agents invoked, and output file paths so past work can be referenced in future sessions. Trigger whenever you finish validation on a multi-step…

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Knowledge Management, covering Knowledge bases and Root cause analysis. The repository describes itself as: AI Product Analyst — Claude Code-powered data analysis toolkit. The licence is MIT.

When your agent uses it

  • Explicitly says save this analysis
  • Automatically at the end of Step 18 (Close the Loop) in the analysis workflow
  • Ever you finish validation on a multi-step analysis
  • Complete an analytical deck

Example prompts

  • “save this analysis”
  • “archive this”
  • “/archive-analysis”

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Determine Mode
  2. Gather Analysis Metadata from Session Context
  3. Create Archive Entry
  4. Append to Index
  5. Update Dataset Stats
  6. Confirm
  7. Capture to Query Archaeology (Optional)

What it can do on your machine

Read from SKILL.md and the folder at commit 52c0744. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are yaml).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Archive Analysis loads about 2.7k tokens when it runs. Until then it costs about 237 tokens; SKILL.md has 1,121 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~237
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ai-analyst-lab/ai-analyst at commit 52c0744, republished under its MIT licence (© ai-analyst-lab). 1,121 words, ~2,700 tokens.

Download SKILL.mdSave it as .claude/skills/archive-analysis/SKILL.md (or your agent's skills folder).
name
archive-analysis
description
Save completed analyses to the knowledge system's analysis archive for future reference. Use this skill after completing any L3+ analysis, when `/run-pipeline` completes, when the user explicitly says "save this analysis" or "archive this", or automatically at the end of Step 18 (Close the Loop) in the analysis workflow. This skill captures key findings, metrics used, agents invoked, and output file paths so past work can be referenced in future sessions. Trigger whenever you finish validation on a multi-step analysis, complete an analytical deck, wrap up a root cause investigation, finish an opportunity sizing exercise, or close any analysis that produced deliverables worth preserving. Also apply when the user mentions saving work, archiving results, preserving findings, or wants to ensure an analysis can be recalled later. This is your analytical memory system — use it proactively to build institutional knowledge.

Skill: Archive Analysis

Purpose

Save a completed analysis to the knowledge system's analysis archive for future recall. Captures key findings, metrics used, agents invoked, and output file paths so that past work can be referenced in future sessions.

When to Use

  • After completing an L3+ analysis (post-validation)
  • After /run-pipeline completes successfully
  • User says "save this analysis" or "archive this"
  • Automatically triggered at the end of Step 18 (Close the Loop)
  • VERIFICATION MODE: User says "verify the archive" or "show me what was captured" — read existing entry, don't create new

Instructions

Step 0: Determine Mode

Check if this is an archive request (create new entry) or a verification request (read existing entry).

Verification signals:

  • User says "verify", "check", "show me what was captured", "did it save", "was it archived"
  • User mentions pipeline "auto-saved" or "already completed"
  • No new findings mentioned — just wants to see what's already there

If verification: Skip to Verification Mode (below). Otherwise, proceed to Step 1.

Step 1: Gather Analysis Metadata from Session Context

Record only what exists: findings, metrics, agents, and files come from the files and session history listed below, or from what the user stated. Anything not found is null or [], never invented.

Where to look:

  1. Pipeline state — Read working/session_state.yaml if it exists (contains pipeline progress, agents run, resume instructions)
  2. Active dataset — Read .knowledge/active.yaml for dataset ID
  3. Output files — Scan outputs/ and working/ directories for artifacts created in this session (use ls -lt to find recent files)
  4. Validation report — Look for working/validation_report.md or working/validation_summary.json for confidence grade
  5. User's stated findings — If user provides key findings in their request, use those verbatim

What to extract:

  1. Title: Derive from the original question or business context (check session history for the initial analytical question)
  2. Question: The original user question (look back in conversation for the first analytical request)
  3. Question level: From the Question Router classification (L1-L5) — check if router was invoked
  4. Dataset ID: From .knowledge/active.yaml
  5. Key findings:
    • If validation report exists, extract from there
    • Otherwise, check working/analysis_summary.md or outputs/narrative.md
    • If nothing exists, use findings the user mentioned in their archive request
    • Format as single-sentence bullets with numbers
  6. Metrics used:
    • Check validation report or analysis summary for metric references
    • Scan SQL queries in working/*.sql for column names
    • Match against .knowledge/metrics/index.yaml if available
  7. Agents used:
    • Read working/session_state.yaml if pipeline was used
    • Check conversation history for agent invocations (look for "Task" tool uses)
    • List in execution order
  8. Output files:
    • Run ls -lt outputs/ working/ | head -20 to find recent files
    • Filter for files created during this session (check timestamps)
    • Include both deliverables (outputs/) and working files (working/)
    • ONLY list files that actually exist — check the directory before listing
    • If no files exist or user didn't mention any outputs, set output_files: []
  9. Tags: Auto-generate from:
    • Keywords in the original question (mobile, checkout, seasonal, etc.)
    • Metric names used
    • Dataset name
    • Analysis type (funnel, root-cause, segmentation, etc.)
  10. Confidence:
    • Read from working/validation_report.md or working/validation_summary.json
    • If validation was not run, set to null and note it

If actual files don't exist: Create the archive with whatever metadata is available. Mark it as partial: true if deliverables are missing.

Step 2: Create Archive Entry
  1. Read the schema: .knowledge/analyses/_schema.yaml to understand required/optional fields
  2. Generate a unique ID: analysis_{YYYYMMDD}_{HHMMSS} (use current timestamp)
  3. Build the entry dict following the schema structure

Example entry format:

yaml
- id: analysis_20260403_232623
  title: "Mobile checkout conversion drop investigation"
  date: "2026-04-03"
  dataset: {active_dataset}
  question: "What caused the conversion rate drop and how does it relate to the mobile checkout flow?"
  question_level: L4
  findings:
    - "Mobile checkout conversion fell 2.1pp (5.4% → 3.3%) in March; desktop was flat"
    - "82% of the drop is concentrated at the payment step on iOS"
    - "Sessions with a payment error retry at 11% vs. 64% baseline"
  metrics:
    - conversion_rate
    - checkout_completion
    - funnel_drop_off
    - device_segmentation
  agents:
    - question-framing
    - data-explorer
    - descriptive-analytics
    - root-cause-investigator
    - validation
    - chart-maker
  output_files:
    - outputs/checkout_conversion_analysis.png
    - outputs/conversion_funnel_chart.png
    - working/checkout_funnel_analysis.png
  tags:
    - conversion
    - mobile
    - checkout
    - funnel-analysis
    - root-cause
  confidence: B
  partial: false
Step 3: Append to Index
  1. Read .knowledge/analyses/index.yaml
  2. If file doesn't exist, create it from template:
    yaml
    analyses: []
    total_analyses: 0
    last_updated: null
  3. Append the new entry to the analyses list
  4. Increment total_analyses
  5. Update last_updated to current date (YYYY-MM-DD)
  6. Write back to index.yaml
Step 4: Update Dataset Stats
  1. Read .knowledge/datasets/{active}/manifest.yaml
  2. Increment analysis_count
  3. Update last_used to current date
  4. Write back
Step 5: Confirm

Report to user:

Analysis archived: {title}
ID: {id}
Findings: {count} key findings captured
Use `/history` to browse past analyses.
Show full SKILL.md (493 more words)Show less
Step 6: Capture to Query Archaeology (Optional)

When to apply: Only for completed analyses (not partial) with confidence grade B or better.

After archiving, check if the analysis produced reusable patterns worth saving to .knowledge/query-archaeology/curated/ via helpers/knowledge/archaeology_helpers.py.

  1. SQL patterns — If validated SQL queries exist in working/*.sql:

    • Ask: "Would you like to save any SQL patterns from this analysis?"
    • Offer to capture via capture_cookbook_entry(title, sql, dataset, tables, tags)
    • Only capture queries that passed tie-out or validation checks
  2. Table knowledge — If the analysis revealed useful table metadata:

    • Offer to capture/update via capture_table_cheatsheet(table_name, dataset, grain, primary_key, common_filters, gotchas, common_joins)
    • Include grain, primary key, common filters, gotchas, and common joins
  3. Join patterns — If the analysis used non-obvious joins:

    • Offer to capture via capture_join_pattern(tables, join_sql, cardinality, validated, dataset)
    • Record cardinality and whether the join was validated

Rules for this step:

  • Ask the user: "Would you like to save any SQL patterns from this analysis?"
  • If the user declines or there are no reusable patterns, skip silently
  • Only offer for analyses with confidence grade B or better
  • Never auto-capture without user confirmation

Verification Mode

When user wants to verify an existing archive (not create a new one):

  1. Read .knowledge/analyses/index.yaml
  2. Find the most recent entry (highest index, latest date)
  3. Display what was captured:
    • Analysis ID and title
    • Date archived
    • Key findings (list them)
    • Metrics used
    • Agents invoked
    • Output files preserved
    • Tags
    • Confidence grade
  4. Confirm dataset manifest was updated
  5. Report archive stats (total analyses, last updated)

Do NOT create a new archive entry in verification mode.

Report format:

Archive verified: {title}
ID: {id}
Status: Successfully archived on {date}

Captured:
- {count} key findings
- {count} metrics tracked
- {count} agents used
- {count} output files preserved

Use `/history` to browse all past analyses.

Rules

  1. Never overwrite an existing archive entry — always append
  2. Key findings should be one sentence each, factual, with numbers where possible
  3. Tags should be lowercase, no spaces (use hyphens)
  4. If validation was not run, set confidence to null and note it
  5. Archive even partial analyses — mark as partial: true
  6. Verification requests don't create new entries — read and report existing archives
  7. DO NOT create standalone analysis markdown files or archive directories — the archive system stores metadata in index.yaml only. Output files remain in their original locations (outputs/, working/) and are referenced by path in the output_files array. DO NOT copy or duplicate artifacts.

Edge Cases

  • No outputs exist: Set output_files: [], do not invent file names. Archive with metadata only.
  • Pipeline was interrupted: Archive what's available, mark as partial: true, document reason in a reason_incomplete field
  • Duplicate question: Still archive — different runs may find different things
  • Analysis index doesn't exist: Create it from template
  • User says 'verify' but no archive exists: Report "No archive found. Would you like to create one?" and proceed to archive mode if confirmed
  • Session state files don't exist: Use conversation history and user-provided metadata to build the archive entry
  • User mentioned files but they don't exist: Only list files that actually exist in outputs/ or working/. If the user mentioned output files but they're not present, note in confirmation: "Files mentioned but not found: {list}"

© ai-analyst-lab, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/archive-analysis of ai-analyst-lab/ai-analyst.

Open the folder on GitHubat commit 52c0744

Compare with similar skills

Archive Analysis next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Archive Analysis compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Archive Analysis this skillai-analyst-lab/ai-analyst304—~2.7kAutomated safety check: PassMIT
Incident Alert Ticketslangfuse/langfuse36k—~1.6kAutomated safety check: PassCustom licence
Capture Conversationoutline/outline41k—~474Automated safety check: PassCustom licence
Project CairniBlinkQ/project-cairn2352 repos~861Automated safety check: PassMIT
LLM Wiki Knowledge GraphEgonex-AI/Understand-Anything86k1 repos~1.5kAutomated safety check: PassMIT
Find And Citeoutline/outline41k—~537Automated safety check: PassCustom licence

Similar skills

  • Incident Alert Tickets

    langfuse/langfuse

    Read and record root causes in the Linear incident-alert knowledge base.

    36k GitHub stars~1.6k tokensUpdated yesterday
    Knowledge ManagementAuto-check passed
  • Capture Conversation

    outline/outline

    Save the current conversation, a decision, or a set of notes as a document in an Outline collection; use when the user wants to keep what was discussed in their knowledge base.

    41k GitHub stars~474 tokensUpdated yesterday
    Knowledge ManagementAuto-check passed
  • Project Cairn

    iBlinkQ/project-cairn

    Standardize how an AI-collaboration project turns work into reusable knowledge.

    235 GitHub starsUsed in 2 repos~861 tokens
    Knowledge ManagementAuto-check passed
  • LLM Wiki Knowledge Graph

    Egonex-AI/Understand-Anything

    Detects a Karpathy-pattern LLM wiki and builds an interactive knowledge graph with entities, implicit relationships and topic clusters.

    86k GitHub starsUsed in 1 repo~1.5k tokens
    Knowledge ManagementAuto-check passed
  • Find And Cite

    outline/outline

    Answer questions from the Outline knowledge base with quotes and links to the source documents; use when the user asks what the team knows, documented, or decided about a topic.

    41k GitHub stars~537 tokensUpdated yesterday
    Knowledge ManagementAuto-check passed
  • Xhs Virtual Product

    chenjin-cmd/xhs-virtual-product

    This skill helps plan, select, produce, and market Xiaohongshu (RED) virtual/digital products — templates, knowledge bases, test tools, study materials.

    727 GitHub stars~862 tokensUpdated 8 days ago
    Knowledge ManagementAuto-check passed

More from ai-analyst-lab/ai-analyst

All 43 skills in this repo
  • Always Compare

    ai-analyst-lab/ai-analyst

    Never present a metric or number in isolation; anchor every number to a comparison (prior period, benchmark, or another segment) or state that none is available.

    304 GitHub stars~1.4k tokensUpdated 8 days ago
    Auto-check passed
  • Archaeology

    ai-analyst-lab/ai-analyst

    Retrieve proven SQL patterns, table cheatsheets, and join patterns from .knowledge/query-archaeology/ so past work gets reused.

    304 GitHub stars~1.3k tokensUpdated 8 days ago
    Auto-check passed
  • Auth Preflight

    ai-analyst-lab/ai-analyst

    Verify Google Workspace MCP authentication at the start of any session that needs Google APIs (Docs, Slides, Drive).

    304 GitHub stars~3.1k tokensUpdated 8 days ago
    Auto-check passed
  • Causal

    ai-analyst-lab/ai-analyst

    Causal inference toolkit for when experiments are not possible: estimate treatment effects from observational data with assumption checks and mandatory caveats.

    304 GitHub stars~1.8k tokensUpdated 8 days ago
    Auto-check passed
  • Chart To Drive

    ai-analyst-lab/ai-analyst

    Standardized workflow for uploading local chart PNGs to Google Drive and making them available for insertion into Google Docs and Slides.

    304 GitHub stars~1.4k tokensUpdated 8 days ago
    Auto-check passed
  • Codex Review

    ai-analyst-lab/ai-analyst

    Independently validate the current analysis with a second model (OpenAI Codex).

    304 GitHub stars~3k tokensUpdated 8 days ago
    Auto-check passed

Questions about Archive Analysis

What does Archive Analysis do?

Save completed analyses to the knowledge system's analysis archive for future reference. Archive Analysis is an agent skill from ai-analyst-lab/ai-analyst. Save completed analyses to the knowledge system's analysis archive for future reference.

When should I use Archive Analysis?

Archive Analysis fits situations like: explicitly says save this analysis; automatically at the end of Step 18 (Close the Loop) in the analysis workflow; ever you finish validation on a multi-step analysis; complete an analytical deck.

How do I install Archive Analysis in Claude Code?

Run `npx skills add ai-analyst-lab/ai-analyst --skill archive-analysis -a claude-code`. Or copy the skill folder (.claude/skills/archive-analysis in ai-analyst-lab/ai-analyst) into .claude/skills/archive-analysis in your project. Claude Code loads it when a task matches its description.

How do I install Archive Analysis in Codex?

Run `npx skills add ai-analyst-lab/ai-analyst --skill archive-analysis -a codex`. Or copy the skill folder (.claude/skills/archive-analysis in ai-analyst-lab/ai-analyst) into .agents/skills/archive-analysis in your project. Codex loads it when a task matches its description.

Can I use Archive Analysis in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ai-analyst-lab/ai-analyst --skill archive-analysis -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/archive-analysis, .gemini/skills/archive-analysis, .github/skills/archive-analysis and .opencode/skills/archive-analysis in your project.

What does Archive Analysis need to run?

SKILL.md names no scripts, command-line tools or credentials: Archive Analysis is instructions for the agent only.

Does Archive Analysis access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Archive Analysis safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Archive Analysis use?

Archive Analysis is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Archive Analysis use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Archive Analysis?

Skills that share tags, products or a category with Archive Analysis: Incident Alert Tickets (langfuse/langfuse, 36k stars), Capture Conversation (outline/outline, 41k stars), Project Cairn (iBlinkQ/project-cairn, 235 stars) and LLM Wiki Knowledge Graph (Egonex-AI/Understand-Anything, 86k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Archive Analysis?

ai-analyst-lab (a GitHub organization) maintains it in ai-analyst-lab/ai-analyst, which has 304 GitHub stars. The repository holds 43 skills in this directory. The repository was last updated on September 30, 2026.

Source: ai-analyst-lab/ai-analyst on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.