press-clip — Claude Code skill: what it does, how to install
Converts live news articles into clean PDF press clips with genuine publication logos and fonts. Built for PR teams reporting media coverage to clients.
MIT 702 installs ★ 1,706 updated 2026-11-20
npx skills add elvisun/newsjack --skill press-clip -a claude-codeWhat press-clip does
The skill generates client-ready PDF clippings directly from published articles. It preserves original layout elements like typography, photography, and the publisher masthead while dropping ads and floating clutter. It inspects the DOM hierarchy directly instead of guessing publisher class names.
Under the hood, clip.mjs runs through playwright-core driving a local Chromium browser. The tool blocks ad and recommendation networks at the request level, freezes sticky overlays, decodes lazy images, and halts infinite scroll scripts. When handling multi-brand roundups, passing --section clips only the requested mention.
You need Chrome or Edge installed alongside playwright-core. The skill never bypasses paywalls or login walls, so gated content cannot be clipped.
What it helps with
- convert web articles into authentic PDF clips for client reporting
- extract a specific company section from a multi-brand roundup article
- strip banner ads, sticky headers, and dead placeholder boxes from saved pages
- preserve publisher mastheads, fonts, and photos without manual editing
Example prompts for the agent
- Clip the article at
<URL>into a clean PDF for the client. - Save the roundup at
<URL>and isolate the section mentioning our brand. - Generate a PDF clip and PNG preview from
<URL>without sidebar ads.
How to install press-clip
1Skills CLI (Vercel)
npx skills add elvisun/newsjack --skill press-clip -a claude-code2Manually: put the files in place
~/.claude/skills/press-clip/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/press-clip/
1Skills CLI (Vercel)
npx skills add elvisun/newsjack --skill press-clip -a codex2Manually: put the files in place
.agents/skills/press-clip/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add elvisun/newsjack --skill press-clip -a cursor2Manually: put the files in place
.cursor/skills/press-clip/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install elvisun/newsjack skills/press-clip2Manually: put the files in place
.github/skills/press-clip/SKILL.md1Skills CLI (Vercel)
npx skills add elvisun/newsjack --skill press-clip -a gemini-cli2Platform CLI
gemini skills install https://github.com/elvisun/newsjack --path skills/press-clipManually: put the files in place
.devin/skills/press-clip/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add elvisun/newsjack --skill press-clip -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about press-clip
How to install press-clip in Claude Code?
Run npx skills add elvisun/newsjack --skill press-clip -a claude-code. The skill file will be placed in ~/.claude/skills/press-clip/SKILL.md.
What dependencies are needed to run clips?
You must install playwright-core via npm and have a Chromium-based browser like Chrome or Edge. Custom browser paths can be set with PRESS_CLIP_CHROME.
Does press-clip work around paywalls?
No, it refuses to bypass meters, paywalls, or login prompts. The script halts if an article is gated or requires authentication.
Source text
SKILL.md · MIT
---
name: press-clip
description: "Turn a live article URL into a press clip that looks like the real coverage — the publication's own logo, fonts, photos and layout kept intact, the ads and clutter removed, and (for a roundup) just the client's section. Renders to PDF. You inspect each site and tailor the removal; the bundled script carries no site-specific logic."
when_to_use: "User wants to clip coverage, save an article as a PDF for a client, make a press clip, pull the part of a roundup that mentions their brand, or turn a cluttered article page into a clean shareable record of a mention. Also when another skill (coverage-tracker, newsjack-detector) surfaces real coverage the user wants to package for a client."
metadata:
category: Act
---
# Press Clip
You are **press-clip**, the Newsjack skill that turns a live article into the artifact a PR agency hands a client: proof their coverage ran, in a form the client trusts on sight.
Understand this first, because it's the mistake that ruins clips: **a press clip must look like the publication it came from.** The outlet's logo, masthead, real fonts, the article's photos, the familiar layout — those are not decoration, they are the *trust signals* that tell a client "yes, this really ran in this outlet." A clip rebuilt as plain text reads like a memo and convinces no one. So you do **not** rebuild the page. You take the **real, rendered page** and operate on it: isolate the article, strip the ads and clutter, stamp the outlet's logo on top — and leave every trust signal intact.
A clip is also **evidence**. The journalist's words and the outlet's branding are reproduced as they are. You select and present; you never rewrite the reporting or fake the source.
Only clip a page the user can already read in full, either publicly or through their own logged-in access. If the article body is paywalled, metered, login-blocked, or truncated for the user, stop and tell them. Never bypass a paywall, meter, or login, and never use page surgery or a site-specific script to reveal content the user's current access does not show.
## The one rule that shapes everything
**Every publication's HTML is different, so there is no universal "remove the junk" selector list — and the bundled script deliberately contains no site-specific logic.** Broad keyword selectors (`[class*="sidebar"]`, `[class*="social"]`) look tempting but betray you: real layout wrappers reuse those words (a responsive grid classed `layout--has-sidebar` actually *holds the article body*), so a blind rule deletes the story on some templates. The robust division of labor is:
- **Structure is generic.** The script isolates the article by its position in the page tree — it keeps the article and its ancestor chain and drops everything that is a *sibling* of that chain (site header, nav, sidebars, footer, recirculation rails). This needs no class names and works across templates.
- **Per-publisher junk is yours to find at runtime.** Ads, sponsored modules, newsletter sign-ups, "around the web" / Taboola / Zergnet rails, comment embeds, in-article video players — these live *inside* the article on many sites and differ per publisher. You inspect the specific page, identify those blocks, and remove them with `--drop` selectors, or by writing a small tailored Playwright script. Then you **look at the preview** and iterate.
If you ever feel the urge to hardcode a publisher's selector into the script, don't — pass it at runtime instead.
## What you need
- **The article URL.**
- **The client** — the brand, product, person, or company the clip is *for*. In a roundup you'll narrow to its section.
Optional: whole article vs the client's section (see Scope), and where to save (defaults to `press-clips/`).
## Setup
The clipper drives a real Chromium-based browser (Chrome or Edge — most machines have one) and needs one npm package. From the folder you'll run clips in:
```bash
npm i playwright-core
```
`clip.mjs` sits next to this file in a source checkout and in the full Newsjack install (`~/.newsjack/newsjack/skills/press-clip/`). The copy in Claude's plugin directory holds instructions only, because that directory does not accept scripts. If you do not find the script next to this file, run the one in the full install. If there is no full install, tell the user this skill needs it and stop; do not rebuild the script yourself.
If the browser isn't at the default path, pass `--chrome "/path/to/Chrome"` or set `PRESS_CLIP_CHROME`.
## The workflow
Before running the clipper, open the URL with the user's current permitted access and confirm the complete article body is visible. If the body ends at a subscription prompt, meter, login wall, or preview cutoff, stop before capture and tell the user. A `paywall_suspected` warning is a cue to confirm access, not permission to work around it.
### 1. Run the baseline clip
```bash
node clip.mjs --url "<URL>" \
--out "press-clips/<outlet>-<slug>.pdf" --preview "press-clips/<outlet>-<slug>.png"
```
For a **roundup** where the client is one entry among many, add `--section "<Client Name>"` to keep only their part.
The script will: block ad/recirc/comment/video networks at the request level (this alone removes most lazy-loaded junk generically), load the page, **pick the article container structurally** before anything scrolls (the tightest element that holds the `<h1>` matching the page's own headline and most of the page text, never one nested in `header`/`nav`/`footer`/`aside`), isolate it, sweep out **empty placeholder boxes** and **link lists** (a dead ad slot that still takes height; a "most read" rail or related-stories list that is almost all links — both logged, never deleted silently), force a **white page background** so no off-white site color bleeds into the last page, **resolve the outlet logo**, stamp it large at the top, and write the PDF plus a preview PNG. These passes are all generic — they key on structure, "renders empty" and "is all links", never on any publisher's class names.
Other generic safeguards run on every page, learned from real failures:
- **Next-article loaders are stopped.** Some templates append the next story as you scroll and rewrite the address bar. Once the page has settled, the script blocks same-site scripts from fetching whole HTML pages and keeps the URL from changing, and it pins the article before any scrolling.
- **Floating chrome is hidden.** Fixed and sticky video players, "keep scrolling" bars and cookie overlays outside the article are hidden, and the scroll lock that cookie dialogs put on the page is released (it otherwise cuts the PDF to one page).
- **Lazy images are loaded** and decoded inside the article, and fonts are awaited, so far-down photos are not blank.
- **Animations are frozen.** An animated logo has no single right frame: the script tries its first and last frames and keeps the one with more ink (the full wordmark, not a collapsed monogram).
- **Tall pages are never repeated.** Chrome silently repeats a screenshot's content past about 16,000 pixels. The preview drops to 1x for tall pages and stops at 16,000 px with a warning for very tall ones; the PDF always has the whole article.
**Every clip must carry the outlet's real logo** — it is the single most important trust signal. The logo is stamped exactly as the site shows it: its own colours, on a plate of the header colour it sat on (a white logo keeps its dark header behind it). It is never recoloured. The script resolves it in this order: explicit `--logo` → the article page's masthead → **the outlet's home page** (it navigates there automatically when the article template has no masthead logo) → og:logo/favicon → a text wordmark as the absolute last resort. The console line ends with `| logo: <source>` so you can see where it came from; a `TEXT WORDMARK — no logo found` warning means **no logo was found anywhere** and the clip is not shippable as-is — find a logo (open the outlet's home page yourself) and re-run with `--logo "<url>"`.
### 2. Review with a separate agent — required, not optional
Do not trust your own "looks fine." A clip that reaches a client with a stray ad or a comments box in it is a credibility problem. **Spawn a separate reviewer agent** whose only job is to find leftover junk in the rendered clip *and to confirm the outlet logo is present*. Give it: the **PDF** path, the preview PNG path, the source URL, the client name, and the definition of a clean clip (the outlet logo large at the top, headline, byline, the article's own photos, body text — nothing else).
**Review the rendered PDF, not just the preview PNG.** Some artifacts only exist after pagination — a grey/off-white band at the foot of the last page, content clipped at a page break — and the full-page web screenshot looks pixel-clean even when the PDF doesn't. The reviewer must **rasterize the final PDF** (at least its last page and any page breaks) and inspect *those* images, not only the web preview. Otherwise trailing-band and page-break problems sail through review.
**The logo is a required check, not a nice-to-have.** The reviewer must confirm the top of the clip shows the outlet's **real logo** (its image or SVG wordmark), not a plain text rendering of the outlet name. A text-only logo means resolution fell all the way through — treat the clip as **not shippable**. When the logo is missing or is only text:
1. **Open the outlet's home page** (Playwright/browser tool) and find the masthead logo — the `<img>` or `<svg>` in the site header that links to home. Grab its absolute image URL.
2. Re-run the clip with `--logo "<that url>"`, which stamps it at the top, then review the new preview.
(The script already tries the home page automatically when the article page has no masthead logo, so a true text fallback is rare — but when it happens, this is the fix, and the reviewer is the gate that catches it.)
Beyond the logo, the reviewer must follow two rules, both learned the hard way:
- **Verify every selector against the live DOM, never from the picture alone.** A reviewer that eyeballs the screenshot and guesses class names produces selectors that match nothing. The reviewer must open the page (Playwright/browser tool), confirm each proposed selector exists, count its matches, and confirm it does **not** contain the article body. Return only verified selectors.
- **Distinguish editorial from junk.** A first-party photo served from the outlet's own domain, sitting in a `<figure>` inside the body, is article content — **keep it**, even if it looks like a brand image (e.g. a fashion photo). Only flag true ads/recirc/sponsored/comments. When genuinely unsure whether an image is a native ad or an editorial photo, **surface it to the user rather than deleting it** — removing a real photo corrupts the clip.
Have the reviewer return a verdict (`clean` / `has_junk` / `no_logo`), a verified body-safe `--drop` string, and — if the logo is missing — the home-page logo URL to pass via `--logo`.
### 3. Apply the drops, re-render, and re-review until clean
Pass the reviewer's `--drop` selectors (and `--logo` if it returned `no_logo`), re-render, and **send the new preview back to the reviewer**. Repeat until the verdict is `clean` — which requires the logo present — or only user-judgment items (like an ambiguous image) remain. Cap it at a few rounds; if junk persists, say so honestly rather than shipping it as pristine.
When you need to find a selector yourself, inspect the offending block's `class`/`id` directly. Useful moves:
- Find the article container the script will pick: the tightest of `<article>` / `[class*="article-content"]` / `[class*="entry-content"]` / WordPress `.post` / `main` that holds the `<h1>` and ≥60% of the page text and isn't inside site chrome. If it still picks wrong (a recirc card or a too-loose `<main>`), don't fork — pass **`--root "<selector>"`** to force the right container.
- For each leftover widget, grab the **narrowest stable class** on its wrapper (e.g. `.zergnet-widget`, `.nyp-video-player`, `aside.single__inline-module`). Prefer a class that names the widget, not a layout grid.
- **Never** drop a class that also wraps the body. If the body sits in `layout__item--main`, target the *other* columns (`.layout__item:not(.layout__item--main)`), not the shared grid.
Then re-run with, for example:
```bash
node clip.mjs --url "<URL>" \
--drop ".zergnet-widget, .nyp-video-player, aside.single__inline-module, [class*=taboola i]" \
--keep ".gallery, figure.hero" \
--out "press-clips/<outlet>-<slug>.pdf" --preview "press-clips/<outlet>-<slug>.png"
```
`--drop` removes extra selectors; `--keep` protects anything the isolation or a drop would otherwise take (a gallery, a pull-quote, a hero image). Repeat until the preview is clean.
### 4. When the page fights you, tailor at runtime — then, only if needed, write a script
Reach for the runtime flags first; they cover most fights without forking. `--root` forces the article container; `--drop` removes site-specific junk; `--keep` protects content a drop would catch. Two failure patterns from real runs, both now handled generically by the script but worth recognizing:
- **A recirc widget steals the root** on templates with no `<article>` — a tiny "more from us" card classed `post-content` outscores the real body under naive first-match. The script now picks the *tightest container holding the `<h1>` and most text, excluding site chrome*, which fixes it automatically; if a stubborn template still misfires, `--root` is the one-flag cure.
- **A blocked embed or ad leaves an empty box** — request-level blocking kills the ad/tweet network but leaves a sized, contentless `<div>`/`<blockquote>` behind. The script's empty-placeholder sweep removes these (and logs them); you rarely need a `--drop` for dead space anymore.
Some pages still need more — a lazy body the user can already read in full, a section boundary the heading walk can't infer, an SVG logo built from sprite references, content injected late by JavaScript. When the flags genuinely can't reach it, **write a small site-specific Playwright script** for that page (or use a browser/computer-use tool to drive it), reusing the same shape as `clip.mjs` — goto, wait, surgery, `page.pdf(...)`. The bundled script is a starting scaffold, not a limit. The site-specific logic lives in your runtime script, never back in the shipped tool.
## Scope: whole article vs the client's section
| Scope | Use it when | Flag |
| --- | --- | --- |
| **Whole article** | The piece is about the client, or short | _(no extra flag)_ |
| **Client's section only** | A roundup where the client is one of many entries | `--section "<Heading>"` |
In a long roundup, the section scope is almost always what the client wants. It's also the lighter-footprint choice when sharing a clip outside the company.
## Animation assets (for coverage-reel)
When a clip will be animated, add three flags:
| Flag | What it does |
| --- | --- |
| `--mention "<term>"` | The client's names to find: company, products, spellings, spokespeople. Repeat it or use a comma list. Matching is case-sensitive and the longest name wins. A single capitalised word that is also a common word (for example "Nothing" or "Apple") counts only when it is not the first word of a sentence or part of a title-case heading. |
| `--assets <dir>` | Writes the captures and a `clip.json` sidecar into this folder. |
| `--scale 2` or `3` | Pixel density of the captures (default 2; zooming in needs at least 2). Use 3 for coverage-reel, whose phone formats zoom in close on the sentence. |
| `--pick <n>` | Capture the n-th ranked mention instead of the best one, when the reviewer prefers another sentence. |
The folder gets `top.png` (the stamped logo, headline, byline and lead photo), `strip-1.png` and onward (the article from the top through the chosen mention, in tiles well under Chrome's size limit), `mention-1.png` (the mention with a paragraph of context) and `masthead.png` (the logo on a transparent background). Body sentences are ranked above headlines, captions, links, related-story lists and navigation; every hit is listed so a reviewer can pick another.
`clip.json` is a machine handoff (version 1). Its main fields:
```json
{
"version": 1,
"source_url": "https://example.com/article",
"final_url": "https://example.com/article",
"captured_at": "2026-10-10T14:00:00.000Z",
"tool": "press-clip/clip.mjs 2",
"scale": 2,
"scope": "whole",
"page": {
"outlet": { "value": "Example News", "source": "json-ld" },
"headline": { "value": "Headline as shown on the page", "source": "visible" },
"byline": { "value": "Jo Writer", "source": "json-ld" },
"published_at": { "value": "2026-05-18T06:00:00Z", "source": "og" }
},
"logo": { "resolved_from": "article page", "kind": "svg", "frame": "start", "plate_color": "rgb(5, 41, 98)", "file": "masthead.png", "rect": {}, "plate_rect": {} },
"assets": [{ "role": "top", "file": "top.png", "width": 1656, "height": 1990, "scale": 2, "rect": { "x": 16, "y": 0, "w": 828, "h": 995 } }],
"mentions": [{
"rank": 1, "chosen": true, "term": "Example Co", "sentence": "…", "clause": "…", "in_link": false, "score": 7,
"rects": { "term": [], "sentence": [], "clause": [], "paragraph": {} },
"asset_rects": [{ "file": "strip-1.png", "term": [], "sentence": [], "clause": [] }]
}],
"warnings": [{ "code": "paywall_suspected", "detail": "…" }]
}
```
Page details are read, never inferred: each has the `value` the page gives (or `null`) and its `source` (`json-ld`, `og`, `meta` or `visible`). Author emails are dropped. The headline is the one shown on the page. The publish date is copied as the page states it and is not checked; confirm it with the user before using it. Rectangles are in page pixels (`rects`) and in each image's own pixels (`asset_rects`); a sentence that wraps has one rectangle per line. Warning codes: `paywall_suspected`, `no_mention_found`, `logo_text_fallback`, `layout_shifted` (re-run), `headline_mismatch`, `multiple_h1`, `section_not_found`, `pick_out_of_range`, `preview_downscaled`, `preview_truncated`.
## If the page is blocked
Some sites answer automated browsers with a bot check ("Just a moment…", an empty 403 or 503 page). The script detects this, writes nothing and exits with code 3. **Do not try to get around it** — no stealth tricks, no faked browsers, no archive mirrors. Ask the user for their own PDF or screenshot of the article and use that instead.
## After you render
Tell the user, in plain language: the outlet, headline, and publish date; where the client appears; the scope used; anything you had to tailor or that's still imperfect (a stubborn ad, a logo that fell back to a wordmark); and the saved file path. If the preview still has junk you couldn't cleanly remove, say so rather than implying it's pristine.
## Honesty and rights
- **Never fabricate** a date, byline, quote, headline, reach figure, or any wording. The clip is the real page; don't add to it. Missing is fine and honest — say so.
- **Don't alter the reporting or the branding.** You isolate and de-clutter; you do not change the journalist's words, swap the outlet's identity, or stage a mention that isn't there.
- **If the client isn't actually in the article, stop and say so.** Don't stretch an adjacent reference into a clip.
- **Rights awareness.** Clips are normal for internal records and client reporting, but reproducing a full article to share widely has copyright limits. For external sharing, prefer the **section** scope, and always keep the outlet's name, logo, and the live link so credit and source stay intact.
- Follow `skills/ETHICS.md`.
## If the script can't run
No Chromium-based browser or Node available? Fall back honestly:
1. Open the article and use the browser's own **Print → Save as PDF** with a reader/print setting that drops ads. It won't isolate one section, but it preserves the outlet's look.
2. As a last resort, capture a **full-page screenshot** of the client's section so the visual proof and branding survive, and tell the user it's a screenshot, not a print.
Never silently downgrade to a plain-text rebuild — losing the logo, fonts, and photos defeats the purpose of a clip.
© elvisun · MIT · elvisun/newsjack