Skip to content

feat: add general-purpose pr-screenshots skill#1

Open
amikofalvy wants to merge 1 commit intomainfrom
feat/pr-screenshots
Open

feat: add general-purpose pr-screenshots skill#1
amikofalvy wants to merge 1 commit intomainfrom
feat/pr-screenshots

Conversation

@amikofalvy
Copy link

Summary

  • Ports the pr-screenshots skill from inkeep/agents PR #1918 and generalizes it for any web project
  • Includes three scripts: Playwright-based screenshot capture with sensitive data masking, Sharp-based image annotation (labels, borders, side-by-side stitching), and pre-upload validation that blocks uploads containing leaked secrets
  • Provides reusable PR body markdown templates

What changed from the original

Removed (Inkeep-specific):

  • references/affected-routes.md — component-to-route mapping specific to agents-manage-ui
  • Vercel/Inkeep preview URL patterns
  • App-specific CSS selectors (input[name="apiKeyToSet"], input[data-field="value"], [role="alertdialog"])
  • ik_ API key pattern from sensitive data validator
  • Cursor-specific browser-use subagent section

Generalized:

  • SKILL.md describes a framework-agnostic workflow
  • capture.ts default masks: input[type="password"] + text-pattern redaction for common secret formats
  • Dependencies documented as prerequisites (not added to a package.json)
  • Script paths use relative references

File structure

skills/pr-screenshots/
├── SKILL.md                         # Skill instructions (Agent Skills spec)
├── scripts/
│   ├── capture.ts                   # Playwright screenshot capture
│   ├── annotate.ts                  # Sharp-based image annotation
│   └── validate-sensitive.ts        # Pre-upload sensitive data check
└── references/
    └── pr-templates.md              # PR body markdown templates

Test plan

  • No Inkeep-specific strings in any file (except author: "inkeep" in metadata)
  • All scripts are syntactically valid TypeScript with only node:fs, node:path, playwright, and sharp imports
  • SKILL.md follows Agent Skills spec (YAML front matter with name, description, license, metadata)
  • README.md updated with new skill listing

🤖 Generated with Claude Code

Port the pr-screenshots skill from inkeep/agents PR #1918 and
generalize it for use with any web project.

Includes:
- SKILL.md with framework-agnostic capture/validate/annotate/upload workflow
- capture.ts: Playwright-based screenshot capture with sensitive data masking
- annotate.ts: Sharp-based image annotation (labels, borders, stitching)
- validate-sensitive.ts: pre-upload sensitive data scanner
- pr-templates.md: reusable PR body markdown templates

Removed Inkeep-specific content: component-to-route mappings,
Vercel preview URL patterns, app-specific CSS selectors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
nick-inkeep added a commit to inkeep/team-skills that referenced this pull request Feb 18, 2026
Ports the general-purpose pr-screenshots skill from inkeep/skills#1.
Captures, redacts sensitive data, annotates, and embeds screenshots
in GitHub PRs for UI changes.

Includes three scripts:
- capture.ts: Playwright-based screenshot capture with auto-masking
- annotate.ts: Sharp-based image labeling and side-by-side stitching
- validate-sensitive.ts: Pre-upload secret detection

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
nick-inkeep added a commit to inkeep/team-skills that referenced this pull request Feb 19, 2026
* feat: add pr-screenshots skill to shared skills

Ports the general-purpose pr-screenshots skill from inkeep/skills#1.
Captures, redacts sensitive data, annotates, and embeds screenshots
in GitHub PRs for UI changes.

Includes three scripts:
- capture.ts: Playwright-based screenshot capture with auto-masking
- annotate.ts: Sharp-based image labeling and side-by-side stitching
- validate-sensitive.ts: Pre-upload secret detection

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: add pr-screenshots output dir to gitignore

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: add pr-screenshots skill demo images

Screenshots generated by the skill itself during end-to-end QA testing:
- raw-capture.png: Raw capture output from capture.ts
- capture-demo.png: Labeled annotation from annotate.ts
- stitch-demo.png: Side-by-side stitch from annotate.ts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add playwright skill and integrate browser inspection across skills

Add playwright skill (plugins/eng/skills/playwright/) with 35 browser
automation helpers: console monitoring, network capture, a11y audits,
video recording, performance metrics, responsive screenshots, network
simulation, and state inspection.

Update qa-test skill with cross-skill references to playwright helpers
for structured browser inspection during QA flows.

Update pr-screenshots skill with --pre-script flag and interaction-first
workflow for capturing post-interaction page states.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: rename playwright skill to use-browser

Rename plugins/eng/skills/playwright/ → use-browser/ and update all
cross-skill references in qa-test and pr-screenshots.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: rename pr-screenshots skill to screengrabs

Rename plugins/shared/skills/pr-screenshots/ → screengrabs/ and update
all internal references (frontmatter, default output dirs, script
defaults, gitignore).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: integrate use-browser and screengrabs across skills

- implement: fix broken dev-browser → use-browser references (6 occurrences),
  add guidance for console/network/a11y helpers in browser verification
- pull-request: add /screengrabs invocation for automated PR screenshots
  when diff touches UI files
- review: add /use-browser for verifying UI fixes with screenshot evidence
- ship: add /screengrabs before PR body writing for UI changes,
  update capability-detection to name /use-browser skill
- docs: add /use-browser and /screengrabs for capturing UI screenshots
  when writing user-facing documentation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add debug skill — systematic debugging methodology for AI agents

5-phase workflow (Triage → Reproduce → Investigate → Fix → Harden) with
Iron Law enforcement (no fixes without root cause investigation), bug
category triage playbooks for 9 categories, MCP tool usage patterns,
hypothesis-test-refine cycles, agent metacognition (loop detection,
confidence calibration, strategy switching), and escalation heuristics.

Also fixes write-skill validator to handle YAML block scalars and filter
prose-like "word/word" patterns from deeply-nested-path warnings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add documentation screenshot pattern to use-browser skill

Add a "Capture Screenshots for Documentation" pattern with Playwright
settings optimized for docs images (1280x720, 2x DPR, PNG, element cropping).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: integrate /debug across skill ecosystem

Add contextual references to /debug in 5 skills at their natural
failure-handling decision points:

- qa-test: triage root-cause-obvious vs unclear before fixing bugs
- implement: add code defect diagnosis to stuck story handling
- ship: route to /debug in post-implementation review + appendix table
- inspect: add Debugging purpose to depth calibration table
- analyze: add defect diagnosis to skill composition routing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant