apply
Canonical apply — pick from N options, validate before apply, or delete safely in one command
SKILL.mdapply/SKILL.md
GitHubGoal
Apply actions correctly and safely — the canonical skill for every apply pattern — merged from the former choose-and-apply, validate-then-apply, and delete
Scope
choose: several alternatives (tools, libraries, approaches) → analyze → pick → applyvalidate: confirm before applying — code, config, references, architecture, or a decisiondelete: delete files/folders safely — dry-run, confirm, backup, update references- No mode given → detect from context/argument, then
/ask-meif still unclear
For domain-specific deletes, call the skill directly: /delete-cicd-fails, /delete-git-branch, /delete-git-submodules, /delete-git-worktree, /delete-projects, /delete-project-temp — each skill has its own dry-run + confirm gate
Execute
0. Detect Mode
Goal: Pick the workflow that fits the context
- argument/context specifies a mode → use that mode
- Several options to choose from →
choose - Deleting files/folders →
delete - A general apply that needs confirmation first →
validate - Unclear →
/ask-me
Mode: Choose
Goal: Pick the best of N options and apply it
- Capture options — take them from argument/context; none →
/ask-me; a single option →/follow-your-suggestion - Analyze — assess scope, cost, effort, risk, compatibility, maintainability; close options/high trade-offs →
/rethink - Present and confirm —
/report tablewith columnsNo. | Option | Pros | Cons | Score | Recommended; mark the recommendation with✅; high-risk →/ask-mefirst - Apply — continuing from context →
/follow-your-suggestion; a single action →/continue; multiple steps →/manage; affects many places →/all-this-patterns - Validate and report —
/run-checkor/deep-validateas appropriate →/report table(No. | Option | Status | Output) →/suggest-next-action
Mode: Validate
Goal: Always check before applying — never apply until the criteria pass
- Capture context — take the action/context; unclear →
/ask-me; define scope, dependencies, expected outcome - Select validation — code →
/run-check; skill/rules/config →/deep-validate; reference/path →/check-referenceor/review-devin-global-harness; architecture/design → the fitting/review; decision →/rethink - Run validation — record passed/failed, findings, warnings; order by severity;
/report table(No. | Check | Status | Findings) - Decide — all pass → apply; low warnings → notify the user and apply once confirmed; error/blocker → fix until it passes; unsure →
/ask-me - Apply — suggestion-only →
/follow-your-suggestion; file ops in many places →/all-this-patterns; multiple steps →/manage - Re-validate and report — validate again after applying →
/report table(No. | Step | Validation | Apply | Status); stuck step →/report-progress→/suggest-next-action
Mode: Delete
Goal: Delete safely — dry-run + confirm + backup + update references
- Identify targets — take the list from the user; expand pattern/glob into concrete files; record absolute paths
- Assess impact —
/reportsummarizes the state;/scan-codebaseor/use-astgrepto find references; checkgit statusfor tracked/untracked; identify broken refs; many/important references →/ask-mefirst - Dry run — show the deletion list + refs that would break + total size → ask
proceed/skip/cancel - Backup — under git → recoverable via git, no backup needed; not in git/uncommitted → copy to
%TEMP%or.trash/and record the path - Delete —
Remove-Item/rm; directory → recursive once confirmed; important targets (config, keys) → double confirm; deletion fails → report the error and stop - Update references —
/update-referencesfixes/removes refs pointing at the targets;/review-devin-global-harnesschecks for broken refs (fix up to 3 rounds) - Validate — confirm the deletion actually happened;
/run-check;/review-devin-global-harnessagain; fails →/resolve-errorsthen retry - Report — deleted list + fixed refs + remaining broken refs →
/suggest-next-action
Rules
1. Confirmation Gates
- Never apply without confirmation when high-risk
- Delete: always dry-run + confirm; never delete outside scope, git history, or
.git - Never apply while validation blockers remain — don't skip them because the user is in a hurry
2. Evidence And Context
- Every option must be evaluated against the real context — no guessing
- Keep the original context throughout the apply
- Keep validation results in the report before and after applying
3. Safety First (Delete)
- Never delete files containing secrets, API keys, or credentials
- Target in global config (
~/.config,%APPDATA%) → double confirm - Target in use by another process → stop the process first
- Target not in git → back it up before deleting and record the backup path in the report
4. No Broken References
- Every broken reference must be updated or deleted
- Never leave imports, paths, or links broken
Expected Outcome
- Mode detected/selected correctly from context
- Choose: full comparison table + recommended option with reasons + apply succeeds
- Validate: check before every apply + no apply with blockers + complete report
- Delete: targets removed + no broken refs + passes
/run-check+ rollback possible if backed up - Next action known for every mode