skill-seekers 2.7.3__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.
Files changed (79) hide show
  1. skill_seekers/__init__.py +22 -0
  2. skill_seekers/cli/__init__.py +39 -0
  3. skill_seekers/cli/adaptors/__init__.py +120 -0
  4. skill_seekers/cli/adaptors/base.py +221 -0
  5. skill_seekers/cli/adaptors/claude.py +485 -0
  6. skill_seekers/cli/adaptors/gemini.py +453 -0
  7. skill_seekers/cli/adaptors/markdown.py +269 -0
  8. skill_seekers/cli/adaptors/openai.py +503 -0
  9. skill_seekers/cli/ai_enhancer.py +310 -0
  10. skill_seekers/cli/api_reference_builder.py +373 -0
  11. skill_seekers/cli/architectural_pattern_detector.py +525 -0
  12. skill_seekers/cli/code_analyzer.py +1462 -0
  13. skill_seekers/cli/codebase_scraper.py +1225 -0
  14. skill_seekers/cli/config_command.py +563 -0
  15. skill_seekers/cli/config_enhancer.py +431 -0
  16. skill_seekers/cli/config_extractor.py +871 -0
  17. skill_seekers/cli/config_manager.py +452 -0
  18. skill_seekers/cli/config_validator.py +394 -0
  19. skill_seekers/cli/conflict_detector.py +528 -0
  20. skill_seekers/cli/constants.py +72 -0
  21. skill_seekers/cli/dependency_analyzer.py +757 -0
  22. skill_seekers/cli/doc_scraper.py +2332 -0
  23. skill_seekers/cli/enhance_skill.py +488 -0
  24. skill_seekers/cli/enhance_skill_local.py +1096 -0
  25. skill_seekers/cli/enhance_status.py +194 -0
  26. skill_seekers/cli/estimate_pages.py +433 -0
  27. skill_seekers/cli/generate_router.py +1209 -0
  28. skill_seekers/cli/github_fetcher.py +534 -0
  29. skill_seekers/cli/github_scraper.py +1466 -0
  30. skill_seekers/cli/guide_enhancer.py +723 -0
  31. skill_seekers/cli/how_to_guide_builder.py +1267 -0
  32. skill_seekers/cli/install_agent.py +461 -0
  33. skill_seekers/cli/install_skill.py +178 -0
  34. skill_seekers/cli/language_detector.py +614 -0
  35. skill_seekers/cli/llms_txt_detector.py +60 -0
  36. skill_seekers/cli/llms_txt_downloader.py +104 -0
  37. skill_seekers/cli/llms_txt_parser.py +150 -0
  38. skill_seekers/cli/main.py +558 -0
  39. skill_seekers/cli/markdown_cleaner.py +132 -0
  40. skill_seekers/cli/merge_sources.py +806 -0
  41. skill_seekers/cli/package_multi.py +77 -0
  42. skill_seekers/cli/package_skill.py +241 -0
  43. skill_seekers/cli/pattern_recognizer.py +1825 -0
  44. skill_seekers/cli/pdf_extractor_poc.py +1166 -0
  45. skill_seekers/cli/pdf_scraper.py +617 -0
  46. skill_seekers/cli/quality_checker.py +519 -0
  47. skill_seekers/cli/rate_limit_handler.py +438 -0
  48. skill_seekers/cli/resume_command.py +160 -0
  49. skill_seekers/cli/run_tests.py +230 -0
  50. skill_seekers/cli/setup_wizard.py +93 -0
  51. skill_seekers/cli/split_config.py +390 -0
  52. skill_seekers/cli/swift_patterns.py +560 -0
  53. skill_seekers/cli/test_example_extractor.py +1081 -0
  54. skill_seekers/cli/test_unified_simple.py +179 -0
  55. skill_seekers/cli/unified_codebase_analyzer.py +572 -0
  56. skill_seekers/cli/unified_scraper.py +932 -0
  57. skill_seekers/cli/unified_skill_builder.py +1605 -0
  58. skill_seekers/cli/upload_skill.py +162 -0
  59. skill_seekers/cli/utils.py +432 -0
  60. skill_seekers/mcp/__init__.py +33 -0
  61. skill_seekers/mcp/agent_detector.py +316 -0
  62. skill_seekers/mcp/git_repo.py +273 -0
  63. skill_seekers/mcp/server.py +231 -0
  64. skill_seekers/mcp/server_fastmcp.py +1249 -0
  65. skill_seekers/mcp/server_legacy.py +2302 -0
  66. skill_seekers/mcp/source_manager.py +285 -0
  67. skill_seekers/mcp/tools/__init__.py +115 -0
  68. skill_seekers/mcp/tools/config_tools.py +251 -0
  69. skill_seekers/mcp/tools/packaging_tools.py +826 -0
  70. skill_seekers/mcp/tools/scraping_tools.py +842 -0
  71. skill_seekers/mcp/tools/source_tools.py +828 -0
  72. skill_seekers/mcp/tools/splitting_tools.py +212 -0
  73. skill_seekers/py.typed +0 -0
  74. skill_seekers-2.7.3.dist-info/METADATA +2027 -0
  75. skill_seekers-2.7.3.dist-info/RECORD +79 -0
  76. skill_seekers-2.7.3.dist-info/WHEEL +5 -0
  77. skill_seekers-2.7.3.dist-info/entry_points.txt +19 -0
  78. skill_seekers-2.7.3.dist-info/licenses/LICENSE +21 -0
  79. skill_seekers-2.7.3.dist-info/top_level.txt +1 -0
