More screenshots
Works with the AI Agents you already use
Locked YAML Writer — Comment-Preserving Edits with flock
Edit shared YAML task boards safely from many agents at once: flock, comment-preserving text edits, safe_load validation, atomic replace and rollback. Includes tests.
$12
Locked YAML Writer — Comment-Preserving Edits with flock
Example session with this skill installed
Three agents update board.yaml at the same time. Mark task_build_docs as in_progress without losing anyone else's edits or the comments in the file.
- Read your context and instructions
- Compiled the locked yaml writer
Summary
The agent edits only the status line of task_build_docs, under an exclusive lock, and keeps every comment and the formatting of the rest of the file.
Commands and real output
$ python3 scripts/locked_yaml_writer.py set-field board.yaml task_build_docs status in_progress
written
$ echo $?
0
$ python3 scripts/locked_yaml_writer.py set-field board.yaml task_build_docs status in_progress
no change
$ echo $?
3
What changed in the file (diff)
3c3
< status: open # open | in_progress | done
---
> status: in_progress # open | in_progress | done
Only one line changed. The inline comment # open | in_progress | done and the other records stay byte-for-byte the same.
How it stays safe
| Step | What happens |
|---|---|
| Lock | flock on a sidecar .lock file, so concurrent writers take turns |
| Edit | The target record's lines are edited as text (no yaml.dump round trip) |
| Check | yaml.safe_load before and after; the write is refused if any other record would change |
| Write | Temp file + os.replace, then a read-back check and rollback on mismatch |
Tests
$ python3 -m unittest discover -s tests
Ran 11 tests in 1.092s
OK
Next steps
Use append-note to add a line to a record's notes, or add-record to create a new record the same safe way.
Connects securely to your tools. The creator never sees your data.
About this skill
Stop losing updates in shared YAML files.
When several agents, cron jobs, or teammates write the same YAML task board, two things go wrong: one writer silently overwrites another, and yaml.dump round trips wipe every comment and reformat the whole file.
Locked YAML Writer fixes both with one small Python tool:
- Exclusive flock on a sidecar lock file, so writers take turns
- Edits the target record's lines as text: comments, quoting and order stay intact
- Validates with yaml.safe_load and refuses the write if any other record would change
- Detects writers that skip the lock and retries
- Atomic temp-file + os.replace, read-back check, automatic rollback
- Clear exit codes: written / no change / refused
What's inside:
- SKILL.md: drop-in instructions for Claude Code and other coding agents
- scripts/locked_yaml_writer.py: CLI (set-field, append-note, add-record) and importable functions
- tests/: 11 unittest cases, including 6 processes writing at once with zero lost entries
- examples/records.yaml and a README with usage and limits
Requirements: Python 3.9+, PyYAML, macOS or Linux.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 8 days ago