night-market-operations
Run and ship this repo: make targets, artifacts, release runbook. Use when testing, linting, or releasing. Do not use for setup; use night-market-build-and-env.
athola · 已有 AI 审核记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add athola/claude-night-market --skill night-market-operations技能说明
name: night-market-operations description: "Run and ship this repo: make targets, artifacts, release runbook. Use when testing, linting, or releasing. Do not use for setup; use night-market-build-and-env."
Night Market Operations
This skill is the runbook for operating the claude-night-market repo: what each make target actually executes, where artifacts land, and the exact sequence that ships a release. Every command below was verified against the Makefile, scripts/, and .github/workflows/ on 2026-07-02 (repo v1.9.15).
Terms used once and reused throughout:
- Plugin: a directory under
plugins/with a.claude-plugin/plugin.jsonmanifest. Most have their own Makefile, pyproject.toml, and tests/. - skrills: a Rust CLI for skill validation and token analysis,
vendored at
plugins/abstract/bin/skrills. Every skrills target has a Python fallback, so a missing binary never blocks you. - ClawHub export: a cross-framework skill package format written to
clawhub/byscripts/clawhub_export.py.
All commands run from the repo root unless a cd is shown. uv is
required for everything Python. For environment setup, see
night-market-build-and-env.
Command anatomy
| Command | What it actually executes | When to use | Expected output shape |
|---|---|---|---|
make test | ./scripts/run-plugin-tests.sh --all: per plugin, runs make test --quiet if the plugin Makefile has a test: target, else uv run python -m pytest tests/ --tb=short --quiet if pyproject mentions pytest. Skips plugins without tests/. | Full sweep before a PR or release. | Per-plugin pass/fail/skip lines. Failures re-run verbose. |
make lint | uv run ruff format plugins/, then uv run ruff check --fix plugins/, then ruff format again, then uv run bandit --quiet -c pyproject.toml -r plugins/. All use root pyproject.toml config. | Before every commit. Mutates files (auto-fix). | Four staged sections ending "Lint Complete". |
make typecheck | ./scripts/run-plugin-typecheck.sh --all: per-plugin uv run mypy under each plugin's own strict config, plus a separate uv run mypy hooks/ pass when hooks/*.py exists. | After type-touching changes and before release. | Per-plugin pass/fail. Hooks checked as a sub-step. |
make validate-all | python3 plugins/abstract/scripts/validate_plugin.py <plugin> for every plugin. Failures print "(validation failed)" but do NOT stop the loop or fail the target. | Structure audit after manifest edits. | One validation block per plugin. Read output, not exit code. |
make plugin-check | For each plugin whose Makefile has a plugin-check: target: timeout 180 make -C plugins/<p> plugin-check. Failures and timeouts print a note, exit code stays 0. | Dogfood/demo sweep before release. | Per-plugin sections. Watch for "(plugin-check failed or timed out)". |
make docs-sync-check | bash scripts/capabilities-sync-check.sh | PR touches plugin manifests or skills (mirrors capabilities-sync.yml CI). | Drift list or clean pass. Fix drift with /sanctum:sync-capabilities --fix. |
make supply-chain-scan | python3 scripts/supply_chain_scan.py | After dependency or lockfile changes. | Scan report between banner lines. |
make validate-skills | skrills validate --skill-dir plugins --target claude (plugin bin, then PATH). Falls back to uv run python scripts/check_plugin_hooks.py. | Skill frontmatter/structure check. | skrills report, or the Python fallback notice plus its output. |
make analyze-skills | skrills analyze --skill-dir plugins. Falls back to uv run python scripts/generate_dependency_map.py. | Skill token-budget and dependency analysis. | Token/dependency stats. |
make status | make -C <plugin> status for every plugin. | Quick overview. | Per-plugin status or "(status unavailable)". |
make clean | make -C <plugin> clean for every plugin, errors ignored. | Reset build artifacts. | "Done." |
Two targets have soft failure modes worth repeating: make validate-all
and make plugin-check keep going past failures and can exit 0 while a
plugin is broken. Read their output. Do not treat a green exit as proof.
Scoping runs: one plugin, one file
The root Makefile auto-generates delegation targets for every plugin
that has a Makefile. make <plugin>-<target> is identical to
make -C plugins/<plugin> <target>:
make sanctum-test # run sanctum's test suite
make imbue-lint # run imbue's lint target
make abstract-help # list a plugin's own targets
Run a single test file from inside the plugin directory:
cd plugins/imbue && uv run pytest tests/unit/test_deferred_capture.py -x -q
Rules that save you an hour:
- Never run root
pytestexpecting plugin tests to run. Root pyproject.toml setsnorecursedirs = ["plugins/*", ...]because plugin conftest.py files collide on import paths. Plugin tests run per-plugin, always. - Some plugins force coverage on every run. imbue's pytest
addoptsinclude--cov=scripts,--cov-report=html:htmlcov, and--cov-report=xml, so even a single-file run writeshtmlcov/andcoverage.xmlintoplugins/imbue/. This is normal, not a mess you made. - Coverage thresholds: root coverage
fail_under = 85. Per-plugin overrides live in each plugin's[tool.nightmarket]coverage_threshold(per-plugin values: see night-market-validation-and-qa, the designated home for the threshold inventory).run-plugin-tests.shreads that value and passes--cov-fail-under=<n>when the plugin runs via the pytest path.
Artifact conventions
| Artifact | Producer | Location | Committed? |
|---|---|---|---|
htmlcov/, coverage.xml | pytest coverage addopts | Repo root and per-plugin dirs | Present in tree but regenerated. Never hand-edit |
reports/skill-graph.json | skill-graph tooling | reports/ | No, |