@@ -0,0 +1,269 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Generic Markdown Adaptor
4
+
5
+ Implements generic markdown export for universal LLM compatibility.
6
+ No platform-specific features, just clean markdown documentation.
7
+ """
8
+
9
+ import zipfile
10
+ from pathlib import Path
11
+ from typing import Any
12
+
13
+ from .base import SkillAdaptor, SkillMetadata
14
+
15
+
16
+ class MarkdownAdaptor(SkillAdaptor):
17
+ """
18
+ Generic Markdown platform adaptor.
19
+
20
+ Handles:
21
+ - Pure markdown format (no platform-specific formatting)
22
+ - ZIP packaging with combined or individual files
23
+ - No upload capability (manual use)
24
+ - No AI enhancement (generic export only)
25
+ """
26
+
27
+ PLATFORM = "markdown"
28
+ PLATFORM_NAME = "Generic Markdown (Universal)"
29
+ DEFAULT_API_ENDPOINT = None # No upload endpoint
30
+
31
+ def format_skill_md(self, skill_dir: Path, metadata: SkillMetadata) -> str:
32
+ """
33
+ Format SKILL.md as pure markdown.
34
+
35
+ Clean, universal markdown that works with any LLM or documentation system.
36
+
37
+ Args:
38
+ skill_dir: Path to skill directory
39
+ metadata: Skill metadata
40
+
41
+ Returns:
42
+ Formatted markdown content
43
+ """
44
+ # Read existing content (if any)
45
+ existing_content = self._read_existing_content(skill_dir)
46
+
47
+ # If existing content is substantial, use it
48
+ if existing_content and len(existing_content) > 100:
49
+ content_body = existing_content
50
+ else:
51
+ # Generate clean markdown
52
+ content_body = f"""# {metadata.name.title()} Documentation
53
+
54
+ {metadata.description}
55
+
56
+ ## Table of Contents
57
+
58
+ {self._generate_toc(skill_dir)}
59
+
60
+ ## Quick Reference
61
+
62
+ {self._extract_quick_reference(skill_dir)}
63
+
64
+ ## Documentation
65
+
66
+ This documentation package contains comprehensive reference materials organized into categorized sections.
67
+
68
+ ### Available Sections
69
+
70
+ {self._generate_toc(skill_dir)}
71
+
72
+ ## Usage
73
+
74
+ Browse the reference files for detailed information on each topic. All files are in standard markdown format and can be viewed with any markdown reader or text editor.
75
+
76
+ ---
77
+
78
+ *Documentation generated by Skill Seekers*
79
+ """
80
+
81
+ # Return pure markdown (no frontmatter, no special formatting)
82
+ return content_body
83
+
84
+ def package(self, skill_dir: Path, output_path: Path) -> Path:
85
+ """
86
+ Package skill into ZIP file with markdown documentation.
87
+
88
+ Creates universal structure:
89
+ - README.md (combined documentation)
90
+ - references/*.md (individual reference files)
91
+ - metadata.json (skill information)
92
+
93
+ Args:
94
+ skill_dir: Path to skill directory
95
+ output_path: Output path/filename for ZIP
96
+
97
+ Returns:
98
+ Path to created ZIP file
99
+ """
100
+ skill_dir = Path(skill_dir)
101
+
102
+ # Determine output filename
103
+ if output_path.is_dir() or str(output_path).endswith("/"):
104
+ output_path = Path(output_path) / f"{skill_dir.name}-markdown.zip"
105
+ elif not str(output_path).endswith(".zip"):
106
+ # Replace extension if needed
107
+ output_str = str(output_path).replace(".tar.gz", ".zip")
108
+ if not output_str.endswith("-markdown.zip"):
109
+ output_str = output_str.replace(".zip", "-markdown.zip")
110
+ if not output_str.endswith(".zip"):
111
+ output_str += ".zip"
112
+ output_path = Path(output_str)
113
+
114
+ output_path = Path(output_path)
115
+ output_path.parent.mkdir(parents=True, exist_ok=True)
116
+
117
+ # Create ZIP file
118
+ with zipfile.ZipFile(output_path, "w", zipfile.ZIP_DEFLATED) as zf:
119
+ # Add SKILL.md as README.md
120
+ skill_md = skill_dir / "SKILL.md"
121
+ if skill_md.exists():
122
+ content = skill_md.read_text(encoding="utf-8")
123
+ zf.writestr("README.md", content)
124
+
125
+ # Add individual reference files
126
+ refs_dir = skill_dir / "references"
127
+ if refs_dir.exists():
128
+ for ref_file in refs_dir.rglob("*.md"):
129
+ if ref_file.is_file() and not ref_file.name.startswith("."):
130
+ # Preserve directory structure under references/
131
+ arcname = ref_file.relative_to(skill_dir)
132
+ zf.write(ref_file, str(arcname))
133
+
134
+ # Create combined documentation file
135
+ combined = self._create_combined_doc(skill_dir)
136
+ if combined:
137
+ zf.writestr("DOCUMENTATION.md", combined)
138
+
139
+ # Add metadata file
140
+ import json
141
+
142
+ metadata = {
143
+ "platform": "markdown",
144
+ "name": skill_dir.name,
145
+ "version": "1.0.0",
146
+ "created_with": "skill-seekers",
147
+ "format": "universal_markdown",
148
+ "usage": "Use with any LLM or documentation system",
149
+ }
150
+
151
+ zf.writestr("metadata.json", json.dumps(metadata, indent=2))
152
+
153
+ return output_path
154
+
155
+ def upload(self, package_path: Path, _api_key: str, **_kwargs) -> dict[str, Any]:
156
+ """
157
+ Generic markdown export does not support upload.
158
+
159
+ Users should manually use the exported markdown files.
160
+
161
+ Args:
162
+ package_path: Path to package file
163
+ api_key: Not used
164
+ **kwargs: Not used
165
+
166
+ Returns:
167
+ Result indicating no upload capability
168
+ """
169
+ return {
170
+ "success": False,
171
+ "skill_id": None,
172
+ "url": str(package_path.absolute()),
173
+ "message": (
174
+ "Generic markdown export does not support automatic upload. "
175
+ f"Your documentation is packaged at: {package_path.absolute()}"
176
+ ),
177
+ }
178
+
179
+ def validate_api_key(self, _api_key: str) -> bool:
180
+ """
181
+ Markdown export doesn't use API keys.
182
+
183
+ Args:
184
+ api_key: Not used
185
+
186
+ Returns:
187
+ Always False (no API needed)
188
+ """
189
+ return False
190
+
191
+ def get_env_var_name(self) -> str:
192
+ """
193
+ No API key needed for markdown export.
194
+
195
+ Returns:
196
+ Empty string
197
+ """
198
+ return ""
199
+
200
+ def supports_enhancement(self) -> bool:
201
+ """
202
+ Markdown export doesn't support AI enhancement.
203
+
204
+ Returns:
205
+ False
206
+ """
207
+ return False
208
+
209
+ def enhance(self, _skill_dir: Path, _api_key: str) -> bool:
210
+ """
211
+ Markdown export doesn't support enhancement.
212
+
213
+ Args:
214
+ skill_dir: Not used
215
+ api_key: Not used
216
+
217
+ Returns:
218
+ False
219
+ """
220
+ print("❌ Generic markdown export does not support AI enhancement")
221
+ print(" Use --target claude, --target gemini, or --target openai for enhancement")
222
+ return False
223
+
224
+ def _create_combined_doc(self, skill_dir: Path) -> str:
225
+ """
226
+ Create a combined documentation file from all references.
227
+
228
+ Args:
229
+ skill_dir: Path to skill directory
230
+
231
+ Returns:
232
+ Combined markdown content
233
+ """
234
+ skill_md = skill_dir / "SKILL.md"
235
+ refs_dir = skill_dir / "references"
236
+
237
+ combined_parts = []
238
+
239
+ # Add main content
240
+ if skill_md.exists():
241
+ content = skill_md.read_text(encoding="utf-8")
242
+ # Strip YAML frontmatter if present
243
+ if content.startswith("---"):
244
+ parts = content.split("---", 2)
245
+ if len(parts) >= 3:
246
+ content = parts[2].strip()
247
+ combined_parts.append(content)
248
+
249
+ # Add separator
250
+ combined_parts.append("\n\n---\n\n")
251
+
252
+ # Add all reference files
253
+ if refs_dir.exists():
254
+ # Sort for consistent ordering
255
+ ref_files = sorted(refs_dir.glob("*.md"))
256
+
257
+ for ref_file in ref_files:
258
+ if ref_file.name == "index.md":
259
+ continue # Skip index
260
+
261
+ try:
262
+ ref_content = ref_file.read_text(encoding="utf-8")
263
+ combined_parts.append(f"# {ref_file.stem.replace('_', ' ').title()}\n\n")
264
+ combined_parts.append(ref_content)
265
+ combined_parts.append("\n\n---\n\n")
266
+ except Exception:
267
+ pass # Skip files that can't be read
268
+
269
+ return "".join(combined_parts).strip()