@workingpayload/agent-skills 1.0.1 → 2.0.1

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.
Files changed (130) hide show
  1. package/APIForge/skill.md +165 -0
  2. package/AccessPlus/skill.md +136 -0
  3. package/AlgoMaster/skill.md +125 -0
  4. package/Architekt AI/skill.md +140 -0
  5. package/AuthCraft/skill.md +144 -0
  6. package/AutoScriptor/skill.md +137 -0
  7. package/BoilerCore/skill.md +136 -0
  8. package/BugHunter Pro/skill.md +133 -0
  9. package/ChangeScribe/skill.md +113 -0
  10. package/CodeMap/skill.md +194 -0
  11. package/CodeSage/skill.md +163 -0
  12. package/CommitCraft/skill.md +113 -0
  13. package/CoverageMax/skill.md +161 -0
  14. package/CronGenius/skill.md +157 -0
  15. package/DataPolish/skill.md +142 -0
  16. package/DataWeaver/skill.md +151 -0
  17. package/DockMaster/skill.md +158 -0
  18. package/DocuGenie/skill.md +138 -0
  19. package/EdgeGuard/skill.md +160 -0
  20. package/EnvWizard/skill.md +156 -0
  21. package/ErrorMedic/skill.md +152 -0
  22. package/FeatureSmith/skill.md +139 -0
  23. package/FlexiLayout/skill.md +144 -0
  24. package/FlowTester/skill.md +154 -0
  25. package/FunctionForge/skill.md +136 -0
  26. package/InputShield/skill.md +144 -0
  27. package/IssueForge/skill.md +148 -0
  28. package/KubeCrafter/skill.md +149 -0
  29. package/LogicLens/skill.md +132 -0
  30. package/MockSmith/skill.md +146 -0
  31. package/ModelSensei/skill.md +138 -0
  32. package/PRMentor/skill.md +103 -0
  33. package/PerfDetective/skill.md +90 -0
  34. package/PipelinePro/skill.md +146 -0
  35. package/PolyglotShift/skill.md +94 -0
  36. package/PromptForge/skill.md +118 -0
  37. package/QueryPulse/skill.md +123 -0
  38. package/README.md +327 -216
  39. package/ReadMeCraft/skill.md +127 -0
  40. package/RefactorX/skill.md +110 -0
  41. package/RenderBoost/skill.md +148 -0
  42. package/SEOMancer/skill.md +156 -0
  43. package/ScrapeMaster/skill.md +157 -0
  44. package/SecretSniffer/skill.md +123 -0
  45. package/SecureScan/skill.md +130 -0
  46. package/ServiceSplitter/skill.md +153 -0
  47. package/SpeedSmith/skill.md +155 -0
  48. package/StackWise/skill.md +155 -0
  49. package/TaskOrchestrator/skill.md +135 -0
  50. package/TestCrafter/skill.md +158 -0
  51. package/TraceMind/skill.md +143 -0
  52. package/UISmith/skill.md +131 -0
  53. package/bin/cli.js +436 -0
  54. package/extension-extender/SKILL.md +122 -0
  55. package/fastapi-furious/SKILL.md +148 -0
  56. package/package.json +42 -32
  57. package/python-master/SKILL.md +108 -0
  58. package/react-ranger/SKILL.md +93 -0
  59. package/scripts/build_index.py +282 -0
  60. package/scripts/doctor.py +542 -0
  61. package/scripts/install.py +436 -0
  62. package/scripts/route.py +348 -0
  63. package/scripts/score.py +355 -0
  64. package/scripts/test_skill.py +501 -0
  65. package/scripts/validate.py +254 -0
  66. package/skills-routing.json +1156 -0
  67. package/skills.json +3389 -0
  68. package/cli.js +0 -181
  69. package/skills/APIForge/skill.md +0 -32
  70. package/skills/AccessPlus/skill.md +0 -32
  71. package/skills/AlgoMaster/skill.md +0 -32
  72. package/skills/Architekt AI/skill.md +0 -32
  73. package/skills/AuthCraft/skill.md +0 -32
  74. package/skills/AutoScriptor/skill.md +0 -32
  75. package/skills/BoilerCore/skill.md +0 -32
  76. package/skills/BugHunter Pro/skill.md +0 -32
  77. package/skills/ChangeScribe/skill.md +0 -32
  78. package/skills/CodeSage/skill.md +0 -32
  79. package/skills/CommitCraft/skill.md +0 -32
  80. package/skills/CoverageMax/skill.md +0 -32
  81. package/skills/CronGenius/skill.md +0 -32
  82. package/skills/DataPolish/skill.md +0 -32
  83. package/skills/DataWeaver/skill.md +0 -32
  84. package/skills/DockMaster/skill.md +0 -32
  85. package/skills/DocuGenie/skill.md +0 -32
  86. package/skills/EdgeGuard/skill.md +0 -32
  87. package/skills/EnvWizard/skill.md +0 -32
  88. package/skills/ErrorMedic/skill.md +0 -32
  89. package/skills/Extension-Extender/SKILL.md +0 -41
  90. package/skills/Extension-Extender/references/ui-guidelines.md +0 -26
  91. package/skills/Fastapi-Furious/README.md +0 -16
  92. package/skills/Fastapi-Furious/SKILL.md +0 -37
  93. package/skills/FeatureSmith/skill.md +0 -32
  94. package/skills/FlexiLayout/skill.md +0 -32
  95. package/skills/FlowTester/skill.md +0 -32
  96. package/skills/FunctionForge/skill.md +0 -32
  97. package/skills/InputShield/skill.md +0 -32
  98. package/skills/IssueForge/skill.md +0 -32
  99. package/skills/KubeCrafter/skill.md +0 -32
  100. package/skills/LogicLens/skill.md +0 -32
  101. package/skills/MockSmith/skill.md +0 -32
  102. package/skills/ModelSensei/skill.md +0 -32
  103. package/skills/PRMentor/skill.md +0 -32
  104. package/skills/PerfDetective/skill.md +0 -32
  105. package/skills/PipelinePro/skill.md +0 -32
  106. package/skills/PolyglotShift/skill.md +0 -32
  107. package/skills/PromptForge/skill.md +0 -32
  108. package/skills/Python-Master/README.md +0 -11
  109. package/skills/Python-Master/SKILL.md +0 -37
  110. package/skills/QueryPulse/skill.md +0 -32
  111. package/skills/React-Ranger/README.md +0 -17
  112. package/skills/React-Ranger/SKILL.md +0 -37
  113. package/skills/ReadMeCraft/skill.md +0 -32
  114. package/skills/RefactorX/skill.md +0 -32
  115. package/skills/RenderBoost/skill.md +0 -32
  116. package/skills/SEOMancer/skill.md +0 -32
  117. package/skills/ScrapeMaster/skill.md +0 -32
  118. package/skills/SecretSniffer/skill.md +0 -32
  119. package/skills/SecureScan/skill.md +0 -32
  120. package/skills/ServiceSplitter/skill.md +0 -32
  121. package/skills/SpeedSmith/skill.md +0 -32
  122. package/skills/StackWise/skill.md +0 -32
  123. package/skills/TaskOrchestrator/skill.md +0 -32
  124. package/skills/TestCrafter/skill.md +0 -32
  125. package/skills/TraceMind/skill.md +0 -32
  126. package/skills/UISmith/skill.md +0 -32
  127. /package/{skills/Extension-Extender → extension-extender}/assets/manifest.json +0 -0
  128. /package/{skills/Extension-Extender → extension-extender}/assets/popup.css +0 -0
  129. /package/{skills/Extension-Extender → extension-extender}/assets/popup.html +0 -0
  130. /package/{skills/Extension-Extender → extension-extender}/assets/popup.js +0 -0
