Add smart terminal selection for --enhance-local with cascading priority:
1. SKILL_SEEKER_TERMINAL env var (explicit user preference)
2. TERM_PROGRAM env var (inherit current terminal)
3. Terminal.app (fallback default)
Supports Ghostty, iTerm2, WezTerm, and Terminal.app. Includes comprehensive
test suite (11 tests) and user documentation.
Changes:
- Add detect_terminal_app() function with priority-based selection
- Support for 4 major macOS terminals via TERMINAL_MAP
- Fallback handling for unknown terminals (IDE terminals)
- Add TERMINAL_SELECTION.md with setup examples and troubleshooting
- Update README.md to link to terminal selection guide
- Full test coverage for all detection paths and edge cases
**Problem:** (PR #170 verified)
Three skill builders were generating SKILL.md files without YAML
frontmatter, making skills invisible to Claude after upload:
- unified_skill_builder.py
- github_scraper.py
- pdf_scraper.py
Only doc_scraper.py had frontmatter implemented.
**Root Cause:**
Claude requires YAML frontmatter with 'name' and 'description' fields
to recognize and index skills. Without it, uploaded skills don't appear
in skill lists and can't be triggered.
**Fix:**
Added consistent frontmatter generation to all three builders:
- Normalizes skill name (lowercase, hyphens, max 64 chars)
- Truncates description to 1024 chars (Claude requirement)
- Generates YAML frontmatter with proper formatting
**Test Results:**
✅ All 390/390 tests passing (0 failures, 0 skipped)
✅ Consistent implementation across all builders
✅ Meets Claude's official skill specification
**Example Output:**
```yaml
---
name: my-skill-name
description: Skill description here
---
# My Skill Name
...
```
**Credits:**
Original fix by @AbdelrahmanHafez in PR #170
Rebased to current development by Claude Code
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: AbdelrahmanHafez <AbdelrahmanHafez@users.noreply.github.com>
**Problem:**
- GitHub Actions failing with 12 test failures in test_unified.py
- ConfigValidator only accepting file paths, not dicts
- ConflictDetector expecting dict pages, but tests providing list
- Import path issues in test_unified.py
**Changes:**
1. **cli/config_validator.py**:
- Modified `__init__` to accept Union[Dict, str] instead of just str
- Added isinstance check to handle both dict and file path inputs
- Maintains backward compatibility with existing code
2. **cli/conflict_detector.py**:
- Modified `_extract_docs_apis()` to handle both dict and list formats for pages
- Added support for 'analyzed_files' key (in addition to 'files')
- Made 'file' key optional in file_info dict
- Handles both production and test data structures
3. **tests/test_unified.py**:
- Fixed import path: sys.path now points to parent.parent/cli
- Fixed test regex: "Invalid source type" -> "Invalid type"
- All 18 unified tests now passing
**Test Results:**
- ✅ 390/390 tests passing (100%)
- ✅ All unified tests fixed (0 failures)
- ✅ No regressions in other test suites
**Impact:**
- Fixes failing GitHub Actions CI
- Improves testability of ConfigValidator and ConflictDetector
- Makes APIs more flexible for both production and test usage
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
## ✅ Approved and Merged
Excellent work, @StuartFenton! This is a critical bug fix that unblocks MCP integration for Claude Code CLI users.
### Review Summary
**Test Results:** ✅ All 372 tests passing (100% success rate)
**Code Quality:** ✅ Minimal, surgical changes with clear documentation
**Impact:** ✅ Fixes critical MCP scraping bug (1 page → 100 pages)
**Compatibility:** ✅ Fully backward compatible, no breaking changes
### What This Fixes
1. **MCP subprocess EOFError**: No more crashes on user input prompts
2. **Link discovery**: Now finds navigation links outside main content (10-100x more pages)
3. **--fresh flag**: Properly skips user prompts in automation mode
### Changes Merged
- **cli/doc_scraper.py**: Link extraction from entire page + --fresh flag fix
- **skill_seeker_mcp/server.py**: Auto-pass --fresh flag to prevent prompts
### Testing Validation
Real-world MCP testing shows:
- ✅ Tailwind CSS: 1 page → 100 pages
- ✅ No user prompts during execution
- ✅ Navigation links properly discovered
- ✅ End-to-end workflow through Claude Code CLI
Thank you for the thorough problem analysis, comprehensive testing, and excellent PR description! 🎉
---
**Next Steps:**
- Will be included in next release (v2.0.1)
- Added to project changelog
- MCP integration now fully functional
🤖 Merged with [Claude Code](https://claude.com/claude-code)
- Support <pre class="brush: java"> pattern (SyntaxHighlighter)
- Support bare class names like <pre class="python">
- Add _extract_language_from_classes() helper method
- Apply detection logic to both code and parent pre elements
- Add 3 comprehensive test cases
Improves language detection for 25+ programming languages across
various documentation site formats.
Co-authored-by: Ricardo JL Rufino <ricardo@edu3.com.br>
Phase 3: Conflict Detection System ✅
- Created conflict_detector.py (500+ lines)
- Detects 4 conflict types:
* missing_in_docs - API in code but not documented
* missing_in_code - Documented API doesn't exist
* signature_mismatch - Different parameters/types
* description_mismatch - Docs vs code comments differ
- Fuzzy matching for similar names
- Severity classification (low/medium/high)
- Generates detailed conflict reports
Phase 4: Rule-Based Merger ✅
- Fast, deterministic merging rules
- 4 rules for handling conflicts:
1. Docs only → Include with [DOCS_ONLY] tag
2. Code only → Include with [UNDOCUMENTED] tag
3. Perfect match → Include normally
4. Conflict → Prefer code signature, keep docs description
- Generates unified API reference
- Summary statistics (matched, conflicts, etc.)
Phase 5: Claude-Enhanced Merger ✅
- AI-powered conflict reconciliation
- Opens Claude Code in new terminal
- Provides merge context and instructions
- Creates workspace with conflicts.json
- Waits for human-supervised merge
- Falls back to rule-based if needed
Testing:
✅ Conflict detector finds 5 conflicts in test data
✅ Rule-based merger successfully merges 5 APIs
✅ Proper handling of docs_only vs code_only
✅ JSON serialization works correctly
Next: Orchestrator to tie everything together
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
CHANGES:
1. **Fixed 9 PDF Scraper Test Failures:**
- Added .get() safety for missing page keys (headings, text, code_blocks, images)
- Supported both 'code_samples' and 'code_blocks' keys for compatibility
- Fixed extract_pdf() to raise RuntimeError on failure (tests expect exception)
- Added image saving functionality to _generate_reference_file()
- Updated all test methods to override skill_dir with temp directory
- Fixed categorization to handle pre-categorized test data
2. **Fixed 25 MCP Test Skips:**
- Renamed mcp/ directory to skill_seeker_mcp/ to avoid shadowing external mcp package
- Updated all imports in tests/test_mcp_server.py
- Simplified skill_seeker_mcp/server.py import logic (no more shadowing workarounds)
- Updated tests/test_package_structure.py to reference skill_seeker_mcp
3. **Test Results:**
- ✅ 297 tests passing (100%)
- ✅ 0 tests skipped
- ✅ 0 tests failed
- All test categories passing:
* 23 package structure tests
* 18 PDF scraper tests
* 67 PDF extractor/advanced tests
* 25 MCP server tests
* 164 other core tests
BREAKING CHANGE: MCP server directory renamed from `mcp/` to `skill_seeker_mcp/`
📦 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Major restructure to support both CLI usage and MCP integration:
**Repository Structure:**
- cli/ - All CLI tools (doc_scraper, estimate_pages, enhance_skill, etc.)
- mcp/ - New MCP server for Claude Code integration
- configs/ - Shared configuration files
- tests/ - Updated to import from cli/
- docs/ - Shared documentation
**MCP Server (NEW):**
- mcp/server.py - Full MCP server implementation
- 6 tools available:
* generate_config - Create config from URL
* estimate_pages - Fast page count estimation
* scrape_docs - Full documentation scraping
* package_skill - Package to .zip
* list_configs - Show available presets
* validate_config - Validate config files
- mcp/README.md - Complete MCP documentation
- mcp/requirements.txt - MCP dependencies
**CLI Tools (Moved to cli/):**
- All existing functionality preserved
- Same commands, same behavior
- Tests updated to import from cli.doc_scraper
**Tests:**
- 68/71 passing (95.8%)
- Updated imports from doc_scraper to cli.doc_scraper
- Fixed validate_config() tuple unpacking (errors, warnings)
- 3 minor test failures (checking warnings instead of errors)
**Benefits:**
- Use as CLI tool: python3 cli/doc_scraper.py
- Use via MCP: Integrated with Claude Code
- Shared code and configs
- Single source of truth
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>