Borrowing it
Nothing to install: this file belongs to AmineDjeghri/personal-os-setup. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/AmineDjeghri/personal-os-setup/main/.claude/skills/run-tests/SKILL.mdgit clone --depth 1 https://github.com/AmineDjeghri/personal-os-setupWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/aminedjeghri/personal-os-setup/run-tests)<a href="https://agentmods.dev/skills/aminedjeghri/personal-os-setup/run-tests"><img src="https://agentmods.dev/badge/skills/aminedjeghri/personal-os-setup/run-tests/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/aminedjeghri/personal-os-setup/run-tests"><img src="https://agentmods.dev/badge/skills/aminedjeghri/personal-os-setup/run-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00081 | $0.01329 |
| Opus 5 | $0.00041 | $0.00665 |
| Sonnet 5 | $0.00016 | $0.00266 |
| Haiku 4.5 | $0.00008 | $0.00133 |
Grade A, and why
run-tests scanned grade A with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
**On a matching machine, these tests run real commands**: `apt-get install curl`, real `apt update`/`upgrade`/`autoremove`, equivalents for brew/pacman. This is why CLAUDE.md says "requires Ubuntu with passwordless sudo" Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
- Fake a `subprocess.CompletedProcess` with `MagicMock(returncode=..., stdout=..., stderr=...)` — never shell out for real in a unit test. How it starts
The opening of the file, as written. The whole thing — 42 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Testing in personal-os-setup
There are three separate test setups in this repo — know which one you're in before running anything.
⚠️ make test-integration and tests/archlinux/ run real, host-mutating commands (package installs/upgrades). Never run either without confirming with the user first, even if they already asked you to "run the tests" generically — that request defaults to make test (unit only), not the destructive suites. See CLAUDE.md § "Safety: always confirm before system-mutating actions".
1. tests/unit/ — make test (safe, run this freely)
uv run pytest tests/unit. No conftest.py exists — fixtures are ad hoc per-file (tmp_path, monkeypatch) or hand-rolled fakes, not shared. Exit code 5 ("no tests collected") is treated as success by test.mk.
Mocking conventions — copy these exactly, don't improvise:
- Patch at the import site, not the source module. Package-manager tests patch
"personal_os_setup.tasks.managers.<backend>.run"/"...sudo_non_interactive_ok"— i.e. wherever the name was imported into, matching the "local check, shared result-builder" split documented in [[add-system-action]].shutil.whichis the one exception, patched at its global path ("shutil.which"), since managers call it directly rather than importing a bound name. - Frontend tests patch chezmoi functions at
personal_os_setup.frontend.app.chezmoi_*(whereapp.pyimports them by name), not attasks.system.chezmoiwhere they're defined. - Fake a
subprocess.CompletedProcesswithMagicMock(returncode=..., stdout=..., stderr=...)— never shell out for real in a unit test. - For a function that calls
shutil.which/runmultiple times with different expected results, useside_effect=iter([...]). - For a fake package manager, duck-type it:
type("FakePM", (), {"is_installed": ..., "install": ...})()— used in bothtest_app.pyandtest_factory.py, no need for a real manager subclass. - Never click a button/action wired to a real system command. Build a synthetic
SystemAction(label=..., run=lambda: TaskResult(...))with an in-memoryrunand inject it, the waytest_app.py's confirm-flow test does. - Textual (
test_app.py):pytestmark = pytest.mark.asyncioat module level is required —asyncio_mode = "strict"inpyproject.tomlmeans an unmarkedasync def test_...silently breaks/skips, unlikeasyncio_mode = "auto". To wait for a@work(thread=True)worker to finish inside a test, poll:for _ in range(20): await pilot.pause(0.1); \n if not app.is_busy: break— there's no direct awaitable for a background worker's completion. - To find a dynamically-id'd
TabPane(tab ids come from a shareditertools.count()inapp.py), walk up from a known child widget by id (e.g.#dotfiles-selection-list) rather than hardcoding a tab id. - Settings/env-var tests need
monkeypatch.setenv(...)plusimportlib.reload(settings_module)—pydantic-settingsreads env at import time, sosetenvalone doesn't take effect on an already-imported module. packages.yamlhas no schema validation beyondtests/unit/test_detect_os.py::TestPackagesYaml::test_every_manager_has_a_backend, which loads the real packaged yaml and asserts every(distro, manager)pair resolves viaget_package_manager(). Adding a new manager string topackages.yamlwithout registering a backend infactory.pyfails this test specifically — it's the only guardrail.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 12d ago First seen · 42 lines · 81 tokens per session scan A dd7a81c60b05
run-tests is a skill published in the GitHub repository AmineDjeghri/personal-os-setup (602 stars, last pushed today), licensed MIT. It adds 81 tokens to every session and 1,329 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 2 findings (makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
hula-skill
HuLa project skill for frontend (Vue 3 + Vite + UnoCSS + Naive UI/Vant), backend (Tauri v2 + Rust + SeaORM/SQLite), full-stack flows, and build/release work. Use when the user mentions hula or HuLa or requests changes in this repository; after triggering, ask which scope (frontend/backend/fullstack/build-release) to…
microsoft-powertoys
Configure PowerToys FancyZones, Run, Keyboard Manager, and Awake; automate settings and troubleshoot Windows utility behavior.
eartrumpet
Inspect and route per-application audio with EarTrumpet, WASAPI, and pycaw; troubleshoot audio sessions and output devices.
flow-launcher
Build Flow Launcher plugins with C# or Python JSON-RPC, configure plugin manifests, and integrate Everything search.
wsl-bash-crlf-or-tempfile
When a Windows shell (PowerShell/cmd) feeds a bash script into WSL, CRLF line endings can corrupt the first shell builtin; force LF or pipe via a temp file.
wsl-networking-mode-dns-fallback
When WSL's mirrored networking fails and falls back to "None", plus /etc/wsl.conf has generateResolvConf=false, the distro has no DNS; fix both layers.