@@ -0,0 +1,542 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ doctor.py - Health check for installed Agent Skills.
4
+
5
+ Checks Claude (~/.claude/commands/) and/or Gemini (~/.gemini/commands/)
6
+ install directories for integrity, staleness, orphans, and format issues.
7
+
8
+ Usage:
9
+ python scripts/doctor.py # check both targets
10
+ python scripts/doctor.py --target claude # check Claude only
11
+ python scripts/doctor.py --target gemini # check Gemini only
12
+
13
+ Exit codes:
14
+ 0 = all healthy
15
+ 1 = warnings only
16
+ 2 = errors found
17
+ """
18
+
19
+ import argparse
20
+ import hashlib
21
+ import json
22
+ import os
23
+ import re
24
+ import sys
25
+ from pathlib import Path
26
+
27
+ # ---------------------------------------------------------------------------
28
+ # Constants
29
+ # ---------------------------------------------------------------------------
30
+
31
+ SKILL_FILENAMES = {"skill.md", "SKILL.md"}
32
+ META_FILENAME = ".skills-meta.json"
33
+
34
+ INSTALL_DIRS = {
35
+ "claude": Path.home() / ".claude" / "commands",
36
+ "gemini": Path.home() / ".gemini" / "commands",
37
+ "antigravity": Path.home() / ".gemini" / "antigravity" / "skills",
38
+ }
39
+
40
+
41
+ # ---------------------------------------------------------------------------
42
+ # Severity levels
43
+ # ---------------------------------------------------------------------------
44
+
45
+ OK = "OK"
46
+ WARN = "WARN"
47
+ ERROR = "ERROR"
48
+
49
+
50
+ class CheckResult:
51
+ def __init__(self, label: str, status: str, message: str, recommendation: str = ""):
52
+ self.label = label
53
+ self.status = status
54
+ self.message = message
55
+ self.recommendation = recommendation
56
+
57
+ @property
58
+ def icon(self) -> str:
59
+ return {"OK": "[OK]", "WARN": "[WARN]", "ERROR": "[ERROR]"}[self.status]
60
+
61
+
62
+ # ---------------------------------------------------------------------------
63
+ # Helpers
64
+ # ---------------------------------------------------------------------------
65
+
66
+ def file_hash(path: Path) -> str:
67
+ """Return MD5 hex digest of a file's content."""
68
+ h = hashlib.md5()
69
+ h.update(path.read_bytes())
70
+ return h.hexdigest()
71
+
72
+
73
+ def content_hash(text: str) -> str:
74
+ """Return MD5 hex digest of a UTF-8 string."""
75
+ return hashlib.md5(text.encode("utf-8")).hexdigest()
76
+
77
+
78
+ def parse_frontmatter(text: str) -> dict | None:
79
+ """
80
+ Parse YAML frontmatter delimited by '---'.
81
+ Returns dict of fields or None if not present.
82
+ """
83
+ lines = text.splitlines()
84
+ if not lines or lines[0].strip() != "---":
85
+ return None
86
+ end = None
87
+ for i, line in enumerate(lines[1:], start=1):
88
+ if line.strip() == "---":
89
+ end = i
90
+ break
91
+ if end is None:
92
+ return None
93
+ fields: dict[str, str] = {}
94
+ for line in lines[1:end]:
95
+ if ":" in line:
96
+ key, _, value = line.partition(":")
97
+ fields[key.strip()] = value.strip().strip('"').strip("'")
98
+ return fields
99
+
100
+
101
+ def find_source_skill(repo_root: Path, skill_name: str) -> Path | None:
102
+ """
103
+ Locate the source skill file in the repo by skill name (case-insensitive
104
+ match against directory names).
105
+ """
106
+ for subdir in repo_root.iterdir():
107
+ if not subdir.is_dir():
108
+ continue
109
+ for fname in SKILL_FILENAMES:
110
+ candidate = subdir / fname
111
+ if candidate.is_file():
112
+ # Try matching by directory name or by frontmatter name
113
+ if subdir.name.lower() == skill_name.lower():
114
+ return candidate
115
+ # Also try reading frontmatter
116
+ try:
117
+ fields = parse_frontmatter(candidate.read_text(encoding="utf-8", errors="replace"))
118
+ if fields and fields.get("name", "").lower() == skill_name.lower():
119
+ return candidate
120
+ except OSError:
121
+ pass
122
+ return None
123
+
124
+
125
+ # ---------------------------------------------------------------------------
126
+ # Individual health checks
127
+ # ---------------------------------------------------------------------------
128
+
129
+ def check_install_dir(install_dir: Path) -> CheckResult:
130
+ """Check a: install directory exists."""
131
+ if install_dir.is_dir():
132
+ return CheckResult(
133
+ "Install directory",
134
+ OK,
135
+ f"Found: {install_dir}",
136
+ )
137
+ return CheckResult(
138
+ "Install directory",
139
+ ERROR,
140
+ f"Missing: {install_dir}",
141
+ recommendation="Run `python scripts/install.py` to create the install directory and install skills.",
142
+ )
143
+
144
+
145
+ def check_meta_file(install_dir: Path) -> tuple[CheckResult, dict | None]:
146
+ """Check b: .skills-meta.json exists and is valid JSON."""
147
+ meta_path = install_dir / META_FILENAME
148
+ if not meta_path.is_file():
149
+ return (
150
+ CheckResult(
151
+ "Meta file",
152
+ ERROR,
153
+ f"Missing: {meta_path}",
154
+ recommendation="Run `python scripts/install.py` to install skills and generate the meta file.",
155
+ ),
156
+ None,
157
+ )
158
+ try:
159
+ meta = json.loads(meta_path.read_text(encoding="utf-8"))
160
+ return (
161
+ CheckResult("Meta file", OK, f"Found: {meta_path}"),
162
+ meta,
163
+ )
164
+ except json.JSONDecodeError as exc:
165
+ return (
166
+ CheckResult(
167
+ "Meta file",
168
+ ERROR,
169
+ f"Invalid JSON in {meta_path}: {exc}",
170
+ recommendation=f"Delete {meta_path} and run `python scripts/install.py` to regenerate it.",
171
+ ),
172
+ None,
173
+ )
174
+
175
+
176
+ def check_file_integrity(install_dir: Path, meta: dict) -> list[CheckResult]:
177
+ """Check c: every skill recorded in meta still exists on disk."""
178
+ results: list[CheckResult] = []
179
+ # Support both formats: {"skills": {...}} (Python installer) and {name: {...}} (Node CLI)
180
+ skills = meta.get("skills", None)
181
+ if skills is None:
182
+ # Node CLI format: top-level keys are skill names
183
+ skills = {k: v for k, v in meta.items() if isinstance(v, dict)}
184
+ if not skills:
185
+ results.append(
186
+ CheckResult(
187
+ "File integrity",
188
+ WARN,
189
+ "Meta file contains no tracked skills.",
190
+ recommendation="Run `python scripts/install.py` to reinstall skills.",
191
+ )
192
+ )
193
+ return results
194
+
195
+ for skill_name, info in skills.items():
196
+ filename = info.get("filename", f"{skill_name}.md")
197
+ skill_path = install_dir / filename
198
+ if skill_path.is_file():
199
+ results.append(
200
+ CheckResult(
201
+ f"File integrity [{skill_name}]",
202
+ OK,
203
+ f"Present: {skill_path.name}",
204
+ )
205
+ )
206
+ else:
207
+ results.append(
208
+ CheckResult(
209
+ f"File integrity [{skill_name}]",
210
+ ERROR,
211
+ f"Missing file: {skill_path}",
212
+ recommendation=f"Run `python scripts/install.py --force` to reinstall missing skills.",
213
+ )
214
+ )
215
+ return results
216
+
217
+
218
+ def check_stale(install_dir: Path, meta: dict, repo_root: Path) -> list[CheckResult]:
219
+ """Check d: installed skill content matches source repo version."""
220
+ results: list[CheckResult] = []
221
+ # Support both formats
222
+ skills = meta.get("skills", None)
223
+ if skills is None:
224
+ skills = {k: v for k, v in meta.items() if isinstance(v, dict)}
225
+
226
+ for skill_name, info in skills.items():
227
+ filename = info.get("filename", f"{skill_name}.md")
228
+ skill_path = install_dir / filename
229
+ if not skill_path.is_file():
230
+ # Already flagged by file integrity check — skip
231
+ continue
232
+
233
+ # Use source path from meta if available (Node CLI stores it as "source")
234
+ source_path_str = info.get("source_path") or info.get("source")
235
+ source_path = Path(source_path_str) if source_path_str and Path(source_path_str).is_file() else find_source_skill(repo_root, skill_name)
236
+ if source_path is None:
237
+ results.append(
238
+ CheckResult(
239
+ f"Stale check [{skill_name}]",
240
+ WARN,
241
+ f"Source skill '{skill_name}' not found in repo — cannot compare.",
242
+ recommendation="Verify the skill exists in the source repo or remove it from the install directory.",
243
+ )
244
+ )
245
+ continue
246
+
247
+ installed_hash = file_hash(skill_path)
248
+ source_hash = file_hash(source_path)
249
+
250
+ # Also compare against hash stored in meta (if present)
251
+ meta_hash = info.get("hash", "")
252
+
253
+ if installed_hash == source_hash:
254
+ results.append(
255
+ CheckResult(
256
+ f"Stale check [{skill_name}]",
257
+ OK,
258
+ "Up to date with source repo.",
259
+ )
260
+ )
261
+ else:
262
+ results.append(
263
+ CheckResult(
264
+ f"Stale check [{skill_name}]",
265
+ WARN,
266
+ f"Installed version differs from source repo ({source_path.relative_to(repo_root)}).",
267
+ recommendation="Run `python scripts/install.py --force` to update stale skills.",
268
+ )
269
+ )
270
+
271
+ return results
272
+
273
+
274
+ def check_orphans(install_dir: Path, meta: dict) -> list[CheckResult]:
275
+ """Check e: files in install dir that aren't tracked in meta."""
276
+ results: list[CheckResult] = []
277
+ # Support both formats
278
+ skills = meta.get("skills", None)
279
+ if skills is None:
280
+ skills = {k: v for k, v in meta.items() if isinstance(v, dict)}
281
+ tracked_filenames = {
282
+ info.get("filename", f"{name}.md") for name, info in skills.items()
283
+ }
284
+ # Also always ignore the meta file itself
285
+ tracked_filenames.add(META_FILENAME)
286
+
287
+ try:
288
+ entries = list(install_dir.iterdir())
289
+ except OSError:
290
+ return results
291
+
292
+ orphans = [
293
+ e for e in entries
294
+ if e.is_file() and e.name not in tracked_filenames
295
+ ]
296
+
297
+ if not orphans:
298
+ results.append(
299
+ CheckResult("Orphan detection", OK, "No untracked files found.")
300
+ )
301
+ else:
302
+ for orphan in sorted(orphans):
303
+ results.append(
304
+ CheckResult(
305
+ f"Orphan [{orphan.name}]",
306
+ WARN,
307
+ f"Untracked file in install directory: {orphan.name}",
308
+ recommendation=(
309
+ f"Remove manually (`del \"{orphan}\"` on Windows / `rm \"{orphan}\"` on Unix) "
310
+ "or run `python scripts/install.py` to regenerate a clean install."
311
+ ),
312
+ )
313
+ )
314
+ return results
315
+
316
+
317
+ def check_format(install_dir: Path, meta: dict) -> list[CheckResult]:
318
+ """Check f: each installed skill has frontmatter with name and description."""
319
+ results: list[CheckResult] = []
320
+ # Support both formats
321
+ skills = meta.get("skills", None)
322
+ if skills is None:
323
+ skills = {k: v for k, v in meta.items() if isinstance(v, dict)}
324
+
325
+ for skill_name, info in skills.items():
326
+ filename = info.get("filename", f"{skill_name}.md")
327
+ skill_path = install_dir / filename
328
+ if not skill_path.is_file():
329
+ continue
330
+
331
+ try:
332
+ text = skill_path.read_text(encoding="utf-8", errors="replace")
333
+ except OSError as exc:
334
+ results.append(
335
+ CheckResult(
336
+ f"Format [{skill_name}]",
337
+ ERROR,
338
+ f"Cannot read file: {exc}",
339
+ )
340
+ )
341
+ continue
342
+
343
+ fields = parse_frontmatter(text)
344
+ issues: list[str] = []
345
+ if fields is None:
346
+ issues.append("missing frontmatter")
347
+ else:
348
+ if "name" not in fields:
349
+ issues.append("frontmatter missing 'name'")
350
+ if "description" not in fields:
351
+ issues.append("frontmatter missing 'description'")
352
+ elif len(fields["description"]) < 20:
353
+ issues.append("description is too short (< 20 chars)")
354
+
355
+ if issues:
356
+ results.append(
357
+ CheckResult(
358
+ f"Format [{skill_name}]",
359
+ WARN,
360
+ f"Format issues: {', '.join(issues)}",
361
+ recommendation=(
362
+ "Edit the installed skill file to add valid YAML frontmatter, "
363
+ "or run `python scripts/install.py --force` to reinstall from source."
364
+ ),
365
+ )
366
+ )
367
+ else:
368
+ results.append(
369
+ CheckResult(f"Format [{skill_name}]", OK, "Frontmatter valid.")
370
+ )
371
+
372
+ return results
373
+
374
+
375
+ def check_source_repo(repo_root: Path) -> CheckResult:
376
+ """Check g: source repo is accessible from the current directory."""
377
+ marker_candidates = [
378
+ repo_root / "skills.json",
379
+ repo_root / "scripts" / "validate.py",
380
+ repo_root / "scripts" / "install.py",
381
+ ]
382
+ # Count how many markers exist
383
+ found = [p for p in marker_candidates if p.exists()]
384
+
385
+ if len(found) >= 1:
386
+ skill_dirs = [
387
+ d for d in repo_root.iterdir()
388
+ if d.is_dir() and any((d / f).is_file() for f in SKILL_FILENAMES)
389
+ ]
390
+ return CheckResult(
391
+ "Source repo",
392
+ OK,
393
+ f"Accessible at {repo_root} ({len(skill_dirs)} skill(s) found).",
394
+ )
395
+ return CheckResult(
396
+ "Source repo",
397
+ WARN,
398
+ f"Source repo markers not found under {repo_root}.",
399
+ recommendation=(
400
+ "Run doctor.py from inside the Agent-Skills repository root, "
401
+ "or verify the repo directory is correct."
402
+ ),
403
+ )
404
+
405
+
406
+ # ---------------------------------------------------------------------------
407
+ # Per-target runner
408
+ # ---------------------------------------------------------------------------
409
+
410
+ def run_checks_for_target(target: str, install_dir: Path, repo_root: Path) -> list[CheckResult]:
411
+ """Run all health checks for one target (claude or gemini)."""
412
+ results: list[CheckResult] = []
413
+
414
+ # (a) Install directory exists
415
+ dir_result = check_install_dir(install_dir)
416
+ results.append(dir_result)
417
+ if dir_result.status == ERROR:
418
+ # Nothing else to check if the directory is absent
419
+ return results
420
+
421
+ # (b) Meta file exists
422
+ meta_result, meta = check_meta_file(install_dir)
423
+ results.append(meta_result)
424
+ if meta is None:
425
+ # Cannot run remaining per-skill checks without meta
426
+ return results
427
+
428
+ # (c) File integrity
429
+ results.extend(check_file_integrity(install_dir, meta))
430
+
431
+ # (d) Stale check
432
+ results.extend(check_stale(install_dir, meta, repo_root))
433
+
434
+ # (e) Orphan detection
435
+ results.extend(check_orphans(install_dir, meta))
436
+
437
+ # (f) Format validation
438
+ results.extend(check_format(install_dir, meta))
439
+
440
+ return results
441
+
442
+
443
+ # ---------------------------------------------------------------------------
444
+ # Output / reporting
445
+ # ---------------------------------------------------------------------------
446
+
447
+ def print_section(title: str, results: list[CheckResult]) -> tuple[int, int, int]:
448
+ """Print a section of results. Returns (ok, warnings, errors)."""
449
+ print(f"\n{'=' * 70}")
450
+ print(f" {title}")
451
+ print(f"{'=' * 70}")
452
+
453
+ ok = warn = err = 0
454
+ for r in results:
455
+ print(f" {r.icon:<9} {r.label}: {r.message}")
456
+ if r.recommendation:
457
+ print(f" -> {r.recommendation}")
458
+ if r.status == OK:
459
+ ok += 1
460
+ elif r.status == WARN:
461
+ warn += 1
462
+ else:
463
+ err += 1
464
+
465
+ return ok, warn, err
466
+
467
+
468
+ # ---------------------------------------------------------------------------
469
+ # Main
470
+ # ---------------------------------------------------------------------------
471
+
472
+ def main() -> int:
473
+ parser = argparse.ArgumentParser(
474
+ description="Health check for installed Agent Skills."
475
+ )
476
+ parser.add_argument(
477
+ "--target", "-t",
478
+ choices=["claude", "gemini", "antigravity"],
479
+ default=None,
480
+ help="Which install target to check (default: all).",
481
+ )
482
+ args = parser.parse_args()
483
+
484
+ targets = [args.target] if args.target else ["claude", "gemini", "antigravity"]
485
+
486
+ repo_root = Path(__file__).resolve().parent.parent
487
+
488
+ total_ok = total_warn = total_err = 0
489
+
490
+ # (g) Source repo check — done once, shown at top
491
+ print("\nAgent Skills Doctor")
492
+ print("=" * 70)
493
+ source_result = check_source_repo(repo_root)
494
+ print(f" {source_result.icon:<9} {source_result.label}: {source_result.message}")
495
+ if source_result.recommendation:
496
+ print(f" -> {source_result.recommendation}")
497
+ if source_result.status == OK:
498
+ total_ok += 1
499
+ elif source_result.status == WARN:
500
+ total_warn += 1
501
+ else:
502
+ total_err += 1
503
+
504
+ for target in targets:
505
+ install_dir = INSTALL_DIRS[target]
506
+ results = run_checks_for_target(target, install_dir, repo_root)
507
+ ok, warn, err = print_section(
508
+ f"Target: {target.upper()} ({install_dir})",
509
+ results,
510
+ )
511
+ total_ok += ok
512
+ total_warn += warn
513
+ total_err += err
514
+
515
+ # Summary
516
+ print(f"\n{'=' * 70}")
517
+ print(f" SUMMARY")
518
+ print(f"{'=' * 70}")
519
+ print(f" Checks run : {total_ok + total_warn + total_err}")
520
+ print(f" [OK] : {total_ok}")
521
+ print(f" [WARN] : {total_warn}")
522
+ print(f" [ERROR] : {total_err}")
523
+ print()
524
+
525
+ if total_err == 0 and total_warn == 0:
526
+ print(" All skills are healthy.")
527
+ elif total_err == 0:
528
+ print(" Skills have warnings — review recommendations above.")
529
+ else:
530
+ print(" Skills have errors — action required.")
531
+
532
+ print()
533
+
534
+ if total_err > 0:
535
+ return 2
536
+ if total_warn > 0:
537
+ return 1
538
+ return 0
539
+
540
+
541
+ if __name__ == "__main__":
542
+ sys.exit(main())