Skip to content

Share one host table, ship one payload, split optional deps - #208

Merged
titanwings merged 3 commits into
dot-skillfrom
chore/shared-hosts-and-deps
Oct 13, 2026
Merged

titanwings merged 3 commits into
dot-skillfrom
chore/shared-hosts-and-deps

Conversation

@titanwings

@titanwings titanwings commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

Requested by Tianyi · project thread

Summary

Before: host install paths were written in three places, and the publish list in two. install_distilly.py copied the whole repo (docs, tests, .github) into skill directories and only knew about 3 hosts. requirements.txt mixed requests with Playwright, Slack and other optional packages. Ruff ran as || true, and 11 test files repeated the same sys.path boilerplate.

After: tools/hosts.json is the only host table, and package.json files is the only publish list. The npm CLI and the Python installer both read them, so they install the same files into the same 8 hosts. Optional deps live in requirements-optional.txt, Ruff can now fail CI, and the tests share tests/_paths.py.

Rebased onto dot-skill after #206 and #209.

Changes

  • Add tools/hosts.json and the tools/hosts.py loader. bin/distilly.mjs, install_distilly.py, install_generated_skill.py, install_claude_generated_skill.py and skill_writer.py all read it. The aliases (claude, deepseek, grok) and the DSH_HOME override are in the table too. No install path changes.
  • bin/distilly.mjs derives payloadEntries from package.json files (minus bin/). install_distilly.py copies the same entries and accepts all 8 hosts. It checks that every entry exists before it touches the destination. Run from an already-installed copy, which has no package.json, it copies that copy whole, minus caches.
  • requirements.txt keeps only requests. Collector extras move to requirements-optional.txt, which is added to the npm files list. INSTALL.md, INSTALL_EN.md, CONTRIBUTING.md and the PR template mention the new file, and CI installs both.
  • Ruff is pinned to 0.16.8, and ruff.toml sets an explicit rule set (E4,E7,E9,F). CI runs ruff check tools/ tests/ without || true. Its findings are fixed: placeholder-less f-strings, unused imports, a shadowed import, an unused variable in transcribe_audio.py, and two style issues in the e2e mock.
  • CI gains workflow_dispatch, so a maintainer can start a run by hand. Retargeting a stacked PR after its base merges does not start one.
  • Add tests/_paths.py, which replaces the sys.path block in 11 test files.
  • New tests in test_install_distilly.py:
    • only the payload is copied
    • an incomplete payload is refused without touching the destination
    • reinstalling from an installed copy works
    • a real install for every host, through both the Python installer and the npm CLI, produces the same file list
  • test_skill_entrypoint_docs.py: only the one assertion this change breaks is adjusted, because the codex path now lives in hosts.json.
  • Rename docs/social-preview-distilly-v10.png to docs/social-preview.png and update the 8 READMEs, so the next redesign replaces the file instead of adding a new one.

Motivation

Repo structure cleanup. Adding a host used to mean editing 3 to 4 files, and the two installers shipped different things.

Testing

  • python -m unittest discover -s tests -p 'test_*.py' passed (117 tests) on Python 3.13 and 3.9, after the rebase
  • python -m compileall tools/ passed
  • ruff check tools/ tests/ passes
  • CI is green (Python 3.9, Python 3.11, Ruff)
  • Manually tested on the rebased head:
    • From the npm pack tarball, distilly install <host> for all 8 hosts, the 3 aliases and DSH_HOME. Paths are unchanged, and the installed prompts/ has Split SKILL.md into a short router with on-demand flows, tidy prompts/ #209's layout.
    • install_distilly.py --host <host> for all 8 hosts produces the same file tree as npm.
    • From an installed copy: skill_writer.py --install-{claude,codex,openclaw}-skill with the Claude command shim, plus install_generated_skill.py --host for hermes, deepseek-harness, pi, grok-build and opencode. All land in the same paths as before.

Checklist

  • I read CONTRIBUTING.md
  • Docs updated if behavior or usage changed (README / SKILL.md / INSTALL.md)
  • No secrets, tokens, or personal data committed
  • New dependencies added to requirements.txt or requirements-optional.txt (if any)
  • Tests added/updated for new functionality (or reason explained above)

🤖 Generated with Claude Code

https://claude.ai/code/session_014AQdagxHQtDiYDXHNMsRSK

@titanwings titanwings self-assigned this Oct 12, 2026
- tools/hosts.json is the single host path table, read by bin/distilly.mjs
  and tools/hosts.py (install_distilly, install_generated_skill,
  install_claude_generated_skill, skill_writer).
- package.json "files" is the single publish list; the npm CLI and the
  Python installer both derive the install payload from it, so the Python
  installer no longer copies docs/, tests/ or .github/ into skill dirs and
  now supports all eight hosts.
- requirements.txt keeps only requests; collector extras move to
  requirements-optional.txt.
- Ruff is pinned with an explicit rule set and blocks CI; fix its findings.
- tests/_paths.py replaces the sys.path boilerplate in 11 test files.
- Rename the cover image to docs/social-preview.png so redesigns stop
  adding versioned files.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014AQdagxHQtDiYDXHNMsRSK
An installed copy has no package.json, so install_distilly.py copies it
whole (minus caches) instead of failing to read the publish list.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014AQdagxHQtDiYDXHNMsRSK
@titanwings
titanwings force-pushed the chore/shared-hosts-and-deps branch from 8724b42 to 734fcf8 Compare October 13, 2026 05:35
@titanwings
titanwings changed the base branch from cleanup/unused-files-and-installers to dot-skill October 13, 2026 05:35
@titanwings
titanwings marked this pull request as ready for review October 13, 2026 05:35
A stacked PR retargeted after its base merges gets no CI run until the
next push; workflow_dispatch lets a maintainer start one.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014AQdagxHQtDiYDXHNMsRSK
@titanwings
titanwings merged commit e9f9567 into dot-skill Oct 13, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants