You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BEGIN_COMMIT_OVERRIDE
fix(p2p): back off on repeated auth handshake failures (#22435)
chore(pipeline): add metrics for pipeling building timelines (#21591)
fix: no division by zero in sentinel (#22467)
chore(pipelining): update next net (#22466)
feat(claude): add skill to read gists (#22471)
feat(node): add fee prediction API for upcoming L2 slots (#22116)
fix: lower EXPECTED_BLOCKS_PER_CHECKPOINT for CI stability (#22480)
END_COMMIT_OVERRIDE
description: Fetch and display a GitHub gist. Triggers when the user asks to read, fetch, or view a URL from gist.github.com.
4
+
argument-hint: "<gist URL or ID>"
5
+
allowed-tools: Bash(gh gist *), WebFetch
6
+
---
7
+
8
+
# Read Gist
9
+
10
+
Fetch and display the contents of a GitHub gist.
11
+
12
+
## Trigger
13
+
14
+
Activate this skill when the user provides a URL matching `gist.github.com` or asks to fetch/read a gist by ID.
15
+
16
+
## Parameters
17
+
18
+
The argument is a gist URL or gist ID: $ARGUMENTS
19
+
20
+
## Steps
21
+
22
+
1.**Extract the gist ID** from the input. It can be:
23
+
- A full URL like `https://gist.github.com/<user>/<id>` -> extract `<id>`
24
+
- A full URL like `https://gist.github.com/<id>` -> extract `<id>`
25
+
- A raw URL like `https://gist.githubusercontent.com/...` -> extract the gist ID segment
26
+
- A bare gist ID (hex string)
27
+
28
+
2.**Try `gh gist view`** first (preferred):
29
+
30
+
```bash
31
+
gh gist view <id> --raw
32
+
```
33
+
34
+
If the gist has multiple files, list them first with `gh gist view <id>` (without `--raw`) to show filenames, then fetch with `--raw` or specify a filename with `-f <filename>` if the user asked for a specific file.
35
+
36
+
3.**Fallback to WebFetch** only if `gh` is not available or the command fails with an auth/install error:
37
+
- Fetch `https://gist.githubusercontent.com/<user>/<id>/raw` for single-file gists
38
+
- Or fetch the gist API endpoint `https://api.github.com/gists/<id>` and extract file contents from the JSON response
39
+
40
+
4.**Return the contents** to the caller. If there are multiple files, show each file with its filename as a header.
0 commit comments