Imported from shikanime-labs/xqbit (
AGENTS.md). Install upstream withnpx skills add shikanime-labs/xqbit. Copyright stays with the author.
xqbit
Extra tooling for qBittorrent — CLI utilities for managing torrents.
Language: Go
Structure
cmd/— CLI entrypointscmd/qbittorrent-cleanup/— Manages errored torrents in qBittorrent
Build / Test Commands
- Run checks:
go test ./... - Run qbittorrent-cleanup:
go run ./cmd/qbittorrent-cleanup --help
Commit Style
- Plain-text capitalized title, no conventional-commit prefix
- Body with labels:
Design:,Related:,Closes # - Keep Markdown lines wrapped at 80 columns and run
nix fmtbefore shipping
Stack Workflow
- Install the official GitHub extension once:
gh extension install github/gh-stack(requires GitHub CLI ≥ 2.0;gh stackis in public preview and may change). - Keep one logical change per PR; split large work into a stack of PRs.
- Create a stack:
gh stack init, thengh stack addfor each new branch, and commit on the active branch.gh stack viewlists the stack. - Submit/update:
gh stack submit(add--opento open PRs,--autoto skip prompts). Resubmit after each change to refresh titles, bodies, and branches. - Pull down an existing stack:
gh stack checkout <PR_NUMBER>(also accepts a stack number, PR URL, or branch name). - Rebase onto updated trunk:
gh stack rebase(cascading), thengh stack submit. - Land a stack:
gh stack merge(interactive) orgh stack merge <PR_NUMBER> --yes --squashto merge up to a PR. - Never
gh pr mergeon a stacked PR — onlygh stack mergelands stacks. - Never force-push stack branches;
gh stackowns the branch pointers.
Protect main
- Require 1 approving review
- Require linear history (no merge commits)
- Require signed commits
- Squash+rebase merge only
Always use worktrees when making changes. Test with go test ./... before
submitting.
Environment
This repository ships a .envrc for direnv. Run direnv allow once after
cloning; direnv then loads the Nix flake dev shell automatically on every
directory change (.envrc runs
use flake . --accept-flake-config --no-pure-eval). Without direnv, enter
the same shell manually with nix develop.