@kood/claude-code 0.1.9 → 0.1.11

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 (56) hide show
  1. package/dist/index.js +54 -35
  2. package/package.json +1 -1
  3. package/templates/hono/docs/commands/docs-creator.md +239 -0
  4. package/templates/hono/docs/commands/docs-refactor.md +168 -0
  5. package/templates/hono/docs/commands/git-all.md +83 -0
  6. package/templates/hono/docs/commands/git-session.md +91 -0
  7. package/templates/hono/docs/commands/git.md +86 -0
  8. package/templates/hono/docs/commands/lint-fix.md +170 -0
  9. package/templates/hono/docs/commands/lint-init.md +300 -0
  10. package/templates/hono/docs/commands/ts-fix.md +176 -0
  11. package/templates/hono/docs/skills/command-creator/LICENSE.txt +202 -0
  12. package/templates/hono/docs/skills/command-creator/SKILL.md +245 -0
  13. package/templates/hono/docs/skills/command-creator/scripts/init_command.py +244 -0
  14. package/templates/hono/docs/skills/command-creator/scripts/package_command.py +125 -0
  15. package/templates/hono/docs/skills/command-creator/scripts/quick_validate.py +143 -0
  16. package/templates/hono/docs/skills/skill-creator/LICENSE.txt +202 -0
  17. package/templates/hono/docs/skills/skill-creator/SKILL.md +184 -0
  18. package/templates/hono/docs/skills/skill-creator/scripts/init_skill.py +303 -0
  19. package/templates/hono/docs/skills/skill-creator/scripts/package_skill.py +110 -0
  20. package/templates/hono/docs/skills/skill-creator/scripts/quick_validate.py +65 -0
  21. package/templates/npx/docs/commands/docs-creator.md +239 -0
  22. package/templates/npx/docs/commands/docs-refactor.md +168 -0
  23. package/templates/npx/docs/commands/git-all.md +83 -0
  24. package/templates/npx/docs/commands/git-session.md +91 -0
  25. package/templates/npx/docs/commands/git.md +86 -0
  26. package/templates/npx/docs/commands/lint-fix.md +170 -0
  27. package/templates/npx/docs/commands/lint-init.md +300 -0
  28. package/templates/npx/docs/commands/ts-fix.md +176 -0
  29. package/templates/npx/docs/skills/command-creator/LICENSE.txt +202 -0
  30. package/templates/npx/docs/skills/command-creator/SKILL.md +245 -0
  31. package/templates/npx/docs/skills/command-creator/scripts/init_command.py +244 -0
  32. package/templates/npx/docs/skills/command-creator/scripts/package_command.py +125 -0
  33. package/templates/npx/docs/skills/command-creator/scripts/quick_validate.py +143 -0
  34. package/templates/npx/docs/skills/skill-creator/LICENSE.txt +202 -0
  35. package/templates/npx/docs/skills/skill-creator/SKILL.md +184 -0
  36. package/templates/npx/docs/skills/skill-creator/scripts/init_skill.py +303 -0
  37. package/templates/npx/docs/skills/skill-creator/scripts/package_skill.py +110 -0
  38. package/templates/npx/docs/skills/skill-creator/scripts/quick_validate.py +65 -0
  39. package/templates/tanstack-start/docs/commands/docs-creator.md +239 -0
  40. package/templates/tanstack-start/docs/commands/docs-refactor.md +168 -0
  41. package/templates/tanstack-start/docs/commands/git-all.md +83 -0
  42. package/templates/tanstack-start/docs/commands/git-session.md +91 -0
  43. package/templates/tanstack-start/docs/commands/git.md +86 -0
  44. package/templates/tanstack-start/docs/commands/lint-fix.md +170 -0
  45. package/templates/tanstack-start/docs/commands/lint-init.md +300 -0
  46. package/templates/tanstack-start/docs/commands/ts-fix.md +176 -0
  47. package/templates/tanstack-start/docs/skills/command-creator/LICENSE.txt +202 -0
  48. package/templates/tanstack-start/docs/skills/command-creator/SKILL.md +245 -0
  49. package/templates/tanstack-start/docs/skills/command-creator/scripts/init_command.py +244 -0
  50. package/templates/tanstack-start/docs/skills/command-creator/scripts/package_command.py +125 -0
  51. package/templates/tanstack-start/docs/skills/command-creator/scripts/quick_validate.py +143 -0
  52. package/templates/tanstack-start/docs/skills/skill-creator/LICENSE.txt +202 -0
  53. package/templates/tanstack-start/docs/skills/skill-creator/SKILL.md +184 -0
  54. package/templates/tanstack-start/docs/skills/skill-creator/scripts/init_skill.py +303 -0
  55. package/templates/tanstack-start/docs/skills/skill-creator/scripts/package_skill.py +110 -0
  56. package/templates/tanstack-start/docs/skills/skill-creator/scripts/quick_validate.py +65 -0
