feat: Merge PR #249 - Bootstrap skill with fixes and MCP optionality

Merged PR #249 from @MiaoDX with enhancements:

Bootstrap Feature:
- Self-bootstrap: Generate skill-seekers as Claude Code skill
- Robust frontmatter detection (dynamic line finding)
- SKILL.md validation (YAML + Markdown structure)
- Comprehensive error handling (uv check, permission checks)
- 6 E2E tests with venv isolation

MCP Optionality (User Feature):
- MCP removed from core dependencies
- Optional install: pip install skill-seekers[mcp]
- Lazy loading with helpful error messages
- Interactive setup wizard on first run
- Backward compatible

Bug Fixes:
- Fixed codebase_scraper.py AttributeError (line 1193)
- Fixed test_bootstrap_skill_e2e.py Path vs str issue
- Updated test version expectations to 2.7.0
- Added httpx to core (required for async scraping)
- Added anthropic to core (required for AI enhancement)

Testing:
- 6 new bootstrap E2E tests (all passing)
- 1207/1217 tests passing (99.2% pass rate)
- All bootstrap and enhancement tests pass
- Remaining failures are pre-existing test infrastructure issues

Documentation:
- Updated CHANGELOG.md with v2.7.0 notes
- Updated README.md with bootstrap and installation options
- Added setup wizard guide

Files Modified (9):
- CHANGELOG.md, README.md - Documentation updates
- pyproject.toml - MCP optional, httpx/anthropic core, markers, entry points
- scripts/bootstrap_skill.sh - Dynamic frontmatter, validation, error handling
- src/skill_seekers/cli/install_skill.py - Lazy MCP loading
- tests/test_cli_paths.py - Version 2.7.0
- uv.lock - Dependency updates

New Files (2):
- src/skill_seekers/cli/setup_wizard.py - Interactive installation guide (95 lines)
- tests/test_bootstrap_skill_e2e.py - E2E bootstrap tests (169 lines)

Credits: @MiaoDX for PR #249

Co-Authored-By: MiaoDX <MiaoDX@hotmail.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
yusyus
2026-01-17 19:51:11 +03:00
parent 6d4ef0f13b
commit 38e8969ae7
9 changed files with 553 additions and 22 deletions

36
uv.lock generated
View File

@@ -17,6 +17,25 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/78/b6/6307fbef88d9b5ee7421e68d78a9f162e0da4900bc5f5793f6d3d0e34fb8/annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53", size = 13643, upload-time = "2024-05-20T21:33:24.1Z" },
]
[[package]]
name = "anthropic"
version = "0.76.0"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "anyio" },
{ name = "distro" },
{ name = "docstring-parser" },
{ name = "httpx" },
{ name = "jiter" },
{ name = "pydantic" },
{ name = "sniffio" },
{ name = "typing-extensions" },
]
sdist = { url = "https://files.pythonhosted.org/packages/6e/be/d11abafaa15d6304826438170f7574d750218f49a106c54424a40cef4494/anthropic-0.76.0.tar.gz", hash = "sha256:e0cae6a368986d5cf6df743dfbb1b9519e6a9eee9c6c942ad8121c0b34416ffe", size = 495483, upload-time = "2026-01-13T18:41:14.908Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/e5/70/7b0fd9c1a738f59d3babe2b4212031c34ab7d0fda4ffef15b58a55c5bcea/anthropic-0.76.0-py3-none-any.whl", hash = "sha256:81efa3113901192af2f0fe977d3ec73fdadb1e691586306c4256cd6d5ccc331c", size = 390309, upload-time = "2026-01-13T18:41:13.483Z" },
]
[[package]]
name = "anyio"
version = "4.12.0"
@@ -450,6 +469,15 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/12/b3/231ffd4ab1fc9d679809f356cebee130ac7daa00d6d6f3206dd4fd137e9e/distro-1.9.0-py3-none-any.whl", hash = "sha256:7bffd925d65168f85027d8da9af6bddab658135b840670a223589bc0c8ef02b2", size = 20277, upload-time = "2023-12-24T09:54:30.421Z" },
]
[[package]]
name = "docstring-parser"
version = "0.17.0"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/b2/9d/c3b43da9515bd270df0f80548d9944e389870713cc1fe2b8fb35fe2bcefd/docstring_parser-0.17.0.tar.gz", hash = "sha256:583de4a309722b3315439bb31d64ba3eebada841f2e2cee23b99df001434c912", size = 27442, upload-time = "2025-07-21T07:35:01.868Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/55/e2/2537ebcff11c1ee1ff17d8d0b6f4db75873e3b0fb32c2d4a2ee31ecb310a/docstring_parser-0.17.0-py3-none-any.whl", hash = "sha256:cf2569abd23dce8099b300f9b4fa8191e9582dda731fd533daf54c4551658708", size = 36896, upload-time = "2025-07-21T07:35:00.684Z" },
]
[[package]]
name = "exceptiongroup"
version = "1.3.1"
@@ -1664,16 +1692,15 @@ wheels = [
[[package]]
name = "skill-seekers"
version = "2.6.0"
version = "2.7.0"
source = { editable = "." }
dependencies = [
{ name = "anthropic" },
{ name = "beautifulsoup4" },
{ name = "click" },
{ name = "gitpython" },
{ name = "httpx" },
{ name = "httpx-sse" },
{ name = "jsonschema" },
{ name = "mcp" },
{ name = "networkx", version = "3.4.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },
{ name = "networkx", version = "3.6.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },
{ name = "pathspec" },
@@ -1728,6 +1755,7 @@ dev = [
[package.metadata]
requires-dist = [
{ name = "anthropic", specifier = ">=0.76.0" },
{ name = "beautifulsoup4", specifier = ">=4.14.2" },
{ name = "click", specifier = ">=8.3.0" },
{ name = "gitpython", specifier = ">=3.1.40" },
@@ -1737,11 +1765,9 @@ requires-dist = [
{ name = "httpx", specifier = ">=0.28.1" },
{ name = "httpx", marker = "extra == 'all'", specifier = ">=0.28.1" },
{ name = "httpx", marker = "extra == 'mcp'", specifier = ">=0.28.1" },
{ name = "httpx-sse", specifier = ">=0.4.3" },
{ name = "httpx-sse", marker = "extra == 'all'", specifier = ">=0.4.3" },
{ name = "httpx-sse", marker = "extra == 'mcp'", specifier = ">=0.4.3" },
{ name = "jsonschema", specifier = ">=4.25.1" },
{ name = "mcp", specifier = ">=1.25,<2" },
{ name = "mcp", marker = "extra == 'all'", specifier = ">=1.25,<2" },
{ name = "mcp", marker = "extra == 'mcp'", specifier = ">=1.25,<2" },
{ name = "networkx", specifier = ">=3.0" },