1.3 KiB
clip-web-article
Lightweight article clipping Skill source.
This Skill uses OpenCLI as the browser/login/extraction substrate, then normalizes output to short-named Markdown plus sibling img_N.ext files under the knowledge-vault article reference folder. Callers can pass --output-root to write to another destination.
It intentionally avoids logs, metadata JSON, raw HTML archives, screenshots, cookie files, and platform subfolders in the final clipped output.
Discussion-like URLs are clipped at the target boundary: a Zhihu answer URL saves only that answer, and an X/Twitter status URL saves only that status, not replies or comments. English sources keep the original Markdown and require a sibling Chinese translation from the calling agent.
The script accepts one or more URLs in a single call. Browser-backed OpenCLI commands use --keep-tab false so the tab lease opened for clipping is released after each command; the script does not close the user's Chrome process.
Test
conda run -n skills-vault python -B -m unittest discover -s skills\clip-web-article\tests -v
conda run -n skills-vault python -B scripts\quick_validate.py skills\clip-web-article
Use conda run --no-capture-output for real URL clipping commands on Windows so OpenCLI/browser output is not re-encoded by conda.