armelhbobdad/oh-my-skills / _bmad/skf/skf-update-skill
skf-update-skill
VerifiedSmart regeneration preserving [MANUAL] sections after source changes. Use when the user requests to "update a skill" or "regenerate a skill."
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 9.8 KB |
| customize.toml | config | 2.8 KB |
| references/detect-changes.md | markdown | 48.1 KB |
| references/gap-driven.md | markdown | 54.2 KB |
| references/health-check.md | markdown | 4.3 KB |
| references/init.md | markdown | 45.7 KB |
| references/invocation-contract.md | markdown | 4.0 KB |
| references/manual-section-rules.md | markdown | 1.2 KB |
| references/merge.md | markdown | 36.0 KB |
| references/re-extract.md | markdown | 14.9 KB |
| references/report.md | markdown | 27.8 KB |
| references/write.md | markdown | 78.8 KB |
| scripts/skf-new-file-diff.py | script | 12.4 KB |
references/health-check.md
View on GitHub---
# `shared/health-check.md` resolves relative to the SKF module root
# (`{project-root}/_bmad/skf/` when installed, `{project-root}/src/` during
# development), NOT relative to this step file.
nextStepFile: 'shared/health-check.md'
# Resolve `{sourceTreeHelper}` to the first existing path. Step 1b removes
# the private source tree init.md §6b prepared. If neither path exists,
# skip the call and continue: a later run removes a tree left behind once
# it is seven days old.
sourceTreeProbeOrder:
- '{project-root}/_bmad/skf/shared/scripts/skf-source-tree.py'
- '{project-root}/src/shared/scripts/skf-source-tree.py'
# Resolve `{runLockHelper}` to the first existing path. If neither exists,
# say the lock stays and continue: a later update replaces it once stale.
runLockProbeOrder:
- '{project-root}/_bmad/skf/shared/scripts/skf-run-lock.py'
- '{project-root}/src/shared/scripts/skf-run-lock.py'
---
<!-- Config: communicate in {communication_language}. -->
# Step 7: Workflow Health Check
## STEP GOAL:
Chain to the shared workflow self-improvement health check at `{nextStepFile}`. This is the terminal step of update-skill: after the shared health check completes, the workflow is fully done. This step only releases the concurrency lock and the private source tree and removes this update's run folder, then delegates: no user-facing reports, file writes, or result contracts here (those belong in step 6), apart from one line when the lock or the tree stays on disk, or the folder does.
## Steps
1. **Release the concurrency lock** init.md §1b took (skip when `detect_only_mode` or `dry_run_mode` is true: those modes take none). Resolve `{runLockHelper}` ← first existing path in `{runLockProbeOrder}` and, from `{project-root}`, run:
```bash
uv run {runLockHelper} release \
--lock "{forge_data_folder}/{skill_name}/.skf-update.lock" \
--owner "{lock_owner}"
```
Never stop on the result:
- `released` true, or `reason` `absent`: continue.
- `reason` `not-owner`: another update took the lock over after this run's lock went stale, and the helper left that run's lock in place. Tell the user in one line "The run lock {forge_data_folder}/{skill_name}/.skf-update.lock now belongs to {held_by}: another update of {skill_name} took it over while this one ran.", then continue.
- No candidate resolves, or the command fails or prints no JSON: tell the user in one line "The run lock {forge_data_folder}/{skill_name}/.skf-update.lock was not released ({the first stderr line, or 'skf-run-lock.py is missing'}); delete it when no update of {skill_name} is running.", then continue.
1b. **Remove the private source tree** init.md §6b prepared, in every mode (`--detect-only` and `--dry-run` included), when `{source_tree}` is set: resolve `{sourceTreeHelper}` ← first existing path in `{sourceTreeProbeOrder}` and, from `{project-root}`, run `uv run {sourceTreeHelper} close --tree "{source_tree}"`. `{source_tree}` is the `tree` path the helper's `open` printed in init.md §6b; close also takes the run folder that holds it (where `changed-files.json` sits), and refuses any other folder. Bind `{source_tree_close}` ← `status` and `{source_tree_close_warnings}` ← `warnings`, and never stop on the result:
- `removed` or `missing`: continue.
- `refused`: run the command once more with `--tree` set to the exact `tree` value `open` printed, and bind its result the same way.
- `left`, `refused` again, or the command fails or prints no JSON: tell the user in one line "The private source tree {source_tree} was not removed ({source_tree_close}, {source_tree_close_warnings}); a later update removes it once it is seven days old.", then continue.
1c. **Remove this update's run folder** `{run_dir}` in every mode (`--detect-only` and `--dry-run` included), when `{run_dir}` is bound: from `{project-root}`, run `rm -rf "{run_dir}"`. It holds this run's state, its decision log and warnings (step 6 listed the warnings in a read-only run's report, a headless run's line carried both, and a finished run's result files hold both), and the helper files steps 2 to 5 passed between them; write.md §10 already dropped the snapshot a gap-driven repair took. When it fails, tell the user in one line "The run folder {run_dir} was not removed; delete it.", then continue.
2. Load `{nextStepFile}`, read it fully, then execute it.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |