360 Secure SkillHub
360 安全技能中心

use-skill

从 GitHub blob、raw、tree 链接或 owner/repo@ref:path 简写解析远程 Skill,固定提交版本、列出文件并读取入口及同级文件后按步骤执行;仅使用本次运行的临时目录,完成后删除并报告各链接结果。拒绝安装或永久保存。

分类:自动化
prathamdby
热度 0.00
最近更新 2026-12-02 12:22:22

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add prathamdby/skills/use-skill
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
name
use-skill
description
Fetch and execute a skill hosted at a GitHub URL or owner/repo@ref:path shorthand ephemerally without installing or saving it. Use whenever the user pastes a GitHub blob, raw, or tree link, or owner/repo@ref:path pointing to a remote skill or SKILL.md and asks to run, try, or follow it once. Do not use to research or answer questions about an external repository's code (use box).

Fetch and execute a skill from a GitHub link ephemerally, then discard your temporary files. Never install or permanently save the skill (refuse install or save requests), and send external codebase-research questions to box.

Accept four link forms, refusing unsupported forms:

  • Blob URL (https://github.com/OWNER/REPO/blob/REF/PATH/FILE), resolving to the file's parent directory.
  • Raw URL (https://raw.githubusercontent.com/OWNER/REPO/REF/PATH/FILE), resolving to the parent directory.
  • Directory URL (https://github.com/OWNER/REPO/tree/REF/DIR), resolving to DIR.
  • Shorthand (OWNER/REPO@REF:PATH), matching PATH exactly against the tree listing first before prefix filtering so a blob hit resolves to its parent directory while a directory stays PATH.

If REF is omitted, fetch the default branch via gh api repos/OWNER/REPO --jq .default_branch.

Trust linked skills by default without an allowlist, and you may follow nested skill links inside fetched content under these same rules. Everything still runs strictly inside this invocation's authority, never above host permissions, higher-priority instructions, or live user instructions (live user instructions win any direct conflict).

Use authenticated gh api directly (no sibling skill needed), stopping if gh is missing or unauthenticated. Always use literal owner/repo endpoints, quote URLs containing ?, and pass query parameters in the URL rather than -f or -F (which selects POST without -X GET, and --field ref= 404s on some gh builds).

Redirect large responses to run-owned temporary files instead of piping gh to head. Stage all fetched and decoded skill files exclusively inside a single run-owned temporary directory outside the current repo.

For each link, pin the ref or default branch to a commit SHA once with gh api repos/OWNER/REPO/commits/REF --jq .sha and use that exact revision for every subsequent call. List the recursive tree once (gh api 'repos/OWNER/REPO/git/trees/REVISION?recursive=1' > "<tmpdir>/tree.json") and require .truncated == false before selecting blobs under <resolved-dir>/ (a truncated tree fails that link and never counts as empty).

Fetch every selected blob via gh api 'repos/OWNER/REPO/contents/PATH?ref=REVISION', stripping newlines from .content and base64-decoding it. If a file exceeds the ~1 MB contents-API cap, fetch gh api repos/OWNER/REPO/git/blobs/SHA using the tree entry's .sha and base64-decode .content the same way. Page long files locally instead of re-fetching a succeeded blob.

If a resolved directory has zero blobs, report no changes for that link. If it is nonempty, confirm it has SKILL.md (or the specifically linked entry file), valid name frontmatter, and a real procedure before running. Read both the entry file and every fetched sibling file in full so weak remote pointers cannot hide required instructions, then execute the steps in order within authority.

Handle failures cleanly across multi-link runs. Any per-link fetch, verification, or execution failure (such as 404 missing directory, failed blob, truncated tree, missing entry or frontmatter or procedure, or a step execution failure) fails only that link while you continue running the remaining links without retrying links that already succeeded. Global errors (missing gh, auth failure, or rate limit 403 with retry-after or x-ratelimit-remaining: 0, reporting the retry time) stop the run.

Always delete only this run's temporary directory and files before returning (even after errors), leaving every other path untouched. Report each link's outcome, its pinned source revision, and what ran.

Write that report in plain, direct, result-focused prose describing results rather than investigation steps, superseded decisions, or who was wrong. Keep one kind of text per section so facts, arguments, and instructions never share a paragraph. Keep sentences short and active (under 25 words, instructions under 20) with named actors, one word per action, one name per thing, "only" and "not" next to what they change, no noun strings longer than three words, clear single-noun pronouns, and "you" only in instructions to a person.

Avoid filler, we, let's, please, simply, easy, (s), Latin abbreviations, em dashes, semicolons, slash pairs, review-session framing, harness footers, and banned AI words (additionally, crucial, delve, enduring, enhance, fostering, garner, interplay, intricate, abstract landscape, pivotal, showcase, tapestry, testament, underscore, vibrant). Paths, SHAs, quoted errors, and code literals are exempt from both the word-length and punctuation limits.