vimalinx/bio-agent / .claude/skills/run-with-lock
run-with-lock
VerifiedUse when wrapping a command in NCBI-style file locking so only one worker for a given lock base runs at a time.
run-with-lock
Compiled NCBI helper for serializing a command behind a named lock. Binary strings and official NCBI source both confirm option names such as -base, -getter, -log, -map, and -reviewer, but this local installation is incomplete because the default get_lock helper is missing from PATH.
Quick Start
- Command:
run_with_lock -base <lock-name> command [args...] - Local executable:
/home/vimalinx/miniforge3/envs/bio/bin/run_with_lock - Observed dependency: external
get_lockhelper
When To Use This Tool
- Preventing two jobs with the same logical lock name from running concurrently
- Serializing fragile build, indexing, or cache-population steps
- Capturing a log file for a locked command run
- Reusing NCBI build-system locking conventions in custom workflows
Common Patterns
# Run one command behind a named lock
run_with_lock -base make_taxdb make taxdb
# Keep a lock-scoped log file
run_with_lock -base make_taxdb -log make_taxdb.log make taxdb
# Ignore the wrapped command's exit status after the lock is acquired
run_with_lock -base make_taxdb ! make taxdb
Recommended Workflow
- Choose a stable lock base for the shared resource you are protecting.
- Wrap the real command after any
run_with_lockoptions. - Add
-logwhen you want captured output, and only use!when failure of the wrapped command should not propagate. - Verify that the supporting lock helper programs are actually installed before depending on this in production.
Guardrails
--helpand--versionare not implemented as help/version paths here; local testing returnedUnsupported option --helpandUnsupported option --version.- Bare invocation failed immediately with
run_with_lock: Unable to exec get_lock: No such file or directory., so this environment is missing the default lock-getter helper. - Binary strings plus official NCBI source confirm these parsed options:
-base,-getter,-log,-map,-reviewer, plus a standalone!marker that suppresses nonzero exit propagation from the wrapped command. - If
-baseis omitted, the source derives it from the basename of the wrapped command and then forms<base>.lock. - The source only applies
-mapremapping when the lock base begins withmake_.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 192k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 192k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 192k | Updated | Claude CodeCodex | Verified | Install |