skill-scan-cli 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ """skill-scan-cli: index and copy AI-assistant skills, rules and subagents."""
2
+
3
+ __version__ = "0.1.0"
skill_scan_cli/app.py ADDED
@@ -0,0 +1,163 @@
1
+ """Typer CLI: index AI-assistant artifacts and copy selected ones into a project."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from pathlib import Path
6
+ from typing import Optional
7
+
8
+ import questionary
9
+ import typer
10
+ from rich.console import Console
11
+ from rich.table import Table
12
+
13
+ from . import cache as cache_mod
14
+ from . import destinations as dest_mod
15
+ from . import scanner
16
+ from .installer import install
17
+ from .models import Artifact, Catalog, Kind
18
+
19
+ app = typer.Typer(
20
+ help="Scan a directory for AI-assistant skills, rules and subagents, then copy selected ones into a project.",
21
+ no_args_is_help=True,
22
+ add_completion=False,
23
+ )
24
+ console = Console()
25
+
26
+ _KIND_LABEL = {"skill": "skills", "agent": "agents", "rule": "rules"}
27
+
28
+
29
+ @app.command()
30
+ def init(
31
+ target_dir: Path = typer.Argument(
32
+ ...,
33
+ exists=True,
34
+ file_okay=False,
35
+ dir_okay=True,
36
+ readable=True,
37
+ resolve_path=True,
38
+ help="Directory to scan for .agents/.cursor/.claude/.github/.codex configs.",
39
+ ),
40
+ ) -> None:
41
+ """Scan TARGET_DIR and cache discovered skills, subagents and rules."""
42
+ catalog = scanner.scan(target_dir)
43
+ path = cache_mod.write_cache(catalog)
44
+
45
+ table = Table(title="Indexed artifacts")
46
+ table.add_column("Kind")
47
+ table.add_column("Count", justify="right")
48
+ table.add_row("Skills", str(len(catalog.skills)))
49
+ table.add_row("Agents", str(len(catalog.agents)))
50
+ table.add_row("Rules", str(len(catalog.rules)))
51
+ console.print(table)
52
+ console.print(f"Cache written to [bold]{path}[/bold]")
53
+
54
+
55
+ def _load_catalog() -> Catalog:
56
+ try:
57
+ return cache_mod.read_cache()
58
+ except FileNotFoundError:
59
+ console.print(
60
+ "[red]No cache found.[/red] Run [bold]skill-scan init <target_dir>[/bold] first."
61
+ )
62
+ raise typer.Exit(code=1)
63
+
64
+
65
+ def _choice_label(a: Artifact) -> str:
66
+ desc = a.description.strip().replace("\n", " ")
67
+ if len(desc) > 100:
68
+ desc = desc[:97] + "..."
69
+ suffix = f" - {desc}" if desc else ""
70
+ return f"[{a.source_root}] {a.name}{suffix}"
71
+
72
+
73
+ def _pick(kind: Kind, target: Path, assistant: Optional[str], overwrite: bool) -> None:
74
+ catalog = _load_catalog()
75
+ artifacts = catalog.by_kind(kind)
76
+ label = _KIND_LABEL[kind]
77
+
78
+ if not artifacts:
79
+ console.print(f"[yellow]No {label} indexed.[/yellow]")
80
+ raise typer.Exit(code=0)
81
+
82
+ choices = [questionary.Choice(title=_choice_label(a), value=a) for a in artifacts]
83
+ selected: list[Artifact] = (
84
+ questionary.checkbox(
85
+ f"Select {label} to copy (Space to toggle, Enter to confirm):",
86
+ choices=choices,
87
+ ).ask()
88
+ or []
89
+ )
90
+ if not selected:
91
+ console.print("[yellow]Nothing selected.[/yellow]")
92
+ raise typer.Exit(code=0)
93
+
94
+ if assistant is None:
95
+ assistant = questionary.select(
96
+ "Copy into which coding assistant?",
97
+ choices=dest_mod.ASSISTANTS,
98
+ ).ask()
99
+ if assistant is None:
100
+ console.print("[yellow]No assistant chosen.[/yellow]")
101
+ raise typer.Exit(code=0)
102
+ if assistant not in dest_mod.ASSISTANTS:
103
+ console.print(f"[red]Unknown assistant '{assistant}'.[/red]")
104
+ raise typer.Exit(code=1)
105
+
106
+ dest_dir = dest_mod.destination_dir(target, assistant, kind)
107
+ results = install(selected, dest_dir, overwrite=overwrite)
108
+
109
+ for r in results:
110
+ if r.status == "copied":
111
+ console.print(f"[green]copied[/green] {r.artifact.name} -> {r.destination}")
112
+ elif r.status == "skipped":
113
+ console.print(
114
+ f"[yellow]skipped[/yellow] {r.artifact.name} (exists; use --overwrite) -> {r.destination}"
115
+ )
116
+ else:
117
+ console.print(f"[red]missing[/red] {r.artifact.name} (source gone: {r.artifact.path})")
118
+
119
+
120
+ @app.command("pick-skills")
121
+ def pick_skills(
122
+ target: Path = typer.Option(
123
+ Path.cwd(), "--target", "-t", resolve_path=True, help="Project root to copy into."
124
+ ),
125
+ assistant: Optional[str] = typer.Option(
126
+ None, "--assistant", "-a", help="Skip the prompt and use this assistant root."
127
+ ),
128
+ overwrite: bool = typer.Option(False, "--overwrite", help="Overwrite existing destinations."),
129
+ ) -> None:
130
+ """Interactively select indexed skills and copy them into a project."""
131
+ _pick("skill", target, assistant, overwrite)
132
+
133
+
134
+ @app.command("pick-agents")
135
+ def pick_agents(
136
+ target: Path = typer.Option(
137
+ Path.cwd(), "--target", "-t", resolve_path=True, help="Project root to copy into."
138
+ ),
139
+ assistant: Optional[str] = typer.Option(
140
+ None, "--assistant", "-a", help="Skip the prompt and use this assistant root."
141
+ ),
142
+ overwrite: bool = typer.Option(False, "--overwrite", help="Overwrite existing destinations."),
143
+ ) -> None:
144
+ """Interactively select indexed subagents and copy them into a project."""
145
+ _pick("agent", target, assistant, overwrite)
146
+
147
+
148
+ @app.command("pick-rules")
149
+ def pick_rules(
150
+ target: Path = typer.Option(
151
+ Path.cwd(), "--target", "-t", resolve_path=True, help="Project root to copy into."
152
+ ),
153
+ assistant: Optional[str] = typer.Option(
154
+ None, "--assistant", "-a", help="Skip the prompt and use this assistant root."
155
+ ),
156
+ overwrite: bool = typer.Option(False, "--overwrite", help="Overwrite existing destinations."),
157
+ ) -> None:
158
+ """Interactively select indexed rules and copy them into a project."""
159
+ _pick("rule", target, assistant, overwrite)
160
+
161
+
162
+ if __name__ == "__main__":
163
+ app()
@@ -0,0 +1,28 @@
1
+ """Read/write the on-disk catalog cache."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import json
6
+ from pathlib import Path
7
+
8
+ from .models import Catalog
9
+
10
+ CACHE_FILENAME = ".skill-scan-cache.json"
11
+
12
+
13
+ def cache_path(directory: Path | None = None) -> Path:
14
+ return (directory or Path.cwd()) / CACHE_FILENAME
15
+
16
+
17
+ def write_cache(catalog: Catalog, directory: Path | None = None) -> Path:
18
+ path = cache_path(directory)
19
+ path.write_text(json.dumps(catalog.to_dict(), indent=2) + "\n", encoding="utf-8")
20
+ return path
21
+
22
+
23
+ def read_cache(directory: Path | None = None) -> Catalog:
24
+ path = cache_path(directory)
25
+ if not path.is_file():
26
+ raise FileNotFoundError(path)
27
+ data = json.loads(path.read_text(encoding="utf-8"))
28
+ return Catalog.from_dict(data)
@@ -0,0 +1,31 @@
1
+ """Map a chosen coding assistant + artifact kind to a destination subfolder.
2
+
3
+ The mapping is centralized here because assistant folder conventions differ and
4
+ are still evolving; edit the tables below to adjust where artifacts land.
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ from pathlib import Path
10
+
11
+ from .models import Kind
12
+
13
+ # Selectable target assistants and their root config folder.
14
+ ASSISTANTS = [".agents", ".claude", ".cursor", ".codex", ".github"]
15
+
16
+ # Per-assistant subfolder for each artifact kind, relative to the assistant root.
17
+ _SUBFOLDERS: dict[str, dict[Kind, str]] = {
18
+ ".agents": {"skill": "skills", "agent": "agents", "rule": "rules"},
19
+ ".claude": {"skill": "skills", "agent": "agents", "rule": "rules"},
20
+ ".cursor": {"skill": "skills", "agent": "agents", "rule": "rules"},
21
+ ".codex": {"skill": "skills", "agent": "agents", "rule": "rules"},
22
+ ".github": {"skill": "skills", "agent": "agents", "rule": "instructions"},
23
+ }
24
+
25
+
26
+ def destination_dir(target_root: Path, assistant: str, kind: Kind) -> Path:
27
+ """Absolute folder where artifacts of ``kind`` are copied for ``assistant``."""
28
+ if assistant not in _SUBFOLDERS:
29
+ raise ValueError(f"Unknown assistant: {assistant}")
30
+ subfolder = _SUBFOLDERS[assistant][kind]
31
+ return (target_root / assistant / subfolder).resolve()
@@ -0,0 +1,49 @@
1
+ """Copy selected artifacts into a destination folder."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import shutil
6
+ from dataclasses import dataclass
7
+ from pathlib import Path
8
+
9
+ from .models import Artifact
10
+
11
+
12
+ @dataclass
13
+ class CopyResult:
14
+ artifact: Artifact
15
+ destination: Path
16
+ status: str # "copied" | "skipped" | "missing"
17
+
18
+
19
+ def _target_for(artifact: Artifact, dest_dir: Path) -> Path:
20
+ src = Path(artifact.path)
21
+ if artifact.kind == "skill":
22
+ return dest_dir / src.name # package directory
23
+ return dest_dir / src.name # single file
24
+
25
+
26
+ def install(
27
+ artifacts: list[Artifact],
28
+ dest_dir: Path,
29
+ *,
30
+ overwrite: bool = False,
31
+ ) -> list[CopyResult]:
32
+ """Copy each artifact into ``dest_dir``; skills as dirs, others as files."""
33
+ dest_dir.mkdir(parents=True, exist_ok=True)
34
+ results: list[CopyResult] = []
35
+ for artifact in artifacts:
36
+ src = Path(artifact.path)
37
+ target = _target_for(artifact, dest_dir)
38
+ if not src.exists():
39
+ results.append(CopyResult(artifact, target, "missing"))
40
+ continue
41
+ if target.exists() and not overwrite:
42
+ results.append(CopyResult(artifact, target, "skipped"))
43
+ continue
44
+ if artifact.kind == "skill":
45
+ shutil.copytree(src, target, dirs_exist_ok=True)
46
+ else:
47
+ shutil.copy2(src, target)
48
+ results.append(CopyResult(artifact, target, "copied"))
49
+ return results
@@ -0,0 +1,64 @@
1
+ """Data structures for the artifact catalog."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from dataclasses import dataclass, field, asdict
6
+ from typing import Literal
7
+
8
+ Kind = Literal["skill", "agent", "rule"]
9
+
10
+
11
+ @dataclass
12
+ class Artifact:
13
+ """A single indexed skill, subagent or rule."""
14
+
15
+ kind: Kind
16
+ name: str
17
+ description: str
18
+ path: str # absolute path: package dir for skills, file for agents/rules
19
+ files: list[str] = field(default_factory=list) # relative paths inside a skill package
20
+ source_root: str = "" # e.g. ".agents", ".claude"
21
+
22
+ def to_dict(self) -> dict:
23
+ return asdict(self)
24
+
25
+ @classmethod
26
+ def from_dict(cls, data: dict) -> "Artifact":
27
+ return cls(
28
+ kind=data["kind"],
29
+ name=data["name"],
30
+ description=data.get("description", ""),
31
+ path=data["path"],
32
+ files=list(data.get("files", [])),
33
+ source_root=data.get("source_root", ""),
34
+ )
35
+
36
+
37
+ @dataclass
38
+ class Catalog:
39
+ """Indexed artifacts grouped by kind, plus the scanned source path."""
40
+
41
+ source: str
42
+ skills: list[Artifact] = field(default_factory=list)
43
+ agents: list[Artifact] = field(default_factory=list)
44
+ rules: list[Artifact] = field(default_factory=list)
45
+
46
+ def by_kind(self, kind: Kind) -> list[Artifact]:
47
+ return {"skill": self.skills, "agent": self.agents, "rule": self.rules}[kind]
48
+
49
+ def to_dict(self) -> dict:
50
+ return {
51
+ "source": self.source,
52
+ "skills": [a.to_dict() for a in self.skills],
53
+ "agents": [a.to_dict() for a in self.agents],
54
+ "rules": [a.to_dict() for a in self.rules],
55
+ }
56
+
57
+ @classmethod
58
+ def from_dict(cls, data: dict) -> "Catalog":
59
+ return cls(
60
+ source=data.get("source", ""),
61
+ skills=[Artifact.from_dict(a) for a in data.get("skills", [])],
62
+ agents=[Artifact.from_dict(a) for a in data.get("agents", [])],
63
+ rules=[Artifact.from_dict(a) for a in data.get("rules", [])],
64
+ )
@@ -0,0 +1,204 @@
1
+ """Scan an assistant-config directory tree for skills, subagents and rules."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import re
6
+ from pathlib import Path
7
+
8
+ from .models import Artifact, Catalog
9
+
10
+ # Config roots scanned for artifacts, relative to the target dir.
11
+ CONFIG_ROOTS = [".agents", ".cursor", ".claude", ".github", ".codex"]
12
+
13
+ SKILL_FILE = "SKILL.md"
14
+ RULE_SUFFIXES = {".md", ".mdc"}
15
+
16
+ # Memory/instruction files indexed as rules, wherever they appear in the tree.
17
+ MEMORY_FILES = {"CLAUDE.md", "AGENTS.md"}
18
+ # Single rule files indexed at a config root (in addition to rules/ instructions/).
19
+ ROOT_RULE_FILES = {".github": ("custom-instructions.md",)}
20
+ # Directories skipped while searching for memory files.
21
+ SKIP_DIRS = {".git", ".venv", "node_modules", "__pycache__", ".obsidian"}
22
+
23
+
24
+ def _read_text(path: Path) -> str:
25
+ try:
26
+ return path.read_text(encoding="utf-8")
27
+ except (OSError, UnicodeDecodeError):
28
+ return ""
29
+
30
+
31
+ def parse_frontmatter(text: str) -> tuple[dict[str, str], str]:
32
+ """Return (frontmatter dict, body). Minimal YAML: flat `key: value` pairs."""
33
+ if not text.startswith("---"):
34
+ return {}, text
35
+ lines = text.splitlines()
36
+ if not lines or lines[0].strip() != "---":
37
+ return {}, text
38
+ fm: dict[str, str] = {}
39
+ end = None
40
+ for i in range(1, len(lines)):
41
+ if lines[i].strip() == "---":
42
+ end = i
43
+ break
44
+ m = re.match(r"^([A-Za-z0-9_-]+)\s*:\s*(.*)$", lines[i])
45
+ if m:
46
+ key, value = m.group(1).strip(), m.group(2).strip()
47
+ if len(value) >= 2 and value[0] == value[-1] and value[0] in "\"'":
48
+ value = value[1:-1]
49
+ fm[key] = value
50
+ if end is None:
51
+ return {}, text
52
+ body = "\n".join(lines[end + 1 :])
53
+ return fm, body
54
+
55
+
56
+ def _first_heading(body: str) -> str:
57
+ for line in body.splitlines():
58
+ stripped = line.strip()
59
+ if stripped.startswith("#"):
60
+ return stripped.lstrip("#").strip()
61
+ return ""
62
+
63
+
64
+ def _description_from_body(body: str, max_lines: int = 5) -> str:
65
+ collected: list[str] = []
66
+ for line in body.splitlines():
67
+ stripped = line.strip()
68
+ if not stripped or stripped.startswith("#"):
69
+ continue
70
+ collected.append(stripped)
71
+ if len(collected) >= max_lines:
72
+ break
73
+ return " ".join(collected)
74
+
75
+
76
+ def _list_package_files(package_dir: Path) -> list[str]:
77
+ files: list[str] = []
78
+ for p in sorted(package_dir.rglob("*")):
79
+ if p.is_file():
80
+ files.append(str(p.relative_to(package_dir)))
81
+ return files
82
+
83
+
84
+ def _skill_artifact(skill_md: Path, root_name: str) -> Artifact:
85
+ package_dir = skill_md.parent
86
+ fm, body = parse_frontmatter(_read_text(skill_md))
87
+ name = fm.get("name") or package_dir.name
88
+ description = fm.get("description") or _first_heading(body) or _description_from_body(body)
89
+ return Artifact(
90
+ kind="skill",
91
+ name=name,
92
+ description=description,
93
+ path=str(package_dir.resolve()),
94
+ files=_list_package_files(package_dir),
95
+ source_root=root_name,
96
+ )
97
+
98
+
99
+ def _agent_artifact(file: Path, root_name: str) -> Artifact:
100
+ fm, body = parse_frontmatter(_read_text(file))
101
+ name = fm.get("name") or file.stem
102
+ description = fm.get("description") or _first_heading(body) or _description_from_body(body)
103
+ return Artifact(
104
+ kind="agent",
105
+ name=name,
106
+ description=description,
107
+ path=str(file.resolve()),
108
+ source_root=root_name,
109
+ )
110
+
111
+
112
+ def _rule_artifact(file: Path, root_name: str) -> Artifact:
113
+ fm, body = parse_frontmatter(_read_text(file))
114
+ name = fm.get("name") or file.stem
115
+ description = fm.get("description") or _description_from_body(body)
116
+ return Artifact(
117
+ kind="rule",
118
+ name=name,
119
+ description=description,
120
+ path=str(file.resolve()),
121
+ source_root=root_name,
122
+ )
123
+
124
+
125
+ def _scan_root(root: Path, root_name: str) -> tuple[list[Artifact], list[Artifact], list[Artifact]]:
126
+ skills: list[Artifact] = []
127
+ agents: list[Artifact] = []
128
+ rules: list[Artifact] = []
129
+
130
+ skill_dirs: list[Path] = []
131
+ for skill_md in root.rglob(SKILL_FILE):
132
+ if skill_md.is_file():
133
+ skills.append(_skill_artifact(skill_md, root_name))
134
+ skill_dirs.append(skill_md.parent.resolve())
135
+
136
+ def inside_skill(p: Path) -> bool:
137
+ rp = p.resolve()
138
+ return any(rp == d or d in rp.parents for d in skill_dirs)
139
+
140
+ for agents_dir in root.rglob("agents"):
141
+ if not agents_dir.is_dir() or inside_skill(agents_dir):
142
+ continue
143
+ for file in sorted(agents_dir.glob("*.md")):
144
+ if file.is_file():
145
+ agents.append(_agent_artifact(file, root_name))
146
+
147
+ rule_dirs = list(root.rglob("rules")) + list(root.rglob("instructions"))
148
+ for rules_dir in rule_dirs:
149
+ if not rules_dir.is_dir() or inside_skill(rules_dir):
150
+ continue
151
+ for file in sorted(rules_dir.rglob("*")):
152
+ if file.is_file() and file.suffix in RULE_SUFFIXES and not inside_skill(file):
153
+ rules.append(_rule_artifact(file, root_name))
154
+
155
+ for filename in ROOT_RULE_FILES.get(root_name, ()):
156
+ candidate = root / filename
157
+ if candidate.is_file():
158
+ rules.append(_rule_artifact(candidate, root_name))
159
+
160
+ return skills, agents, rules
161
+
162
+
163
+ def _scan_memory_files(target_dir: Path) -> list[Artifact]:
164
+ """Index CLAUDE.md / AGENTS.md anywhere under target_dir as rules."""
165
+ rules: list[Artifact] = []
166
+ for path in sorted(target_dir.rglob("*")):
167
+ if not path.is_file() or path.name not in MEMORY_FILES:
168
+ continue
169
+ if any(part in SKIP_DIRS for part in path.relative_to(target_dir).parts):
170
+ continue
171
+ rules.append(_rule_artifact(path, "."))
172
+ return rules
173
+
174
+
175
+ def _dedup(artifacts: list[Artifact]) -> list[Artifact]:
176
+ seen: set[str] = set()
177
+ out: list[Artifact] = []
178
+ for a in artifacts:
179
+ if a.path in seen:
180
+ continue
181
+ seen.add(a.path)
182
+ out.append(a)
183
+ return out
184
+
185
+
186
+ def scan(target_dir: Path) -> Catalog:
187
+ """Index skills, subagents and rules under the config roots of ``target_dir``."""
188
+ target_dir = target_dir.resolve()
189
+ catalog = Catalog(source=str(target_dir))
190
+ for root_name in CONFIG_ROOTS:
191
+ root = target_dir / root_name
192
+ if not root.is_dir():
193
+ continue
194
+ skills, agents, rules = _scan_root(root, root_name)
195
+ catalog.skills.extend(skills)
196
+ catalog.agents.extend(agents)
197
+ catalog.rules.extend(rules)
198
+
199
+ catalog.rules.extend(_scan_memory_files(target_dir))
200
+
201
+ catalog.skills = _dedup(catalog.skills)
202
+ catalog.agents = _dedup(catalog.agents)
203
+ catalog.rules = _dedup(catalog.rules)
204
+ return catalog
@@ -0,0 +1,67 @@
1
+ Metadata-Version: 2.4
2
+ Name: skill-scan-cli
3
+ Version: 0.1.0
4
+ Summary: Scan a directory for AI-assistant skills, rules and subagents and copy selected ones into a chosen assistant's folder layout.
5
+ License-File: LICENSE
6
+ Requires-Python: >=3.12
7
+ Requires-Dist: questionary>=2.1.1
8
+ Requires-Dist: rich>=13.0.0
9
+ Requires-Dist: typer>=0.26.7
10
+ Description-Content-Type: text/markdown
11
+
12
+ # skill-scan-cli
13
+
14
+ A Typer CLI that scans a directory for AI-assistant artifacts (skills, rules, subagents), caches them, and lets you interactively copy selected ones into a chosen coding assistant's folder layout.
15
+
16
+ ## Install / run
17
+
18
+ This is a [uv](https://docs.astral.sh/uv/) project.
19
+
20
+ ```bash
21
+ uv sync
22
+ uv run skill-scan --help
23
+ ```
24
+
25
+ ## Commands
26
+
27
+ ### `init <target_dir>`
28
+
29
+ Scans `target_dir` for the config roots `.agents/`, `.cursor/`, `.claude/`, `.github/`, `.codex/` and indexes:
30
+
31
+ - Skills: any folder containing `SKILL.md` (the whole package, including `assets/`, `references/`, `examples/`).
32
+ - Subagents: `*.md` files directly under an `agents/` folder.
33
+ - Rules: `*.md` / `*.mdc` under `rules/` and (recursively) `instructions/` (e.g. `.github/instructions/**/*.instructions.md`), `.github/custom-instructions.md`, plus any `CLAUDE.md` / `AGENTS.md` memory files anywhere under the target (excluding `.git`, `.venv`, `node_modules`, etc.).
34
+
35
+ Names and descriptions come from YAML frontmatter (`name`, `description`); rules fall back to the filename plus the first few lines. Results are written to `.skill-scan-cache.json` in the current directory.
36
+
37
+ ```bash
38
+ uv run skill-scan init /path/to/source
39
+ ```
40
+
41
+ ### `pick-skills` / `pick-agents` / `pick-rules`
42
+
43
+ Loads the cache, shows an interactive multi-select (Arrows to move, `<Space>` to toggle, `Enter` to confirm), asks which coding assistant to target, and copies the selected artifacts into that assistant's folder.
44
+
45
+ ```bash
46
+ uv run skill-scan pick-skills # copy into ./ (cwd)
47
+ uv run skill-scan pick-rules --target ./proj # copy into another project root
48
+ uv run skill-scan pick-agents --assistant .claude --overwrite
49
+ ```
50
+
51
+ Options:
52
+
53
+ - `--target, -t` — project root to copy into (default: cwd).
54
+ - `--assistant, -a` — skip the assistant prompt (`.agents`, `.claude`, `.cursor`, `.codex`, `.github`).
55
+ - `--overwrite` — overwrite existing destinations (otherwise they are skipped).
56
+
57
+ ## Destination mapping
58
+
59
+ Per-assistant destinations are defined in [`skill_scan_cli/destinations.py`](skill_scan_cli/destinations.py):
60
+
61
+ | Kind | Default subfolder |
62
+ | ------ | -------------------------------------------------- |
63
+ | skill | `<assistant>/skills/<name>/` |
64
+ | agent | `<assistant>/agents/<file>` |
65
+ | rule | `<assistant>/rules/<file>` (`.github` -> `instructions/`) |
66
+
67
+ These are sensible defaults; edit the tables in `destinations.py` to match evolving conventions.
@@ -0,0 +1,12 @@
1
+ skill_scan_cli/__init__.py,sha256=zB0AXO8XEIAqDH9ryTyeHPfQqpFTaNUjg4_DfY5UC4U,102
2
+ skill_scan_cli/app.py,sha256=8diM0zQMoxs4rzuKqjzwiQuC7SCLT31N4c_7GCCKgoI,5479
3
+ skill_scan_cli/cache.py,sha256=b5ueb7Lo6XB6CmH-8sPpDei63urBjvgbaoP2eezEULc,761
4
+ skill_scan_cli/destinations.py,sha256=CEij4IeVBW8rR5GJ6UfIRGp6k5G1kE7gllEqNyMKJlQ,1312
5
+ skill_scan_cli/installer.py,sha256=yte6ZtQGceBweyPHbsGN6RnFBxEJd8z-Dv1o-OHuC7E,1441
6
+ skill_scan_cli/models.py,sha256=FkKs2BXOICL0dVJTDeAoAGw3MkDKywToGrrkjJLYli4,2026
7
+ skill_scan_cli/scanner.py,sha256=6dC43092HlWK1vCdA8BnTSe9MpCtodmndI4219bmY-U,6792
8
+ skill_scan_cli-0.1.0.dist-info/METADATA,sha256=k8DMM5SR_IusGPYP9nFj_Q0XKZ1rawnxgUmKzRNXZsw,2883
9
+ skill_scan_cli-0.1.0.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
10
+ skill_scan_cli-0.1.0.dist-info/entry_points.txt,sha256=fsW2BPUp-NDmz05RtflHIXehgdZ2dInplMnqCwNHh1s,54
11
+ skill_scan_cli-0.1.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
12
+ skill_scan_cli-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.30.1
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ skill-scan = skill_scan_cli.app:app
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.