Skip to content
Back to search

frad-dotclaude

MarketplaceWorks with Claude CodeGitHub

Frad's Claude Code plugin marketplace featuring specialized agents and workflow automation

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

Its scripts were only partly scanned.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/fradser/dotclaude with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/fradser/dotclaude'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/fradser--dotclaude/badge.svg)](/listings/fradser--dotclaude)

HTML

<a href="/listings/fradser--dotclaude"><img src="/api/listings/fradser--dotclaude/badge.svg" alt="findsafeskills safety rating" /></a>

Install

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 321 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. {
  2. "$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
  3. "name": "frad-dotclaude",
  4. "version": "1.19.0",
  5. "description": "Frad's Claude Code plugin marketplace featuring specialized agents and workflow automation",
  6. "owner": {
  7. "name": "Frad LEE",
  8. "email": "fradser@gmail.com"
  9. },
  10. "plugins": [
  11. {
  12. "name": "git",
  13. "displayName": "Git",
  14. "version": "0.6.2",
  15. "description": "Conventional Git automation, advanced repository management, and GitFlow workflow automation for feature, hotfix, and release branches with post-finish cleanup",
  16. "author": {
  17. "name": "Frad LEE",
  18. "email": "fradser@gmail.com"
  19. },
  20. "source": "./git",
  21. "category": "development",
  22. "homepage": "https://github.com/FradSer/dotclaude/tree/main/git"
  23. },
  24. {
  25. "name": "git-agent",
  26. "displayName": "Git Agent",
  27. "version": "0.8.0",
  28. "description": "AI-first Git CLI automation \u2014 atomic AI commits, co-change relations, autonomous git health agent, pre-tool hook safety, and workspace initialization",
  29. "author": {
  30. "name": "Frad LEE",
  31. "email": "fradser@gmail.com"
  32. },
  33. "source": "./git-agent",
  34. "category": "development",
  35. "homepage": "https://github.com/FradSer/dotclaude/tree/main/git-agent"
  36. },
  37. {
  38. "name": "github",
  39. "displayName": "GitHub",
  40. "version": "0.7.5",
  41. "description": "GitHub project operations with quality gates",
  42. "author": {
  43. "name": "Frad LEE",
  44. "email": "fradser@gmail.com"
  45. },
  46. "source": "./github",
  47. "category": "productivity",
  48. "homepage": "https://github.com/FradSer/dotclaude/tree/main/github"
  49. },
  50. {
  51. "name": "swiftui",
  52. "displayName": "SwiftUI",
  53. "version": "0.2.3",
  54. "description": "SwiftUI code review with modern API best practices",
  55. "author": {
  56. "name": "Frad LEE",
  57. "email": "fradser@gmail.com"
  58. },
  59. "source": "./swiftui",
  60. "category": "development",
  61. "homepage": "https://github.com/FradSer/dotclaude/tree/main/swiftui"
  62. },
  63. {
  64. "name": "office",
  65. "displayName": "Office",
  66. "version": "0.7.4",
  67. "description": "Office productivity skills for patent applications, PRD generation, video generation, Remotion programmatic video authoring, and AI writing trope detection",
  68. "author": {
  69. "name": "Frad LEE",
  70. "email": "fradser@gmail.com"
  71. },
  72. "source": "./office",
  73. "category": "productivity",
  74. "strict": false,
  75. "homepage": "https://github.com/FradSer/dotclaude/tree/main/office"
  76. },
  77. {
  78. "name": "generate-image",
  79. "displayName": "Generate Image",
  80. "version": "0.1.0",
  81. "description": "Generate or edit images via two backends: Google Gemini (gemini-3-pro-image) or any OpenAI-compatible endpoint (gpt-image-2, dall-e-3)",
  82. "author": {
  83. "name": "Frad LEE",
  84. "email": "fradser@gmail.com"
  85. },
  86. "source": "./generate-image",
  87. "category": "productivity",
  88. "homepage": "https://github.com/FradSer/dotclaude/tree/main/generate-image"
  89. },
  90. {
  91. "name": "lark",
  92. "displayName": "Lark",
  93. "version": "0.1.2",
  94. "description": "Feishu/Lark CLI skills, mirrored from larksuite/cli \u2014 docs, sheets, IM, calendar, approval, drive, wiki, contacts, and more",
  95. "author": {
  96. "name": "Frad LEE",
  97. "email": "fradser@gmail.com"
  98. },
  99. "source": "./lark",
  100. "category": "productivity",
  101. "strict": false,
  102. "homepage": "https://github.com/FradSer/dotclaude/tree/main/lark"
  103. },
  104. {
  105. "name": "marketing",
  106. "displayName": "Marketing",
  107. "version": "0.2.2",
  108. "description": "Marketing skills for AI agents, mirrored from coreyhaines31/marketingskills \u2014 CRO, copywriting, SEO, paid ads, ad creative, analytics, and growth",
  109. "author": {
  110. "name": "Frad LEE",
  111. "email": "fradser@gmail.com"
  112. },
  113. "source": "./marketing",
  114. "category": "productivity",
  115. "strict": false,
  116. "homepage": "https://github.com/FradSer/dotclaude/tree/main/marketing"
  117. },
  118. {
  119. "name": "hyperframes",
  120. "displayName": "Hyperframes",
  121. "version": "0.1.2",
  122. "description": "HyperFrames HTML-based video authoring skills, mirrored from heygen-com/hyperframes \u2014 keyframes, animation, captions, motion graphics, and remotion-to-hyperframes conversion",
  123. "author": {
  124. "name": "Frad LEE",
  125. "email": "fradser@gmail.com"
  126. },
  127. "source": "./hyperframes",
  128. "category": "productivity",
  129. "strict": false,
  130. "homepage": "https://github.com/FradSer/dotclaude/tree/main/hyperframes"
  131. },
  132. {
  133. "name": "refactor",
  134. "displayName": "Refactor",
  135. "version": "1.5.7",
  136. "description": "Agent and skills for code simplification and refactoring to improve code quality while preserving functionality",
  137. "author": {
  138. "name": "Frad LEE",
  139. "email": "fradser@gmail.com"
  140. },
  141. "source": "./refactor",
  142. "category": "development",
  143. "homepage": "https://github.com/FradSer/dotclaude/tree/main/refactor"
  144. },
  145. {
  146. "name": "mattpocock",
  147. "displayName": "Mattpocock",
  148. "version": "0.2.0",
  149. "description": "BDD-first engineering skills forked from mattpocock/skills (synced 2026-11-04, upstream v1.3.2 + 3 commits)",
  150. "author": {
  151. "name": "Frad LEE",
  152. "email": "fradser@gmail.com"
  153. },
  154. "source": "./mattpocock",
  155. "category": "productivity",
  156. "homepage": "https://github.com/FradSer/dotclaude/tree/main/mattpocock",
  157. "keywords": [
  158. "bdd",
  159. "tdd",
  160. "code-review",
  161. "engineering"
  162. ]
  163. },
  164. {
  165. "name": "superpowers",
  166. "displayName": "Superpowers",
  167. "version": "3.8.2",
  168. "description": "Advanced development workflow orchestration with BDD support and self-improving skills",
  169. "author": {
  170. "name": "Frad LEE",
  171. "email": "fradser@gmail.com"
  172. },
  173. "source": "./superpowers",
  174. "category": "productivity",
  175. "homepage": "https://github.com/FradSer/dotclaude/tree/main/superpowers"
  176. },
  177. {
  178. "name": "plugin-optimizer",
  179. "displayName": "Plugin Optimizer",
  180. "version": "0.13.3",
  181. "description": "Validates and optimizes Claude Code plugins against official best practices and file patterns",
  182. "author": {
  183. "name": "Frad LEE",
  184. "email": "fradser@gmail.com"
  185. },
  186. "source": "./plugin-optimizer",
  187. "category": "development",
  188. "homepage": "https://github.com/FradSer/dotclaude/tree/main/plugin-optimizer"
  189. },
  190. {
  191. "name": "acpx",
  192. "displayName": "ACPX",
  193. "version": "0.4.2",
  194. "description": "Knowledge base for acpx - a headless ACP CLI for agent-to-agent communication",
  195. "author": {
  196. "name": "Frad LEE",
  197. "email": "fradser@gmail.com"
  198. },
  199. "source": "./acpx",
  200. "category": "development",
  201. "homepage": "https://github.com/FradSer/dotclaude/tree/main/acpx"
  202. },
  203. {
  204. "name": "code-context",
  205. "displayName": "Code Context",
  206. "version": "0.3.2",
  207. "description": "Retrieve code context for any repo, library, or natural-language query via DeepWiki, Context7, Exa, git clone, and web search+fetch",
  208. "author": {
  209. "name": "Frad LEE",
  210. "email": "fradser@gmail.com"
  211. },
  212. "source": "./code-context",
  213. "category": "development",
  214. "homepage": "https://github.com/FradSer/dotclaude/tree/main/code-context"
  215. },
  216. {
  217. "name": "utils",
  218. "displayName": "Utils",
  219. "version": "0.2.3",
  220. "description": "General-purpose utility skills for documentation, writing, and project maintenance",
  221. "author": {
  222. "name": "Frad LEE",
  223. "email": "fradser@gmail.com"
  224. },
  225. "source": "./utils",
  226. "category": "productivity",
  227. "homepage": "https://github.com/FradSer/dotclaude/tree/main/utils"
  228. },
  229. {
  230. "name": "autoresearch",
  231. "displayName": "Autoresearch",
  232. "version": "0.9.2",
  233. "description": "Autonomous research loop inspired by karpathy/autoresearch \u2014 give it a plain-language goal; it infers a recommended contract, then grills each decision with you (goal measurability, artifact, evaluator, bounds) before iterating: cheap sequential rounds that escalate to a parallel GAN tournament when they plateau",
  234. "author": {
  235. "name": "Frad LEE",
  236. "email": "fradser@gmail.com"
  237. },
  238. "source": "./autoresearch",
  239. "category": "development",
  240. "homepage": "https://github.com/FradSer/dotclaude/tree/main/autoresearch"
  241. },
  242. {
  243. "name": "antigravity",
  244. "displayName": "Antigravity",
  245. "version": "0.6.0",
  246. "description": "Delegate tasks and deep research to Google Gemini Managed Agents (Antigravity) running in a remote sandbox, then read the results back",
  247. "author": {
  248. "name": "Frad LEE",
  249. "email": "fradser@gmail.com"
  250. },
  251. "source": "./antigravity",
  252. "category": "development",
  253. "homepage": "https://github.com/FradSer/dotclaude/tree/main/antigravity"
  254. },
  255. {
  256. "name": "storm",
  257. "displayName": "STORM",
  258. "version": "0.1.0",
  259. "description": "Wikipedia-style long-form article generation via multi-perspective question asking and retrieval \u2014 a Claude-native port of Stanford STORM's two-stage research-to-article pipeline",
  260. "author": {
  261. "name": "Frad LEE",
  262. "email": "fradser@gmail.com"
  263. },
  264. "source": "./storm",
  265. "category": "productivity",
  266. "homepage": "https://github.com/FradSer/dotclaude/tree/main/storm"
  267. },
  268. {
  269. "name": "hardware",
  270. "displayName": "Hardware",
  271. "version": "0.2.2",
  272. "description": "Hardware and EDA toolkit. Drives the KiCad CLI for schematic/PCB export and checks, and OpenSCAD for parametric 3D/2D part design and STL/DXF/PNG output.",
  273. "author": {
  274. "name": "Frad LEE",
  275. "email": "fradser@gmail.com"
  276. },
  277. "source": "./hardware",
  278. "category": "development",
  279. "homepage": "https://github.com/FradSer/dotclaude/tree/main/hardware"
  280. },
  281. {
  282. "name": "memory",
  283. "displayName": "Memory",
  284. "version": "0.1.5",
  285. "description": "Active memory writing during conversation, plus manual /memory:consolidate with theme clustering, ground-truth prune, adversarial pass, and machine validator \u2014 no auto-consolidation",
  286. "author": {
  287. "name": "Frad LEE",
  288. "email": "fradser@gmail.com"
  289. },
  290. "source": "./memory",
  291. "category": "development",
  292. "homepage": "https://github.com/FradSer/dotclaude/tree/main/memory"
  293. },
  294. {
  295. "name": "pi",
  296. "displayName": "Pi",
  297. "version": "0.2.2",
  298. "description": "Bridges to pi (dev/pi), a minimal terminal coding harness. Delegates coding tasks to the pi CLI for execution with full file and git context.",
  299. "author": {
  300. "name": "Frad LEE",
  301. "email": "fradser@gmail.com"
  302. },
  303. "source": "./pi",
  304. "category": "development",
  305. "homepage": "https://github.com/FradSer/dotclaude/tree/main/pi"
  306. },
  307. {
  308. "name": "interfaces",
  309. "displayName": "Interfaces",
  310. "version": "1.0.1",
  311. "description": "Agent skills for building great product interfaces, from typography and color to accessibility and UX writing",
  312. "author": {
  313. "name": "Jakub Krehel",
  314. "email": "jakub@kbo.sk"
  315. },
  316. "source": "./interfaces",
  317. "category": "development",
  318. "homepage": "https://github.com/FradSer/dotclaude/tree/main/interfaces"
  319. }
  320. ]
  321. }
