restore-study

Restores retired study sources from a merged commit SHA using Scripts/_restore_study.py.

Updated Jun 12, 2026
One-click install
npx skills add https://github.com/raghavamohan/AnalyticMadhyasthDarshan --skill restore-study-raghavamohan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: restore-study
Source: https://github.com/raghavamohan/AnalyticMadhyasthDarshan/tree/main/.cursor/skills/restore-study
Command: npx skills add https://github.com/raghavamohan/AnalyticMadhyasthDarshan --skill restore-study-raghavamohan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Recovering a retired study or its companion files from Git history is error-prone: manual checkouts can overwrite active files, break catalog metadata, or conflict with proposal ownership. This Skill restores historical canonical content safely through a validated script and the current shared pipelines. ## Core Features & Use Cases - Whole-study restoration: Recovers a retired study's canonical Markdown, status, and catalog date exactly as they existed at a merged commit SHA, requiring an absent study directory and catalog entry. - Companion-only restoration: Recovers selected companion sources (notes, decks) when the original parent study still exists, including deck presenter chains and note image dependencies. - Conflict protection: Rejects active-file conflicts, ownership mismatches, conflicting deck IDs, and changed shared figures before any replacement occurs. - Use Case: A study was retired last quarter but is needed again. Run the restore script with the merged SHA in dry-run mode, verify paths and ownership, then execute with --yes and open a study-update PR with the restore fields. ## Quick Start Restore the retired study 'Study-Slug' from merged commit SHA abc123 by running Scripts/_restore_study.py with --dry-run first, then confirm with --yes and submit a study-update PR.

Frequently Asked Questions about restore-study

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I restore a retired study from Git history?

Run Scripts/_restore_study.py with the study slug and a full 40-character merged commit SHA using --dry-run first, inspect paths and ownership, then repeat with --yes. Submit a study-update PR with the restore fields for verification.

How to restore only companion files of a study?

Pass --companion flags with the companion filenames alongside --from-ref. Companion-only restoration requires the original parent study to still exist and uses an ordinary study-update PR without changing parent metadata.

Does restoring a study roll back the production deployment?

No. Restoration only recovers authoring sources; it does not roll back production or activate old deployments. Historical R2 objects and retained deployments are never purged, and publication happens only after the verified PR merges.

Why does study restoration fail with ownership or conflict errors?

The script rejects restoration when the study directory or catalog entry already exists, when deck IDs conflict, when proposal ownership differs, or when shared figures changed. These checks run before any replacement to protect active content.

Can I use restore-study for a brand new study?

No. A new or never-approved study must use the add-study flow and the proposal approval workflow. Restoration only applies to studies with prior public registration at a merged commit in master history.