| name | local-test |
| description | Test local Jekyll build and visualize pages using Playwright MCP. Starts the development server, navigates through key pages, captures screenshots, and validates rendering. Use when testing local changes before deployment. |
| version | 1.0.0 |
| allowed-tools | Bash, BashOutput, KillShell, mcp__playwright__browser_navigate, mcp__playwright__browser_snapshot, mcp__playwright__browser_take_screenshot, mcp__playwright__browser_click, TodoWrite |
Local Testing with Playwright MCP
This skill helps you test the Jekyll site locally and visualize pages using Playwright MCP browser automation.
When to Use This Skill
Use this skill when:
- "Test the local build"
- "Preview the site locally"
- "Visualize local changes"
- "Test with Playwright"
- "Check how the site looks"
- Before committing major changes
- After updating member profiles or content
- When debugging layout or rendering issues
Prerequisites
Ensure Playwright MCP is installed:
claude mcp add playwright npx '@playwright/mcp@latest'
Workflow
Step 1: Start Jekyll Server
Launch the server in background:
bundle exec jekyll serve --force_polling --livereloadUse
run_in_background: trueto keep the server running while testing.Wait for server initialization (8-10 seconds):
sleep 8Check server output:
- Use
BashOutputto verify server started successfully - Confirm it's running at
http://127.0.0.1:4000/ - Look for "Server running..." message
- Use
Step 2: Navigate to Homepage
Open homepage with Playwright:
mcp__playwright__browser_navigate url: http://127.0.0.1:4000/Verify page loaded:
- Check page title: "Talmo Lab - Home"
- Review page snapshot structure
- Look for key elements (banner, navigation, content)
Capture full-page screenshot:
mcp__playwright__browser_take_screenshot filename: homepage-screenshot.png type: png fullPage: true
Step 3: Test Key Pages
Navigate and capture screenshots of important pages:
Team Page
mcp__playwright__browser_navigate
url: http://127.0.0.1:4000/team/
- Verify all member portraits load
- Check alumni section formatting
- Take full-page screenshot:
team-page-screenshot.png
Research Page
mcp__playwright__browser_navigate
url: http://127.0.0.1:4000/research/
- Verify research areas display correctly
- Check images and formatting
- Take screenshot:
research-page-screenshot.png
Publications Page
mcp__playwright__browser_navigate
url: http://127.0.0.1:4000/publications/
- Verify citations render properly
- Check publication cards/entries
- Take screenshot:
publications-page-screenshot.png
Individual Member Profile
mcp__playwright__browser_navigate
url: http://127.0.0.1:4000/members/talmo-pereira.html
- Verify profile image displays
- Check bio formatting
- Verify social links work
- Take screenshot:
member-profile-screenshot.png
Step 4: Test Interactive Elements (Optional)
If testing navigation or interactive features:
Click navigation links:
mcp__playwright__browser_click element: "Research navigation link" ref: [element reference from snapshot]Hover over portraits:
mcp__playwright__browser_hover element: "Member portrait" ref: [element reference]Test responsive behavior:
mcp__playwright__browser_resize width: 375 height: 667Then take screenshots at mobile size.
Step 5: Check Console for Errors
Look for any JavaScript errors or 404s:
mcp__playwright__browser_console_messages
onlyErrors: true
Common issues to check:
- Missing images (404 errors)
- Failed CSS/JS loads
- JavaScript runtime errors
Step 6: Review Screenshots
Present screenshots to user:
- Show what pages were tested
- Highlight any rendering issues
- Note any console errors found
- Summarize overall build health
Step 7: Cleanup
Kill the Jekyll server:
KillShell shell_id: [server shell ID]Confirm cleanup:
- Verify server stopped
- Note that screenshots are saved in
.playwright-mcp/(gitignored)
Common Testing Scenarios
Testing New Member Profile
When adding a new member:
- Start server
- Navigate to team page → verify member appears
- Navigate to member profile → verify all fields render
- Check profile image displays correctly
- Verify links (email, GitHub, etc.) are present
- Take screenshots of both pages
Testing Layout Changes
When modifying CSS or templates:
- Start server with livereload
- Navigate to affected pages
- Take "before" screenshots
- Make changes (livereload will auto-refresh)
- Take "after" screenshots
- Compare visually
Testing Publications
When updating _data/sources.yaml:
- Run
./cite.shto generate citations - Start server
- Navigate to publications page
- Verify new publications appear
- Check formatting of citations
- Verify links and images
Full Site Regression Test
Before major deployments:
- Test all main pages (home, team, research, publications, join)
- Test sample member profiles (PI, PhD, undergrad, alumni)
- Check footer and navigation on all pages
- Test at desktop and mobile sizes
- Review console for any errors
- Capture screenshots of all tested pages
Screenshot Storage
All screenshots are saved to .playwright-mcp/ directory:
- This directory is automatically gitignored
- Screenshots are for local review only
- Filenames should be descriptive (e.g.,
team-page-screenshot.png) - Full-page screenshots recommended for complete context
Troubleshooting
Server Won't Start
Error: "Address already in use"
- Check if Jekyll is already running:
lsof -i :4000 - Kill existing process:
kill -9 [PID] - Restart server
Error: "Permission denied"
- Don't run
./start.shdirectly (may not be executable) - Use:
bundle exec jekyll serve --force_polling --livereload
Playwright Can't Connect
Error: "Navigation failed"
- Ensure server is fully started (wait 8-10 seconds)
- Check server logs with
BashOutput - Verify URL is
http://127.0.0.1:4000/(not localhost)
Error: "Browser not installed"
- Run:
mcp__playwright__browser_install
Page Rendering Issues
Images not loading
- Check file paths in frontmatter
- Verify images exist in
images/directory - Look for 404 errors in console
Styling broken
- Check for CSS compilation errors in server logs
- Verify
_sass/files are valid - Check browser console for CSS load failures
Content missing
- Verify frontmatter is valid YAML
- Check Jekyll build output for warnings
- Look for Liquid template errors in server logs
Best Practices
Always test locally before committing:
- Catches rendering issues early
- Validates new content appears correctly
- Ensures no broken links or images
Use descriptive screenshot filenames:
- Include page name and purpose
- Add date for tracking changes over time
- Example:
team-page-new-members-2025-10-31.png
Test multiple page types:
- Don't just test homepage
- Verify collection pages (team, publications)
- Check individual item pages (member profiles)
Keep server logs:
- Check
BashOutputperiodically - Look for build warnings
- Note any deprecation notices
- Check
Clean up after testing:
- Always kill the server when done
- Review and delete old screenshots
- Check for any uncommitted test files
Integration with Development Workflow
Standard Development Cycle
- Make changes to content/code
- Run this skill to test locally
- Review screenshots and console output
- Fix any issues found
- Re-test until satisfied
- Commit changes
- Push to GitHub (auto-deploys via GitHub Actions)
Pre-Commit Hook Integration
Consider testing before commits:
# In .git/hooks/pre-commit
bundle exec jekyll build --quiet
Continuous Testing
For ongoing development:
- Leave server running with livereload
- Make changes and watch auto-refresh
- Use Playwright to capture specific states
- Take screenshots at milestones
See Also
- Jekyll Documentation
- Playwright MCP Documentation
- CLAUDE.md - Project-specific development guidelines
.github/workflows/- CI/CD configuration