"""Synthetic plugin fixture. Usage: python3 seed.py <fixture-directory>"""
import json
import pathlib
import sys
root = pathlib.Path(sys.argv[1]).resolve()
(root / ".claude-plugin").mkdir(parents=True, exist_ok=True)
plugin = root / "plugins/refresh-proof"
(plugin / ".claude-plugin").mkdir(parents=True, exist_ok=True)
(plugin / "skills/fresh-skill").mkdir(parents=True, exist_ok=True)
(root / ".claude-plugin/marketplace.json").write_text(json.dumps({
    "name": "refresh-proof-market", "owner": {"name": "Scenario"},
    "plugins": [{"name": "refresh-proof", "source": "./plugins/refresh-proof",
                 "description": "Synthetic skill refresh proof"}]}))
(plugin / ".claude-plugin/plugin.json").write_text(json.dumps({
    "name": "refresh-proof", "version": "1.0.0", "description": "Synthetic skill refresh proof"}))
(plugin / "skills/fresh-skill/SKILL.md").write_text(
    "---\nname: fresh-skill\ndescription: A newly installed demonstration skill.\n"
    "user-invocable: true\n---\nReply with Fresh skill ready.\n")
print("Fixture created. In the running thread's workspace, after opening the skill menu:")
print(f"claude plugin marketplace add {root} --scope project")
print("claude plugin install refresh-proof@refresh-proof-market --scope project")
