clear-all-data

Clears MOM business data through a guarded PowerShell reset script with multi-layer safety checks.

Updated Jun 16, 2026
One-click install
npx skills add https://github.com/SSS08099/mom-system --skill clear-all-data-sss08099
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clear-all-data
Source: https://github.com/SSS08099/mom-system/tree/main/.agents/skills/clear-all-data
Command: npx skills add https://github.com/SSS08099/mom-system --skill clear-all-data-sss08099

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Developers and testers working with the MOM system occasionally need to wipe all business data from a local instance to reset a development or test environment, but doing this manually risks deleting the wrong database, hitting a running backend, or corrupting instance identity records. ## Core Features & Use Cases - Guarded destructive reset: Runs scripts\clear-business-data.ps1 -Scope All only after verifying the backend is stopped, the port is unused, and the database name matches MOM_EXPECTED_DATABASE. - Instance identity verification: Confirms sys_instance_identity matches the live database, MOM_INSTANCE_ID, and a valid instance UUID before any DELETE executes. - Explicit typed confirmation: Requires the user to type CLEAR followed by the current instance ID, preventing accidental or automated invocation. - Use Case: After finishing a test cycle on a local MOM instance, ask the assistant to clear all business data; it stops the verified backend, runs the guarded script, and reports before/after row counts. ## Quick Start Ask the assistant to clear all business data from the current MOM instance and confirm the reset when prompted.

Frequently Asked Questions about clear-all-data

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

FAQPage Schema
How do I clear all business data from a MOM instance?

Ask the assistant to clear all business data explicitly. It resolves the repository root, stops the PID-verified backend, runs scripts\clear-business-data.ps1 -Scope All in interactive PowerShell, and you must type CLEAR followed by the instance ID to confirm.

What safety checks run before the MOM data reset script deletes anything?

The script verifies the backend is stopped and its port unused, MOM_ALLOW_DATA_RESET=true, MOM_DB_NAME equals MOM_EXPECTED_DATABASE, the PostgreSQL container carries the configured Compose project label, and sys_instance_identity matches the live database and instance UUID.

Can I reset sequences when clearing MOM business data?

Sequence reset is not included in the default scope. It requires the separate -ResetSequences switch on the script plus explicit user intent, and it is never run automatically as part of the standard clear operation.

Why does the MOM data clear script refuse to run?

The script aborts if the backend is still running, the port is in use, environment variables are missing or mismatched, the instance identity check fails, or the target uses external-infrastructure mode. Direct docker exec or psql deletion is never permitted.

When should I not use the clear-all-data reset for MOM?

Do not use it against external-infrastructure mode or production-like environments, and never for runtime corrections. Runtime ledger fixes must use reversal entries in inv_ledger; this guarded reset is the only permitted deletion exception.