Orchestrates RLS-scoped dataset cleanup, delete, retirement, and redo workflows via CLI maintenance plans with explicit approvals and readback verification.
How this skill is triggered — by the user, by Claude, or both
Slash command
/lca-foundry-workflows:dataset-rls-maintenanceThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use this skill when a Foundry or account-governance task needs to remove, retire, repair, or redo rows that were previously imported incorrectly under the current user's database access.
Use this skill when a Foundry or account-governance task needs to remove, retire, repair, or redo rows that were previously imported incorrectly under the current user's database access.
state_code=0.For the narrow "clear my current account so I can re-import" workflow, use the implemented command:
tiangong-lca dataset maintenance clear-account \
--out-dir ./dataset-maintenance/account-clear \
--json
tiangong-lca dataset maintenance clear-account \
--out-dir ./dataset-maintenance/account-clear \
--commit \
--confirm <current-account-email> \
--json
This command deletes only rows visible to the current authenticated user and filtered by that user's user_id
through RLS. It covers authorable dataset tables in reference-safe delete order:
lifecyclemodels, processes, flows, sources, and contacts.
It does not delete unitgroups or flowproperties, because those are treated as protected support data by default.
Use --state-code <n> only when the operator asks for a narrower cleanup. Omit it when the operator explicitly
asks to clear all current-account data for re-import.
For row-level delete, retirement, repair, or redo workflows, the owning command family remains:
tiangong-lca dataset maintenance plan \
--scope ./maintenance-scope.json \
--operation <delete|retire|redo-import|repair-references> \
--out-dir ./dataset-maintenance \
--json
tiangong-lca dataset maintenance apply \
--plan ./dataset-maintenance/maintenance-plan.json \
--commit \
--json
tiangong-lca dataset maintenance verify \
--plan ./dataset-maintenance/maintenance-plan.json \
--out-dir ./dataset-maintenance/verify \
--json
Until the row-level plan/apply/verify commands are implemented, the skill may plan and document the required artifacts, but must not substitute ad hoc SQL, REST deletes, or Foundry-local database code.
delete_candidate, retire_candidate, rewrite_reference, redo_candidate, skip_missing, protected, or blocked.maintenance-plan.json and dry-run-report.json. The plan must include row-level actions, order of operations, dependency blockers, expected post-state, and rollback notes.apply --commit. Approval must name the plan file, operation, current user/account, row counts, and whether redo rows are ready..foundry artifacts as proof of the new run.maintenance-scope.jsonrls-visible-snapshot.jsonprotected-rows.jsonlreference-impact-report.jsonmaintenance-plan.jsondry-run-report.jsonapproval-record.jsoncommit-report.jsonreadback-verify-report.jsonredo-source-manifest.json when redo is part of the taskGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub tiangong-lca/skills --plugin lca-hybrid-search