{"data":{"slug":"discovered-02b78bf2c850d6469d8cd87222b89b49d4a29827581a1259","title":"Screenshot GitHub (MedTracker)","summary":"Take screenshots of MedTracker pages and attach them directly to GitHub issue or PR comments using GitHub's native browser attachment flow.","url":"https:\/\/skillshunter.net\/skills\/discovered-02b78bf2c850d6469d8cd87222b89b49d4a29827581a1259","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/discovered-02b78bf2c850d6469d8cd87222b89b49d4a29827581a1259","markdown_url":"https:\/\/skillshunter.net\/skills\/discovered-02b78bf2c850d6469d8cd87222b89b49d4a29827581a1259.md","download_url":"https:\/\/skillshunter.net\/skills\/discovered-02b78bf2c850d6469d8cd87222b89b49d4a29827581a1259\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Ensure the `mcp-playwright` dev server is running before starting. Use fixture users like `nurse.smith@example.com` for general screenshots and `john.doe@example.com` for admin pages. Avoid using `damacus@example.com` due to MFA requirements. Use clear filenames such as `medication-finder-desktop.png` for screenshots.","instructions":"---\nname: screenshot-github\ndescription: Take screenshots of MedTracker pages and attach them directly to GitHub issue or PR comments using GitHub's native browser attachment flow. Use when asked to \"screenshot for issue\", \"attach screenshots to PR\", \"add visual evidence to GitHub\", \"post UI screenshots on a PR\", or any task involving MedTracker screenshots in GitHub comments.\n---\n\n# Screenshot GitHub\n\nCapture MedTracker screenshots locally, then attach them directly in the GitHub comment composer with browser automation. Do not use GitHub Releases for screenshot hosting.\n\n## Principles\n\n- **Use native GitHub comment attachments**\n- **Do not use `gh release upload`**\n- **Do not commit screenshots into the repo unless the user explicitly asks**\n- **Use `gh` only for discovery, not for image hosting**\n\n## Core Workflow\n\n### 1. Ensure Dev Server Is Running\n\n```fish\ntask dev:up\nset PORT (task dev:port)\n```\n\nWait for the server to be healthy before proceeding.\n\n### 2. Identify the Target Page or Pages\n\nIf the request is tied to a PR, inspect the changed files first:\n\n```fish\ngh pr view {NUMBER} --json files --jq '.files[].path'\n```\n\nMap changed files to routes using [medtracker-pages.md](references\/medtracker-pages.md). Prioritize pages that visibly changed.\n\n### 3. Log In to MedTracker\n\nUse `mcp-playwright` tools to authenticate against the local app.\n\n```text\nbrowser_navigate \u2192 http:\/\/localhost:{PORT}\/login\nbrowser_snapshot \u2192 identify form field refs\nbrowser_fill_form \u2192 choose the correct fixture user\nbrowser_click \u2192 sign-in button ref\n```\n\nUse fixture users from [medtracker-pages.md](references\/medtracker-pages.md).\n\n- **Use `nurse.smith@example.com`** for general non-admin screenshots\n- **Use `john.doe@example.com`** for `\/medication-finder` and admin pages\n- **Avoid `damacus@example.com`** because it requires MFA\n\nIf redirected to `\/otp-auth`, stop using that account and switch to a non-MFA fixture user.\n\n### 4. Take Screenshots\n\nNavigate to each target page and capture:\n\n**Desktop (1440x900):**\n\n```text\nbrowser_resize \u2192 1440, 900\nbrowser_navigate \u2192 http:\/\/localhost:{PORT}\/{path}\nbrowser_take_screenshot \u2192 filename: tmp\/screenshots\/{page}-desktop.png\n```\n\n**Full page:**\n\n```text\nbrowser_run_code \u2192 async page => {\n  await page.screenshot({\n    path: 'tmp\/screenshots\/{page}-desktop-full.png',\n    fullPage: true, scale: 'css', type: 'png'\n  });\n}\n```\n\n**Mobile (390x844):**\n\n```text\nbrowser_resize \u2192 390, 844\nbrowser_take_screenshot \u2192 filename: tmp\/screenshots\/{page}-mobile.png\n```\n\nUse clear filenames such as:\n\n- `medication-finder-desktop.png`\n- `medication-finder-mobile.png`\n- `admin-users-desktop-full.png`\n\n### 5. Open the GitHub PR or Issue in the Browser\n\nNavigate to the target conversation directly:\n\n```text\nbrowser_navigate \u2192 https:\/\/github.com\/{owner}\/{repo}\/pull\/{number}\n```\n\nOr for an issue:\n\n```text\nbrowser_navigate \u2192 https:\/\/github.com\/{owner}\/{repo}\/issues\/{number}\n```\n\nIf GitHub shows a sign-in page, stop and ask the user to authenticate in the Playwright browser context. Do not attempt to improvise a non-native upload path.\n\n### 6. Attach Screenshots in the GitHub Comment Composer\n\nIn the PR or issue conversation:\n\n```text\nbrowser_snapshot \u2192 locate the comment textarea and any \u201cAttach files\u201d control\nbrowser_click \u2192 comment textarea or \u201cWrite\u201d tab if needed\nbrowser_click \u2192 \u201cAttach files\u201d button if present\nbrowser_file_upload \u2192 absolute screenshot paths\nbrowser_wait_for \u2192 wait until markdown attachment links appear in the textarea\n```\n\nGitHub normally inserts attachment markdown automatically after upload. It will look like standard Markdown image references pointing at GitHub-hosted attachment URLs.\n\nIf the file chooser does not appear through the visible button, use Playwright to target the file input directly and upload the files there.\n\n### 7. Structure the Comment and Submit\n\nOnce GitHub has inserted the uploaded-image Markdown, wrap it in a useful comment:\n\n```text\n## Screenshots\n\n### Medication Finder\n\n| Desktop         | Mobile         |\n|-----------------|----------------|\n| ![desktop](...) | ![mobile](...) |\n\nKey changes:\n- Barcode scanner entry point\n- Manual barcode fallback\n- Mobile layout\n```\n\nThen submit the comment with the GitHub UI.\n\n### 8. Verify the Rendered Comment\n\nConfirm that:\n\n- **The uploaded images render inline**\n- **The comment is attached to the correct PR or issue**\n- **The screenshots match the changed UI**\n\n## Resources\n\n### references\/medtracker-pages.md\n\nMedTracker-specific reference: fixture users, route map, viewport sizes, screenshot naming conventions, and account selection notes.\n\n## Dependencies\n\n- `mcp-playwright` MCP server (for browser automation)\n- `task` (Taskfile runner for dev server)\n- `gh` CLI (optional, for discovering PR files and metadata)\n","use_cases":["Screenshot for issue","Attach screenshots to PR","Add visual evidence to GitHub","Post UI screenshots on a PR"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/damacus\/skills\/blob\/5706f70c0058822adf29da9bd7620c7ea780b9d6\/skills\/workflow\/screenshot-github\/SKILL.md","source_commit":"5706f70c0058822adf29da9bd7620c7ea780b9d6","license":null,"version":null,"listing_approved_at":"2026-12-02","created_at":"2026-11-30T08:55:11.000000Z","updated_at":"2026-12-02T09:15:01.000000Z","seo_title":"Screenshot GitHub (MedTracker) - Attach MedTracker Screenshots to PRs","seo_description":"Capture MedTracker screenshots locally and attach them directly to GitHub issue or PR comments using browser automation and native GitHub attachment flow.","seo_keywords":["screenshot github","medtracker screenshot","github comment attachment","github pr screenshot","github issue screenshot"]}}