@@ -0,0 +1,110 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Skill Packager - Creates a distributable zip file of a skill folder
4
+
5
+ Usage:
6
+ python utils/package_skill.py <path/to/skill-folder> [output-directory]
7
+
8
+ Example:
9
+ python utils/package_skill.py skills/public/my-skill
10
+ python utils/package_skill.py skills/public/my-skill ./dist
11
+ """
12
+
13
+ import sys
14
+ import zipfile
15
+ from pathlib import Path
16
+ from quick_validate import validate_skill
17
+
18
+
19
+ def package_skill(skill_path, output_dir=None):
20
+ """
21
+ Package a skill folder into a zip file.
22
+
23
+ Args:
24
+ skill_path: Path to the skill folder
25
+ output_dir: Optional output directory for the zip file (defaults to current directory)
26
+
27
+ Returns:
28
+ Path to the created zip file, or None if error
29
+ """
30
+ skill_path = Path(skill_path).resolve()
31
+
32
+ # Validate skill folder exists
33
+ if not skill_path.exists():
34
+ print(f"❌ Error: Skill folder not found: {skill_path}")
35
+ return None
36
+
37
+ if not skill_path.is_dir():
38
+ print(f"❌ Error: Path is not a directory: {skill_path}")
39
+ return None
40
+
41
+ # Validate SKILL.md exists
42
+ skill_md = skill_path / "SKILL.md"
43
+ if not skill_md.exists():
44
+ print(f"❌ Error: SKILL.md not found in {skill_path}")
45
+ return None
46
+
47
+ # Run validation before packaging
48
+ print("🔍 Validating skill...")
49
+ valid, message = validate_skill(skill_path)
50
+ if not valid:
51
+ print(f"❌ Validation failed: {message}")
52
+ print(" Please fix the validation errors before packaging.")
53
+ return None
54
+ print(f"✅ {message}\n")
55
+
56
+ # Determine output location
57
+ skill_name = skill_path.name
58
+ if output_dir:
59
+ output_path = Path(output_dir).resolve()
60
+ output_path.mkdir(parents=True, exist_ok=True)
61
+ else:
62
+ output_path = Path.cwd()
63
+
64
+ zip_filename = output_path / f"{skill_name}.zip"
65
+
66
+ # Create the zip file
67
+ try:
68
+ with zipfile.ZipFile(zip_filename, 'w', zipfile.ZIP_DEFLATED) as zipf:
69
+ # Walk through the skill directory
70
+ for file_path in skill_path.rglob('*'):
71
+ if file_path.is_file():
72
+ # Calculate the relative path within the zip
73
+ arcname = file_path.relative_to(skill_path.parent)
74
+ zipf.write(file_path, arcname)
75
+ print(f" Added: {arcname}")
76
+
77
+ print(f"\n✅ Successfully packaged skill to: {zip_filename}")
78
+ return zip_filename
79
+
80
+ except Exception as e:
81
+ print(f"❌ Error creating zip file: {e}")
82
+ return None
83
+
84
+
85
+ def main():
86
+ if len(sys.argv) < 2:
87
+ print("Usage: python utils/package_skill.py <path/to/skill-folder> [output-directory]")
88
+ print("\nExample:")
89
+ print(" python utils/package_skill.py skills/public/my-skill")
90
+ print(" python utils/package_skill.py skills/public/my-skill ./dist")
91
+ sys.exit(1)
92
+
93
+ skill_path = sys.argv[1]
94
+ output_dir = sys.argv[2] if len(sys.argv) > 2 else None
95
+
96
+ print(f"📦 Packaging skill: {skill_path}")
97
+ if output_dir:
98
+ print(f" Output directory: {output_dir}")
99
+ print()
100
+
101
+ result = package_skill(skill_path, output_dir)
102
+
103
+ if result:
104
+ sys.exit(0)
105
+ else:
106
+ sys.exit(1)
107
+
108
+
109
+ if __name__ == "__main__":
110
+ main()
@@ -0,0 +1,65 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Quick validation script for skills - minimal version
4
+ """
5
+
6
+ import sys
7
+ import os
8
+ import re
9
+ from pathlib import Path
10
+
11
+ def validate_skill(skill_path):
12
+ """Basic validation of a skill"""
13
+ skill_path = Path(skill_path)
14
+
15
+ # Check SKILL.md exists
16
+ skill_md = skill_path / 'SKILL.md'
17
+ if not skill_md.exists():
18
+ return False, "SKILL.md not found"
19
+
20
+ # Read and validate frontmatter
21
+ content = skill_md.read_text()
22
+ if not content.startswith('---'):
23
+ return False, "No YAML frontmatter found"
24
+
25
+ # Extract frontmatter
26
+ match = re.match(r'^---\n(.*?)\n---', content, re.DOTALL)
27
+ if not match:
28
+ return False, "Invalid frontmatter format"
29
+
30
+ frontmatter = match.group(1)
31
+
32
+ # Check required fields
33
+ if 'name:' not in frontmatter:
34
+ return False, "Missing 'name' in frontmatter"
35
+ if 'description:' not in frontmatter:
36
+ return False, "Missing 'description' in frontmatter"
37
+
38
+ # Extract name for validation
39
+ name_match = re.search(r'name:\s*(.+)', frontmatter)
40
+ if name_match:
41
+ name = name_match.group(1).strip()
42
+ # Check naming convention (hyphen-case: lowercase with hyphens)
43
+ if not re.match(r'^[a-z0-9-]+$', name):
44
+ return False, f"Name '{name}' should be hyphen-case (lowercase letters, digits, and hyphens only)"
45
+ if name.startswith('-') or name.endswith('-') or '--' in name:
46
+ return False, f"Name '{name}' cannot start/end with hyphen or contain consecutive hyphens"
47
+
48
+ # Extract and validate description
49
+ desc_match = re.search(r'description:\s*(.+)', frontmatter)
50
+ if desc_match:
51
+ description = desc_match.group(1).strip()
52
+ # Check for angle brackets
53
+ if '<' in description or '>' in description:
54
+ return False, "Description cannot contain angle brackets (< or >)"
55
+
56
+ return True, "Skill is valid!"
57
+
58
+ if __name__ == "__main__":
59
+ if len(sys.argv) != 2:
60
+ print("Usage: python quick_validate.py <skill_directory>")
61
+ sys.exit(1)
62
+
63
+ valid, message = validate_skill(sys.argv[1])
64
+ print(message)
65
+ sys.exit(0 if valid else 1)