[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75Z5BP0TDDJTRMY8KV3VPNZ":3,"skill-same:01M75Z5BP0TDDJTRMY8KV3VPNZ":44},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":13,"repositoryHtmlUrl":26,"repositoryHomepageUrl":27,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M75Z5BP0TDDJTRMY8KV3VPNZ","run-tests",null,"Run the harnessed pytest suite, and the other three CI gates before you push. Use whenever you need to run, re-run, or verify tests in this repo — including from a fresh git worktree, after changing src\u002Fharnessed\u002F or catalog\u002F, and always before pushing a branch or opening a PR. Also use when pytest reports \"No module named 'harnessed'\", when a CLI test fails comparing plain text against ANSI-escaped output, when pyright reports hundreds of missing imports, or when mise says a config file is not trusted.","drmikecrowe\u002Fharnessed","drmikecrowe","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F90312?v=4","01M75Z3TD9D8YVCA67X1F4HFY4","01M75Z3TDYTCR5APZRMXJ00TXG",0,"BSD-3-Clause","https:\u002F\u002Fgithub.com\u002Fdrmikecrowe\u002Fharnessed\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Frun-tests\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: run-tests\ndescription: Run the harnessed pytest suite, and the other three CI gates before you push. Use whenever you need to run, re-run, or verify tests in this repo — including from a fresh git worktree, after changing src\u002Fharnessed\u002F or catalog\u002F, and always before pushing a branch or opening a PR. Also use when pytest reports \"No module named 'harnessed'\", when a CLI test fails comparing plain text against ANSI-escaped output, when pyright reports hundreds of missing imports, or when mise says a config file is not trusted.\n---\n\n# Running the harnessed test suite\n\n```bash\ntools\u002Frun-tests.sh                        # whole suite\ntools\u002Frun-tests.sh tests\u002Ftest_schema.py   # one file\ntools\u002Frun-tests.sh -k install -x          # filter, stop on first failure\n```\n\nThat is the whole workflow **for pytest**. The script handles worktree setup itself and is\nidempotent, so run it directly rather than composing `mise`\u002F`uv`\u002F`pytest` by hand.\n\n## Before you push: `tools\u002Fpreflight.sh`, not `run-tests.sh`\n\n`run-tests.sh` runs **pytest and nothing else**. CI runs **four** gates across three workflows, so\na green suite proves one of four:\n\n| Workflow | Gate |\n|---|---|\n| `test.yml` | pytest (3.12 **and** 3.13) |\n| `lint.yml` | `ruff check src tests tools` → `pyright` → `shellcheck $(git ls-files '*.sh')` |\n| `pin-check.yml` | `harnessed update --check` |\n\n```bash\ntools\u002Fpreflight.sh              # pytest + ruff + pyright + shellcheck\ntools\u002Fpreflight.sh --all        # also the catalog pin check (network, slow)\ntools\u002Fpreflight.sh --no-tests   # lint layers only, for a docs- or shell-only change\n```\n\n**Never report a branch as verified on the strength of `run-tests.sh` alone.** PR #431 went red on\ntwo `RUF005` findings with pytest fully green, because nothing local had ever run ruff.\n\nTwo traps worth knowing even if you always use the script:\n\n- **`lint.yml` has no `continue-on-error`, and ruff is its first step.** A ruff finding means\n  pyright and shellcheck **never ran** — so a red lint job understates how much is unverified. Fix\n  ruff, then run the other two before assuming they were fine. `preflight.sh` diverges here on\n  purpose: it runs every gate even after one fails, and names the ones it skipped.\n- **`pyright` needs `--pythonpath`.** `mise.toml` puts the venv outside the repo\n  (`UV_PROJECT_ENVIRONMENT=~\u002F.local\u002Fshare\u002Fharnessed\u002Fvenvs\u002F\u003Cbranch>\u002F.venv`), so a bare `pyright`\n  resolves none of the installed packages and reports hundreds of phantom `reportMissingImports` on\n  a tree that is genuinely at zero. `preflight.sh` passes it for you.\n\nThe current baseline is on the branch you are working from — record the number before your change\nand compare after. A drop is a regression even if your own new tests pass.\n\n## Why not just run pytest\n\nThree things make this suite fail **locally while CI stays green**. Each looks like a different bug\nthan it is, and each costs a round trip to rediscover.\n\n**Per-branch venvs.** `mise.toml` sets `UV_PROJECT_ENVIRONMENT` to\n`~\u002F.local\u002Fshare\u002Fharnessed\u002Fvenvs\u002F\u003Cbranch>\u002F.venv` — one venv per branch, outside the repo so a\ncontainer bind-mount cannot corrupt it. A fresh worktree starts with **no venv** and does not\ninherit `main\u002F`'s.\n\n**pytest is an optional extra.** It lives in `[project.optional-dependencies].dev`. A plain\n`uv sync` installs the project without it, and `uv run pytest` then falls through to a *system*\npytest on a different Python — where every test errors with `ModuleNotFoundError: No module named\n'harnessed'`. That reads like a broken checkout; it is a missing `--extra dev`.\n\n**mise refuses untrusted configs** in a new worktree.\n\n## If a test fails on ANSI escape codes\n\n```\nassert \"no such stack 'x'\" in \"\\x1b[1;31merror:\\x1b[0m no such stack \\x1b[32m'x'\\x1b[0m\"\n```\n\n**Do not fix this by changing the assertion.** The test is correct — CI proves it. The environment\nis wrong.\n\n`rich` renders plain text when stdout is not a TTY, which is the case under typer's `CliRunner`.\n`FORCE_COLOR` overrides that check, so escapes land inside the captured output. Terminal shell\nintegration sets it without asking (Ghostty exports `FORCE_COLOR=3`), so you hit this having never\nopted in, while CI — a bare environment — is green the whole time.\n\n`tests\u002Fconftest.py` pops `FORCE_COLOR` at **module import**. That is the only place early enough:\n`rich` reads the variable when a `Console` is *constructed*, and `launcher.py` builds `_out`\u002F`_err`\nat import, before any fixture runs. An autouse fixture was tried and does not work. Preserve that if\nyou touch conftest.\n\n## If a test passes locally and fails on CI comparing rendered text\n\nSame family as the escape codes above, different axis: **line wrapping**.\n\n`_err` is a `rich` Console that hard-wraps at 80 columns, and most harnessed messages embed a path.\nWhen that path is a pytest `tmp_path` its length is machine-dependent —\n`\u002Ftmp\u002Fpytest-of-\u003Cyou>\u002Fpytest-\u003Cn>\u002F…` locally versus `\u002Ftmp\u002Fpytest-of-runner\u002Fpytest-0\u002F…` on the runner\n— so the wrap points move and a multi-word substring lands across a line break on one machine and\nnot the other. PR #430 failed exactly this way on `could not be resolved`.\n\n**Never assert on raw rendered output.** Normalise first:\n\n```python\ndef _flat(text: str) -> str:\n    return \" \".join(text.split())\n```\n\nA test that renders under a deliberately long path (`tmp_path \u002F (\"d\" * 60) \u002F (\"e\" * 60)`) shifts\nevery wrap point and keeps the class of bug from returning.\n\n## Related\n\nLive behavior is **not** covered by this suite. It runs no `podman build` and no\n`harnessed launch`, so container layering, image ENV, and host-launch behavior are asserted through\nemitted text and monkeypatched executors only. Do not report a change as verified end-to-end on the\nstrength of a green run — and do not run `harnessed` yourself to close that gap (see AGENTS.md); ask\nthe user to.\n","# Running the harnessed test suite\n\n```bash\ntools\u002Frun-tests.sh                        # whole suite\ntools\u002Frun-tests.sh tests\u002Ftest_schema.py   # one file\ntools\u002Frun-tests.sh -k install -x          # filter, stop on first failure\n```\n\nThat is the whole workflow **for pytest**. The script handles worktree setup itself and is\nidempotent, so run it directly rather than composing `mise`\u002F`uv`\u002F`pytest` by hand.\n\n## Before you push: `tools\u002Fpreflight.sh`, not `run-tests.sh`\n\n`run-tests.sh` runs **pytest and nothing else**. CI runs **four** gates across three workflows, so\na green suite proves one of four:\n\n| Workflow | Gate |\n|---|---|\n| `test.yml` | pytest (3.12 **and** 3.13) |\n| `lint.yml` | `ruff check src tests tools` → `pyright` → `shellcheck $(git ls-files '*.sh')` |\n| `pin-check.yml` | `harnessed update --check` |\n\n```bash\ntools\u002Fpreflight.sh              # pytest + ruff + pyright + shellcheck\ntools\u002Fpreflight.sh --all        # also the catalog pin check (network, slow)\ntools\u002Fpreflight.sh --no-tests   # lint layers only, for a docs- or shell-only change\n```\n\n**Never report a branch as verified on the strength of `run-tests.sh` alone.** PR #431 went red on\ntwo `RUF005` findings with pytest fully green, because nothing local had ever run ruff.\n\nTwo traps worth knowing even if you always use the script:\n\n- **`lint.yml` has no `continue-on-error`, and ruff is its first step.** A ruff finding means\n  pyright and shellcheck **never ran** — so a red lint job understates how much is unverified. Fix\n  ruff, then run the other two before assuming they were fine. `preflight.sh` diverges here on\n  purpose: it runs every gate even after one fails, and names the ones it skipped.\n- **`pyright` needs `--pythonpath`.** `mise.toml` puts the venv outside the repo\n  (`UV_PROJECT_ENVIRONMENT=~\u002F.local\u002Fshare\u002Fharnessed\u002Fvenvs\u002F\u003Cbranch>\u002F.venv`), so a bare `pyright`\n  resolves none of the installed packages and reports hundreds of phantom `reportMissingImports` on\n  a tree that is genuinely at zero. `preflight.sh` passes it for you.\n\nThe current baseline is on the branch you are working from — record the number before your change\nand compare after. A drop is a regression even if your own new tests pass.\n\n## Why not just run pytest\n\nThree things make this suite fail **locally while CI stays green**. Each looks like a different bug\nthan it is, and each costs a round trip to rediscover.\n\n**Per-branch venvs.** `mise.toml` sets `UV_PROJECT_ENVIRONMENT` to\n`~\u002F.local\u002Fshare\u002Fharnessed\u002Fvenvs\u002F\u003Cbranch>\u002F.venv` — one venv per branch, outside the repo so a\ncontainer bind-mount cannot corrupt it. A fresh worktree starts with **no venv** and does not\ninherit `main\u002F`'s.\n\n**pytest is an optional extra.** It lives in `[project.optional-dependencies].dev`. A plain\n`uv sync` installs the project without it, and `uv run pytest` then falls through to a *system*\npytest on a different Python — where every test errors with `ModuleNotFoundError: No module named\n'harnessed'`. That reads like a broken checkout; it is a missing `--extra dev`.\n\n**mise refuses untrusted configs** in a new worktree.\n\n## If a test fails on ANSI escape codes\n\n```\nassert \"no such stack 'x'\" in \"\\x1b[1;31merror:\\x1b[0m no such stack \\x1b[32m'x'\\x1b[0m\"\n```\n\n**Do not fix this by changing the assertion.** The test is correct — CI proves it. The environment\nis wrong.\n\n`rich` renders plain text when stdout is not a TTY, which is the case under typer's `CliRunner`.\n`FORCE_COLOR` overrides that check, so escapes land inside the captured output. Terminal shell\nintegration sets it without asking (Ghostty exports `FORCE_COLOR=3`), so you hit this having never\nopted in, while CI — a bare environment — is green the whole time.\n\n`tests\u002Fconftest.py` pops `FORCE_COLOR` at **module import**. That is the only place early enough:\n`rich` reads the variable when a `Console` is *constructed*, and `launcher.py` builds `_out`\u002F`_err`\nat import, before any fixture runs. An autouse fixture was tried and does not work. Preserve that if\nyou touch conftest.\n\n## If a test passes locally and fails on CI comparing rendered text\n\nSame family as the escape codes above, different axis: **line wrapping**.\n\n`_err` is a `rich` Console that hard-wraps at 80 columns, and most harnessed messages embed a path.\nWhen that path is a pytest `tmp_path` its length is machine-dependent —\n`\u002Ftmp\u002Fpytest-of-\u003Cyou>\u002Fpytest-\u003Cn>\u002F…` locally versus `\u002Ftmp\u002Fpytest-of-runner\u002Fpytest-0\u002F…` on the runner\n— so the wrap points move and a multi-word substring lands across a line break on one machine and\nnot the other. PR #430 failed exactly this way on `could not be resolved`.\n\n**Never assert on raw rendered output.** Normalise first:\n\n```python\ndef _flat(text: str) -> str:\n    return \" \".join(text.split())\n```\n\nA test that renders under a deliberately long path (`tmp_path \u002F (\"d\" * 60) \u002F (\"e\" * 60)`) shifts\nevery wrap point and keeps the class of bug from returning.\n\n## Related\n\nLive behavior is **not** covered by this suite. It runs no `podman build` and no\n`harnessed launch`, so container layering, image ENV, and host-launch behavior are asserted through\nemitted text and monkeypatched executors only. Do not report a change as verified end-to-end on the\nstrength of a green run — and do not run `harnessed` yourself to close that gap (see AGENTS.md); ask\nthe user to.\n",{"name":5,"description":7},"main","580ef1f7d05e79586ece387ff45e3e0e47424c9f",".agents\u002Fskills\u002Frun-tests","https:\u002F\u002Fgithub.com\u002Fdrmikecrowe\u002Fharnessed","https:\u002F\u002Fdrmikecrowe.github.io\u002Fharnessed\u002F","https:\u002F\u002Fgithub.com\u002Fdrmikecrowe","2026-11-13 22:15:04",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add drmikecrowe\u002Fharnessed --skill run-tests",{"tool":36,"command":37},"bunx","bunx skills add drmikecrowe\u002Fharnessed --skill run-tests",{"tool":39,"command":40},"pnpm","pnpm dlx skills add drmikecrowe\u002Fharnessed --skill run-tests","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdrmikecrowe\u002Fharnessed\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Frun-tests\u002FSKILL.md",true,[],[45,52,59,65,72,79],{"skillNo":46,"name":47,"nameZh":6,"description":48,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":49,"categories":50,"keywords":51,"publishedAt":18},"01M75Z8044E0QMWTA23RT25EPS","foo","GH-649 fixture skill.","https:\u002F\u002Fgithub.com\u002Fdrmikecrowe\u002Fharnessed\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Frecipes\u002Fplugin-recipe\u002Fskills\u002Ffoo\u002FSKILL.md",[],[],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":18},"01M75Z7YR0WSHATRWFY0C5563T","time-helper","Ask the time MCP server for the current time in any IANA timezone and convert times between timezones.","https:\u002F\u002Fgithub.com\u002Fdrmikecrowe\u002Fharnessed\u002Fblob\u002Fmain\u002Fcatalog\u002Frecipes\u002Ftime\u002Fskills\u002Ftime-helper\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":18},"01M75Z7WFANC8TKFCFCPV43V88","wrangler","https:\u002F\u002Fgithub.com\u002Fdrmikecrowe\u002Fharnessed\u002Fblob\u002Fmain\u002Fcatalog\u002Frecipes\u002Fmikes-universal-setup\u002Fskills\u002Fwrangler\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":18},"01M75Z7SASE6ADBXJ26CGMFPJ7","varlock","Create and maintain `.env.schema` files in the varlock\u002F@env-spec DSL. Use when adding env var definitions, migrating from `.env.example`, running varlock commands (init, load, run, encrypt, audit), debugging missing env vars, or wiring 1Password secrets.","https:\u002F\u002Fgithub.com\u002Fdrmikecrowe\u002Fharnessed\u002Fblob\u002Fmain\u002Fcatalog\u002Frecipes\u002Fmikes-universal-setup\u002Fskills\u002Fvarlock\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":18},"01M75Z7Q23PFS46ZSHTYW6Z4MF","thinking-partner","Find where the user's idea, plan, direction, or draft is wrong before they accelerate. Use on \"I've been thinking\", \"what do you think\", \"assess this\", \"review my plan\", \"am I going the right direction\", \"should I\". Not for code diffs.","https:\u002F\u002Fgithub.com\u002Fdrmikecrowe\u002Fharnessed\u002Fblob\u002Fmain\u002Fcatalog\u002Frecipes\u002Fmikes-universal-setup\u002Fskills\u002Fthinking-partner\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":18},"01M75Z7N0J4JN3S5V01PNTSM25","tests-are-authority","An existing test encodes a decision already made; your change does not outrank it. Load when a test fails after your change, before editing an existing test, and before adding skip\u002Fxfail or loosening an assertion.","https:\u002F\u002Fgithub.com\u002Fdrmikecrowe\u002Fharnessed\u002Fblob\u002Fmain\u002Fcatalog\u002Frecipes\u002Fmikes-universal-setup\u002Fskills\u002Ftests-are-authority\u002FSKILL.md",[],[]]