360 Secure SkillHub
360 安全技能中心

GitHub Extract

给定 GitHub 仓库/tree/blob 链接,先转换为 raw 链接,再提取文件内容并打印到 stdout,或用 --save 保存到临时路径;仓库/tree 类型会尝试 README.md、SKILL.md、README.txt。仅支持公开仓库,需要 uv 与 wget。

guoqiao
guoqiao
热度 68.57
最近更新 2026-05-17 11:55:58
分类:效率依赖:代码执行 / 读写文件 / 第三方 API应用场景:自动化脚本 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add gh-extract
Metadata
name
gh-extract
description
Extract content from a GitHub url.
metadata
{"openclaw":{"always":false,"emoji":"🦞","homepage":"https://clawhub.ai/guoqiao/gh-extract","os":["darwin","linux","win32"],"requires":{"bins":["uv"]}}}
triggers
["/gh-extract <url>","Extract content form this github url","Download this github file"]

GitHub Extract

Extract content from a GitHub url.

Use this skill when the user types /gh-extract or asks to extract/download/summarize a GitHub url.

What it does

  • Accepts an GitHub url, could be repo/tree/blob.
  • Convert the url to github raw url.
  • Extract file content from the raw url or save to a temp path.

Requirements

  • uv
  • wget

Usage

# print file content to stdout
uv run --script ${baseDir}/gh_extract.py <url>

# save file to a temp path, with a proper filename
uv run --script ${baseDir}/gh_extract.py <url> --save

Notes

  • only works for public repo.
  • url can be repo/tree/blob
  • for repo/tree, will try to get README.md or SKILL.md or README.txt