README.md · README · 276 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Frad's Claude Code Plugins ![](https://img.shields.io/badge/plugins-23-blue)
  2. [![MIT License](https://img.shields.io/badge/license-MIT-green)](LICENSE)
  3. [![Claude Code](https://img.shields.io/badge/Claude%20Code-v0.6+-purple)](https://claude.ai/code)
  4. **English** | [简体中文](README.zh-CN.md)
  5. A curated collection of 23 plugins for Claude Code, providing specialized agents, skills, and automation tools for development and productivity workflows.
  6. ## Available Plugins
  7. ### [git](git/)
  8. Conventional Git automation for commits and repository management with AI code quality checks, plus GitFlow workflow automation for feature, hotfix, and release branches with semantic versioning and post-finish cleanup.
  9. **Installation:**
  10. ```bash
  11. claude plugin install git@frad-dotclaude
  12. ```
  13. ---
  14. ### [github](github/)
  15. GitHub project operations with quality gates, TDD workflows, comprehensive validation, and persistent PR review monitoring (/github:review-pr watches CI and triages reviewer comments).
  16. **Installation:**
  17. ```bash
  18. claude plugin install github@frad-dotclaude
  19. ```
  20. ---
  21. ### [git-agent](git-agent/)
  22. AI-first Git CLI automation backed by `git-agent` CLI. `@git-agent` runs a full health scan — checks gitignore completeness, commit scope freshness, secret leaks via trufflehog, and co-change index health. Also includes slash commands for atomic commits (`/git-agent:commit`), co-change queries (`/git-agent:related`), and workspace initialization (`/git-agent:init`).
  23. **Installation:**
  24. ```bash
  25. claude plugin install git-agent@frad-dotclaude
  26. ```
  27. ---
  28. ### [mattpocock](mattpocock/)
  29. BDD-first engineering skills forked from mattpocock/skills v1.3.2, with a self-improving checklist subsystem and an upstream-sync checker.
  30. **Installation:**
  31. ```bash
  32. claude plugin install mattpocock@frad-dotclaude
  33. ```
  34. ---
  35. ### [superpowers](superpowers/)
  36. Advanced development workflow orchestration with BDD support and self-improving skills.
  37. **Installation:**
  38. ```bash
  39. claude plugin install superpowers@frad-dotclaude
  40. ```
  41. ---
  42. ### [refactor](refactor/)
  43. Code simplification and refactoring with language-specific patterns and cross-file optimization.
  44. **Installation:**
  45. ```bash
  46. claude plugin install refactor@frad-dotclaude
  47. ```
  48. ---
  49. ### [swiftui](swiftui/)
  50. SwiftUI Clean Architecture reviewer for iOS/macOS development with best practices enforcement.
  51. **Installation:**
  52. ```bash
  53. claude plugin install swiftui@frad-dotclaude
  54. ```
  55. ---
  56. ### [office](office/)
  57. Patent application generation, Product Requirements Documents, video generation, Remotion programmatic video authoring, and AI writing trope detection.
  58. **Installation:**
  59. ```bash
  60. claude plugin install office@frad-dotclaude
  61. ```
  62. ---
  63. ### [generate-image](generate-image/)
  64. Generate or edit images via two backends: Google Gemini (`gemini-3-pro-image`) or any OpenAI-compatible endpoint (`gpt-image-2`, `dall-e-3`).
  65. **Installation:**
  66. ```bash
  67. claude plugin install generate-image@frad-dotclaude
  68. ```
  69. ---
  70. ### [lark](lark/)
  71. Feishu/Lark CLI skills, mirrored from larksuite/cli — docs, sheets, IM, calendar, approval, drive, wiki, contacts, and more.
  72. **Installation:**
  73. ```bash
  74. claude plugin install lark@frad-dotclaude
  75. ```
  76. ---
  77. ### [marketing](marketing/)
  78. Marketing skills for AI agents, mirrored from coreyhaines31/marketingskills — CRO, copywriting, SEO, paid ads, ad creative, analytics, and growth.
  79. **Installation:**
  80. ```bash
  81. claude plugin install marketing@frad-dotclaude
  82. ```
  83. ---
  84. ### [hyperframes](hyperframes/)
  85. HyperFrames HTML-based video authoring skills, mirrored from heygen-com/hyperframes — keyframes, animation, captions, motion graphics, and remotion-to-hyperframes conversion.
  86. **Installation:**
  87. ```bash
  88. claude plugin install hyperframes@frad-dotclaude
  89. ```
  90. ---
  91. ### [plugin-optimizer](plugin-optimizer/)
  92. Validate and optimize Claude Code plugins against official best practices with agent-based fixes.
  93. **Installation:**
  94. ```bash
  95. claude plugin install plugin-optimizer@frad-dotclaude
  96. ```
  97. ---
  98. ### [autoresearch](autoresearch/)
  99. Autonomous research loop inspired by karpathy/autoresearch — give it a plain-language goal; it infers a recommended contract (artifact, evaluator, bounds), then grills each decision with you one at a time before iterating: cheap sequential rounds that escalate to a parallel GAN tournament when they plateau. Works on any objective, not just ML training.
  100. **Installation:**
  101. ```bash
  102. claude plugin install autoresearch@frad-dotclaude
  103. ```
  104. ---
  105. ### [antigravity](antigravity/)
  106. Delegate tasks and deep research to Google Gemini Managed Agents (Antigravity) running in a remote sandbox with code execution, Google Search, and URL reading, then read the results back. Runs asynchronously and polls for completion via the Monitor tool. Requires `GEMINI_API_KEY` and `uv`.
  107. **Installation:**
  108. ```bash
  109. claude plugin install antigravity@frad-dotclaude
  110. ```
  111. ---
  112. ### [storm](storm/)
  113. Wikipedia-style long-form article generation via multi-perspective question asking and retrieval — a Claude-native port of Stanford STORM's two-stage research-to-article pipeline. Given a topic, it discovers research personas, runs simulated Q&A grounded in web search, then writes a cited article through outline → per-section → polish phases. Each phase is independently runnable and resumable.
  114. **Installation:**
  115. ```bash
  116. claude plugin install storm@frad-dotclaude
  117. ```
  118. ---
  119. ### [hardware](hardware/)
  120. Hardware and EDA toolkit. `use-kicad-cli` drives KiCad 9.0's `kicad-cli` for schematic/PCB export, fabrication outputs (gerbers, drill, pick-and-place, BOM), 3D models, and ERC/DRC checks. `use-openscad` writes OpenSCAD code and drives the `openscad` CLI for parametric 3D/2D part design and STL/DXF/PNG output.
  121. **Installation:**
  122. ```bash
  123. claude plugin install hardware@frad-dotclaude
  124. ```
  125. ---
  126. ### [acpx](acpx/)
  127. Knowledge base for acpx - a headless ACP CLI for agent-to-agent communication.
  128. **Installation:**
  129. ```bash
  130. claude plugin install acpx@frad-dotclaude
  131. ```
  132. ---
  133. ### [code-context](code-context/)
  134. Five methods to retrieve code context: DeepWiki, Context7, Exa, git clone, and web search.
  135. **Installation:**
  136. ```bash
  137. claude plugin install code-context@frad-dotclaude
  138. ```
  139. ---
  140. ### [utils](utils/)
  141. General-purpose utility skills for documentation, writing, and project maintenance.
  142. **Installation:**
  143. ```bash
  144. claude plugin install utils@frad-dotclaude
  145. ```
  146. ---
  147. ### [memory](memory/)
  148. Active memory writing during conversation, plus manual `/memory:consolidate` — no auto-consolidation. Keeps harness memory (`~/.claude/projects/<escaped-cwd>/memory`) and repo-local `.memory/` idempotent. Consolidate is fail-closed: theme clustering, practical-expiry prune, ground-truth verify, adversarial second pass, and a machine validator (`validate-consolidate.py`) for cluster coverage, report path rows, and privacy scrub.
  149. **Installation:**
  150. ```bash
  151. claude plugin install memory@frad-dotclaude
  152. ```
  153. ---
  154. ### [pi](pi/)
  155. Bridges to pi (dev/pi), a minimal terminal coding harness. `/pi:delegate` sends coding tasks with file and git context for execution; `/pi:review` runs read-only code reviews via pi; `/pi:setup` configures provider, model, and base URL. Supports three-tier persistent settings and custom base URLs via `~/.pi/agent/models.json`.
  156. **Installation:**
  157. ```bash
  158. claude plugin install pi@frad-dotclaude
  159. ```
  160. ---
  161. ### [interfaces](interfaces/)
  162. Agent skills for building great product interfaces, from typography and color to accessibility and UX writing. One skill, better-interface (orchestrator), with six domain reference packs: accessibility, layout, writing, typography, colors, and ui.
  163. **Installation:**
  164. ```bash
  165. claude plugin install interfaces@frad-dotclaude
  166. ```
  167. ---
  168. ## Adding a New Plugin
  169. 1. Create a plugin directory under `plugin-name/`.
  170. 2. Add `.claude-plugin/plugin.json` with required metadata.
  171. 3. Add the plugin entry to `.claude-plugin/marketplace.json`.
  172. 4. Run `/utils:update-readme` to sync both README files.
  173. ## License
  174. [MIT](LICENSE)
hyperframes/skills/media-use/scripts/lib/freeze.test.mjs · Bundled script · 46 lines · 1 finding marked
  1. import { strict as assert } from "node:assert";
  2. import { test } from "node:test";
  3. import { isDirectMediaUrl } from "./freeze.mjs";
  4. test("accepts direct public media URLs", () => {
  5. assert.equal(isDirectMediaUrl("https://cdn.example.com/clip.mp4"), true);
  6. assert.equal(isDirectMediaUrl("https://example.com/a/b/track.mp3"), true);
  7. assert.equal(isDirectMediaUrl("http://example.com/logo.svg"), true);
  8. });
  9. test("rejects platform pages (no yt-dlp)", () => {
  10. assert.equal(isDirectMediaUrl("https://www.youtube.com/watch?v=abc"), false);
  11. assert.equal(isDirectMediaUrl("https://youtu.be/abc"), false);
  12. assert.equal(isDirectMediaUrl("https://vimeo.com/12345"), false);
  13. assert.equal(isDirectMediaUrl("https://x.com/u/status/1"), false);
  14. });
  15. test("rejects non-direct / non-media URLs", () => {
  16. assert.equal(isDirectMediaUrl("https://example.com/page"), false, "no media extension");
  17. assert.equal(isDirectMediaUrl("ftp://example.com/a.mp4"), false, "non-http(s)");
  18. assert.equal(isDirectMediaUrl("not a url"), false);
  19. });
  20. test("rejects local / private hosts (SSRF guard, m11)", () => {
  21. for (const u of [
  22. "http://localhost/a.mp4",
  23. "http://127.0.0.1/a.mp4",
  24. "http://127.1.2.3/a.mp4",
  25. "http://0.0.0.0/a.mp4",
  26. "http://10.0.0.5/a.mp4",
  27. "http://192.168.1.1/a.mp4",
  28. "http://172.16.0.1/a.mp4",
  29. "http://172.31.255.255/a.mp4",
  30. "http://169.254.169.254/a.mp4", // cloud metadata endpoint
  31. "http://printer.local/a.mp4",
  32. "http://svc.internal/a.mp4",
  33. "http://[::1]/a.mp4",
  34. "http://[fe80::1]/a.mp4",
  35. "http://[fd00::1]/a.mp4",
  36. ]) {
  37. assert.equal(isDirectMediaUrl(u), false, `should block ${u}`);
  38. }
  39. // A public host that merely starts with similar digits is still allowed.
  40. assert.equal(isDirectMediaUrl("https://172.40.0.1/a.mp4"), true, "172.40 is public");
    • Dismissed after review: Talks to a raw IP address or throwaway host, where malware is often staged
    • Line 44 on GitHub
  41. assert.equal(isDirectMediaUrl("https://11.example.com/a.mp4"), true);
  42. });
hyperframes/skills/media-use/scripts/lib/probe.mjs · Bundled script · 39 lines · 1 finding marked
  1. import { execFileSync } from "node:child_process";
  2. import { extname } from "node:path";
  3. const IMAGE_EXT = new Set([".jpg", ".jpeg", ".png", ".gif", ".webp", ".svg", ".ico"]);
  4. export function probe(filePath) {
  5. const ext = extname(filePath).toLowerCase();
  6. if (ext === ".svg") return { width: null, height: null, duration: null, codec: "svg" };
  7. try {
  8. // execFileSync (no shell) so a hostile filename like `"; rm -rf ~; ".png`
    • Note: Quoted as data in code: Runs `rm -rf` against a root or home-directory path
    • Line 11 on GitHub
  9. // can't break out of the quoting — filePath is passed as a literal argv entry.
  10. const raw = execFileSync(
  11. "ffprobe",
  12. ["-v", "quiet", "-print_format", "json", "-show_format", "-show_streams", filePath],
  13. { encoding: "utf8", timeout: 5000 },
  14. );
  15. const info = JSON.parse(raw);
  16. const stream = info.streams?.[0];
  17. const format = info.format;
  18. const isImage = IMAGE_EXT.has(ext);
  19. const duration = isImage
  20. ? null
  21. : parseFloat(format?.duration) || parseFloat(stream?.duration) || null;
  22. const width = parseInt(stream?.width, 10) || null;
  23. const height = parseInt(stream?.height, 10) || null;
  24. const codec = stream?.codec_name || null;
  25. return {
  26. duration: duration != null ? Math.round(duration * 10) / 10 : null,
  27. width,
  28. height,
  29. codec,
  30. };
  31. } catch {
  32. return { duration: null, width: null, height: null, codec: null };
  33. }
  34. }

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.