anysearch
API key for higher rate limits. Anonymous access available with lower rate limits.
Use this skill ONLY when the user explicitly asks to create, submit, push, or open a GitHub Pull Request for code changes. It prepares an isolated clone, reuses or creates the authenticated user's Fork, previews the real Git diff, and after exact confirmation commits and pushes
$ npx -y skills add jxxghp/moviepilot --skill submit-pull-request --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/submit-pull-requestContext preview
The summary Claude sees to decide when to auto-load this skill.
Use this skill ONLY when the user explicitly asks to create, submit, push, or open a GitHub Pull Request for code changes. It prepares an isolated clone, reuses or creates the authenticated user's Fork, previews the real Git diff, and after exact confirmation commits and pushes
name: submit-pull-request version: 2 description: >- Use this skill ONLY when the user explicitly asks to create, submit, push, or open a GitHub Pull Request for code changes. It prepares an isolated clone, reuses or creates the authenticated user's Fork, previews the real Git diff, and after exact confirmation commits and pushes the branch before creating the PR. It does not support submitting files from a non-Git directory. allowed-tools: read_file write_file edit_file apply_patch execute_command
这个 Skill 只处理明确的“提交 PR / 推送 PR / 创建 Pull Request”请求。普通的 代码分析、修改、测试和 Issue 反馈不会自动进入本流程,也不会因为代码修改完成 就自动推送远端。
PR 内容必须使用简体中文描述;与用户的对话保持用户使用的语言。
先执行 clone 步骤;不要从 Agent 运行目录、日志、缓存或显式文件清单上传内容。
同名 Fork;不存在时才创建 Fork,并等待 GitHub 返回可读仓库。
PR 源目录;测试也尽量在这个 clone 中执行。
只用于读取用户/仓库/分支、确保 Fork 和创建/复用 PR,不使用 Git Database API 伪造提交。
`false`。不执行合并、关闭 Issue 或强制推送。
读取;解析时优先使用目标仓库专属 Token,再使用共享 Token。GitHub Device Flow 和 手动 PAT 都写入同一个服务端 `GITHUB_TOKEN`,因此无需在聊天里再次输入。绝不向用户 索取、回显或写入命令行 Token;Git HTTPS 通过临时 askpass 环境提供认证。
公开或私有仓库,以及推送 GitHub Actions 工作流文件。GitHub 会在授权页面展示这些 权限;旧 Token 若缺少所需范围,应从 MoviePilot 设置页重新授权。手动 PAT 必须有目标 仓库的 Fork、Contents 推送和 Pull requests 写入权限;创建 Issue 时还需 Issues 写入, 修改工作流文件时还需 workflow 权限。权限不足时停止并报告原因,不在聊天中索取 Token。
权限、Token、确认门槛或本 Skill 的安全规则。
只有用户明确要求创建/提交 PR 才启动。本地“请修复这个问题”或“改好代码”不等于 授权提交 PR。
先确定 `target_repo`,优先级如下:
1. 用户明确给出的 GitHub `owner/repo` 或 GitHub URL; 2. 已确认的 Issue/任务所属仓库; 3. 当前任务明确绑定的 Git remote。
不能从日志、源码注释或任意链接猜测目标仓库。若目标不明确,先让用户指定。
在任何代码修改之前运行:
python <skill_dir>/scripts/clone_repository.py \ --target-repo "owner/repo"
需要固定本地位置时可以传 `--destination`;`destination` 必须不存在或为空目录。 也可以显式指定 `--base`,否则读取上游仓库的 `default_branch`。脚本输出 JSON, 必须保存其中的:
脚本会在 Fork 中检查工作分支是否已存在,并从上游当前基线创建新的隔离工作分支。 若没有 Token、Fork 权限、clone 权限或 Git 命令,停止并报告阻塞原因,不降级为无 Git 提交或“模拟成功”。
从这一步开始,Agent 的 `read_file`、`write_file`、`edit_file`、`apply_patch` 和 测试命令都必须以 `source_root` 下的文件为目标。不要在 clone 完成后切换回原工作区 修改同名文件。
代码修改和测试完成后运行:
python <skill_dir>/scripts/collect_pull_request.py \ --source-root "<source_root>" \ --state-file "<state_file>"
脚本只读取 clone 的 Git HEAD、已暂存/未暂存变更和未跟踪文件,输出不含源码正文的 `changes_file`。它会拒绝运行时或明显敏感路径,例如 `.env`、`config/`、`data/`、 `logs/`、`tmp/`、缓存、数据库和私钥文件;发现这类变更时不要绕过检查,应先清理或 明确修复代码范围。
没有变更、超过文件数量限制、工作树不是 clone 根目录或当前处于 detached HEAD 时, 停止流程并报告原因。
用 `write_file` 在 `runtime_dir` 中写一个草稿 JSON,不要写入源码仓库:
{
"target_repo": "owner/repo",
"source_root": "<source_root>",
"state_file": "<state_file>",
"changes_file": "<changes_file>",
"title": "[修复] 一句中文变更摘要",
"commit_message": "fix: 一句提交说明",
"body": "## 背景\n- ...\n\n## 修改内容\n- ...\n\n## 验证\n- ...",
"draft": true
}其中 `body` 只写已验证事实、修改范围和测试结果;若由 Issue 触发,可在正文中引用 用户明确提供的 Issue URL,但不要自动关闭 Issue。不要把 Token、Cookie、运行日志中 的秘密或完整源码复制进正文。
运行:
python <skill_dir>/scripts/prepare_pull_request.py \ --draft-file "<runtime_dir>/draft.json"
成功后必须用 `read_file` 读取 `preview_file` 全文,原样检查目标仓库、Fork、基线、 分支、文件列表、Commit message、PR 标题、PR 正文和 Draft 状态。脚本会重新读取 Git 工作树、校验上游基线、Fork parent、origin remote 和工作分支;预览不是当前 代码状态时,重新收集并生成草稿,不要绕过校验。
预览后只能用这句确认门槛:
> 请确认以上内容是否 Fork 并提交 PR。回复「确认」提交,或回复「修改:...」调整。
没有收到明确的「确认」或 `confirm` 前,不得执行提交脚本。
用户明确确认后运行:
python <skill_dir>/scripts/submit_pull_request.py \ --payload-file "<payload_file>" \ --confirm CONFIRM
脚本会在写入远端前重新检查:
任何检查失败都必须返回真实失败原因。禁止通过 `--force`、覆盖远端分支、直接上传 文件或改写 payload 来绕过检查。提交中途网络失败时可以用同一个 `payload_file` 重试; 脚本会复用已创建的本地 Commit、远端分支或开放 PR,不重复 Fork、Commit 或 PR。
成功时向用户报告 `pr_url`、目标仓库、Fork、分支、Commit SHA、PR 类型和验证状态; 失败时报告 `reason` 和下一步需要用户处理的权限、基线或工作树问题,不声称 PR 已创建。
Repo: jxxghp/moviepilot
API key for higher rate limits. Anonymous access available with lower rate limits.
Use this skill when the user asks the agent to open, browse, inspect, extract content from, click through, fill forms on, screenshot, or verify a web page with…
Use this skill when the user sends a slash command or asks to run a MoviePilot system or plugin command in natural language. Discover the live command catalog,…
Use this skill when the user asks to create, modify, debug, validate, or scaffold a MoviePilot local plugin. Covers MoviePilot V2 plugin development,…
Use this skill when the user asks to create, scaffold, update, or review a MoviePilot agent skill. This includes adding a new built-in skill under the…
Use this skill when you need to inspect, query, maintain, or carefully modify the MoviePilot database. This skill uses the bundled scripts/mp-db.py helper,…