dotslash
Use when adding, updating, or troubleshooting DotSlash binaries in bin/ — covers file creation, Rakefile integration, and the dotslash CLI helpers
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 10
- Forks
- 0
01 前言 Front Matter
- name
- dotslash
- description
- Use when adding, updating, or troubleshooting DotSlash binaries in bin/ — covers file creation, Rakefile integration, and the dotslash CLI helpers
03 SKILL.md 正文
DotSlash Binaries
This repo uses DotSlash to manage binaries in bin/. DotSlash files are lightweight JSON wrappers that lazily fetch, verify, cache, and run executables. Each file covers macos-aarch64, linux-aarch64, and linux-x86_64, minus any platform upstream doesn't publish. Run dotslash --help for the full CLI; create-url-entry is the only subcommand these workflows use.
Adding a new DotSlash binary
The update_dotslash_release helper in Rakefile generates the file for you — you rarely hand-write the JSON.
1. Add a Rake task
In the dotslash namespace, add a task that calls the helper, then list <name> in the all task. The helper resolves the latest tag with gh release view, runs create-url-entry, and writes bin/<name>:
desc "Update jj"
task(:jj) do
update_dotslash_release(name: "jj", repo: "jj-vcs/jj") do |tag|
{
"macos-aarch64" => "jj-#{tag}-aarch64-apple-darwin.tar.gz",
"linux-aarch64" => "jj-#{tag}-aarch64-unknown-linux-musl.tar.gz",
"linux-x86_64" => "jj-#{tag}-x86_64-unknown-linux-musl.tar.gz",
}
end
end
The block receives the resolved tag and returns a hash of DotSlash platform to asset filename. Ignore the tag when the names are fixed, or interpolate it (as above). Leave out a platform upstream doesn't publish. On Linux, prefer a musl asset over gnu when both exist, since it's statically linked and runs regardless of the host's glibc.
Pass path: when the executable sits inside an archive subdirectory; it defaults to name, which is correct when the archive holds a single file at its root. When the subdirectory varies by platform or version (e.g. cq-0.11.0-aarch64-apple-darwin/cq), pass path: a proc — it receives each asset filename, so the generated path stays correct across platforms and release bumps:
path: ->(asset) { "#{asset.delete_suffix(".tar.gz")}/cq" }
2. Generate and verify
rake dotslash:<name>
chmod +x bin/<name>
bin/<name> --help # or whatever smoke test is appropriate
Hand-writing the file (fallback)
Prefer extending update_dotslash_release over hand-writing JSON. Reserve hand-writing for cases the helper can't reach — a non-GitHub host, an unusual URL scheme, or a repo with no Rakefile to hold the helper (Gusto/claude-code ships DotSlash launchers inside plugins and has none):
- Find the asset with
gh release view --repo owner/repo --json tagName,assetsand pick the asset for each platform (e.g.darwin-arm64,linux-arm64,linux-amd64). - Run
dotslash -- create-url-entry URL. It computes size and hash and infersformatfrom the URL suffix; you fill inpath. On a private repo it can't do this — it fetches the URL with no auth and gets a 404. Download the asset instead (gh release download <tag> --repo owner/repo --pattern '<asset>'), then takesizefromls -landdigestfromshasum -a 256, and set"hash": "sha256"to match. - Determine
path: for a bare binary, the filename to save as (e.g."jq", omitformat); for an archive, the executable's relative path inside it (list contents withcurl -sL URL | tar tzf -, ortar tzf <file>on the copy you downloaded above). - Write
bin/<name>with the structure below, thenchmod +x:
#!/usr/bin/env dotslash
{
"name": "<name>",
"platforms": {
"macos-aarch64": {
"size": <size>,
"hash": "blake3",
"digest": "<digest>",
"format": "<format>", // omit for bare binaries
"path": "<path>",
"providers": [
{
"url": "<url>"
},
{
"type": "github-release",
"repo": "https://github.com/owner/repo",
"tag": "<tag>",
"name": "<asset-filename>"
}
]
},
"linux-aarch64": { ... },
"linux-x86_64": { ... }
}
}
Include both an HTTP provider (direct URL, tried first) and a GitHub Release provider (uses gh CLI, works with private repos). On a private repo, omit the HTTP provider — releases/download/... needs auth the bare url provider never sends, so it is a dead entry that masks the real error when the fallback breaks.
Updating existing binaries
Run:
rake dotslash:all # every binary
rake dotslash:<name> # a single binary
Key details
- Use
blake3(preferred) orsha256for the hash. Thecreate-url-entryhelper defaults to blake3. - The
formatfield must be a recognized value:tar.gz,tar.zst,tar.xz,tar.bz2,tar,zip,gz,zst,xz,bz2.tgzis not valid; usetar.gz. - The
pathmust be a normalized relative UNIX path: no leading./, no.., no trailing/, no backslashes. - Release tags containing
+(e.g.v2026-07-01+564c15b) work unescaped in the provider URL — GitHub's download endpoint accepts them raw.
04 同仓库更多 Skills
zoekt
Use when searching code across repositories — prefer zoekt over grep/ripgrep for indexed code search. Covers indexing repos, search syntax, and query patterns.
writing-for-accessibility
Use when writing documentation, alt text, diagrams, or any content that should be accessible to people with disabilities. Covers alt text, color contrast, inclusive language, and accessible visuals. Also use when reviewing documents for accessibility.
writing-error-messages
Use when writing, reviewing, or improving error messages in code, CLI tools, APIs, or UIs. Covers identifying the cause, explaining the fix, and setting the right tone. Also use when error messages are vague, unactionable, or confusing.
working-in-the-open
Use when making design decisions during implementation — routes rationale to the right venue (commits, task comments, code comments, or documentation) based on how durable the context needs to be
web-standards
Use when writing or reviewing HTML, CSS, or browser JavaScript — covers semantic markup, native platform features over libraries, Baseline browser support, accessibility and APCA contrast, and optional validation with vnu, axe, and Lighthouse
web-design
Use when designing or building web UI, frontends, or styling — covers personal web design preferences, fluid layout, and Alpine.js