Skip to content

Make skill file writes atomic#551

Merged
teknium1 merged 1 commit intoNousResearch:mainfrom
aydnOktay:feature/atomic-skill-writes
Mar 10, 2026
Merged

Make skill file writes atomic#551
teknium1 merged 1 commit intoNousResearch:mainfrom
aydnOktay:feature/atomic-skill-writes

Conversation

@aydnOktay
Copy link
Copy Markdown
Contributor

his PR hardens skill management operations by making all file writes atomic. The skill_manager_tool now uses a temporary file and os.replace() for writing SKILL.md and supporting files, preventing corruption if Hermes crashes or is interrupted mid-write. The change adds a _atomic_write_text() helper that handles temp file creation, content writing, and atomic replacement, and updates _create_skill, _edit_skill, _patch_skill, and _write_file to use it. Rollback operations during security scans are also atomic, ensuring skill files remain consistent even if errors occur

@teknium1 teknium1 merged commit 739eb67 into NousResearch:main Mar 10, 2026
1 check passed
@teknium1
Copy link
Copy Markdown
Contributor

Merged locally with contributor credit (739eb67). Clean, well-implemented atomic write pattern — thanks for the contribution! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants