cli-self-updater
Skill10 starsChanged todayMITView on GitHub
Self-update CLI tool via uv tool upgrade or pip install with rollback safety
- Installs packages
In this repository44 other files it gives its agents.
- llms-full.txtllms.txt
- llms.txtllms.txt
- ai-prompt-engineering-safety-reviewSkill
- ast-codemapSkill
- ast-grepSkill
- autoharnessSkill
- autonomous-backlog-driverSkill
- claude-kimi-mcp-normalizationSkill
- code-frugalitySkill
- codemode-gatewaySkill
- codemode-typesSkill
- consequence-simulationSkill
- context-pruningSkill
- github-update-checkerSkill
- google-agents-cli-evalSkill
- google-agents-cli-scaffoldSkill
- history-searchSkill
- hook-gatingSkill
- hybrid-semantic-searchSkill
- kimi-code-agent-integrationSkill
- kimi-mcp-configurationSkill
- leann-vectorSkill
- log-summarizerSkill
- markdown-vagueSkill
- memory-reconciliationSkill
- mode-classificationSkill
- multiagent-orchestrationSkill
- output-compressionSkill
- prompt-injectionSkill
- python-anti-patternsSkill
- regression-sentinelSkill
- restart-trackingSkill
- rollback-guardSkill
- rust-call-graphSkill
- secrets-managementSkill
- security-best-practicesSkill
- session-compactorSkill
- sqlite-memorySkill
- swarm-barrierSkill
- swarm-dagSkill
- autoharnessSkill
- code-reliability-checksSkill
- skill-threat-rulesSkill
- autoharnessSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 1 is distinctive, and 11 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 9
Use when updating a Python command line application in-place from its git repository or release source, detecting the active package …
- Very specific: line 13
Check if the current workspace specifically matches the tool's own repository (is_autoharness_git_repo verifying pyproject.toml package …
- Very specific: line 14
Check if uv is available on PATH via shutil.which("uv").
- Very specific: line 15
Check if installed as a uv tool or inside an editable git workspace.
- Very specific: line 17
If running inside the package's own git working tree: perform git pull then re-install with uv tool install --editable .
- Very specific: line 18
If installed globally as a uv tool or when uv is available: execute uv tool install --force git+https://github.com/{owner}/{repo}.git.
- Very specific: line 19
If running via standard pip/venv: execute sys.executable -m pip install --upgrade git+https://github.com/{owner}/{repo}.git.
- Very specific: line 21
Use resp.read(MAX_BYTES) (e.g.
- Very specific: line 23
Always write configuration files atomically via temporary file in the same directory and os.replace (source: …
- Very specific: line 25
When running autonomously without --yes, verify consent or prompt interactive user before mutating the environment.
- Distinctive: line 27
Check subprocess exit code == 0.
- Very specific: line 28
Run new binary version check --version to confirm upgrade.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
cli-self-updater
When to use
Use when updating a Python command line application in-place from its git repository or release source, detecting the active package manager (uv, pipx, or pip).
Steps
- Detect runtime environment:
- Check if the current workspace specifically matches the tool's own repository (
is_autoharness_git_repoverifyingpyproject.tomlpackage name matches"autoharness"andsrc/autoharness/__init__.pyexists) rather than an arbitrary user git repository. - Check if
uvis available onPATHviashutil.which("uv"). - Check if installed as a
uv toolor inside an editable git workspace.
- Check if the current workspace specifically matches the tool's own repository (
- Determine update strategy:
- If running inside the package's own git working tree: perform
git pullthen re-install withuv tool install --editable . --force(orpip install -e .). - If installed globally as a uv tool or when
uvis available: executeuv tool install --force git+https://github.com/{owner}/{repo}.git. - If running via standard pip/venv: execute
sys.executable -m pip install --upgrade git+https://github.com/{owner}/{repo}.git.
- If running inside the package's own git working tree: perform
- Safe HTTP streaming with size limits:
- Use
resp.read(MAX_BYTES)(e.g. 1MB buffer cap) to prevent unbounded memory consumption or denial-of-service from remote HTTP endpoints (source: https://docs.python.org/3/library/urllib.request.html).
- Use
- Atomic file replacement:
- Always write configuration files atomically via temporary file in the same directory and
os.replace(source: https://docs.python.org/3/library/os.html#os.replace).
- Always write configuration files atomically via temporary file in the same directory and
- Confirmation and approval gating:
- When running autonomously without
--yes, verify consent or prompt interactive user before mutating the environment.
- When running autonomously without
- Post-update verification:
- Check subprocess exit code == 0.
- Run new binary version check
--versionto confirm upgrade.
Facts found here
- A workspace containing
.gitandpyproject.tomlis NOT necessarily the tool's repo; verifyname = "autoharness"before executing in-place editable installation. - In Python
urllib.request,response.read(size)enforces a hard buffer ceiling, preventing unbounded memory exhaustion (source: https://docs.python.org/3/library/urllib.request.html). os.replace(temp_path, path)atomically overwrites existing destination files on both Windows and POSIX systems when the temp file resides in the same directory/filesystem (source: https://docs.python.org/3/library/os.html#os.replace).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

