mirror of
https://github.com/titanwings/colleague-skill.git
synced 2026-10-29 04:16:54 +08:00
* Share one host table, ship one payload, split optional deps - 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 * Keep reinstalling from an installed copy working 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 * Allow running CI manually 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 --------- Co-authored-by: Claude <noreply@anthropic.com>
48 lines
1.5 KiB
Python
Executable File
48 lines
1.5 KiB
Python
Executable File
#!/usr/bin/env python3
|
|
"""Install a generated Distilly skill into a supported host discovery path."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import argparse
|
|
from pathlib import Path
|
|
|
|
from hosts import HOSTS, generated_skills_dir as default_skills_dir
|
|
from install_generated_skill_common import install_generated_skill
|
|
|
|
|
|
def main() -> None:
|
|
parser = argparse.ArgumentParser(
|
|
description=(
|
|
"Install only a generated skill's self-contained SKILL.md, rewriting "
|
|
"legacy frontmatter to its canonical command name"
|
|
)
|
|
)
|
|
parser.add_argument("--skill-dir", required=True, help="Generated skill directory")
|
|
parser.add_argument("--host", required=True, choices=sorted(HOSTS))
|
|
parser.add_argument(
|
|
"--skills-dir",
|
|
help="Override the host skill root (the canonical command directory is appended)",
|
|
)
|
|
parser.add_argument("--force", action="store_true", help="Overwrite an existing installed copy")
|
|
parser.add_argument("--dry-run", action="store_true", help="Resolve install paths without writing files")
|
|
args = parser.parse_args()
|
|
|
|
skills_dir = (
|
|
Path(args.skills_dir).expanduser()
|
|
if args.skills_dir
|
|
else default_skills_dir(args.host)
|
|
)
|
|
result = install_generated_skill(
|
|
Path(args.skill_dir).expanduser(),
|
|
skills_dir,
|
|
force=args.force,
|
|
dry_run=args.dry_run,
|
|
host=args.host,
|
|
)
|
|
print(result["command_name"])
|
|
print(result["skill_dir"])
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|