From agent-agentic-os
Trigger with "/os-clean-locks", "clear all locks", "reset agent locks", or when an agent is deadlocked and cannot acquire a lock because a previous agent crashed and left a stale lock behind in `context/.locks/`. <example> Context: User is seeing errors about locks already existing. user: "/os-clean-locks" assistant: <Bash> rm -r context/.locks/ python3 context/kernel.py state_update active_agent os-clean-locks </Bash> </example> <example> Context: Agent detects a deadlock when trying to acquire a lock during a task. 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." <commentary> Implicit audit trigger -- agent detects deadlock from kernel output and self-heals using os-clean-locks without user prompting. </commentary> </example>
How this skill is triggered — by the user, by Claude, or both
Slash command
/agent-agentic-os:os-clean-locksThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill requires **Python 3.8+** and standard library only. No external packages needed.
This skill requires Python 3.8+ and standard library only. No external packages needed.
To install this skill's dependencies:
pip-compile ./requirements.in
pip install -r ./requirements.txt
See ./requirements.txt for the dependency lockfile (currently empty — standard library only).
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.
Execute these phases in order:
Before taking any actions, emit intent to the Event Bus (if kernel is available):
python3 context/kernel.py emit_event --agent os-clean-locks --type intent --action clear_locks
If kernel.py does not exist, skip this step.
context/.locks/ exists.Bash tool to list all lock directories in context/.locks/ (e.g., ls -la context/.locks/)..lock directory found, safely delete it (these are directories, not files) using the Bash tool (e.g., rm -r context/.locks/skill.lock/).python3 context/kernel.py state_update active_agent os-clean-locks and python3 context/kernel.py state_update locks_cleared true. Skip this step if context/kernel.py does not exist.Emit a result event to the Event Bus (if kernel is available):
python3 context/kernel.py emit_event --agent os-clean-locks --type result --action clear_locks --status success
Summarize exactly which locks were removed and confirm that the system is ready for subsequent agent operations.
npx claudepluginhub richfrem/agent-plugins-skills --plugin agent-agentic-osImplements hooks for permission control, blocking dangerous operations, and audit trails in custom Claude Code agents.
Manages lifecycle of agents, skills, rules, and hooks in .claude/: create/update/delete with cross-reference propagation, subagent delegation for edits, and atomic permissions handling.
Coordinates two-specialist workflow to safely retire a team agent: Satchmo removes plugin/code references, Johnny tears down ClawNet bot infrastructure.