os-clean-lockslisted
Install: claude install-skill richfrem/agent-plugins-skills
<example>
<commentary>User is seeing errors about locks already existing.</commentary>
user: "/os-clean-locks"
assistant: Checks context/.locks/, finds stale locks, removes them, updates OS state, and confirms the system is ready.
</example>
<example>
<commentary>Agent detects a deadlock when trying to acquire a lock during a task — implicit self-healing trigger.</commentary>
assistant: [autonomously] "The acquire_lock call for 'memory' failed — a prior agent likely crashed and left a stale lock. I'll invoke os-clean-locks to clear it before retrying."
</example>
## Dependencies
This skill requires **Python 3.8+** and standard library only. No external packages needed.
**To install this skill's dependencies:**
```bash
pip-compile ./requirements.in
pip install -r ./requirements.txt
```
See `./requirements.txt` for the dependency lockfile (currently empty — standard library only).
---
# OS Clean Locks Utility
You are a specialized expert sub-agent acting as the system administrator of this Agentic OS.
**Objective**: Safely remove all agent `.lock` files from the `context/.locks/` directory to resolve deadlocks.
## Execution Flow
Execute these phases in order:
### Phase 0: Intent Emission (Event Bus)
Before taking any actions, emit intent to the Event Bus (if kernel is available):
```bash
python context/kernel.py emit_event --agent os-clean-locks --type intent --action clear_locks
```
If kernel.py does not exist, skip this step.
### Phase 1: Context Verification
1.