repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

refactor(pi): route related skills through focused guides

d9c0b0e500022d7547142685f4f83c222dd00b9a

Oliver Jan Krylow <oliver@bugabinga.net> ·

SSH signature · not checked

Browse filesCompare with HEAD

Changed files (121)

+3239 / −3151 text lines · all files grouped into 32 bars

Diff layout

pi/agent/skills/optional/quickshell/README.md

Added
new file mode 100644

+62 / −0 text lines

1# quickshell skill
2
3Guidance and small examples for building Linux desktop components with Quickshell.
4Read [`SKILL.md`](SKILL.md) first.
5
6## Contents
7
8```text
9quickshell/
10├── SKILL.md
11├── references/
12├── examples/
13├── bin/
14└── package.json
15```
17The references intentionally avoid broad service API summaries.
18Resolve the installed `qs` version and consult its official type pages before writing service, IPC, windowing, or authentication code.
20## Examples
22The examples cover:
241. a single panel
252. one panel per screen
263. a clock panel
274. PipeWire volume display and control
285. a volume OSD
296. typed IPC functions
307. a composite bar
318. a minimal notification daemon
33Examples are teaching inputs, not proof of target-desktop behavior.
34Do not launch them on the user's real desktop as routine validation.
35Notification and authentication components can claim session-global protocols or services.
37## Validation levels
39- `npm test` checks the Node helper tools.
40- `qmllint` checks supported QML structure and installed imports without launching the shell.
41- An offscreen load check establishes load behavior only.
42- Interaction acceptance requires exercising input, IPC, timers, hotplug, and service events.
43- Visual acceptance requires observing mapped surfaces on the target display setup.
45Runtime checks belong in a nested compositor with isolated runtime and session services.
46A nested compositor without an isolated D-Bus and service environment is insufficient for notification, tray, Polkit, greetd, or similar checks.
47Never claim interaction or visual validation from static or offscreen checks.
49### Upstream tooling boundary
51[Quickshell recommends `qmlls` with generated `.qmlls.ini`](https://quickshell.org/docs/v0.3.1/guide/install-setup/#language-server) and explicitly documents unresolved `PanelWindow` types.
52Its runtime backend registration is not fully described by static `.qmltypes`; [issue #543](https://github.com/quickshell-mirror/quickshell/issues/543) tracks related false positives.
53Use Qt6 tooling, not an unverified executable named `qmllint` that may belong to Qt5.
54The earlier claim that typed `IpcHandler` functions cause an independent linter defect was incorrect: minimal typed IPC passes with Qt6 and the existing project lint policy.
55Keep that policy unchanged; do not add warning suppressions or fabricated metadata.
56The offscreen Qt platform has no Quickshell `PanelWindow` backend.
57Mapped surfaces, services, and interaction require an isolated nested compositor rather than more offscreen retries.
59## Helpers
61See [`bin/README.md`](bin/README.md).
62The helpers use Node built-ins and have no package dependencies.

pi/agent/skills/optional/quickshell/SKILL.md

Added
new file mode 100644

+142 / −0 text lines

1---
2name: quickshell
3license: LGPL-3.0
4description: "Use for building, reviewing, or debugging Quickshell desktop components and qs IPC. Not general QML or compositor config."
5---
6
7# Quickshell
8
9## Start with the installed version
11**Do not write Quickshell APIs from memory.**
12Quickshell changes between releases, especially service modules.
141. Run `qs --version`.
152. Read the matching official guide and type pages under `https://quickshell.org/docs/v<version>/`.
163. When local and web versions may differ, inspect the installed `*.qmltypes` files under `/usr/lib/qt6/qml/Quickshell/` or the platform's equivalent QML import path.
174. Cross-check a nearby official example before using a service or compositor-specific API.
19Use [`references/getting-fresh-docs.md`](references/getting-fresh-docs.md) for the lookup procedure.
20If cloning upstream examples is necessary, use the `git_clone_safe` tool with the repository URL and an isolated destination.
21It is a tool, not a shell command.
23## Model
25A Quickshell entry file has one QML root object.
26There is no rule that it must be `ShellRoot` or `Scope`.
27A single `PanelWindow` and a per-screen `Variants` object are both valid roots.
28`ShellRoot` is optional and provides inline shell settings.
29`Scope` groups non-visual reloadable objects.
31```qml
32import QtQuick
33import Quickshell
35PanelWindow {
36 anchors { top: true; left: true; right: true }
37 implicitHeight: 30
38 Text { anchors.centerIn: parent; text: "hello" }
39}
40```
42For one instance per screen:
44```qml
45import QtQuick
46import Quickshell
48Variants {
49 model: Quickshell.screens
50 delegate: Component {
51 PanelWindow {
52 required property var modelData
53 screen: modelData
54 anchors { top: true; left: true; right: true }
55 implicitHeight: 30
56 }
57 }
58}
59```
61Use:
63- `PanelWindow` for anchored panels and layer-shell surfaces.
64- `FloatingWindow` for ordinary desktop windows.
65- `PopupWindow` for a popup anchored to another Quickshell window.
66- `ShellRoot` when the entry needs multiple child objects or inline shell settings.
67- `Scope` when non-visual objects need a common reload scope.
69`WlrLayershell` is an attached object on `PanelWindow`, not on `FloatingWindow`.
70See [`references/windowing.md`](references/windowing.md).
72## QML rules that matter here
74- Keep state reactive with property bindings.
75- Implicit size flows from child to parent; actual size flows from parent to child.
76- Do not use `childrenRect` as a generic container sizing shortcut because it commonly creates binding loops.
77- For a service-backed `Slider`, bind `value` to service state and write user movement in `onMoved`.
78 Do not replace the binding with imperative synchronization handlers.
79- Use `Connections` for signals from a changing external object.
80- Use `PwObjectTracker` when the matching installed PipeWire docs require tracking an object.
82See [`references/patterns.md`](references/patterns.md) for the small set of retained patterns.
84## Services and privileged components
86For notifications, PipeWire, MPRIS, PAM, greetd, Polkit, Bluetooth, networking, and system tray APIs,
87read the installed-version type page before coding.
88Do not advertise a notification capability unless the implementation actually provides it.
89Do not improvise PAM, greetd, or Polkit conversations.
90Use the official installed-version example and keep prompts separate from user responses.
92See [`references/services.md`](references/services.md).
94## Tooling: follow upstream first
96Read the installed version's [official tooling recommendations](https://quickshell.org/docs/v0.3.1/guide/install-setup/#language-server) before diagnosing a linter or inventing metadata.
97Upstream recommends `qmlls` and an empty `.qmlls.ini` beside the entry point.
98Quickshell generates the machine-specific configuration; gitignore it and do not hand-maintain its paths.
99Use the matching Qt major version for both `qmlls` and `qmllint`.
100On Arch, `/usr/lib/qt6/bin/qmllint` is Qt6; the bare `qmllint` command may be Qt5.
102Upstream explicitly documents that `PanelWindow` cannot be resolved by the language server.
103Its runtime backend registration is not fully represented in static metadata; see [issue #543](https://github.com/quickshell-mirror/quickshell/issues/543).
104This is not evidence that valid panel QML or typed IPC functions are broken.
105Capture complete stdout/stderr from a minimal reproduction with the correct Qt tool before attributing a failure.
106Do not fabricate type metadata, remove typing, or disable additional warning categories to obtain a pass.
107Keep project-approved lint policy and verify actual loading in a nested compositor.
109## Validation
111Separate these evidence levels:
1131. **Static:** `qmllint` resolves supported imports and QML structure.
1142. **Load:** Quickshell loads the configuration without diagnostics.
1153. **Interaction:** input, IPC, timers, hotplug, and service events behave correctly.
1164. **Visual:** placement, sizing, clipping, color, typography, and animation are accepted on target displays.
118A static or offscreen load check proves neither interaction nor visual correctness.
119Do not claim UI validation without observing and exercising the mapped surfaces.
121**Never test desktop components against the user's real desktop session by default.**
122A test instance can claim D-Bus names, notification ownership, layer-shell surfaces, session-lock protocols, or authentication agents.
123Use a nested compositor plus isolated runtime, D-Bus, and service state for runtime checks.
124Offscreen validation is limited to parsing or loading and must be reported as such.
125Never run live authentication or lockscreen tests without an explicit isolated test plan.
127Run helper tests from this skill directory:
129```sh
130npm test
131```
133## References
135- [`references/getting-fresh-docs.md`](references/getting-fresh-docs.md)
136- [`references/patterns.md`](references/patterns.md)
137- [`references/windowing.md`](references/windowing.md)
138- [`references/services.md`](references/services.md)
139- [`references/resources.md`](references/resources.md)
140- [`references/packaging.md`](references/packaging.md)
141- [`examples/`](examples/)
142- `qml` skill for QML language and layout details

pi/agent/skills/optional/quickshell/bin/README.md

Added
new file mode 100644

+69 / −0 text lines

1# quickshell CLI helpers
2
3Three cross-platform CLI tools written in Node.js ESM (`.mjs` files). No npm dependencies, only Node built-ins. Run with `node <tool>.mjs` or directly (`./<tool>.mjs` after `chmod +x`).
4
5## qs-version
6
7Print the installed `qs` version and the matching docs URL.
8
9```sh
10$ qs-version
11Quickshell 0.3.0
12https://quickshell.org/docs/v0.3.0/
13```
15## qs-scaffold
17Scaffold a new Quickshell config from an example. Copies `shell.qml` (and any supporting `*.qml` files), the `README.md`, and creates an empty `.qmlls.ini` (LSP marker).
19```sh
20qs-scaffold mybar # uses 02-per-monitor-bar (default)
21qs-scaffold foo --from 03-clock # specific example
22qs-scaffold bar --from 07-composite-bar # multi-file: copies Bar.qml too
23```
25Result:
27```
28~/.config/quickshell/mybar/
29├── shell.qml
30├── Bar.qml (if the source example has one)
31├── README.md
32└── .qmlls.ini (empty; quickshell will populate)
33```
35Then run with `qs -c mybar`.
37Refuses to clobber an existing target.
39## qs-doc
41Print or open the docs URL for a type, namespaced or not.
43```sh
44qs-doc PanelWindow # bare type
45https://quickshell.org/docs/v0.3.0/types/Quickshell/PanelWindow
47qs-doc Quickshell.Services.Pipewire.Pipewire # namespaced
48https://quickshell.org/docs/v0.3.0/types/Quickshell/Services/Pipewire/Pipewire
50qs-doc --list # full type index
51https://quickshell.org/docs/v0.3.0/types
53qs-doc PanelWindow --open # open in browser
54```
56## Cross-platform
58- No shell, no POSIX assumptions; pure `node:child_process`, `node:fs`, `node:os`, `node:path`.
59- `xdg-open` on Linux, `open` on macOS, `cmd /c start` on Windows for `--open`.
60- `XDG_CONFIG_HOME` honored; falls back to `~/.config` (Linux/macOS) or `%APPDATA%` (Windows).
62## Testing
64Tests are in `test/` and use the built-in Node test runner.
65Run all from the skill root:
67```sh
68npm test
69```

pi/agent/skills/optional/quickshell/bin/qs-doc.mjs

Added
new file mode 100755

+104 / −0 text lines

1#!/usr/bin/env node
2// qs-doc.mjs: open or print docs for the installed Quickshell version.
3// Cross-platform: no shell, no POSIX assumptions. Pure Node builtins.
4//
5// Usage:
6// qs-doc <Type> # print URL for a type
7// qs-doc --list # print type index URL
8// qs-doc <Type> --open # open in default browser
9// qs-doc <Type> --print # print URL (explicit; same as default)
10//
11// Type names use the dot-path shown in the docs (e.g. PanelWindow,
12// Quickshell.Services.Pipewire.Pipewire).
14import { spawnSync } from "node:child_process";
15import { platform } from "node:os";
17function getVersion() {
18 for (const bin of ["qs", "quickshell"]) {
19 const r = spawnSync(bin, ["--version"], { encoding: "utf8" });
20 if (r.status === 0) {
21 const m = r.stdout.match(/(\d+\.\d+\.\d+)/);
22 if (m) return m[1];
23 }
24 }
25 return null;
26}
28function usage() {
29 process.stderr.write(
30 "usage: qs-doc <Type> [--open|--print]\n" +
31 " qs-doc --list\n" +
32 " Type: doc path like PanelWindow or Quickshell.Services.Pipewire.Pipewire\n" +
33 " --open open the URL in the default browser\n" +
34 " --print print the URL to stdout (default if stdout is a tty)\n",
35 );
36}
38function openUrl(url) {
39 const os = platform();
40 // Try each platform's open command. Each is a separate spawn without a shell.
41 const candidates =
42 os === "darwin"
43 ? [["open", [url]]]
44 : os === "win32"
45 ? [["cmd", ["/c", "start", "", url]]]
46 : [
47 ["xdg-open", [url]],
48 ["wslview", [url]],
49 ["sensible-browser", [url]],
50 ];
51 for (const [cmd, args] of candidates) {
52 const r = spawnSync(cmd, args, { stdio: "ignore" });
53 if (r.status === 0) return true;
54 }
55 return false;
56}
58const argv = process.argv.slice(2);
59if (argv.length === 0) {
60 usage();
61 process.exit(1);
62}
63const wantList = argv[0] === "--list";
64const wantOpen = argv.includes("--open");
65const wantPrint = argv.includes("--print") || !wantOpen;
66const type = wantList ? null : argv.find((a) => !a.startsWith("--"));
68if (!wantList && !type) {
69 usage();
70 process.exit(1);
71}
73const version = getVersion();
74if (!version) {
75 process.stderr.write("qs-doc: cannot find `qs` or `quickshell` on PATH\n");
76 process.exit(1);
77}
79const url = wantList
80 ? `https://quickshell.org/docs/v${version}/types`
81 : (() => {
82 // Type path: "PanelWindow" -> "Quickshell/PanelWindow",
83 // "Quickshell.Services.Pipewire.Pipewire" -> "Quickshell/Services/Pipewire/Pipewire"
84 const path = type.includes("/")
85 ? type
86 : type.startsWith("Quickshell")
87 ? type.replace(/\./g, "/")
88 : `Quickshell/${type.replace(/\./g, "/")}`;
89 return `https://quickshell.org/docs/v${version}/types/${path}`;
90 })();
92if (wantOpen) {
93 if (!openUrl(url)) {
94 process.stderr.write(`qs-doc: could not open browser; URL: ${url}\n`);
95 process.exit(1);
96 }
97 process.stdout.write(`${url}\n`);
98 process.exit(0);
99}
101if (wantPrint) {
102 process.stdout.write(`${url}\n`);
103 process.exit(0);
104}

pi/agent/skills/optional/quickshell/bin/qs-scaffold.mjs

Added
new file mode 100755

+125 / −0 text lines

1#!/usr/bin/env node
2// qs-scaffold.mjs: scaffold a new Quickshell config from an example.
3// Cross-platform: no shell, no POSIX assumptions. Pure Node builtins.
4//
5// Usage:
6// qs-scaffold <name> [--from <example-name>]
7//
8// Default example: 02-per-monitor-bar (canonical per-monitor shape).
9
10import {
11 copyFileSync,
12 existsSync,
13 mkdirSync,
14 readdirSync,
15 statSync,
16 writeFileSync,
17} from "node:fs";
18import { dirname, join } from "node:path";
19import { fileURLToPath } from "node:url";
21const __dirname = dirname(fileURLToPath(import.meta.url));
22const SKILL_ROOT = join(__dirname, "..");
23const EXAMPLES_DIR = join(SKILL_ROOT, "examples");
25const DEFAULT_EXAMPLE = "02-per-monitor-bar";
27function usage() {
28 process.stderr.write("usage: qs-scaffold <name> [--from <example-name>]\n");
29 process.stderr.write(
30 " example-name: e.g. 01-hello-bar, 07-composite-bar (omit the .qml)\n",
31 );
32}
34function parseArgs(argv) {
35 const out = { name: null, from: DEFAULT_EXAMPLE };
36 for (let i = 2; i < argv.length; i++) {
37 const a = argv[i];
38 if (a === "-h" || a === "--help") {
39 usage();
40 process.exit(0);
41 }
42 if (a === "--from") {
43 const v = argv[++i];
44 if (!v) {
45 process.stderr.write("qs-scaffold: --from requires a value\n");
46 process.exit(1);
47 }
48 out.from = v;
49 continue;
50 }
51 if (a.startsWith("--")) {
52 process.stderr.write(`qs-scaffold: unknown flag ${a}\n`);
53 process.exit(1);
54 }
55 if (!out.name) {
56 out.name = a;
57 continue;
58 }
59 process.stderr.write(`qs-scaffold: unexpected positional arg ${a}\n`);
60 process.exit(1);
61 }
62 return out;
63}
65function xdgConfigHome() {
66 if (process.env.XDG_CONFIG_HOME) return process.env.XDG_CONFIG_HOME;
67 if (process.env.HOME) return join(process.env.HOME, ".config");
68 // Windows fallback.
69 if (process.env.APPDATA) return process.env.APPDATA;
70 process.stderr.write(
71 "qs-scaffold: cannot determine config dir (set XDG_CONFIG_HOME or HOME)\n",
72 );
73 process.exit(1);
74}
76const { name, from } = parseArgs(process.argv);
77if (!name) {
78 usage();
79 process.exit(1);
80}
82function requirePathSegment(label, value) {
83 if (!/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(value)) {
84 process.stderr.write(
85 `qs-scaffold: ${label} must be a single path segment: ${value}\n`,
86 );
87 process.exit(1);
88 }
89}
91requirePathSegment("name", name);
92requirePathSegment("example name", from);
94// Validate example dir.
95const exampleDir = join(EXAMPLES_DIR, from);
96if (!existsSync(exampleDir) || !statSync(exampleDir).isDirectory()) {
97 process.stderr.write(
98 `qs-scaffold: example not found: ${from} (looked in ${EXAMPLES_DIR})\n`,
99 );
100 process.exit(1);
101}
103const configRoot = join(xdgConfigHome(), "quickshell");
104const target = join(configRoot, name);
106if (existsSync(target)) {
107 process.stderr.write(`qs-scaffold: target already exists: ${target}\n`);
108 process.exit(1);
109}
111mkdirSync(target, { recursive: true });
113// Copy the example dir's QML + README. Skip hidden / non-source files.
114for (const entry of readdirSync(exampleDir, { withFileTypes: true })) {
115 if (!entry.isFile()) continue;
116 if (entry.name.startsWith(".")) continue;
117 if (!(entry.name.endsWith(".qml") || entry.name.endsWith(".md"))) continue;
118 copyFileSync(join(exampleDir, entry.name), join(target, entry.name));
119}
121// Touch .qmlls.ini for LSP.
122writeFileSync(join(target, ".qmlls.ini"), "");
124process.stdout.write(`Scaffolded ${target}\n`);
125process.stdout.write(`Run: qs -c ${name}\n`);

pi/agent/skills/optional/quickshell/bin/qs-version.mjs

Added
new file mode 100755

+28 / −0 text lines

1#!/usr/bin/env node
2// qs-version.mjs: print the installed qs version and matching docs URL.
3// Cross-platform: no shell, no POSIX assumptions. Pure Node builtins.
4
5import { spawnSync } from "node:child_process";
6
7function getVersion() {
8 for (const bin of ["qs", "quickshell"]) {
9 const r = spawnSync(bin, ["--version"], { encoding: "utf8" });
10 if (r.status === 0) {
11 // Output looks like: "Quickshell 0.3.0 (revision , distributed by Arch Linux)"
12 const m = r.stdout.match(/(\d+\.\d+\.\d+)/);
13 if (m) return m[1];
14 }
15 }
16 return null;
17}
19const version = getVersion();
20if (!version) {
21 process.stderr.write(
22 "qs-version: cannot find `qs` or `quickshell` on PATH\n",
23 );
24 process.exit(1);
25}
27process.stdout.write(`Quickshell ${version}\n`);
28process.stdout.write(`https://quickshell.org/docs/v${version}/\n`);

pi/agent/skills/optional/quickshell/bin/test/qs-doc.test.mjs

Added
new file mode 100644

+59 / −0 text lines

1// qs-doc.test.mjs
2// Run: node --test bin/test/qs-doc.test.mjs
3
4import assert from "node:assert/strict";
5import { spawnSync } from "node:child_process";
6import { dirname, join } from "node:path";
7import { test } from "node:test";
8import { fileURLToPath } from "node:url";
9
10const __dirname = dirname(fileURLToPath(import.meta.url));
11const BIN = join(__dirname, "..", "qs-doc.mjs");
13test("qs-doc with no args prints usage", () => {
14 const result = spawnSync("node", [BIN], { encoding: "utf8" });
15 assert.notEqual(result.status, 0);
16 assert.match(result.stderr, /usage/i);
17});
19test("qs-doc <Type> prints the type's docs URL for the current qs version", () => {
20 const result = spawnSync("node", [BIN, "PanelWindow"], { encoding: "utf8" });
21 assert.equal(result.status, 0, `stderr: ${result.stderr}`);
22 // Must contain a quickshell.org URL matching the installed version.
23 assert.match(
24 result.stdout,
25 /https?:\/\/quickshell\.org\/docs\/v\d+\.\d+\.\d+\/types\/Quickshell\/PanelWindow/,
26 );
27});
29test("qs-doc accepts a namespaced type like Quickshell.Services.Pipewire.Pipewire", () => {
30 const result = spawnSync(
31 "node",
32 [BIN, "Quickshell.Services.Pipewire.Pipewire"],
33 { encoding: "utf8" },
34 );
35 assert.equal(result.status, 0, `stderr: ${result.stderr}`);
36 assert.match(
37 result.stdout,
38 /https?:\/\/quickshell\.org\/docs\/v\d+\.\d+\.\d+\/types\/Quickshell\/Services\/Pipewire\/Pipewire/,
39 );
40});
42test("qs-doc with --list prints type index URL", () => {
43 const result = spawnSync("node", [BIN, "--list"], { encoding: "utf8" });
44 assert.equal(result.status, 0, `stderr: ${result.stderr}`);
45 assert.match(
46 result.stdout,
47 /https?:\/\/quickshell\.org\/docs\/v\d+\.\d+\.\d+\/types/,
48 );
49});
51test("qs-doc --open <Type> uses xdg-open (Linux) or platform equivalent", () => {
52 // Just verify the --open flag is recognized (exit 0, no usage message).
53 // We don't actually open a browser in the test (no display guarantee).
54 const result = spawnSync("node", [BIN, "PanelWindow", "--print"], {
55 encoding: "utf8",
56 });
57 assert.equal(result.status, 0, `stderr: ${result.stderr}`);
58 assert.match(result.stdout, /PanelWindow/);
59});

pi/agent/skills/optional/quickshell/bin/test/qs-scaffold.test.mjs

Added
new file mode 100644

+182 / −0 text lines

1// qs-scaffold.test.mjs
2// Run: node --test bin/test/qs-scaffold.test.mjs
3
4import assert from "node:assert/strict";
5import { spawnSync } from "node:child_process";
6import {
7 existsSync,
8 mkdirSync,
9 mkdtempSync,
10 readdirSync,
11 readFileSync,
12 rmSync,
13 writeFileSync,
14} from "node:fs";
15import { tmpdir } from "node:os";
16import { dirname, join } from "node:path";
17import { test } from "node:test";
18import { fileURLToPath } from "node:url";
20const __dirname = dirname(fileURLToPath(import.meta.url));
21const BIN = join(__dirname, "..", "qs-scaffold.mjs");
23function makeTmp() {
24 const dir = mkdtempSync(join(tmpdir(), "qs-scaffold-test-"));
25 return dir;
26}
28test("qs-scaffold creates a config dir with shell.qml from default example", () => {
29 const tmp = makeTmp();
30 try {
31 const result = spawnSync("node", [BIN, "mybar"], {
32 encoding: "utf8",
33 env: { ...process.env, XDG_CONFIG_HOME: tmp },
34 });
35 assert.equal(result.status, 0, `stderr: ${result.stderr}`);
36 const target = join(tmp, "quickshell", "mybar");
37 assert.ok(existsSync(target), `target dir not created: ${target}`);
38 assert.ok(existsSync(join(target, "shell.qml")), "shell.qml missing");
39 // The default example is 02-per-monitor-bar (canonical per-monitor shape).
40 const content = readFileSync(join(target, "shell.qml"), "utf8");
41 assert.match(content, /Variants/);
42 assert.match(content, /Quickshell\.screens/);
43 } finally {
44 rmSync(tmp, { recursive: true, force: true });
45 }
46});
48test("qs-scaffold with --from 01 uses 01-hello-bar", () => {
49 const tmp = makeTmp();
50 try {
51 const result = spawnSync("node", [BIN, "mybar", "--from", "01-hello-bar"], {
52 encoding: "utf8",
53 env: { ...process.env, XDG_CONFIG_HOME: tmp },
54 });
55 assert.equal(result.status, 0, `stderr: ${result.stderr}`);
56 const shell = readFileSync(
57 join(tmp, "quickshell", "mybar", "shell.qml"),
58 "utf8",
59 );
60 assert.match(shell, /hello quickshell/i);
61 } finally {
62 rmSync(tmp, { recursive: true, force: true });
63 }
64});
66test("qs-scaffold with --from 07-composite-bar copies Bar.qml too", () => {
67 const tmp = makeTmp();
68 try {
69 const result = spawnSync(
70 "node",
71 [BIN, "mybar", "--from", "07-composite-bar"],
72 {
73 encoding: "utf8",
74 env: { ...process.env, XDG_CONFIG_HOME: tmp },
75 },
76 );
77 assert.equal(result.status, 0, `stderr: ${result.stderr}`);
78 const target = join(tmp, "quickshell", "mybar");
79 const files = readdirSync(target);
80 assert.ok(files.includes("shell.qml"), "shell.qml missing");
81 assert.ok(
82 files.includes("Bar.qml"),
83 "Bar.qml missing (multi-file example not fully copied)",
84 );
85 } finally {
86 rmSync(tmp, { recursive: true, force: true });
87 }
88});
90test("qs-scaffold touches .qmlls.ini for LSP", () => {
91 const tmp = makeTmp();
92 try {
93 const result = spawnSync("node", [BIN, "mybar"], {
94 encoding: "utf8",
95 env: { ...process.env, XDG_CONFIG_HOME: tmp },
96 });
97 assert.equal(result.status, 0, `stderr: ${result.stderr}`);
98 assert.ok(
99 existsSync(join(tmp, "quickshell", "mybar", ".qmlls.ini")),
100 ".qmlls.ini missing",
101 );
102 } finally {
103 rmSync(tmp, { recursive: true, force: true });
104 }
105});
107test("qs-scaffold without args exits non-zero with usage", () => {
108 const result = spawnSync("node", [BIN], { encoding: "utf8" });
109 assert.notEqual(result.status, 0);
110 assert.match(result.stderr, /usage/i);
111});
113test("qs-scaffold with bad --from exits non-zero", () => {
114 const tmp = makeTmp();
115 try {
116 const result = spawnSync(
117 "node",
118 [BIN, "mybar", "--from", "99-does-not-exist"],
119 {
120 encoding: "utf8",
121 env: { ...process.env, XDG_CONFIG_HOME: tmp },
122 },
123 );
124 assert.notEqual(result.status, 0);
125 assert.match(result.stderr, /not found|does not exist/i);
126 } finally {
127 rmSync(tmp, { recursive: true, force: true });
128 }
129});
131test("qs-scaffold rejects a config name that escapes the config root", () => {
132 const tmp = makeTmp();
133 try {
134 const result = spawnSync("node", [BIN, "../escaped"], {
135 encoding: "utf8",
136 env: { ...process.env, XDG_CONFIG_HOME: tmp },
137 });
138 assert.notEqual(result.status, 0);
139 assert.match(result.stderr, /single path segment/i);
140 assert.equal(existsSync(join(tmp, "escaped")), false);
141 } finally {
142 rmSync(tmp, { recursive: true, force: true });
143 }
144});
146test("qs-scaffold rejects an example name containing path traversal", () => {
147 const tmp = makeTmp();
148 try {
149 const result = spawnSync(
150 "node",
151 [BIN, "mybar", "--from", "../01-hello-bar"],
152 {
153 encoding: "utf8",
154 env: { ...process.env, XDG_CONFIG_HOME: tmp },
155 },
156 );
157 assert.notEqual(result.status, 0);
158 assert.match(result.stderr, /single path segment/i);
159 assert.equal(existsSync(join(tmp, "quickshell", "mybar")), false);
160 } finally {
161 rmSync(tmp, { recursive: true, force: true });
162 }
163});
165test("qs-scaffold with existing target dir exits non-zero (no clobber)", () => {
166 const tmp = makeTmp();
167 try {
168 const target = join(tmp, "quickshell", "mybar");
169 mkdirSync(target, { recursive: true });
170 writeFileSync(join(target, "preexisting.txt"), "do not clobber");
171 const result = spawnSync("node", [BIN, "mybar"], {
172 encoding: "utf8",
173 env: { ...process.env, XDG_CONFIG_HOME: tmp },
174 });
175 assert.notEqual(result.status, 0);
176 // Preexisting file must still exist with original content.
177 const still = readFileSync(join(target, "preexisting.txt"), "utf8");
178 assert.equal(still, "do not clobber");
179 } finally {
180 rmSync(tmp, { recursive: true, force: true });
181 }
182});

pi/agent/skills/optional/quickshell/bin/test/qs-version.test.mjs

Added
new file mode 100644

+49 / −0 text lines

1// qs-version.test.mjs
2// Run: node --test bin/test/qs-version.test.mjs
3
4import assert from "node:assert/strict";
5import { spawnSync } from "node:child_process";
6import { dirname, join } from "node:path";
7import { test } from "node:test";
8import { fileURLToPath } from "node:url";
9
10const __dirname = dirname(fileURLToPath(import.meta.url));
11const BIN = join(__dirname, "..", "qs-version.mjs");
13test("qs-version prints version + docs URL when qs is in PATH", () => {
14 // We rely on the system `qs` being installed (it's in /usr/bin on this box).
15 const result = spawnSync("node", [BIN], { encoding: "utf8" });
16 assert.equal(result.status, 0, `stderr: ${result.stderr}`);
17 // Output must contain "Quickshell" (or "quickshell"), a version, and a docs URL.
18 assert.match(
19 result.stdout,
20 /Quickshell\s+\d+\.\d+\.\d+/i,
21 "must print version",
22 );
23 assert.match(
24 result.stdout,
25 /https?:\/\/quickshell\.org\/docs\/v\d+\.\d+\.\d+\//,
26 "must print docs URL",
27 );
28 // The docs URL must match the version line.
29 const versionMatch = result.stdout.match(/(\d+\.\d+\.\d+)/);
30 assert.ok(versionMatch, "must find a version");
31 assert.ok(
32 result.stdout.includes(`/docs/v${versionMatch[1]}/`),
33 `docs URL must include /docs/v${versionMatch[1]}/`,
34 );
35});
37test("qs-version exit code 0 on success", () => {
38 const result = spawnSync("node", [BIN], { encoding: "utf8" });
39 assert.equal(result.status, 0);
40});
42test("qs-version output is 2-3 lines", () => {
43 const result = spawnSync("node", [BIN], { encoding: "utf8" });
44 const lines = result.stdout.trim().split("\n");
45 assert.ok(
46 lines.length >= 2 && lines.length <= 3,
47 `got ${lines.length} lines: ${result.stdout}`,
48 );
49});

pi/agent/skills/optional/quickshell/examples/01-hello-bar/README.md

Added
new file mode 100644

+13 / −0 text lines

1# 01: hello bar
2
3A `PanelWindow` can be the root object of `shell.qml`.
4This example anchors one 30-pixel panel to the top edge and renders centered text.
5
6Static check:
7
8```sh
9qmllint -I /usr/lib/qt6/qml examples/01-hello-bar/shell.qml
10```
12Do not launch it on the real desktop merely to validate the skill.
13Mapped placement and appearance require separate visual acceptance in a nested compositor or explicitly approved session.

pi/agent/skills/optional/quickshell/examples/01-hello-bar/shell.qml

Added
new file mode 100644

+22 / −0 text lines

1// 01-hello-bar/shell.qml
2// Smallest valid Quickshell shell: one panel on the focused monitor, "hello world".
3// Run with: qs -p examples/01-hello-bar/shell.qml
4
5import QtQuick
6import Quickshell
7
8PanelWindow {
9 anchors {
10 top: true
11 left: true
12 right: true
13 }
14 implicitHeight: 30
15 color: "#cc1e1e2e"
17 Text {
18 anchors.centerIn: parent
19 text: "hello quickshell"
20 color: "white"
21 }
22}

pi/agent/skills/optional/quickshell/examples/02-per-monitor-bar/Bar.qml

Added
new file mode 100644

+52 / −0 text lines

1// 02-per-monitor-bar/Bar.qml
2// The bar component. Imported from shell.qml with `import "."`.
3
4import QtQuick
5import QtQuick.Layouts
6import Quickshell
7
8PanelWindow {
9 id: bar
11 // Anchored to top, full-width.
12 anchors {
13 top: true
14 left: true
15 right: true
16 }
17 implicitHeight: 32
18 color: "#cc1e1e2e"
20 // The screen is set by the Variants delegate in shell.qml.
22 // Instantiate the clock; precision defaults to Seconds.
23 SystemClock {
24 id: clock
25 precision: SystemClock.Seconds
26 }
28 Row {
29 anchors.fill: parent
30 anchors.leftMargin: 12
31 anchors.rightMargin: 12
32 spacing: 16
34 // Left side: workspace label (just static here; see Hyprland example for live).
35 Text {
36 text: "Bar"
37 color: "white"
38 font.pointSize: 11
39 anchors.verticalCenter: parent.verticalCenter
40 }
42 Item { width: 1 } // spacer; the Row stretches
44 // Right side: a clock. Uses Qt.formatDateTime for formatting.
45 Text {
46 text: Qt.formatDateTime(clock.date, "yyyy-MM-dd hh:mm:ss")
47 color: "white"
48 font.pointSize: 11
49 anchors.verticalCenter: parent.verticalCenter
50 }
51 }
52}

pi/agent/skills/optional/quickshell/examples/02-per-monitor-bar/README.md

Added
new file mode 100644

+15 / −0 text lines

1# 02: per-monitor bar
2
3`Variants` is the entry root and creates a `Bar` for each item in `Quickshell.screens`.
4The delegate exposes each screen as `modelData` and binds it to the panel's `screen` property.
5
6`Bar.qml` is a local PascalCase component imported by `import "."` in `shell.qml`.
7Check the installed guide before changing local imports to `qs.*` module imports.
8
9Static check:
11```sh
12qmllint -I /usr/lib/qt6/qml examples/02-per-monitor-bar/shell.qml
13```
15Static checking does not exercise monitor hotplug or confirm one correctly placed surface per display.

pi/agent/skills/optional/quickshell/examples/02-per-monitor-bar/shell.qml

Added
new file mode 100644

+19 / −0 text lines

1// 02-per-monitor-bar/shell.qml
2// Per-monitor bar: one bar per connected screen, via Variants + Quickshell.screens.
3// Run with: qs -p examples/02-per-monitor-bar/shell.qml
4
5import QtQuick
6import Quickshell
7import "."
8
9// Variants creates one delegate instance per item in `model`.
10// `modelData` is the per-iteration value; mark it `required` so qmlls catches misses.
11Variants {
12 model: Quickshell.screens
13 delegate: Component {
14 Bar {
15 required property var modelData
16 screen: modelData
17 }
18 }
19}

pi/agent/skills/optional/quickshell/examples/03-clock/README.md

Added
new file mode 100644

+17 / −0 text lines

1# 03: clock panel
2
3This example uses `PanelWindow`, not `FloatingWindow`.
4`PanelWindow` provides screen-edge anchors and margins.
5`SystemClock.date` gives the text binding a reactive dependency.
6
7The panel anchors to the top edge and uses a calculated left margin for horizontal placement.
8It does not use `WlrLayershell` on a `FloatingWindow`.
9
10Static check:
12```sh
13qmllint -I /usr/lib/qt6/qml examples/03-clock/shell.qml
14```
16Static checking does not prove final placement, typography, or appearance above other windows.
17Those require visual acceptance in an isolated compositor or explicitly approved session.

pi/agent/skills/optional/quickshell/examples/03-clock/shell.qml

Added
new file mode 100644

+55 / −0 text lines

1// 03-clock/shell.qml
2// A floating-style clock panel: appears at top-center of the focused monitor.
3// Uses PanelWindow (not FloatingWindow) so we get anchors + margins + layer-shell by default.
4// Run with: qs -p examples/03-clock/shell.qml
5
6import QtQuick
7import Quickshell
8
9PanelWindow {
10 // Center horizontally via margins; no `anchors.horizontalCenter` on PanelWindow.
11 anchors { top: true }
12 margins {
13 top: 60
14 left: (screen.width - implicitWidth) / 2
15 }
17 implicitWidth: 380
18 implicitHeight: 90
19 color: "#dd1e1e2e"
21 // Do not reserve screen space because this is an overlay, not a bar.
22 exclusiveZone: 0
24 // Round corners via an inner Rectangle (PanelWindow itself can't be rounded).
25 Rectangle {
26 anchors.fill: parent
27 radius: 12
28 color: "transparent" // fill the panel
30 Column {
31 anchors.centerIn: parent
32 spacing: 4
34 SystemClock {
35 id: clock
36 precision: SystemClock.Seconds
37 }
39 Text {
40 text: Qt.formatTime(clock.date, "HH:mm:ss")
41 color: "white"
42 font.pointSize: 28
43 font.bold: true
44 anchors.horizontalCenter: parent.horizontalCenter
45 }
47 Text {
48 text: Qt.formatDate(clock.date, "dddd, MMMM d")
49 color: "#ccd0d0d0"
50 font.pointSize: 12
51 anchors.horizontalCenter: parent.horizontalCenter
52 }
53 }
54 }
55}

pi/agent/skills/optional/quickshell/examples/04-pipewire-volume/Bar.qml

Added
new file mode 100644

+70 / −0 text lines

1// 04-pipewire-volume/Bar.qml
2// A bar showing the default audio sink volume. Drag the slider to change it.
3
4import QtQuick
5import QtQuick.Controls
6import QtQuick.Layouts
7import Quickshell
8import Quickshell.Services.Pipewire
9import Quickshell.Widgets
11PanelWindow {
12 id: bar
13 anchors { top: true; left: true; right: true }
14 implicitHeight: 36
15 color: "#cc1e1e2e"
16 readonly property var sinkAudio: Pipewire.defaultAudioSink ? Pipewire.defaultAudioSink.audio : null
18 // Keep the default sink tracked so its audio object remains available.
19 PwObjectTracker {
20 objects: [ Pipewire.defaultAudioSink ]
21 }
23 RowLayout {
24 anchors.fill: parent
25 anchors.leftMargin: 12
26 anchors.rightMargin: 12
27 spacing: 12
29 // Icon. `Quickshell.iconPath` resolves against the system icon theme.
30 IconImage {
31 implicitSize: 18
32 source: Quickshell.iconPath(
33 bar.sinkAudio && bar.sinkAudio.muted
34 ? "audio-volume-muted-symbolic"
35 : "audio-volume-high-symbolic"
36 )
37 }
39 // Mute toggle. The `Connections` watches the service for changes.
40 Text {
41 text: "Mute"
42 color: "white"
43 font.pointSize: 11
44 MouseArea {
45 anchors.fill: parent
46 cursorShape: Qt.PointingHandCursor
47 onClicked: if (bar.sinkAudio) bar.sinkAudio.muted = !bar.sinkAudio.muted
48 }
49 }
51 Item { Layout.fillWidth: true; Layout.preferredWidth: 1 } // spacer
53 // Service changes update the slider through the value binding.
54 // User movement writes back through onMoved without reacting to initialization.
55 Slider {
56 Layout.preferredWidth: 240
57 from: 0
58 to: 1.5
59 value: bar.sinkAudio ? bar.sinkAudio.volume : 0
60 onMoved: if (bar.sinkAudio) bar.sinkAudio.volume = value
61 }
63 Text {
64 text: `${Math.floor((bar.sinkAudio ? bar.sinkAudio.volume : 0) * 100)}%`
65 color: "white"
66 font.pointSize: 11
67 Layout.preferredWidth: 40
68 }
69 }
70}

pi/agent/skills/optional/quickshell/examples/04-pipewire-volume/README.md

Added
new file mode 100644

+14 / −0 text lines

1# 04: PipeWire volume
2
3This example tracks the default audio sink, displays its state, and binds a slider to its volume.
4The slider writes back only from `onMoved`, so initialization and service-driven updates do not cause writes.
5The write checks that the audio object exists.
6
7Static check:
8
9```sh
10qmllint -I /usr/lib/qt6/qml examples/04-pipewire-volume/shell.qml
11```
13This does not exercise PipeWire discovery or volume mutation.
14A runtime service test needs an isolated PipeWire environment and explicit interaction assertions.

pi/agent/skills/optional/quickshell/examples/04-pipewire-volume/shell.qml

Added
new file mode 100644

+19 / −0 text lines

1// 04-pipewire-volume/shell.qml
2// A bar with the default sink's volume, read and written via PwObjectTracker and Slider.
3// Run with: qs -p examples/04-pipewire-volume/shell.qml
4
5import QtQuick
6import QtQuick.Layouts
7import Quickshell
8import Quickshell.Services.Pipewire
9import "."
11Variants {
12 model: Quickshell.screens
13 delegate: Component {
14 Bar {
15 required property var modelData
16 screen: modelData
17 }
18 }
19}

pi/agent/skills/optional/quickshell/examples/05-osd-volume/README.md

Added
new file mode 100644

+21 / −0 text lines

1# 05: volume OSD
2
3This example follows the structural OSD pattern:
4
5- `Scope` groups the non-visual objects under one reload scope.
6- `Connections` reacts to changes from the current default sink audio object.
7- `Timer` controls visibility duration.
8- `LazyLoader` creates the window only while needed.
9- `PanelWindow` provides anchored layer-shell placement.
10- an empty `Region` makes the surface click-through.
12It does not use `FloatingWindow` with `WlrLayershell`.
14Static check:
16```sh
17qmllint -I /usr/lib/qt6/qml examples/05-osd-volume/shell.qml
18```
20Do not trigger the real session's audio service during routine validation.
21Appearance, timing, click-through behavior, and service reaction require separate isolated interaction and visual checks.

pi/agent/skills/optional/quickshell/examples/05-osd-volume/shell.qml

Added
new file mode 100644

+109 / −0 text lines

1// 05-osd-volume/shell.qml
2// OSD volume: appears for 1s when the default sink's volume changes.
3// Pattern: Scope (shared state) + Connections (signal) + Timer (debounce) + LazyLoader (memory-aware) + PanelWindow (default layer).
4// Run with: qs -p examples/05-osd-volume/shell.qml
5// Try: `wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.5` in another terminal to trigger.
6
7import QtQuick
8import QtQuick.Layouts
9import Quickshell
10import Quickshell.Services.Pipewire
11import Quickshell.Widgets
13Scope {
14 id: root
15 readonly property var sinkAudio: Pipewire.defaultAudioSink ? Pipewire.defaultAudioSink.audio : null
17 // Keep the default sink tracked. The Connections below needs it to be live.
18 PwObjectTracker { objects: [ Pipewire.defaultAudioSink ] }
20 // Show OSD for 1s after every volume change.
21 Connections {
22 target: root.sinkAudio
23 function onVolumeChanged() {
24 root.shouldShowOsd = true
25 hideTimer.restart()
26 }
27 function onMutedChanged() {
28 root.shouldShowOsd = true
29 hideTimer.restart()
30 }
31 }
33 property bool shouldShowOsd: false
35 Timer {
36 id: hideTimer
37 interval: 1000
38 onTriggered: root.shouldShowOsd = false
39 }
41 // LazyLoader: only exists when shouldShowOsd. Frees memory between events.
42 // PanelWindow, not FloatingWindow, provides layer-shell placement.
43 LazyLoader {
44 active: root.shouldShowOsd
46 PanelWindow {
47 // The compositor picks the current focused monitor when no screen is set.
48 anchors.bottom: true
49 margins.bottom: screen.height / 5
50 exclusiveZone: 0
52 implicitWidth: 400
53 implicitHeight: 60
54 color: "transparent"
56 // Empty region = click-through. Clicks pass to whatever's behind.
57 mask: Region {}
59 Rectangle {
60 anchors.fill: parent
61 radius: height / 2
62 color: "#aa000000"
64 RowLayout {
65 anchors {
66 fill: parent
67 leftMargin: 14
68 rightMargin: 18
69 }
70 spacing: 12
72 IconImage {
73 implicitSize: 28
74 source: Quickshell.iconPath(
75 root.sinkAudio && root.sinkAudio.muted
76 ? "audio-volume-muted-symbolic"
77 : "audio-volume-high-symbolic"
78 )
79 }
81 Rectangle {
82 Layout.fillWidth: true
83 implicitHeight: 8
84 radius: 4
85 color: "#33ffffff"
87 Rectangle {
88 anchors {
89 left: parent.left
90 top: parent.top
91 bottom: parent.bottom
92 }
93 implicitWidth: parent.width * Math.min(1, root.sinkAudio ? root.sinkAudio.volume : 0)
94 radius: 4
95 color: "white"
96 }
97 }
99 Text {
100 text: `${Math.floor((root.sinkAudio ? root.sinkAudio.volume : 0) * 100)}%`
101 color: "white"
102 font.pointSize: 13
103 Layout.preferredWidth: 50
104 }
105 }
106 }
107 }
108 }
109}

pi/agent/skills/optional/quickshell/examples/06-ipc-control/README.md

Added
new file mode 100644

+24 / −0 text lines

1# 06: IPC control
2
3This example exposes explicitly typed functions through `IpcHandler`.
4The handler target is `mybar`.
5
6After starting the configuration in an isolated runtime, inspect and call it with the installed CLI:
7
8```sh
9qs ipc show
10qs ipc call mybar show
11qs ipc call mybar hide
12qs ipc call mybar toggle
13qs ipc call mybar setText "hello"
14```
16`IpcHandler` signals are observed with `qs ipc wait` or `qs ipc listen` when supported by the installed version.
17They are not consumed through an invented cross-process `IpcHandler.ipcBus` object.
19The installed `qmllint` may not handle dynamically declared, explicitly typed `IpcHandler` functions.
20A non-zero result without diagnostics is not proof that the example is invalid or valid.
21Cross-check the exact function syntax against the installed `IpcHandler` type page,
22then use an isolated load and IPC test.
24Static checking does not prove IPC registration or calls.

pi/agent/skills/optional/quickshell/examples/06-ipc-control/shell.qml

Added
new file mode 100644

+40 / −0 text lines

1// 06-ipc-control/shell.qml
2// IpcHandler: expose show/hide/toggle/text functions callable from outside the shell.
3// Run with: qs -p examples/06-ipc-control/shell.qml
4// Try:
5// qs -c ... ipc call mybar show
6// qs -c ... ipc call mybar hide
7// qs -c ... ipc call mybar toggle
8// qs -c ... ipc call mybar setText "hello from outside"
9
10import QtQuick
11import Quickshell
12import Quickshell.Io
14Scope {
15 id: root
16 property string label: "idle"
18 IpcHandler {
19 target: "mybar" // IPC namespace for qs ipc call
21 function show(): void { bar.visible = true }
22 function hide(): void { bar.visible = false }
23 function toggle(): void { bar.visible = !bar.visible }
24 function setText(s: string): void { root.label = s }
25 }
27 PanelWindow {
28 id: bar
29 visible: false
30 anchors { top: true; left: true; right: true }
31 implicitHeight: 40
32 color: "#cc1e1e2e"
34 Text {
35 anchors.centerIn: parent
36 text: root.label
37 color: "white"
38 }
39 }
40}

pi/agent/skills/optional/quickshell/examples/07-composite-bar/Bar.qml

Added
new file mode 100644

+67 / −0 text lines

1// 07-composite-bar/Bar.qml
2import QtQuick
3import QtQuick.Layouts
4import Quickshell
5import Quickshell.Services.Pipewire
6import Quickshell.Services.UPower
7import Quickshell.Hyprland
8import Quickshell.Widgets
9
10PanelWindow {
11 id: bar
12 anchors { top: true; left: true; right: true }
13 implicitHeight: 36
14 color: "#cc1e1e2e"
15 readonly property var sinkAudio: Pipewire.defaultAudioSink ? Pipewire.defaultAudioSink.audio : null
17 // Keep Pipewire nodes alive for state binding.
18 PwObjectTracker { objects: [ Pipewire.defaultAudioSink ] }
20 SystemClock { id: clock; precision: SystemClock.Seconds }
22 RowLayout {
23 anchors.fill: parent
24 anchors.leftMargin: 12
25 anchors.rightMargin: 12
26 spacing: 16
28 // Left: Hyprland workspace indicator (live from Hyprland IPC).
29 Text {
30 color: "white"
31 font.pointSize: 11
32 text: Hyprland.focusedWorkspace ? `${Hyprland.focusedWorkspace.id}` : "?"
33 }
35 Item { Layout.fillWidth: true }
37 // Center: SystemClock live time.
38 Text {
39 color: "white"
40 font.pointSize: 11
41 text: Qt.formatDateTime(clock.date, "HH:mm:ss")
42 }
44 Item { Layout.fillWidth: true }
46 // Right cluster: battery + volume.
47 Text {
48 color: "white"
49 font.pointSize: 11
50 text: UPower.displayDevice ? `${Math.floor(UPower.displayDevice.chargePercentage * 100)}%` : "n/a"
51 }
53 IconImage {
54 implicitSize: 16
55 source: Quickshell.iconPath(
56 bar.sinkAudio && bar.sinkAudio.muted
57 ? "audio-volume-muted-symbolic"
58 : "audio-volume-high-symbolic"
59 )
60 }
61 Text {
62 color: "white"
63 font.pointSize: 11
64 text: `${Math.floor((bar.sinkAudio ? bar.sinkAudio.volume : 0) * 100)}%`
65 }
66 }
67}

pi/agent/skills/optional/quickshell/examples/07-composite-bar/README.md

Added
new file mode 100644

+14 / −0 text lines

1# 07: composite bar
2
3This example combines a per-screen panel with `SystemClock`, PipeWire, UPower, and the Hyprland module.
4It is intentionally compositor-specific because it imports `Quickshell.Hyprland`.
5Do not claim that the Hyprland workspace binding is a generic Sway, i3, or Niri interface.
6
7Static check:
8
9```sh
10qmllint -I /usr/lib/qt6/qml examples/07-composite-bar/shell.qml
11```
13Static checking only establishes that the installed imports and QML structure resolve.
14Service values, workspace updates, per-screen placement, and appearance require isolated runtime and visual checks.

pi/agent/skills/optional/quickshell/examples/07-composite-bar/shell.qml

Added
new file mode 100644

+22 / −0 text lines

1// 07-composite-bar/shell.qml
2// Composite: per-monitor bar combining Variants, SystemClock, Pipewire, UPower, Hyprland.
3// Real-world "give me one of every module on my bar" stress test.
4// Run with: qs -p examples/07-composite-bar/shell.qml
5import QtQuick
6import QtQuick.Layouts
7import Quickshell
8import Quickshell.Services.Pipewire
9import Quickshell.Services.UPower
10import Quickshell.Hyprland
11import Quickshell.Widgets
12import "."
14Variants {
15 model: Quickshell.screens
16 delegate: Component {
17 Bar {
18 required property var modelData
19 screen: modelData
20 }
21 }
22}

pi/agent/skills/optional/quickshell/examples/08-notification-daemon/README.md

Added
new file mode 100644

+21 / −0 text lines

1# 08: minimal notification daemon
2
3This example tracks notifications and renders plain summary and body text.
4It explicitly disables action, persistence, inline-reply, markup, hyperlink, and image capability flags because the UI does not implement them.
5
6For a positive `expireTimeout`, which the installed-version docs express in seconds, the example converts to milliseconds for QML `Timer.interval` and calls `Notification.expire()`.
7Zero leaves the notification visible; a negative timeout requests daemon policy, here five seconds.
8Each window owns its expiry timer, so removing the notification also removes its timer.
9`Variants` creates the windows; a Qt Quick `Repeater` cannot use non-Item window delegates.
10This example has no history, manual dismissal, overflow management, or multi-monitor policy and is not a production daemon.
12Static check:
14```sh
15qmllint -I /usr/lib/qt6/qml examples/08-notification-daemon/shell.qml
16```
18**Do not launch this against the user's real session during routine validation.**
19`NotificationServer` attempts to own the session notification service.
20A runtime test requires an isolated session bus and notification clients.
21Static checking does not prove ownership, expiry, stacking, interaction, or appearance.

pi/agent/skills/optional/quickshell/examples/08-notification-daemon/shell.qml

Added
new file mode 100644

+90 / −0 text lines

1// Minimal plain-text notification example, not a production daemon.
2// Run only with an isolated session bus and nested compositor.
3
4pragma ComponentBehavior: Bound
5
6import QtQuick
7import Quickshell
8import Quickshell.Services.Notifications
9
10Scope {
11 NotificationServer {
12 id: server
14 actionsSupported: false
15 bodyMarkupSupported: false
16 persistenceSupported: false
17 bodyHyperlinksSupported: false
18 bodyImagesSupported: false
19 inlineReplySupported: false
21 onNotification: notification => notification.tracked = true
22 }
24 // Variants can instantiate windows; Repeater delegates must be Items.
25 Variants {
26 model: server.trackedNotifications
28 delegate: Component {
29 PanelWindow {
30 id: popup
31 required property var modelData
33 anchors {
34 bottom: true
35 right: true
36 }
37 margins {
38 bottom: 30 + server.trackedNotifications.values.indexOf(popup.modelData) * 88
39 right: 16
40 }
41 exclusiveZone: 0
42 implicitWidth: 360
43 implicitHeight: 80
44 color: "transparent"
45 mask: Region {}
47 // Quickshell uses seconds: zero persists, negative requests daemon policy.
48 Timer {
49 interval: popup.modelData.expireTimeout > 0 ? popup.modelData.expireTimeout * 1000 : 5000
50 running: popup.modelData.expireTimeout !== 0
51 repeat: false
52 onTriggered: popup.modelData.expire()
53 }
55 Rectangle {
56 anchors.fill: parent
57 radius: 8
58 color: "#dd1e1e2e"
59 border.color: "#444"
60 border.width: 1
62 Column {
63 anchors.fill: parent
64 anchors.margins: 12
65 spacing: 4
67 Text {
68 text: popup.modelData.summary
69 textFormat: Text.PlainText
70 color: "white"
71 font.pointSize: 12
72 font.bold: true
73 elide: Text.ElideRight
74 width: parent.width
75 }
76 Text {
77 text: popup.modelData.body
78 textFormat: Text.PlainText
79 color: "#ccc"
80 font.pointSize: 10
81 elide: Text.ElideRight
82 width: parent.width
83 visible: text.length > 0
84 }
85 }
86 }
87 }
88 }
89 }
90}

pi/agent/skills/optional/quickshell/examples/README.md

Added
new file mode 100644

+26 / −0 text lines

1# Quickshell examples
2
3These examples demonstrate small configuration shapes.
4Before adapting one, resolve the installed Quickshell version and check its official type pages.
5
6| Example | Demonstrates |
7| ------------------------ | ------------------------------------------------------------------------------- |
8| `01-hello-bar` | A `PanelWindow` as the entry root |
9| `02-per-monitor-bar` | A `Variants` root and one panel per screen |
10| `03-clock` | A top-anchored clock panel |
11| `04-pipewire-volume` | Tracked PipeWire state and reactive slider binding |
12| `05-osd-volume` | `Scope`, `Connections`, `Timer`, `LazyLoader`, and `PanelWindow` |
13| `06-ipc-control` | Explicitly typed `IpcHandler` functions |
14| `07-composite-bar` | Several installed services in one panel |
15| `08-notification-daemon` | Plain notification summary/body rendering without unsupported capability claims |
17## Validation boundary
19Use `qmllint` for static structure and imports.
20Do not launch these examples on the user's real desktop merely to validate the skill.
21A panel maps a desktop surface, and the notification example attempts to own the session notification service.
23Runtime checks require a nested compositor and isolated runtime and service state.
24Interaction and visual acceptance are separate from static or offscreen loading.
26The authentication and lockscreen APIs are intentionally not represented by runnable examples here because routine validation must not start live authentication or session-lock flows.

pi/agent/skills/optional/quickshell/package.json

Added
new file mode 100644

+6 / −0 text lines

1{
2 "private": true,
3 "scripts": {
4 "test": "node --test bin/test/*.test.mjs"
5 }
6}

pi/agent/skills/optional/quickshell/references/getting-fresh-docs.md

Added
new file mode 100644

+62 / −0 text lines

1# Getting fresh Quickshell documentation
2
3Quickshell APIs change between releases.
4Resolve the installed version before designing or changing a component.
5
6## 1. Identify the installed version
7
8```sh
9qs --version
10```
12Use the exact reported version in official URLs:
14- Guide: `https://quickshell.org/docs/v<version>/guide/`
15- Type index: `https://quickshell.org/docs/v<version>/types/`
16- Changelog: `https://quickshell.org/changelog/`
18## 2. Inspect each type used
20For every Quickshell type, verify:
22- import module
23- creatable versus singleton status
24- properties and their units
25- signals and handler parameters
26- invokable methods
27- platform or protocol restrictions
29Do not infer one service's shape from another service.
30Do not preserve a guessed fallback API for older versions.
31Target the installed version unless the user explicitly requests multiple versions.
33## 3. Resolve local and web disagreement
35The installed module describes what the local binary exposes.
36On a typical Qt 6 Linux installation, inspect:
38```text
39/usr/lib/qt6/qml/Quickshell/**/qmldir
40/usr/lib/qt6/qml/Quickshell/**/*.qmltypes
41```
43Use the equivalent QML import directory on other systems.
44`*.qmltypes` establishes names, properties, signals, methods, and enums,
45but prose docs remain necessary for semantics such as units and lifecycle.
47## 4. Cross-check official examples
49Use the official examples repository only when the guide and type pages are insufficient.
50Call the `git_clone_safe` tool with URL `https://github.com/quickshell-mirror/quickshell-examples` and an isolated destination.
51Do not invoke it as a shell command.
53Read the example nearest to the requested component.
54Do not treat community configuration files as API documentation because they may target another Quickshell revision.
56## 5. Record evidence honestly
58`qmllint` provides static evidence only.
59An offscreen Quickshell load provides load evidence only.
60Neither proves mapped surfaces, input, compositor behavior, or service integration.
61Runtime service checks require an isolated D-Bus and service environment.
62Visual and interaction acceptance require a nested compositor or an explicitly approved target session.

pi/agent/skills/optional/quickshell/references/packaging.md

Added
new file mode 100644

+32 / −0 text lines

1# Installation and packaging
2
3Package availability and build dependencies change.
4Use the install guide matching the desired Quickshell release:
5
6```text
7https://quickshell.org/docs/v<version>/guide/install-setup/
8```
9
10For an existing machine, inspect before changing anything:
12```sh
13qs --version
14qs --help
15```
17Prefer the distribution's supported package path unless the user asks for a source build or another packaging model.
18Do not add blanket package pinning, source-build scaffolding, compatibility branches, or version gates.
19If multiple versions are an explicit requirement, define the supported versions and test each one.
21## Editor setup
23Follow the installed guide for `qmlls` setup.
24A `.qmlls.ini` file contains machine-specific paths and should not be copied as portable configuration.
26## Troubleshooting order
281. Capture the exact `qs` version and full diagnostic output.
292. Verify the QML import paths and installed modules.
303. Check the matching official type page for every unresolved symbol.
314. Distinguish a static or load failure from a mapped-surface, compositor-protocol, or service failure.
325. Reproduce runtime behavior only in an isolated environment when the configuration can claim desktop protocols or services.

pi/agent/skills/optional/quickshell/references/patterns.md

Added
new file mode 100644

+150 / −0 text lines

1# Retained patterns
2
3Verify every Quickshell type against the installed-version docs before using these patterns.
4These examples show structure, not cross-version compatibility.
5
6## Single panel root
7
8A `PanelWindow` can be the entry file's root object.
9It does not need a `ShellRoot` wrapper.
11```qml
12import QtQuick
13import Quickshell
15PanelWindow {
16 anchors { top: true; left: true; right: true }
17 implicitHeight: 30
18 Text { anchors.centerIn: parent; text: "hello" }
19}
20```
22## One panel per screen
24A `Variants` object can also be the entry root.
26```qml
27import QtQuick
28import Quickshell
30Variants {
31 model: Quickshell.screens
32 delegate: Component {
33 PanelWindow {
34 required property var modelData
35 screen: modelData
36 }
37 }
38}
39```
41`required property var modelData` exposes the model item to the delegate.
43## Reactive clock
45```qml
46SystemClock {
47 id: clock
48 precision: SystemClock.Seconds
49}
51Text {
52 text: Qt.formatTime(clock.date, "HH:mm:ss")
53}
54```
56The binding updates when `clock.date` changes.
57A direct `new Date()` expression has no changing QML dependency.
59## Process output
61```qml
62import Quickshell.Io
64Process {
65 command: ["some-program", "--argument"]
66 running: true
67 stdout: StdioCollector {
68 onStreamFinished: output.text = this.text
69 }
70}
71```
73Pass command arguments as a list.
74Do not invoke a shell unless shell syntax is explicitly required and trusted.
76For line-oriented output, use `SplitParser` and its `onRead` signal after verifying the installed type page.
78## Service-backed slider
80Assuming the containing object declares
81`readonly property var sinkAudio: Pipewire.defaultAudioSink ? Pipewire.defaultAudioSink.audio : null`:
83```qml
84Slider {
85 value: sinkAudio ? sinkAudio.volume : 0
86 onMoved: if (sinkAudio) sinkAudio.volume = value
87}
88```
90The `value` binding keeps external service changes reactive.
91`onMoved` limits writes to user movement instead of reacting to initialization or service-driven updates.
93## Changing signal target
95```qml
96Connections {
97 target: sinkAudio
98 function onVolumeChanged() {
99 showVolumeOsd()
100 }
101}
102```
104Bind `target` to the current service object because the object may appear, disappear, or be replaced.
106## Conditional non-Item object
108```qml
109LazyLoader {
110 active: shouldShow
111 PanelWindow { /* content */ }
112}
113```
115Use `LazyLoader` for a conditionally instantiated window.
116Use ordinary `visible` when retaining the object is intentional.
118## Click-through panel
120```qml
121PanelWindow {
122 color: "transparent"
123 mask: Region {}
124}
125```
127An empty `Region` makes the window's input mask empty.
128Confirm interaction in a nested compositor because static loading cannot prove click-through behavior.
130## IPC callable
132```qml
133import Quickshell.Io
135IpcHandler {
136 target: "mybar"
137 function toggle(): void {
138 panel.visible = !panel.visible
139 }
140}
141```
143IPC function argument and return types must be explicit and supported by the installed version.
144Inspect registered handlers with `qs ipc show`, then call the function with `qs ipc call mybar toggle`.
146## Multi-file configuration
148Neighboring PascalCase QML files can define local types.
149For subdirectories, follow the installed guide's `qs.*` import rules.
150Do not add compatibility imports or version gates unless the user explicitly requires multiple Quickshell versions.

pi/agent/skills/optional/quickshell/references/resources.md

Added
new file mode 100644

+78 / −0 text lines

1# Resources and I/O
2
3Verify these APIs against the installed-version type pages before using them.
4
5## Paths
6
7- `Qt.resolvedUrl("asset.png")` resolves relative to the current QML file.
8- `Quickshell.cachePath(...)`, `dataPath(...)`, and `statePath(...)` return shell-specific paths when exposed by the installed version.
9- `Quickshell.env("NAME")` reads an environment variable.
11Choose cache, data, and state according to XDG semantics.
12Do not claim that a path helper itself persists QML properties.
14## Icons
16```qml
17import Quickshell.Widgets
19IconImage {
20 source: Quickshell.iconPath("audio-volume-high-symbolic")
21 implicitSize: 24
22}
23```
25Check the installed `Quickshell.iconPath` overloads before adding fallback behavior.
26An icon name still depends on the active icon theme.
28## FileView and JsonAdapter
30`JsonAdapter` is an adapter owned by `FileView`.
31It does not have a `path` property and does not infer arbitrary properties from a JSON file.
32Declare the adapter properties explicitly.
34```qml
35import Quickshell.Io
37FileView {
38 path: Qt.resolvedUrl("config.json")
39 watchChanges: true
40 onFileChanged: reload()
42 JsonAdapter {
43 property string accent: "blue"
44 }
45}
46```
48Read the installed `FileView` and `JsonAdapter` pages before enabling writes.
49Writing configuration requires an explicit save policy and data-loss handling.
51## Reload state
53`PersistentProperties` carries declared properties across a Quickshell configuration reload.
54It does not provide durable persistence across process restarts.
55Use its documented `reloadableId` behavior and do not describe it as disk storage.
57## IPC
59`IpcHandler` exposes explicitly typed functions, properties, and signals through `qs ipc`.
61```qml
62import Quickshell.Io
64IpcHandler {
65 target: "mybar"
66 function setText(value: string): void {
67 label.text = value
68 }
69 signal changed(value: string)
70}
71```
73- Inspect registrations with `qs ipc show`.
74- Call functions with `qs ipc call mybar setText "value"`.
75- Observe exported signals with the installed CLI's `qs ipc wait` or `qs ipc listen` commands.
76- Do not invent an `IpcHandler.ipcBus` singleton or use `Connections` as cross-process IPC.
78Function argument and return types must be explicit and supported by the installed version.

pi/agent/skills/optional/quickshell/references/services.md

Added
new file mode 100644

+90 / −0 text lines

1# Services
2
3**Service APIs are version-sensitive and can mutate the user's session.**
4Start from the installed-version type index, not from a remembered recipe.
5Inspect local `*.qmltypes` files when the installed module and web docs may differ.
6
7## PipeWire
8
9The retained default-sink shape is:
11```qml
12import QtQuick
13import Quickshell
14import Quickshell.Services.Pipewire
16PanelWindow {
17 id: root
18 anchors { top: true; left: true; right: true }
19 implicitHeight: 30
20 readonly property var sinkAudio: Pipewire.defaultAudioSink ? Pipewire.defaultAudioSink.audio : null
22 PwObjectTracker {
23 objects: [Pipewire.defaultAudioSink]
24 }
26 Text {
27 anchors.centerIn: parent
28 text: `${Math.floor((root.sinkAudio ? root.sinkAudio.volume : 0) * 100)}%`
29 }
30}
31```
33For a slider, keep the service-to-control binding declarative and write only user movement:
35```qml
36Slider {
37 value: root.sinkAudio ? root.sinkAudio.volume : 0
38 onMoved: if (root.sinkAudio) root.sinkAudio.volume = value
39}
40```
42Verify the tracker and node properties against the installed PipeWire module before extending this shape.
44## Notifications
46Creating `NotificationServer` attempts to become the session notification daemon.
47Do not run it alongside the user's real notification daemon during tests.
49Capability properties advertise behavior to clients.
50Set `actionsSupported`, `persistenceSupported`, `inlineReplySupported`, markup, hyperlinks, images, or action icons to true only when the UI implements that behavior.
51Receiving a property from `Notification` does not mean the daemon implements its presentation or interaction.
53A received notification must be marked `tracked` in `onNotification` if it should remain in `trackedNotifications`.
54`Notification.expireTimeout` is expressed in seconds in the installed-version docs checked for this skill.
55Use `expire()` for timeout expiry and `dismiss()` for an explicit user dismissal because they report different close reasons.
56Re-check these semantics for the installed version.
58The bundled notification example intentionally renders only plain summary and body text.
59It does not advertise actions, persistence, inline reply, markup, hyperlinks, or images.
61## PAM
63Never send the PAM prompt text back as the response.
64The prompt is display state.
65The response comes from the user's input and may be sent only while `responseRequired` is true.
66Honor `responseVisible` when deciding whether user input may be shown.
68Do not use an abbreviated PAM recipe for a lockscreen.
69Read the complete installed-version `PamContext` page and official lockscreen example.
70Do not run live PAM or lockscreen checks during routine skill validation.
72## greetd and Polkit
74These components participate in authentication and session authorization.
75Do not guess method names, lifecycle order, or response objects.
76Use the installed-version type pages and official examples.
77Test only in an isolated environment with a recovery path.
79## MPRIS, system tray, UPower, Bluetooth, and networking
81Look up the installed module name and exported types before importing them.
82Module names and singleton shapes are not uniform across these services.
83If the installed API cannot support a requested feature, report the blocker.
84Do not silently delete requested behavior or add guessed adapters and compatibility branches.
86## Runtime isolation
88A nested compositor alone does not isolate D-Bus or per-user services.
89For service tests, isolate the runtime directory, session bus, and relevant service daemons as well.
90Static `qmllint` and offscreen loading do not validate service ownership, events, or interaction.

pi/agent/skills/optional/quickshell/references/windowing.md

Added
new file mode 100644

+78 / −0 text lines

1# Windowing
2
3Read the installed-version type page for each window and attached property before coding.
4
5## PanelWindow
6
7Use `PanelWindow` for a decorationless surface attached to screen edges.
8It can be the root object of `shell.qml`.
9
10```qml
11import Quickshell
13PanelWindow {
14 anchors { top: true; left: true; right: true }
15 implicitHeight: 30
16 margins { top: 4; left: 4; right: 4 }
17}
18```
20Opposite anchors force the corresponding dimension to span the screen between margins.
21The exclusion zone only takes effect with the anchor combinations documented by the installed `PanelWindow` type page.
23For click-through rendering:
25```qml
26PanelWindow {
27 color: "transparent"
28 mask: Region {}
29}
30```
32## FloatingWindow
34Use `FloatingWindow` for an ordinary desktop window controlled by the window manager.
35Do not use panel anchors or `WlrLayershell` on it.
37```qml
38import Quickshell
40FloatingWindow {
41 width: 600
42 height: 400
43}
44```
46## PopupWindow
48Use `PopupWindow` only when the popup is anchored to another Quickshell window.
49Its anchor API is version-sensitive, so read the installed `PopupWindow` and `PopupAnchor` pages rather than copying a recipe from this skill.
51## Layer shell
53`WlrLayershell` is an attached object on `PanelWindow`.
54It is not attached to `FloatingWindow`.
56```qml
57import Quickshell
58import Quickshell.Wayland
60PanelWindow {
61 WlrLayershell.layer: WlrLayer.Overlay
62 WlrLayershell.namespace: "my-osd"
63}
64```
66Layer-shell support depends on the compositor protocol, not on a blanket "Wayland" or "wlroots" label.
67Niri is not wlroots-based.
68i3 is an X11 window manager; Sway is its Wayland counterpart.
69Verify the target compositor's protocol support independently.
71## Session lock
73`WlSessionLock` and `WlSessionLockSurface` are security-sensitive protocol objects.
74Do not derive a lockscreen from an abbreviated recipe.
75Use the official example matching the installed Quickshell version and review the complete PAM conversation.
77Never launch a lockscreen or authentication flow on the real session during routine validation.
78Use a nested compositor and isolated authentication setup with an explicit recovery path.

pi/agent/skillz/archlinux/SKILL.md

Deleted
deleted file mode 100644

+0 / −84 text lines

1---
2name: archlinux
3os: lnx
4description: "Use for Arch Linux system help: configuring the OS, pacman/package management, upgrades, maintenance, AUR/PKGBUILD/makepkg, boot/service/package/software troubleshooting. Not Raspberry Pi or generic Linux unless Arch-specific."
5---
6
7# Arch Linux
8
9Arch-specific system/config/troubleshooting/pkg help.
10Confirm Arch via `/etc/os-release`; `pacman` alone is not proof.
11Keep volatile facts out of memory; fetch current docs.
13## Route
15- System/maintenance/upgrade → `references/system.md`
16- Config changes/mirrors/hooks → `references/config.md`
17- Troubleshooting failures → `references/troubleshooting.md`
18- Software/pkg/AUR/build issues → `references/software.md`
20## Fresh Truth
22Local first:
24```sh
25man pacman pacman.conf makepkg PKGBUILD alpm-hooks paccache pacdiff
26```
28Web when local docs missing/stale:
30```text
31https://man.archlinux.org/man/<page>.<section>.en
32https://wiki.archlinux.org/title/<Topic>
33https://archlinux.org/news/
34https://archlinux.org/packages/
35https://aur.archlinux.org/
36```
38Before upgrade advice, check Arch News.
39For exact package/repo/current syntax, use current man/wiki/package pages, not memory.
41## Local Wiki
43If offline/frequent Arch work, check:
45```sh
46pacman -Qq arch-wiki-docs arch-wiki-lite wikiman 2>/dev/null
47```
49If absent, suggest installing one.
50Do not require it.
52## Safety
54- No partial upgrades.
55 Avoid `pacman -Sy <pkg>`; use full upgrade flow.
56- If `-Sy` happened and `-Su` failed:
57 resolve + complete upgrade before other pkg ops.
58- AUR = untrusted user content.
59 Inspect `PKGBUILD`, `*.install`, patches before build.
60- `.pacnew`/`.pacsave` need manual merge; never blind overwrite.
61- Avoid unless current Arch News/wiki explicitly says so:
62 `--overwrite`, `-Rdd`, `--nodeps`, blind `--noconfirm`.
63- Do not symlink libraries to fix soname errors; complete/recover upgrade.
65## Root Delegation
67Do not run root/admin mutations yourself.
68Follow [linux](../linux/SKILL.md) for system boundaries and human-run escalation, even when the user authorizes the change.
69Give exact command for user to run.
70Detect user's shell first for syntax compatibility:
72```sh
73printf 'SHELL=%s\n' "$SHELL"
74getent passwd "$(id -un)" | cut -d: -f7
75```
77Command style:
79- unknown/fish/nu → one simple command per line; avoid arrays, functions,
80 process substitution, brace expansion.
81- env vars → use `env VAR=value command` for portability.
82- complex flow → write tiny script or split steps.
83- state impact + rollback/log path before mutating `/etc`, pacman DB, boot,
84 services.

pi/agent/skillz/archlinux/package.json

Deleted
deleted file mode 100644

+0 / −9 text lines

1{
2 "name": "archlinux-skill",
3 "version": "0.1.0",
4 "private": true,
5 "type": "module",
6 "scripts": {
7 "test": "node --test scripts/*.test.mjs"
8 }
9}

pi/agent/skillz/archlinux/references/config.md

Deleted
deleted file mode 100644

+0 / −72 text lines

1# Arch Config
2
3Use for `/etc`, pacman config, repos, mirrors, hooks, service/package config.
4
5## Before Changing
6
7Classify:
8
9- file path
10- owning package
11- live reload/restart needed?
12- backup/rollback path
13- root required?
15Read-only probes:
17```sh
18pacman -Qo /path/to/file
19pacman -Qii package
20systemctl cat unit.service
21systemctl status unit.service --no-pager
22```
24If root edit needed, delegate via user's shell.
25Prefer editor-safe command, e.g. `sudoedit /etc/file` when appropriate.
27## Pacman Config
29Current truth:
30`man pacman.conf`, wiki `Pacman`.
32Stable rules:
34- Main config:
35 `/etc/pacman.conf`.
36- Mirror list commonly included from `/etc/pacman.d/mirrorlist`.
37- Repository order matters when packages share names.
38- Directives are case-sensitive/CamelCase.
39- `NoUpgrade`/`NoExtract` paths are archive paths:
40 no leading `/`.
41- Hooks are non-interactive; system hooks live under
42 `/usr/share/libalpm/hooks/`, admin hooks commonly under
43 `/etc/pacman.d/hooks/`.
44- Signature policy/current defaults:
45 verify with `man pacman.conf`, do not weaken casually.
47## Mirrors/Repos
49For stale/404/target-not-found problems, inspect:
51```sh
52grep -v '^#' /etc/pacman.conf
53grep -v '^#' /etc/pacman.d/mirrorlist | head
54```
56Use current wiki `Mirrors`/`Reflector` before recommending tooling.
57After repo config changes, full upgrade before installing new packages.
59## Service/Software Config
61- Check package docs + Arch Wiki page for that software.
62- Check ownership before editing generated/package-owned files.
63- Prefer drop-ins over modifying unit files directly.
64- State reload command separately:
65 e.g. daemon reload, service restart, app reload.
67## Current Sources
69- Man:
70 `pacman.conf(5)`, `alpm-hooks(5)`, `pacman(8)`
71- Wiki:
72 `Pacman`, `Mirrors`, target software page

pi/agent/skillz/archlinux/references/software.md

Deleted
deleted file mode 100644

+0 / −87 text lines

1# Arch Software
2
3Use for pacman, packages, AUR, PKGBUILD, makepkg, app install/build issues.
4
5## Pacman Query Map
6
7```sh
8pacman -Ss term # sync DB search
9pacman -Si package # sync pkg info
10pacman -Qs term # installed search
11pacman -Qi package # installed pkg info
12pacman -Ql package # installed files
13pacman -Qo /path/file # file owner
14pacman -Qm # foreign/local/AUR
15pacman -Qtdq # orphan deps
16pacman -F path # remote file owner; needs files DB
17```
19Refresh files DB only when needed:
20`pacman -Fy`.
22## Install/Remove
24- Install from repos:
25 `pacman -S package` if DB current; otherwise full upgrade flow.
26- Full upgrade:
27 `pacman -Syu`.
28- Install local pkg:
29 `pacman -U ./pkg.pkg.tar.zst`.
30- Remove package + unneeded deps:
31 `pacman -Rs package`.
32- Avoid `-Rsc`, `-Rdd`, `--nodeps`, `--overwrite` unless explicitly justified.
33- Use `--print`/`--print-format` for dry/processable transaction previews.
35## AUR
37AUR is unsupported/untrusted user content.
38Agent must inspect before build/install:
40```sh
41less PKGBUILD
42ls -la
43git diff @~..@ # if updating existing clone
44```
46Check for:
48- unexpected network/code exec in build funcs
49- dangerous `install` scripts
50- checksum/PGP handling
51- bundled patches
52- dependency sanity
54Build rules:
56- `base-devel` is assumed by AUR packages.
57- Run `makepkg` as normal user, never root.
58- `makepkg -s` can install repo deps via pacman; AUR deps need separate
59 handling.
60- `makepkg --verifysource` checks sources without building.
61- `makepkg --printsrcinfo` for metadata.
62- Clean chroot helps distinguish user-env failure from broken PKGBUILD.
64AUR helpers do not remove review duty.
66## PKGBUILD Facts
68Current truth:
69`man PKGBUILD`, `man makepkg`.
70Durable basics:
72- PKGBUILD is Bash sourced by `makepkg`; treat as executable code.
73- Minimal fields include `pkgname`, `pkgver`, `pkgrel`, `arch`.
74- `package()` installs into `$pkgdir`; `prepare()`, `build()`, `check()`
75 optional.
76- `backup=()` controls pacnew/pacsave behavior for config files.
77- `source=()` + checksums/PGP define source verification.
78- Split packages use multiple `pkgname`s and `package_name()` funcs.
80## Current Sources
82- Man:
83 `pacman(8)`, `makepkg(8)`, `PKGBUILD(5)`, `makepkg.conf(5)`
84- Wiki:
85 `Pacman`, `Arch User Repository`, `Creating packages`, `Makepkg`
86- Live:
87 `archlinux.org/packages`, `aur.archlinux.org`

pi/agent/skillz/archlinux/references/system.md

Deleted
deleted file mode 100644

+0 / −59 text lines

1# Arch System
2
3Use for system state, maintenance, upgrades, health.
4
5## First Read-only Probes
6
7```sh
8cat /etc/os-release
9uname -a
10pacman -Q pacman 2>/dev/null
11systemctl --failed
12journalctl -b --no-pager -p warning..alert
13pacman -Qm
14pacman -Qtdq
15```
17Do not infer Arch from `pacman` alone; read `/etc/os-release`.
19## Upgrade Discipline
21- Read `https://archlinux.org/news/` before upgrade guidance.
22- Full upgrades only:
23 `pacman -Syu`.
24- Never advise `pacman -Sy <pkg>`.
25- Keep rescue/live media in mind for risky kernel/boot/glibc/systemd updates.
26- After upgrade:
27 review pacman output, handle `.pacnew`, restart affected services or reboot.
28- AUR/local packages are user's responsibility; rebuild when deps/ABI change.
30## Maintenance Checks
32```sh
33systemctl --failed
34journalctl -b --no-pager
35pacman -Qtdq # orphan deps
36pacman -Qm # foreign/local/AUR packages
37pacman -Qkk # file integrity; can be noisy
38```
40Package cache:
42- Prefer `paccache` from `pacman-contrib` over aggressive `pacman -Scc`.
43- Preserve rollback ability unless disk pressure is real.
45Config drift:
47```sh
48find /etc -name '*.pacnew' -o -name '*.pacsave'
49grep -E '\.pac(new|save)' /var/log/pacman.log
50```
52Use `pacdiff` if present.
54## Current Sources
56- Wiki:
57 `System maintenance`, `Pacman`, `Pacman/Pacnew and Pacsave`
58- Man:
59 `pacman(8)`, `paccache(8)`, `pacdiff(8)`

pi/agent/skillz/archlinux/references/troubleshooting.md

Deleted
deleted file mode 100644

+0 / −97 text lines

1# Arch Troubleshooting
2
3Use for boot, service, package transaction, upgrade, and app failures.
4Start read-only.
5Identify last change.
6
7## Baseline
8
9```sh
10cat /etc/os-release
11uname -a
12systemctl --failed
13journalctl -b --no-pager -p err..alert
14tail -n 80 /var/log/pacman.log
15```
17For app issue:
19```sh
20command -v app
21pacman -Qo "$(command -v app)"
22pacman -Qi package
23```
25If command substitution conflicts with user shell, split into two commands.
27## Package Transaction Errors
29Lock:
31- Verify no pacman/makepkg/AUR helper process is running before removing lock.
32- Current lock path/safe handling:
33 check wiki/man.
35Conflicting files:
37```sh
38pacman -Qo /path/to/conflict
39```
41If unowned, investigate origin before rename/delete.
42Avoid `--overwrite` unless current Arch guidance says so.
44Target not found / retrieval failed:
46- Verify package exists:
47 `archlinux.org/packages`, `pacman -Ss`, AUR if unofficial.
48- Check enabled repos + mirror freshness.
49- Do not fix with `pacman -Sy <pkg>`.
51Invalid/corrupt package/signature:
53- Check current wiki `Pacman/Package signing` + Arch News.
54- Suspect stale keyring, partial downloads, bad mirror only after evidence.
56Interrupted upgrade / broken pacman / unbootable:
58- Fetch current wiki `Pacman#Troubleshooting` before procedural advice.
59- Prefer live ISO + mount + `arch-chroot`/`--sysroot` recovery path.
60- Reconstruct exact failed transaction from `/var/log/pacman.log` when relevant.
62## Software Failures
64Classify:
66- packaging issue?
67 upstream bug?
68 config?
69 missing optional dep?
70 partial upgrade?
71 service sandbox?
72 permissions?
74Probes:
76```sh
77pacman -Qi package
78pacman -Ql package | less
79pacman -Qii package
80journalctl -b --user --no-pager
81journalctl -b --no-pager -u unit.service
82```
84Missing `.so` after upgrades usually means partial/incomplete upgrade or
85unrebuilt local/AUR package.
86Do not symlink libs.
88## Output Shape
90```text
91Observed: ...
92Likely cause: ...
93Evidence: ...
94Safe checks: ...
95User-run root step, if needed: ...
96Rollback/logs: ...
97```

pi/agent/skillz/archlinux/scripts/archlinux-doc.test.mjs

Deleted
deleted file mode 100644

+0 / −48 text lines

1import assert from "node:assert/strict";
2import { readFileSync } from "node:fs";
3import { join } from "node:path";
4import { test } from "node:test";
5
6const root = new URL("..", import.meta.url);
7const files = [
8 "SKILL.md",
9 "references/system.md",
10 "references/config.md",
11 "references/troubleshooting.md",
12 "references/software.md",
13];
14const docs = files.map((file) => [file, readFileSync(join(root.pathname, file), "utf8")]);
15const all = docs.map(([, text]) => text).join("\n");
17test("Arch skill points at current sources before volatile advice", () => {
18 assert.match(all, /https:\/\/archlinux\.org\/news\//);
19 assert.match(all, /https:\/\/wiki\.archlinux\.org\/title\//);
20 assert.match(all, /https:\/\/man\.archlinux\.org\/man\//);
21 assert.match(all, /man pacman/);
22});
24test("partial-upgrade hazard is only documented as a warning", () => {
25 for (const [file, text] of docs) {
26 for (const [index, line] of text.split("\n").entries()) {
27 if (!/pacman -Sy(\s|$|<)/.test(line)) continue;
28 assert.match(
29 line,
30 /Avoid|Never|Do not|No partial|happened/,
31 `${file}:${index + 1} must warn about pacman -Sy`,
32 );
33 }
34 }
35});
37test("AUR and dangerous pacman flags keep safety warnings", () => {
38 assert.match(all, /AUR = untrusted|AUR is unsupported\/untrusted/);
39 assert.match(all, /Inspect `PKGBUILD`|inspect before build\/install/);
40 assert.match(all, /Avoid .*--overwrite/);
41 assert.match(all, /Do not symlink libs|Do not symlink libraries/);
42});
44test("root mutation guidance delegates instead of auto-running", () => {
45 assert.match(all, /Do not run root\/admin mutations yourself\./);
46 assert.match(all, /\.\.\/linux\/SKILL\.md/);
47 assert.match(all, /sudoedit \/etc\/file/);
48});

pi/agent/skillz/git/git-commit/SKILL.md

Modified

+1 / −0 text lines

11---
22name: git-commit
33path: .git
4disable-model-invocation: true
45description: "Commit selected changes in a Git repository. Use when asked to commit, record, or split current work without pushing."
56---

pi/agent/skillz/git/git-fast-forward/SKILL.md

Modified

+1 / −0 text lines

11---
22name: git-fast-forward
33path: .git
4disable-model-invocation: true
45description: "Fast-forward a Git target branch to the current branch and push it without creating a merge commit. Use for direct linear branch integration."
56---

pi/agent/skillz/git/git-review/SKILL.md

Modified

+1 / −0 text lines

11---
22name: git-review
33path: .git
4disable-model-invocation: true
45description: "Prepare and inspect a pinned Git branch, commit range, or pair of refs without changing source. Use when a read-only workflow needs a trustworthy Git revision comparison."
56---

pi/agent/skillz/git/git-sync/SKILL.md

Modified

+2 / −1 text lines

11---
22name: git-sync
33path: .git
4description: "Synchronize a Git branch by fetching, rebasing onto its target, testing, and optionally pushing when publication was requested. Use for pull, sync, rebase-and-push, or branch publication requests."
4disable-model-invocation: true
5description: "Use for Git pull/sync: fetch, rebase, test; push only when publication requested. For dirty trees or merge/rebase planning use merge-plan."
56---
78# Git Sync

pi/agent/skillz/git/git-workflow/SKILL.md

Added
new file mode 100644

+19 / −0 text lines

1---
2name: git-workflow
3path: .git
4description: "Use for Git commits, branch/commit reviews, pull/sync/rebase, fast-forward integration, or authorized pushes."
5---
6
7# Git workflow
8
9Read the matching guide before acting, resolving links relative to this skill directory rather than the project cwd.
11- Commit or split selected work without pushing: [git-commit](../git-commit/SKILL.md).
12- Inspect pinned branches, commits, or ranges without modifying source: [git-review](../git-review/SKILL.md).
13- Fetch, rebase, pull, or sync a branch; push only when requested: [git-sync](../git-sync/SKILL.md).
14- Advance a target branch to the current commit without a merge: [git-fast-forward](../git-fast-forward/SKILL.md).
16Read every applicable guide when the request combines operations.
17Follow the chosen guide's authorization checks; routing does not authorize committing, rebasing, or publishing.
18In colocated Git/Jujutsu workspaces, use the VCS the user or project selected; ask if ambiguous before mutating.
19Use GitHub-specific skills for GitHub PR operations.

pi/agent/skillz/github/github-cli/SKILL.md

Modified

+1 / −0 text lines

11---
22name: github-cli
33which: gh
4disable-model-invocation: true
45description: "Access GitHub issues, pull requests, releases, comments, Actions, and repository metadata through the gh CLI. Use when local VCS data is insufficient."
56---

pi/agent/skillz/github/github-pr-create/SKILL.md

Modified

+1 / −0 text lines

11---
22name: github-pr-create
33which: gh
4disable-model-invocation: true
45description: "Create or update a GitHub pull request and drive it to review-ready completion. Use when asked to make, open, prepare, publish, or finish a GitHub PR."
56---

pi/agent/skillz/github/github-pr-merge/SKILL.md

Modified

+1 / −0 text lines

11---
22name: github-pr-merge
33which: gh
4disable-model-invocation: true
45description: "Validate, merge, and clean up a GitHub pull request. Use when asked to merge, accept, or integrate a GitHub PR."
56---

pi/agent/skillz/github/github-pr-review/SKILL.md

Modified

+1 / −0 text lines

11---
22name: github-pr-review
33which: gh
4disable-model-invocation: true
45description: "Review a GitHub pull request against pinned base and head commits. Use for local PR review, readiness assessment, or drafting and publishing GitHub review feedback."
56---

pi/agent/skillz/github/github-workflow/SKILL.md

Added
new file mode 100644

+18 / −0 text lines

1---
2name: github-workflow
3which: gh
4description: "Use for GitHub issues, PR creation/review/merge, releases, comments, Actions, or repository metadata via gh when local Git data is insufficient."
5---
6
7# GitHub workflow
8
9Read the matching guide before acting, resolving links relative to this skill directory rather than the project cwd.
11- Inspect issues, releases, Actions, comments, or repository state through `gh`: [github-cli](../github-cli/SKILL.md).
12- Create, open, update, publish, or finish a PR: [github-pr-create](../github-pr-create/SKILL.md).
13- Review a PR, assess readiness, or draft or publish review feedback: [github-pr-review](../github-pr-review/SKILL.md).
14- Merge or integrate a PR and clean up its branch: [github-pr-merge](../github-pr-merge/SKILL.md).
16Read every applicable guide when the request combines operations.
17Follow the selected guide's authorization and verification checks; reading this router does not authorize mutation, review publication, or merge.
18For a Git-only revision comparison without GitHub PR state, use git-workflow instead.

pi/agent/skillz/jj/jj-bookmark-move/SKILL.md

Modified

+1 / −0 text lines

11---
22name: jj-bookmark-move
33path: .jj
4disable-model-invocation: true
45description: "Move a Jujutsu target bookmark forward to the current change and push it. Use for direct linear integration without a merge commit."
56---

pi/agent/skillz/jj/jj-commit/SKILL.md

Modified

+1 / −0 text lines

11---
22name: jj-commit
33path: .jj
4disable-model-invocation: true
45description: "Commit the current Jujutsu change. Use when asked to commit or record work in a jj repository without pushing."
56---

pi/agent/skillz/jj/jj-review/SKILL.md

Modified

+1 / −0 text lines

11---
22name: jj-review
33path: .jj
4disable-model-invocation: true
45description: "Prepare and inspect pinned Jujutsu revisions, bookmarks, or a change range without modifying source. Use when a read-only workflow needs a trustworthy jj comparison."
56---

pi/agent/skillz/jj/jj-sync/SKILL.md

Modified

+1 / −0 text lines

11---
22name: jj-sync
33path: .jj
4disable-model-invocation: true
45description: "Synchronize a Jujutsu change stack by fetching, rebasing onto its target, testing, and optionally pushing when publication was requested. Use for pull, sync, rebase-and-push, or bookmark publication requests."
56---

pi/agent/skillz/jj/jj-workflow/SKILL.md

Added
new file mode 100644

+18 / −0 text lines

1---
2name: jj-workflow
3path: .jj
4description: "Use for Jujutsu (jj) commits, revision/bookmark reviews, pull/sync/rebase, bookmark integration, or authorized pushes."
5---
6
7# Jujutsu workflow
8
9Read the matching guide before acting, resolving links relative to this skill directory rather than the project cwd.
11- Commit or split the current change without pushing: [jj-commit](../jj-commit/SKILL.md).
12- Inspect pinned revisions, bookmarks, or change ranges without modifying source: [jj-review](../jj-review/SKILL.md).
13- Fetch, rebase, pull, or sync a stack; push only when requested: [jj-sync](../jj-sync/SKILL.md).
14- Advance a target bookmark to the current change and push it: [jj-bookmark-move](../jj-bookmark-move/SKILL.md).
16Read every applicable guide when the request combines operations.
17Follow the chosen guide's authorization checks; routing does not authorize committing, rebasing, moving bookmarks, or publishing.
18In colocated Git/Jujutsu workspaces, use the VCS the user or project selected; ask if ambiguous before mutating.

pi/agent/skillz/linux-console/SKILL.md

Deleted
deleted file mode 100644

+0 / −101 text lines

1---
2name: linux-console
3os: lnx
4description: "Use for real Linux kernel virtual console work: tty1/tty2, /dev/ttyN, Ctrl+Alt+F1 VTs, TERM=linux, getty, vconsole.conf, setfont, loadkeys, setterm, console_codes, fbcon. Not for terminal emulators, /dev/pts ptys, tmux, X11, or Wayland."
5---
6
7# Linux Console
8
9## Scope
11Use for kernel virtual consoles only:
13- `/dev/ttyN`
14- `TERM=linux`
15- `tty1`, `tty2`, ...
16- `Ctrl+Alt+F1` / VT switching
17- `getty`, `vconsole.conf`, `setfont`, `loadkeys`, `setterm`, `fbcon`
19Do not use for:
21- graphical terminal emulators
22- `/dev/pts/*` pseudo-terminals
23- tmux internals
24- X11 / Wayland / XKB config
26## First Probe
28Identify the target host and VT from the user's report before probing.
29The agent's stdin and `TERM` describe its execution context, not necessarily the target console.
31Run these in the target session, or ask the user for their output there:
33```sh
34tty
35printf '%s\n' "$TERM"
36```
38Interpret:
40- Target `/dev/ttyN` + `TERM=linux` → real VT likely.
41- Agent `/dev/pts/N` or `not a tty` → target remains unknown; do not reject VT diagnosis.
42- Target `/dev/pts/N` → pty; clarify whether a separate VT is the actual target.
43- User reports `tty1`/`tty2` on another session/host → continue target-specific read-only diagnosis.
45Use `infocmp -1 linux` to inspect console capabilities; it does not detect the target.
46Do not send console escape sequences to the agent's terminal as a substitute for the target.
47Missing local man page → fetch current upstream man page.
49## Learn Locally First
51Prefer local truth over memory:
53```sh
54man console_codes | col -b
55man setterm | col -b
56man vconsole.conf | col -b
57man loadkeys | col -b
58man keymaps | col -b
59man setfont | col -b
60man reset | col -b
61infocmp -1 linux
62```
64For deeper lookup:
65`references/research.md`.
67## Durable Rules
69- `TERM=linux` describes Linux-console capabilities via terminfo.
70- `clear` and `reset` differ; inspect `infocmp -1 linux`.
71- Linux console interprets control/escape sequences; verify in
72 `console_codes(4)`.
73- Existing screen cells may need redraw after display/attribute changes.
74- Keymap, font, palette, and persistence scopes differ; classify first.
76## Change Hygiene
78For every proposed change, state:
80- target:
81 current VT | all VTs | boot/persistent
82- mechanism:
83 escape seq | terminfo | kbd tool | system config | ioctl
84- privilege needs:
85 none | user permissions | root/admin | unknown until probed
86- rollback/reset path
88## Safety
90- Never apply X11/Wayland/XKB/niri fixes to Linux console.
91- Never confuse `/dev/ttyN` with `/dev/pts/N`.
92- Do not change keymaps/fonts/persistent config without explicit user intent.
93- Prefer `setterm`, `loadkeys`, `setfont`, `vconsole.conf` docs over guesses.
95## References
97Read when needed:
99- `references/research.md` — fresh docs, command probes, web fallbacks.
100- `references/model.md` — VT model, terminfo, reset/clear, screen memory.
101- `references/tools.md` — setterm/loadkeys/setfont/vconsole scope notes.

pi/agent/skillz/linux-console/references/model.md

Deleted
deleted file mode 100644

+0 / −77 text lines

1# Model
2
3## Terms
4
5- Linux console:
6 kernel console implementation.
7- Virtual console / VT:
8 numbered console, usually `/dev/ttyN`.
9- pty:
10 pseudo-terminal, usually `/dev/pts/N`; not a real VT.
11- `TERM=linux`:
12 terminfo name commonly used by Linux VTs.
13- framebuffer console / `fbcon`:
14 kernel console display path on many systems.
16## Detection
18Evaluate the target session, not the agent's execution context.
19Strong signal from the target:
21```text
22/dev/ttyN + TERM=linux
23```
25`/dev/pts/N` identifies the probed session as a pty, not the user's separate VT.
26Agent output of `/dev/pts/N` or `not a tty` leaves the target unknown.
27Confirm the target host and VT; continue remote diagnosis rather than stopping.
29Use exact user wording too:
30`tty1`, `tty2`, `virtual console`, `linux console`, `Ctrl+Alt+F1`, `getty`,
31`fbcon`.
33## Terminfo
35`infocmp -1 linux` shows what `clear`, `reset`, curses apps, and terminfo-aware
36programs will emit.
38Inspect, do not assume:
40```sh
41infocmp -1 linux | grep -E 'clear|rs1|rs2|rs3|oc|op|initc|sgr0'
42```
44## Clear vs Reset
46`clear` normally clears/redraws screen state.
48`reset` reinitializes terminal state via terminfo reset strings.
49It may undo palette/display state.
50Confirm through `infocmp -1 linux` and `man reset`.
52## Escape Controls
54`console_codes(4)` is source of truth for Linux-console control sequences.
55Stable topics there:
57- control chars
58- ESC / CSI / OSC sequences
59- SGR attributes
60- palette controls
61- private Linux console sequences
63Avoid hard-wiring controls unless the task explicitly needs raw escapes.
64Prefer terminfo-aware tools when possible.
66## Screen Memory
68`vcs(4)` documents `/dev/vcsN` and `/dev/vcsaN` screen-memory devices.
69They can help inspect or dump VTs.
70Access depends on device permissions.
71Prefer `setterm --dump` for simple snapshots when available.
73## Low-level ioctls
75`ioctl_console(2)` describes Linux-specific console/VT ioctls and warns they are
76internal-ish.
77Prefer user tools unless low-level work is requested.

pi/agent/skillz/linux-console/references/research.md

Deleted
deleted file mode 100644

+0 / −58 text lines

1# Research Pattern
2
3Identify the target host and VT first.
4Run session probes in that target session, or ask the user to run them there:
5
6```sh
7tty
8printf '%s\n' "$TERM"
9```
11The agent's pty or missing tty does not rule out a separate target VT.
12Inspect capabilities with `infocmp -1 linux`; terminfo lookup is not target detection.
13Run device probes below only on the target host.
15Man pages:
17```sh
18man console_codes | col -b
19man setterm | col -b
20man vconsole.conf | col -b
21man loadkeys | col -b
22man keymaps | col -b
23man dumpkeys | col -b
24man showkey | col -b
25man setfont | col -b
26man reset | col -b
27man terminfo | col -b
28man vcs | col -b
29man ioctl_console | col -b
30```
32Useful probes:
34```sh
35infocmp -1 linux | grep -E '^(\s*(clear|rs[123]|is[123]|oc|op|initc|sgr0)=)'
36dumpkeys | head
37kbd_mode
38fgconsole 2>/dev/null
39ls -l /dev/tty[0-9]* /dev/vcs* /dev/vcsa* 2>/dev/null
40```
42If local docs are missing/stale, fetch current upstream docs:
44- <https://man7.org/linux/man-pages/man4/console_codes.4.html>
45- <https://man7.org/linux/man-pages/man1/setterm.1.html>
46- <https://man7.org/linux/man-pages/man5/vconsole.conf.5.html>
47- <https://man7.org/linux/man-pages/man1/loadkeys.1.html>
48- <https://man7.org/linux/man-pages/man5/keymaps.5.html>
49- <https://man7.org/linux/man-pages/man8/setfont.8.html>
50- <https://man7.org/linux/man-pages/man1/clear.1.html>
51- <https://man7.org/linux/man-pages/man1/reset.1.html>
52- <https://man7.org/linux/man-pages/man5/terminfo.5.html>
53- <https://man7.org/linux/man-pages/man4/vcs.4.html>
54- <https://man7.org/linux/man-pages/man2/ioctl_console.2.html>
56Distro docs can explain policy/integration.
57Prefer upstream man pages for interfaces, distro wiki for packaging/persistence
58quirks.

pi/agent/skillz/linux-console/references/tools.md

Deleted
deleted file mode 100644

+0 / −94 text lines

1# Tools
2
3## setterm
4
5Use for terminal attributes and VT-specific controls.
6
7Research:
8
9```sh
10man setterm | col -b
11setterm --help
12```
14Common scopes:
16- foreground/background/rendering attrs:
17 current terminal stream
18- `--store`:
19 stored defaults for reset-to-default on virtual consoles
20- blanking, bell, repeat, kernel messages:
21 virtual-console-specific controls
23State exact scope before changing.
25## loadkeys / dumpkeys / showkey / keymaps
27Use for kernel console keyboard maps, not XKB/X11/Wayland.
29Research:
31```sh
32man loadkeys | col -b
33man keymaps | col -b
34man dumpkeys | col -b
35man showkey | col -b
36dumpkeys | head
37```
39Critical scope:
40`loadkeys` changes the kernel keymap used by virtual consoles; check local docs
41for exact reach and permissions.
43Rollback idea:
45```sh
46loadkeys --default
47```
49Verify with local docs before presenting as final rollback.
51## setfont
53Use for Linux console fonts and Unicode maps.
55Research:
57```sh
58man setfont | col -b
59ls /usr/share/kbd/consolefonts 2>/dev/null | head
60```
62Important:
64- PSF fonts are common.
65- Font/glyph choices can affect color availability.
66- `-O` can save previous font/map.
67- `-C` can target a console device; permissions vary.
69## vconsole.conf / localectl / systemd-vconsole-setup
71Use for boot/persistent virtual-console keyboard/font config on systemd systems.
73Research:
75```sh
76man vconsole.conf | col -b
77man localectl | col -b
78man systemd-vconsole-setup.service | col -b
79```
81State persistence and privilege needs before editing.
83## Palette / colors
85Research:
87```sh
88man console_codes | col -b
89man setterm | col -b
90infocmp -1 linux | grep -E 'initc|oc|op|setaf|setab'
91```
93Linux console color behavior is not the same as graphical terminal emulators.
94Verify palette, SGR, and reset behavior locally.

pi/agent/skillz/linux-userland/SKILL.md

Deleted
deleted file mode 100644

+0 / −127 text lines

1---
2name: linux-userland
3os: lnx
4description: Use when editing or diagnosing Linux user-owned configuration, XDG paths, shell environment, PATH issues, dotfiles, user systemd units, desktop/session config, caches, state dirs, or app config under HOME.
5---
6
7# Linux Userland
8
9Linux config work inside the user's ownership boundary.
11**Boundary:** operate under `$HOME` and user managers only. If a fix needs `/etc`, `/usr`, `/var/lib`, packages, kernel settings, devices, or `sudo`, stop and use `linux` escalation.
13## Workflow
151. Identify app/tool, config file discovery rules, and current user/session.
162. Resolve XDG paths; do not hard-code `~/.config` if env overrides exist.
173. Read installed docs: `man`, `--help`, app config docs in repo/package.
184. Inspect current config/env/state.
195. Back up before edits; make minimal change.
206. Validate with app-specific parser/check command.
217. Reload/restart only user-owned process/service. Provide rollback.
23## XDG Paths
25| Purpose | Env | Default |
26| ------------------ | ----------------- | -------------------- |
27| Config | `XDG_CONFIG_HOME` | `$HOME/.config` |
28| Data | `XDG_DATA_HOME` | `$HOME/.local/share` |
29| State/logs/history | `XDG_STATE_HOME` | `$HOME/.local/state` |
30| Cache | `XDG_CACHE_HOME` | `$HOME/.cache` |
31| Runtime sockets | `XDG_RUNTIME_DIR` | set by login/session |
33Probe safely:
35```bash
36printf 'HOME=%s\nXDG_CONFIG_HOME=%s\nXDG_DATA_HOME=%s\nXDG_STATE_HOME=%s\nXDG_CACHE_HOME=%s\nXDG_RUNTIME_DIR=%s\n' \
37 "$HOME" "${XDG_CONFIG_HOME:-$HOME/.config}" "${XDG_DATA_HOME:-$HOME/.local/share}" \
38 "${XDG_STATE_HOME:-$HOME/.local/state}" "${XDG_CACHE_HOME:-$HOME/.cache}" "${XDG_RUNTIME_DIR:-}"
39```
41XDG env vars must be absolute paths to be valid.
43## Shell + Environment Diagnosis
45The agent's tool shell may not equal the user's interactive shell. Detect before giving syntax:
47```bash
48printf 'SHELL=%s\n' "$SHELL"
49getent passwd "$(id -un)" | awk -F: '{print "login_shell=" $7}'
50printf 'PATH=%s\n' "$PATH" | tr ':' '\n'
51```
53Startup files by shell:
55| Shell | Common user files | PATH/export syntax |
56| ------- | -------------------------------------------- | ----------------------------------------- |
57| bash | `~/.bashrc`, `~/.bash_profile`, `~/.profile` | `export NAME=value` |
58| zsh | `~/.zshrc`, `~/.zprofile`, `~/.zshenv` | `export NAME=value` |
59| fish | `~/.config/fish/config.fish` | `set -gx NAME value`; `fish_add_path DIR` |
60| nushell | `~/.config/nushell/env.nu`, `config.nu` | `$env.NAME = value` |
62Prefer editing the shell's config file over emitting complex copy-paste snippets. If root is needed, do not craft fish/nushell sudo heredocs; use `linux` script escalation.
64## User systemd Units
66User units live primarily in `$XDG_CONFIG_HOME/systemd/user` (default `~/.config/systemd/user`).
68Read:
70```bash
71systemctl --user --no-pager --full list-units --failed
72systemctl --user --no-pager --full status UNIT
73systemctl --user show UNIT -p LoadState -p ActiveState -p SubState -p Result -p ExecMainStatus
74systemctl --user cat UNIT
75journalctl --user-unit UNIT -b --no-pager --full -n 200
76systemd-analyze --user verify "${XDG_CONFIG_HOME:-$HOME/.config}/systemd/user/UNIT"
77```
79After editing a user unit:
81```bash
82systemctl --user daemon-reload
83systemctl --user status UNIT --no-pager --full
84journalctl --user-unit UNIT -b --no-pager --full -n 100
85```
87Restart only if the user asked for restart or the service was active before edit:
89```bash
90systemctl --user restart UNIT
91```
93Use `enable --now` only when the user asked for autostart.
95## Safe Edit Pattern
97For an existing regular config file, resolve symlinks first and confirm the target is inside the authorized user-owned boundary.
98Edit and restore the resolved target, leaving the original symlink intact.
99A `cp -a` backup of a symlink copies only the link, not a content snapshot.
101```bash
102file=$(realpath -e -- /path/to/file) || exit 1
103[ -f "$file" ] || exit 1
104backup=$(mktemp -- "$file.bak.XXXXXX") || exit 1
105cp -p -- "$file" "$backup" || exit 1
106# edit "$file"
107# run validator/reload
108# rollback if bad: cp -p -- "$backup" "$file"
109```
111Stop on resolution or backup failure; do not create a missing symlink target implicitly.
113Validation examples:
115- systemd user unit: `systemd-analyze --user verify FILE`
116- shell config: run the shell parser if available (`bash -n FILE`, `zsh -n FILE`); fish/nushell need shell-specific checks.
117- app config: use the app's documented `check`, `validate`, `doctor`, or dry-run command.
119## Common Mistakes
121| Mistake | Fix |
122| --------------------------------- | -------------------------------------------------------- |
123| Editing `/etc` from userland task | Stop; use `linux` escalation |
124| Assuming bash syntax | Detect shell; prefer editing files or POSIX `sh` scripts |
125| Ignoring XDG overrides | Resolve env/defaults first |
126| Restarting system service | Only use `systemctl --user`; escalate otherwise |
127| Changing config without rollback | Backup + validate + rollback command |

pi/agent/skillz/linux-userland/package.json

Deleted
deleted file mode 100644

+0 / −8 text lines

1{
2 "name": "linux-userland-skill",
3 "private": true,
4 "type": "module",
5 "scripts": {
6 "test": "node --test scripts/*.test.mjs"
7 }
8}

pi/agent/skillz/linux-userland/scripts/backup.test.mjs

Deleted
deleted file mode 100644

+0 / −57 text lines

1import assert from "node:assert/strict";
2import { spawnSync } from "node:child_process";
3import { lstatSync, mkdtempSync, readFileSync, readdirSync, rmSync, symlinkSync, writeFileSync } from "node:fs";
4import { tmpdir } from "node:os";
5import { join } from "node:path";
6import { test } from "node:test";
7
8const doc = readFileSync(new URL("../SKILL.md", import.meta.url), "utf8");
9const snippet = doc.match(/## Safe Edit Pattern[\s\S]*?```bash\n([\s\S]*?)```/)[1];
11for (const symlink of [false, true]) {
12 test(`backup and rollback preserve ${symlink ? "symlinked" : "regular"} config`, { skip: process.platform !== "linux" }, () => {
13 const dir = mkdtempSync(join(tmpdir(), "linux-userland-backup-"));
14 try {
15 const target = join(dir, "config target");
16 const file = symlink ? join(dir, "config link") : target;
17 writeFileSync(target, "original\n");
18 if (symlink) symlinkSync(target, file);
19 const script = snippet
20 .replace("/path/to/file", '"$CONFIG_FILE"')
21 .replace('# edit "$file"', 'printf "changed\\n" > "$file"')
22 .replace("# run validator/reload", 'test "$(cat "$backup")" = original || exit 1')
23 .replace("# rollback if bad: ", "");
24 const result = spawnSync("sh", ["-eu", "-c", script], {
25 env: { ...process.env, CONFIG_FILE: file },
26 encoding: "utf8",
27 });
28 assert.equal(result.status, 0, result.stderr);
29 assert.equal(readFileSync(target, "utf8"), "original\n");
30 assert.equal(lstatSync(file).isSymbolicLink(), symlink);
31 const backups = readdirSync(dir).filter((name) => name.includes(".bak."));
32 assert.equal(backups.length, 1);
33 assert.ok(lstatSync(join(dir, backups[0])).isFile());
34 } finally {
35 rmSync(dir, { recursive: true, force: true });
36 }
37 });
38}
40for (const kind of ["missing", "dangling symlink", "directory"]) {
41 test(`refuse ${kind} without creating a backup`, { skip: process.platform !== "linux" }, () => {
42 const dir = mkdtempSync(join(tmpdir(), "linux-userland-backup-"));
43 try {
44 const file = kind === "directory" ? dir : join(dir, "config");
45 if (kind === "dangling symlink") symlinkSync(join(dir, "missing"), file);
46 const before = readdirSync(dir);
47 const result = spawnSync("sh", ["-eu", "-c", snippet.replace("/path/to/file", '"$CONFIG_FILE"')], {
48 env: { ...process.env, CONFIG_FILE: file },
49 encoding: "utf8",
50 });
51 assert.equal(result.status, 1, result.stderr);
52 assert.deepEqual(readdirSync(dir), before);
53 } finally {
54 rmSync(dir, { recursive: true, force: true });
55 }
56 });
57}

pi/agent/skillz/linux/SKILL.md

Deleted
deleted file mode 100644

+0 / −122 text lines

1---
2name: linux
3os: lnx
4description: Use when diagnosing Linux system issues, asking about host state, systemd/journal logs, services, boot/session problems, permissions, devices, networking, or when a task may need root escalation.
5---
6
7# Linux
8
9Safe Linux diagnosis for agents without root.
11**Boundary:** read system state; do not mutate system config. For user-owned config under `$HOME`, also use `linux-userland`.
13## Non-Negotiables
15- No `sudo`, `su`, `doas`, `pkexec`, package manager install/remove, system-service mutation, `/etc` edits, kernel/sysctl changes, or device writes from the agent.
16- User-service changes follow [linux-userland](../linux-userland/SKILL.md); the system-service ban does not cover them.
17- Read-only probes first. Prefer commands with `--no-pager`, `--full`, bounded output, and explicit units/time ranges.
18- Prefer installed truth: `man`, `--help`, distro files. Web docs may not match host version.
19- Redact secrets from env, tokens, key files, URLs, logs, and command output.
20- If root is required, explain why and give a copy-paste command or script for the human to run.
22## Workflow
241. Classify: user config? → `linux-userland`. system state/root/service/device/package? → continue here.
252. Inventory host facts before hypotheses.
263. Inspect installed docs for exact command/config behavior.
274. Gather bounded logs/status.
285. State root cause confidence + evidence. If changing system state is needed, escalate to human.
30## Read-Only Inventory
32```bash
33uname -a
34cat /etc/os-release
35id
36printf 'SHELL=%s\n' "$SHELL"
37getent passwd "$(id -un)"
38systemctl --version 2>/dev/null || true
39loginctl show-user "$(id -un)" 2>/dev/null || true
40```
42## Installed Documentation
44```bash
45MANWIDTH=100 MANPAGER=cat man systemctl | col -b | head -120
46MANWIDTH=100 MANPAGER=cat man 5 systemd.service | col -b | rg -n 'ExecStart|Type=|Restart='
47man -k 'journal|systemd|network'
48<command> --help 2>&1 | head -80
49```
51Use section numbers: `man 1 command`, `man 5 config-file`, `man 7 topic`, `man 8 admin-command`.
53## systemd Diagnosis
55System manager is OS-level. User manager is per-user; see `linux-userland` for editing user units.
57```bash
58systemctl --no-pager --full status UNIT
59systemctl --no-pager --full list-units --failed
60systemctl show UNIT -p LoadState -p ActiveState -p SubState -p Result -p ExecMainStatus
61systemctl cat UNIT
62systemd-analyze verify /path/to/unit.service
63```
65`systemctl status` is for humans. `systemctl show` is for parseable properties.
67## Network Read-Only Probes
69```bash
70ip addr
71ip route
72resolvectl status 2>/dev/null || true
73```
75## journalctl Diagnosis
77Always bound logs:
79```bash
80journalctl -b --no-pager -n 200
81journalctl -b -u UNIT --no-pager --full -n 200
82journalctl -b --since '1 hour ago' -p warning..alert --no-pager
83journalctl --list-boots --no-pager
84```
86Unprivileged users may not read system journal. If denied, report the permission boundary; do not try `sudo`.
88## Root Escalation
90Escalate only after read-only evidence shows user privileges are insufficient. Never execute elevation.
92Follow the global command-handoff policy.
94Prefer a direct launch with no shell syntax:
96```text
97sudo systemctl status UNIT --no-pager --full
98```
100For multi-step or shell-sensitive actions, write a reviewed POSIX shell script in a user-owned path and provide a launch command:
102```text
103sudo sh /tmp/pi-root-action.sh
104```
106Write the script to a path without spaces, e.g. `/tmp/pi-root-action.sh` or `$HOME/.cache/pi-root-action.sh`. Include:
108- what it changes
109- pre-checks
110- backup path when editing
111- rollback command
112- verification command
114## Common Mistakes
116| Mistake | Fix |
117| ------------------------------ | --------------------------------------- |
118| Running unbounded `journalctl` | Add `-b`, `-n`, `--since`, `--no-pager` |
119| Treating web docs as exact | Check installed `man`/`--help` |
120| Using `sudo` from agent | Stop; give human command/script |
121| Editing `/etc` directly | Escalate with backup + rollback |
122| Guessing before inventory | Collect host facts + logs first |

pi/agent/skillz/lnx/archlinux/SKILL.md

Added
new file mode 100644

+85 / −0 text lines

1---
2name: archlinux
3os: lnx
4disable-model-invocation: true
5description: "Use for Arch Linux setup and troubleshooting: pacman, AUR/PKGBUILD/makepkg, upgrades, maintenance, boot, services, packages. Not generic Linux or Raspberry Pi."
6---
7
8# Arch Linux
9
10Arch-specific system/config/troubleshooting/pkg help.
11Confirm Arch via `/etc/os-release`; `pacman` alone is not proof.
12Keep volatile facts out of memory; fetch current docs.
14## Route
16- System/maintenance/upgrade → `references/system.md`
17- Config changes/mirrors/hooks → `references/config.md`
18- Troubleshooting failures → `references/troubleshooting.md`
19- Software/pkg/AUR/build issues → `references/software.md`
21## Fresh Truth
23Local first:
25```sh
26man pacman pacman.conf makepkg PKGBUILD alpm-hooks paccache pacdiff
27```
29Web when local docs missing/stale:
31```text
32https://man.archlinux.org/man/<page>.<section>.en
33https://wiki.archlinux.org/title/<Topic>
34https://archlinux.org/news/
35https://archlinux.org/packages/
36https://aur.archlinux.org/
37```
39Before upgrade advice, check Arch News.
40For exact package/repo/current syntax, use current man/wiki/package pages, not memory.
42## Local Wiki
44If offline/frequent Arch work, check:
46```sh
47pacman -Qq arch-wiki-docs arch-wiki-lite wikiman 2>/dev/null
48```
50If absent, suggest installing one.
51Do not require it.
53## Safety
55- No partial upgrades.
56 Avoid `pacman -Sy <pkg>`; use full upgrade flow.
57- If `-Sy` happened and `-Su` failed:
58 resolve + complete upgrade before other pkg ops.
59- AUR = untrusted user content.
60 Inspect `PKGBUILD`, `*.install`, patches before build.
61- `.pacnew`/`.pacsave` need manual merge; never blind overwrite.
62- Avoid unless current Arch News/wiki explicitly says so:
63 `--overwrite`, `-Rdd`, `--nodeps`, blind `--noconfirm`.
64- Do not symlink libraries to fix soname errors; complete/recover upgrade.
66## Root Delegation
68Do not run root/admin mutations yourself.
69Follow [linux](../linux/SKILL.md) for system boundaries and human-run escalation, even when the user authorizes the change.
70Give exact command for user to run.
71Detect user's shell first for syntax compatibility:
73```sh
74printf 'SHELL=%s\n' "$SHELL"
75getent passwd "$(id -un)" | cut -d: -f7
76```
78Command style:
80- unknown/fish/nu → one simple command per line; avoid arrays, functions,
81 process substitution, brace expansion.
82- env vars → use `env VAR=value command` for portability.
83- complex flow → write tiny script or split steps.
84- state impact + rollback/log path before mutating `/etc`, pacman DB, boot,
85 services.

pi/agent/skillz/lnx/archlinux/package.json

Added
new file mode 100644

+9 / −0 text lines

1{
2 "name": "archlinux-skill",
3 "version": "0.1.0",
4 "private": true,
5 "type": "module",
6 "scripts": {
7 "test": "node --test scripts/*.test.mjs"
8 }
9}

pi/agent/skillz/lnx/archlinux/references/config.md

Added
new file mode 100644

+72 / −0 text lines

1# Arch Config
2
3Use for `/etc`, pacman config, repos, mirrors, hooks, service/package config.
4
5## Before Changing
6
7Classify:
8
9- file path
10- owning package
11- live reload/restart needed?
12- backup/rollback path
13- root required?
15Read-only probes:
17```sh
18pacman -Qo /path/to/file
19pacman -Qii package
20systemctl cat unit.service
21systemctl status unit.service --no-pager
22```
24If root edit needed, delegate via user's shell.
25Prefer editor-safe command, e.g. `sudoedit /etc/file` when appropriate.
27## Pacman Config
29Current truth:
30`man pacman.conf`, wiki `Pacman`.
32Stable rules:
34- Main config:
35 `/etc/pacman.conf`.
36- Mirror list commonly included from `/etc/pacman.d/mirrorlist`.
37- Repository order matters when packages share names.
38- Directives are case-sensitive/CamelCase.
39- `NoUpgrade`/`NoExtract` paths are archive paths:
40 no leading `/`.
41- Hooks are non-interactive; system hooks live under
42 `/usr/share/libalpm/hooks/`, admin hooks commonly under
43 `/etc/pacman.d/hooks/`.
44- Signature policy/current defaults:
45 verify with `man pacman.conf`, do not weaken casually.
47## Mirrors/Repos
49For stale/404/target-not-found problems, inspect:
51```sh
52grep -v '^#' /etc/pacman.conf
53grep -v '^#' /etc/pacman.d/mirrorlist | head
54```
56Use current wiki `Mirrors`/`Reflector` before recommending tooling.
57After repo config changes, full upgrade before installing new packages.
59## Service/Software Config
61- Check package docs + Arch Wiki page for that software.
62- Check ownership before editing generated/package-owned files.
63- Prefer drop-ins over modifying unit files directly.
64- State reload command separately:
65 e.g. daemon reload, service restart, app reload.
67## Current Sources
69- Man:
70 `pacman.conf(5)`, `alpm-hooks(5)`, `pacman(8)`
71- Wiki:
72 `Pacman`, `Mirrors`, target software page

pi/agent/skillz/lnx/archlinux/references/software.md

Added
new file mode 100644

+87 / −0 text lines

1# Arch Software
2
3Use for pacman, packages, AUR, PKGBUILD, makepkg, app install/build issues.
4
5## Pacman Query Map
6
7```sh
8pacman -Ss term # sync DB search
9pacman -Si package # sync pkg info
10pacman -Qs term # installed search
11pacman -Qi package # installed pkg info
12pacman -Ql package # installed files
13pacman -Qo /path/file # file owner
14pacman -Qm # foreign/local/AUR
15pacman -Qtdq # orphan deps
16pacman -F path # remote file owner; needs files DB
17```
19Refresh files DB only when needed:
20`pacman -Fy`.
22## Install/Remove
24- Install from repos:
25 `pacman -S package` if DB current; otherwise full upgrade flow.
26- Full upgrade:
27 `pacman -Syu`.
28- Install local pkg:
29 `pacman -U ./pkg.pkg.tar.zst`.
30- Remove package + unneeded deps:
31 `pacman -Rs package`.
32- Avoid `-Rsc`, `-Rdd`, `--nodeps`, `--overwrite` unless explicitly justified.
33- Use `--print`/`--print-format` for dry/processable transaction previews.
35## AUR
37AUR is unsupported/untrusted user content.
38Agent must inspect before build/install:
40```sh
41less PKGBUILD
42ls -la
43git diff @~..@ # if updating existing clone
44```
46Check for:
48- unexpected network/code exec in build funcs
49- dangerous `install` scripts
50- checksum/PGP handling
51- bundled patches
52- dependency sanity
54Build rules:
56- `base-devel` is assumed by AUR packages.
57- Run `makepkg` as normal user, never root.
58- `makepkg -s` can install repo deps via pacman; AUR deps need separate
59 handling.
60- `makepkg --verifysource` checks sources without building.
61- `makepkg --printsrcinfo` for metadata.
62- Clean chroot helps distinguish user-env failure from broken PKGBUILD.
64AUR helpers do not remove review duty.
66## PKGBUILD Facts
68Current truth:
69`man PKGBUILD`, `man makepkg`.
70Durable basics:
72- PKGBUILD is Bash sourced by `makepkg`; treat as executable code.
73- Minimal fields include `pkgname`, `pkgver`, `pkgrel`, `arch`.
74- `package()` installs into `$pkgdir`; `prepare()`, `build()`, `check()`
75 optional.
76- `backup=()` controls pacnew/pacsave behavior for config files.
77- `source=()` + checksums/PGP define source verification.
78- Split packages use multiple `pkgname`s and `package_name()` funcs.
80## Current Sources
82- Man:
83 `pacman(8)`, `makepkg(8)`, `PKGBUILD(5)`, `makepkg.conf(5)`
84- Wiki:
85 `Pacman`, `Arch User Repository`, `Creating packages`, `Makepkg`
86- Live:
87 `archlinux.org/packages`, `aur.archlinux.org`

pi/agent/skillz/lnx/archlinux/references/system.md

Added
new file mode 100644

+59 / −0 text lines

1# Arch System
2
3Use for system state, maintenance, upgrades, health.
4
5## First Read-only Probes
6
7```sh
8cat /etc/os-release
9uname -a
10pacman -Q pacman 2>/dev/null
11systemctl --failed
12journalctl -b --no-pager -p warning..alert
13pacman -Qm
14pacman -Qtdq
15```
17Do not infer Arch from `pacman` alone; read `/etc/os-release`.
19## Upgrade Discipline
21- Read `https://archlinux.org/news/` before upgrade guidance.
22- Full upgrades only:
23 `pacman -Syu`.
24- Never advise `pacman -Sy <pkg>`.
25- Keep rescue/live media in mind for risky kernel/boot/glibc/systemd updates.
26- After upgrade:
27 review pacman output, handle `.pacnew`, restart affected services or reboot.
28- AUR/local packages are user's responsibility; rebuild when deps/ABI change.
30## Maintenance Checks
32```sh
33systemctl --failed
34journalctl -b --no-pager
35pacman -Qtdq # orphan deps
36pacman -Qm # foreign/local/AUR packages
37pacman -Qkk # file integrity; can be noisy
38```
40Package cache:
42- Prefer `paccache` from `pacman-contrib` over aggressive `pacman -Scc`.
43- Preserve rollback ability unless disk pressure is real.
45Config drift:
47```sh
48find /etc -name '*.pacnew' -o -name '*.pacsave'
49grep -E '\.pac(new|save)' /var/log/pacman.log
50```
52Use `pacdiff` if present.
54## Current Sources
56- Wiki:
57 `System maintenance`, `Pacman`, `Pacman/Pacnew and Pacsave`
58- Man:
59 `pacman(8)`, `paccache(8)`, `pacdiff(8)`

pi/agent/skillz/lnx/archlinux/references/troubleshooting.md

Added
new file mode 100644

+97 / −0 text lines

1# Arch Troubleshooting
2
3Use for boot, service, package transaction, upgrade, and app failures.
4Start read-only.
5Identify last change.
6
7## Baseline
8
9```sh
10cat /etc/os-release
11uname -a
12systemctl --failed
13journalctl -b --no-pager -p err..alert
14tail -n 80 /var/log/pacman.log
15```
17For app issue:
19```sh
20command -v app
21pacman -Qo "$(command -v app)"
22pacman -Qi package
23```
25If command substitution conflicts with user shell, split into two commands.
27## Package Transaction Errors
29Lock:
31- Verify no pacman/makepkg/AUR helper process is running before removing lock.
32- Current lock path/safe handling:
33 check wiki/man.
35Conflicting files:
37```sh
38pacman -Qo /path/to/conflict
39```
41If unowned, investigate origin before rename/delete.
42Avoid `--overwrite` unless current Arch guidance says so.
44Target not found / retrieval failed:
46- Verify package exists:
47 `archlinux.org/packages`, `pacman -Ss`, AUR if unofficial.
48- Check enabled repos + mirror freshness.
49- Do not fix with `pacman -Sy <pkg>`.
51Invalid/corrupt package/signature:
53- Check current wiki `Pacman/Package signing` + Arch News.
54- Suspect stale keyring, partial downloads, bad mirror only after evidence.
56Interrupted upgrade / broken pacman / unbootable:
58- Fetch current wiki `Pacman#Troubleshooting` before procedural advice.
59- Prefer live ISO + mount + `arch-chroot`/`--sysroot` recovery path.
60- Reconstruct exact failed transaction from `/var/log/pacman.log` when relevant.
62## Software Failures
64Classify:
66- packaging issue?
67 upstream bug?
68 config?
69 missing optional dep?
70 partial upgrade?
71 service sandbox?
72 permissions?
74Probes:
76```sh
77pacman -Qi package
78pacman -Ql package | less
79pacman -Qii package
80journalctl -b --user --no-pager
81journalctl -b --no-pager -u unit.service
82```
84Missing `.so` after upgrades usually means partial/incomplete upgrade or
85unrebuilt local/AUR package.
86Do not symlink libs.
88## Output Shape
90```text
91Observed: ...
92Likely cause: ...
93Evidence: ...
94Safe checks: ...
95User-run root step, if needed: ...
96Rollback/logs: ...
97```

pi/agent/skillz/lnx/archlinux/scripts/archlinux-doc.test.mjs

Added
new file mode 100644

+48 / −0 text lines

1import assert from "node:assert/strict";
2import { readFileSync } from "node:fs";
3import { join } from "node:path";
4import { test } from "node:test";
5
6const root = new URL("..", import.meta.url);
7const files = [
8 "SKILL.md",
9 "references/system.md",
10 "references/config.md",
11 "references/troubleshooting.md",
12 "references/software.md",
13];
14const docs = files.map((file) => [file, readFileSync(join(root.pathname, file), "utf8")]);
15const all = docs.map(([, text]) => text).join("\n");
17test("Arch skill points at current sources before volatile advice", () => {
18 assert.match(all, /https:\/\/archlinux\.org\/news\//);
19 assert.match(all, /https:\/\/wiki\.archlinux\.org\/title\//);
20 assert.match(all, /https:\/\/man\.archlinux\.org\/man\//);
21 assert.match(all, /man pacman/);
22});
24test("partial-upgrade hazard is only documented as a warning", () => {
25 for (const [file, text] of docs) {
26 for (const [index, line] of text.split("\n").entries()) {
27 if (!/pacman -Sy(\s|$|<)/.test(line)) continue;
28 assert.match(
29 line,
30 /Avoid|Never|Do not|No partial|happened/,
31 `${file}:${index + 1} must warn about pacman -Sy`,
32 );
33 }
34 }
35});
37test("AUR and dangerous pacman flags keep safety warnings", () => {
38 assert.match(all, /AUR = untrusted|AUR is unsupported\/untrusted/);
39 assert.match(all, /Inspect `PKGBUILD`|inspect before build\/install/);
40 assert.match(all, /Avoid .*--overwrite/);
41 assert.match(all, /Do not symlink libs|Do not symlink libraries/);
42});
44test("root mutation guidance delegates instead of auto-running", () => {
45 assert.match(all, /Do not run root\/admin mutations yourself\./);
46 assert.match(all, /\.\.\/linux\/SKILL\.md/);
47 assert.match(all, /sudoedit \/etc\/file/);
48});

pi/agent/skillz/lnx/linux-console/SKILL.md

Added
new file mode 100644

+102 / −0 text lines

1---
2name: linux-console
3os: lnx
4disable-model-invocation: true
5description: "Use for Linux kernel virtual consoles (/dev/ttyN, Ctrl+Alt+F1): getty, TERM=linux, vconsole.conf, setfont, loadkeys, setterm, fbcon. Not emulators, ptys, tmux, X11, or Wayland."
6---
7
8# Linux Console
9
10## Scope
12Use for kernel virtual consoles only:
14- `/dev/ttyN`
15- `TERM=linux`
16- `tty1`, `tty2`, ...
17- `Ctrl+Alt+F1` / VT switching
18- `getty`, `vconsole.conf`, `setfont`, `loadkeys`, `setterm`, `fbcon`
20Do not use for:
22- graphical terminal emulators
23- `/dev/pts/*` pseudo-terminals
24- tmux internals
25- X11 / Wayland / XKB config
27## First Probe
29Identify the target host and VT from the user's report before probing.
30The agent's stdin and `TERM` describe its execution context, not necessarily the target console.
32Run these in the target session, or ask the user for their output there:
34```sh
35tty
36printf '%s\n' "$TERM"
37```
39Interpret:
41- Target `/dev/ttyN` + `TERM=linux` → real VT likely.
42- Agent `/dev/pts/N` or `not a tty` → target remains unknown; do not reject VT diagnosis.
43- Target `/dev/pts/N` → pty; clarify whether a separate VT is the actual target.
44- User reports `tty1`/`tty2` on another session/host → continue target-specific read-only diagnosis.
46Use `infocmp -1 linux` to inspect console capabilities; it does not detect the target.
47Do not send console escape sequences to the agent's terminal as a substitute for the target.
48Missing local man page → fetch current upstream man page.
50## Learn Locally First
52Prefer local truth over memory:
54```sh
55man console_codes | col -b
56man setterm | col -b
57man vconsole.conf | col -b
58man loadkeys | col -b
59man keymaps | col -b
60man setfont | col -b
61man reset | col -b
62infocmp -1 linux
63```
65For deeper lookup:
66`references/research.md`.
68## Durable Rules
70- `TERM=linux` describes Linux-console capabilities via terminfo.
71- `clear` and `reset` differ; inspect `infocmp -1 linux`.
72- Linux console interprets control/escape sequences; verify in
73 `console_codes(4)`.
74- Existing screen cells may need redraw after display/attribute changes.
75- Keymap, font, palette, and persistence scopes differ; classify first.
77## Change Hygiene
79For every proposed change, state:
81- target:
82 current VT | all VTs | boot/persistent
83- mechanism:
84 escape seq | terminfo | kbd tool | system config | ioctl
85- privilege needs:
86 none | user permissions | root/admin | unknown until probed
87- rollback/reset path
89## Safety
91- Never apply X11/Wayland/XKB/niri fixes to Linux console.
92- Never confuse `/dev/ttyN` with `/dev/pts/N`.
93- Do not change keymaps/fonts/persistent config without explicit user intent.
94- Prefer `setterm`, `loadkeys`, `setfont`, `vconsole.conf` docs over guesses.
96## References
98Read when needed:
100- `references/research.md` — fresh docs, command probes, web fallbacks.
101- `references/model.md` — VT model, terminfo, reset/clear, screen memory.
102- `references/tools.md` — setterm/loadkeys/setfont/vconsole scope notes.

pi/agent/skillz/lnx/linux-console/references/model.md

Added
new file mode 100644

+77 / −0 text lines

1# Model
2
3## Terms
4
5- Linux console:
6 kernel console implementation.
7- Virtual console / VT:
8 numbered console, usually `/dev/ttyN`.
9- pty:
10 pseudo-terminal, usually `/dev/pts/N`; not a real VT.
11- `TERM=linux`:
12 terminfo name commonly used by Linux VTs.
13- framebuffer console / `fbcon`:
14 kernel console display path on many systems.
16## Detection
18Evaluate the target session, not the agent's execution context.
19Strong signal from the target:
21```text
22/dev/ttyN + TERM=linux
23```
25`/dev/pts/N` identifies the probed session as a pty, not the user's separate VT.
26Agent output of `/dev/pts/N` or `not a tty` leaves the target unknown.
27Confirm the target host and VT; continue remote diagnosis rather than stopping.
29Use exact user wording too:
30`tty1`, `tty2`, `virtual console`, `linux console`, `Ctrl+Alt+F1`, `getty`,
31`fbcon`.
33## Terminfo
35`infocmp -1 linux` shows what `clear`, `reset`, curses apps, and terminfo-aware
36programs will emit.
38Inspect, do not assume:
40```sh
41infocmp -1 linux | grep -E 'clear|rs1|rs2|rs3|oc|op|initc|sgr0'
42```
44## Clear vs Reset
46`clear` normally clears/redraws screen state.
48`reset` reinitializes terminal state via terminfo reset strings.
49It may undo palette/display state.
50Confirm through `infocmp -1 linux` and `man reset`.
52## Escape Controls
54`console_codes(4)` is source of truth for Linux-console control sequences.
55Stable topics there:
57- control chars
58- ESC / CSI / OSC sequences
59- SGR attributes
60- palette controls
61- private Linux console sequences
63Avoid hard-wiring controls unless the task explicitly needs raw escapes.
64Prefer terminfo-aware tools when possible.
66## Screen Memory
68`vcs(4)` documents `/dev/vcsN` and `/dev/vcsaN` screen-memory devices.
69They can help inspect or dump VTs.
70Access depends on device permissions.
71Prefer `setterm --dump` for simple snapshots when available.
73## Low-level ioctls
75`ioctl_console(2)` describes Linux-specific console/VT ioctls and warns they are
76internal-ish.
77Prefer user tools unless low-level work is requested.

pi/agent/skillz/lnx/linux-console/references/research.md

Added
new file mode 100644

+58 / −0 text lines

1# Research Pattern
2
3Identify the target host and VT first.
4Run session probes in that target session, or ask the user to run them there:
5
6```sh
7tty
8printf '%s\n' "$TERM"
9```
11The agent's pty or missing tty does not rule out a separate target VT.
12Inspect capabilities with `infocmp -1 linux`; terminfo lookup is not target detection.
13Run device probes below only on the target host.
15Man pages:
17```sh
18man console_codes | col -b
19man setterm | col -b
20man vconsole.conf | col -b
21man loadkeys | col -b
22man keymaps | col -b
23man dumpkeys | col -b
24man showkey | col -b
25man setfont | col -b
26man reset | col -b
27man terminfo | col -b
28man vcs | col -b
29man ioctl_console | col -b
30```
32Useful probes:
34```sh
35infocmp -1 linux | grep -E '^(\s*(clear|rs[123]|is[123]|oc|op|initc|sgr0)=)'
36dumpkeys | head
37kbd_mode
38fgconsole 2>/dev/null
39ls -l /dev/tty[0-9]* /dev/vcs* /dev/vcsa* 2>/dev/null
40```
42If local docs are missing/stale, fetch current upstream docs:
44- <https://man7.org/linux/man-pages/man4/console_codes.4.html>
45- <https://man7.org/linux/man-pages/man1/setterm.1.html>
46- <https://man7.org/linux/man-pages/man5/vconsole.conf.5.html>
47- <https://man7.org/linux/man-pages/man1/loadkeys.1.html>
48- <https://man7.org/linux/man-pages/man5/keymaps.5.html>
49- <https://man7.org/linux/man-pages/man8/setfont.8.html>
50- <https://man7.org/linux/man-pages/man1/clear.1.html>
51- <https://man7.org/linux/man-pages/man1/reset.1.html>
52- <https://man7.org/linux/man-pages/man5/terminfo.5.html>
53- <https://man7.org/linux/man-pages/man4/vcs.4.html>
54- <https://man7.org/linux/man-pages/man2/ioctl_console.2.html>
56Distro docs can explain policy/integration.
57Prefer upstream man pages for interfaces, distro wiki for packaging/persistence
58quirks.

pi/agent/skillz/lnx/linux-console/references/tools.md

Added
new file mode 100644

+94 / −0 text lines

1# Tools
2
3## setterm
4
5Use for terminal attributes and VT-specific controls.
6
7Research:
8
9```sh
10man setterm | col -b
11setterm --help
12```
14Common scopes:
16- foreground/background/rendering attrs:
17 current terminal stream
18- `--store`:
19 stored defaults for reset-to-default on virtual consoles
20- blanking, bell, repeat, kernel messages:
21 virtual-console-specific controls
23State exact scope before changing.
25## loadkeys / dumpkeys / showkey / keymaps
27Use for kernel console keyboard maps, not XKB/X11/Wayland.
29Research:
31```sh
32man loadkeys | col -b
33man keymaps | col -b
34man dumpkeys | col -b
35man showkey | col -b
36dumpkeys | head
37```
39Critical scope:
40`loadkeys` changes the kernel keymap used by virtual consoles; check local docs
41for exact reach and permissions.
43Rollback idea:
45```sh
46loadkeys --default
47```
49Verify with local docs before presenting as final rollback.
51## setfont
53Use for Linux console fonts and Unicode maps.
55Research:
57```sh
58man setfont | col -b
59ls /usr/share/kbd/consolefonts 2>/dev/null | head
60```
62Important:
64- PSF fonts are common.
65- Font/glyph choices can affect color availability.
66- `-O` can save previous font/map.
67- `-C` can target a console device; permissions vary.
69## vconsole.conf / localectl / systemd-vconsole-setup
71Use for boot/persistent virtual-console keyboard/font config on systemd systems.
73Research:
75```sh
76man vconsole.conf | col -b
77man localectl | col -b
78man systemd-vconsole-setup.service | col -b
79```
81State persistence and privilege needs before editing.
83## Palette / colors
85Research:
87```sh
88man console_codes | col -b
89man setterm | col -b
90infocmp -1 linux | grep -E 'initc|oc|op|setaf|setab'
91```
93Linux console color behavior is not the same as graphical terminal emulators.
94Verify palette, SGR, and reset behavior locally.

pi/agent/skillz/lnx/linux-userland/SKILL.md

Added
new file mode 100644

+128 / −0 text lines

1---
2name: linux-userland
3os: lnx
4disable-model-invocation: true
5description: "Use for Linux user-owned config and environment: HOME/XDG paths, shell, PATH, dotfiles, user systemd, desktop/session settings, caches, state dirs."
6---
7
8# Linux Userland
9
10Linux config work inside the user's ownership boundary.
12**Boundary:** operate under `$HOME` and user managers only. If a fix needs `/etc`, `/usr`, `/var/lib`, packages, kernel settings, devices, or `sudo`, stop and use `linux` escalation.
14## Workflow
161. Identify app/tool, config file discovery rules, and current user/session.
172. Resolve XDG paths; do not hard-code `~/.config` if env overrides exist.
183. Read installed docs: `man`, `--help`, app config docs in repo/package.
194. Inspect current config/env/state.
205. Back up before edits; make minimal change.
216. Validate with app-specific parser/check command.
227. Reload/restart only user-owned process/service. Provide rollback.
24## XDG Paths
26| Purpose | Env | Default |
27| ------------------ | ----------------- | -------------------- |
28| Config | `XDG_CONFIG_HOME` | `$HOME/.config` |
29| Data | `XDG_DATA_HOME` | `$HOME/.local/share` |
30| State/logs/history | `XDG_STATE_HOME` | `$HOME/.local/state` |
31| Cache | `XDG_CACHE_HOME` | `$HOME/.cache` |
32| Runtime sockets | `XDG_RUNTIME_DIR` | set by login/session |
34Probe safely:
36```bash
37printf 'HOME=%s\nXDG_CONFIG_HOME=%s\nXDG_DATA_HOME=%s\nXDG_STATE_HOME=%s\nXDG_CACHE_HOME=%s\nXDG_RUNTIME_DIR=%s\n' \
38 "$HOME" "${XDG_CONFIG_HOME:-$HOME/.config}" "${XDG_DATA_HOME:-$HOME/.local/share}" \
39 "${XDG_STATE_HOME:-$HOME/.local/state}" "${XDG_CACHE_HOME:-$HOME/.cache}" "${XDG_RUNTIME_DIR:-}"
40```
42XDG env vars must be absolute paths to be valid.
44## Shell + Environment Diagnosis
46The agent's tool shell may not equal the user's interactive shell. Detect before giving syntax:
48```bash
49printf 'SHELL=%s\n' "$SHELL"
50getent passwd "$(id -un)" | awk -F: '{print "login_shell=" $7}'
51printf 'PATH=%s\n' "$PATH" | tr ':' '\n'
52```
54Startup files by shell:
56| Shell | Common user files | PATH/export syntax |
57| ------- | -------------------------------------------- | ----------------------------------------- |
58| bash | `~/.bashrc`, `~/.bash_profile`, `~/.profile` | `export NAME=value` |
59| zsh | `~/.zshrc`, `~/.zprofile`, `~/.zshenv` | `export NAME=value` |
60| fish | `~/.config/fish/config.fish` | `set -gx NAME value`; `fish_add_path DIR` |
61| nushell | `~/.config/nushell/env.nu`, `config.nu` | `$env.NAME = value` |
63Prefer editing the shell's config file over emitting complex copy-paste snippets. If root is needed, do not craft fish/nushell sudo heredocs; use `linux` script escalation.
65## User systemd Units
67User units live primarily in `$XDG_CONFIG_HOME/systemd/user` (default `~/.config/systemd/user`).
69Read:
71```bash
72systemctl --user --no-pager --full list-units --failed
73systemctl --user --no-pager --full status UNIT
74systemctl --user show UNIT -p LoadState -p ActiveState -p SubState -p Result -p ExecMainStatus
75systemctl --user cat UNIT
76journalctl --user-unit UNIT -b --no-pager --full -n 200
77systemd-analyze --user verify "${XDG_CONFIG_HOME:-$HOME/.config}/systemd/user/UNIT"
78```
80After editing a user unit:
82```bash
83systemctl --user daemon-reload
84systemctl --user status UNIT --no-pager --full
85journalctl --user-unit UNIT -b --no-pager --full -n 100
86```
88Restart only if the user asked for restart or the service was active before edit:
90```bash
91systemctl --user restart UNIT
92```
94Use `enable --now` only when the user asked for autostart.
96## Safe Edit Pattern
98For an existing regular config file, resolve symlinks first and confirm the target is inside the authorized user-owned boundary.
99Edit and restore the resolved target, leaving the original symlink intact.
100A `cp -a` backup of a symlink copies only the link, not a content snapshot.
102```bash
103file=$(realpath -e -- /path/to/file) || exit 1
104[ -f "$file" ] || exit 1
105backup=$(mktemp -- "$file.bak.XXXXXX") || exit 1
106cp -p -- "$file" "$backup" || exit 1
107# edit "$file"
108# run validator/reload
109# rollback if bad: cp -p -- "$backup" "$file"
110```
112Stop on resolution or backup failure; do not create a missing symlink target implicitly.
114Validation examples:
116- systemd user unit: `systemd-analyze --user verify FILE`
117- shell config: run the shell parser if available (`bash -n FILE`, `zsh -n FILE`); fish/nushell need shell-specific checks.
118- app config: use the app's documented `check`, `validate`, `doctor`, or dry-run command.
120## Common Mistakes
122| Mistake | Fix |
123| --------------------------------- | -------------------------------------------------------- |
124| Editing `/etc` from userland task | Stop; use `linux` escalation |
125| Assuming bash syntax | Detect shell; prefer editing files or POSIX `sh` scripts |
126| Ignoring XDG overrides | Resolve env/defaults first |
127| Restarting system service | Only use `systemctl --user`; escalate otherwise |
128| Changing config without rollback | Backup + validate + rollback command |

pi/agent/skillz/lnx/linux-userland/package.json

Added
new file mode 100644

+8 / −0 text lines

1{
2 "name": "linux-userland-skill",
3 "private": true,
4 "type": "module",
5 "scripts": {
6 "test": "node --test scripts/*.test.mjs"
7 }
8}

pi/agent/skillz/lnx/linux-userland/scripts/backup.test.mjs

Added
new file mode 100644

+57 / −0 text lines

1import assert from "node:assert/strict";
2import { spawnSync } from "node:child_process";
3import { lstatSync, mkdtempSync, readFileSync, readdirSync, rmSync, symlinkSync, writeFileSync } from "node:fs";
4import { tmpdir } from "node:os";
5import { join } from "node:path";
6import { test } from "node:test";
7
8const doc = readFileSync(new URL("../SKILL.md", import.meta.url), "utf8");
9const snippet = doc.match(/## Safe Edit Pattern[\s\S]*?```bash\n([\s\S]*?)```/)[1];
11for (const symlink of [false, true]) {
12 test(`backup and rollback preserve ${symlink ? "symlinked" : "regular"} config`, { skip: process.platform !== "linux" }, () => {
13 const dir = mkdtempSync(join(tmpdir(), "linux-userland-backup-"));
14 try {
15 const target = join(dir, "config target");
16 const file = symlink ? join(dir, "config link") : target;
17 writeFileSync(target, "original\n");
18 if (symlink) symlinkSync(target, file);
19 const script = snippet
20 .replace("/path/to/file", '"$CONFIG_FILE"')
21 .replace('# edit "$file"', 'printf "changed\\n" > "$file"')
22 .replace("# run validator/reload", 'test "$(cat "$backup")" = original || exit 1')
23 .replace("# rollback if bad: ", "");
24 const result = spawnSync("sh", ["-eu", "-c", script], {
25 env: { ...process.env, CONFIG_FILE: file },
26 encoding: "utf8",
27 });
28 assert.equal(result.status, 0, result.stderr);
29 assert.equal(readFileSync(target, "utf8"), "original\n");
30 assert.equal(lstatSync(file).isSymbolicLink(), symlink);
31 const backups = readdirSync(dir).filter((name) => name.includes(".bak."));
32 assert.equal(backups.length, 1);
33 assert.ok(lstatSync(join(dir, backups[0])).isFile());
34 } finally {
35 rmSync(dir, { recursive: true, force: true });
36 }
37 });
38}
40for (const kind of ["missing", "dangling symlink", "directory"]) {
41 test(`refuse ${kind} without creating a backup`, { skip: process.platform !== "linux" }, () => {
42 const dir = mkdtempSync(join(tmpdir(), "linux-userland-backup-"));
43 try {
44 const file = kind === "directory" ? dir : join(dir, "config");
45 if (kind === "dangling symlink") symlinkSync(join(dir, "missing"), file);
46 const before = readdirSync(dir);
47 const result = spawnSync("sh", ["-eu", "-c", snippet.replace("/path/to/file", '"$CONFIG_FILE"')], {
48 env: { ...process.env, CONFIG_FILE: file },
49 encoding: "utf8",
50 });
51 assert.equal(result.status, 1, result.stderr);
52 assert.deepEqual(readdirSync(dir), before);
53 } finally {
54 rmSync(dir, { recursive: true, force: true });
55 }
56 });
57}

pi/agent/skillz/lnx/linux/SKILL.md

Added
new file mode 100644

+123 / −0 text lines

1---
2name: linux
3os: lnx
4disable-model-invocation: true
5description: "Use for Linux system diagnosis: host state, systemd/journal, services, boot, permissions, devices, network, root escalation. For user-owned config use linux-userland."
6---
7
8# Linux
9
10Safe Linux diagnosis for agents without root.
12**Boundary:** read system state; do not mutate system config. For user-owned config under `$HOME`, also use `linux-userland`.
14## Non-Negotiables
16- No `sudo`, `su`, `doas`, `pkexec`, package manager install/remove, system-service mutation, `/etc` edits, kernel/sysctl changes, or device writes from the agent.
17- User-service changes follow [linux-userland](../linux-userland/SKILL.md); the system-service ban does not cover them.
18- Read-only probes first. Prefer commands with `--no-pager`, `--full`, bounded output, and explicit units/time ranges.
19- Prefer installed truth: `man`, `--help`, distro files. Web docs may not match host version.
20- Redact secrets from env, tokens, key files, URLs, logs, and command output.
21- If root is required, explain why and give a copy-paste command or script for the human to run.
23## Workflow
251. Classify: user config? → `linux-userland`. system state/root/service/device/package? → continue here.
262. Inventory host facts before hypotheses.
273. Inspect installed docs for exact command/config behavior.
284. Gather bounded logs/status.
295. State root cause confidence + evidence. If changing system state is needed, escalate to human.
31## Read-Only Inventory
33```bash
34uname -a
35cat /etc/os-release
36id
37printf 'SHELL=%s\n' "$SHELL"
38getent passwd "$(id -un)"
39systemctl --version 2>/dev/null || true
40loginctl show-user "$(id -un)" 2>/dev/null || true
41```
43## Installed Documentation
45```bash
46MANWIDTH=100 MANPAGER=cat man systemctl | col -b | head -120
47MANWIDTH=100 MANPAGER=cat man 5 systemd.service | col -b | rg -n 'ExecStart|Type=|Restart='
48man -k 'journal|systemd|network'
49<command> --help 2>&1 | head -80
50```
52Use section numbers: `man 1 command`, `man 5 config-file`, `man 7 topic`, `man 8 admin-command`.
54## systemd Diagnosis
56System manager is OS-level. User manager is per-user; see `linux-userland` for editing user units.
58```bash
59systemctl --no-pager --full status UNIT
60systemctl --no-pager --full list-units --failed
61systemctl show UNIT -p LoadState -p ActiveState -p SubState -p Result -p ExecMainStatus
62systemctl cat UNIT
63systemd-analyze verify /path/to/unit.service
64```
66`systemctl status` is for humans. `systemctl show` is for parseable properties.
68## Network Read-Only Probes
70```bash
71ip addr
72ip route
73resolvectl status 2>/dev/null || true
74```
76## journalctl Diagnosis
78Always bound logs:
80```bash
81journalctl -b --no-pager -n 200
82journalctl -b -u UNIT --no-pager --full -n 200
83journalctl -b --since '1 hour ago' -p warning..alert --no-pager
84journalctl --list-boots --no-pager
85```
87Unprivileged users may not read system journal. If denied, report the permission boundary; do not try `sudo`.
89## Root Escalation
91Escalate only after read-only evidence shows user privileges are insufficient. Never execute elevation.
93Follow the global command-handoff policy.
95Prefer a direct launch with no shell syntax:
97```text
98sudo systemctl status UNIT --no-pager --full
99```
101For multi-step or shell-sensitive actions, write a reviewed POSIX shell script in a user-owned path and provide a launch command:
103```text
104sudo sh /tmp/pi-root-action.sh
105```
107Write the script to a path without spaces, e.g. `/tmp/pi-root-action.sh` or `$HOME/.cache/pi-root-action.sh`. Include:
109- what it changes
110- pre-checks
111- backup path when editing
112- rollback command
113- verification command
115## Common Mistakes
117| Mistake | Fix |
118| ------------------------------ | --------------------------------------- |
119| Running unbounded `journalctl` | Add `-b`, `-n`, `--since`, `--no-pager` |
120| Treating web docs as exact | Check installed `man`/`--help` |
121| Using `sudo` from agent | Stop; give human command/script |
122| Editing `/etc` directly | Escalate with backup + rollback |
123| Guessing before inventory | Collect host facts + logs first |

pi/agent/skillz/lnx/lnx-workflow/SKILL.md

Added
new file mode 100644

+18 / −0 text lines

1---
2name: lnx-workflow
3os: lnx
4description: "Use for Linux system diagnosis, Arch/pacman/AUR maintenance, kernel virtual consoles, or user-owned HOME/XDG, shell, and user-systemd config."
5---
6
7# Linux workflow
8
9Read the matching guide before acting, resolving links relative to this skill directory rather than the project cwd.
11- Diagnose system services, boot, permissions, devices, networking, or root boundaries: [linux](../linux/SKILL.md).
12- Configure or troubleshoot Arch Linux packages, pacman, AUR/PKGBUILD, or upgrades: [archlinux](../archlinux/SKILL.md).
13- Work on kernel virtual consoles, `/dev/ttyN`, getty, fonts, or keymaps: [linux-console](../linux-console/SKILL.md).
14- Edit user-owned HOME/XDG config, dotfiles, shell environment, or user services: [linux-userland](../linux-userland/SKILL.md).
16Read each applicable guide when a task crosses these boundaries.
17A terminal emulator or pty is not a kernel virtual console; generic Linux tasks do not automatically require system diagnosis.
18Follow each guide's safety constraints; routing never authorizes privileged commands or system mutation.

pi/agent/skillz/mise/SKILL.md

Modified

+1 / −1 text lines

3030 `MISE_AUTO_INSTALL=0`, `--skip-tools`, and `--no-deps` do not make task execution read-only.
3131 Isolate `MISE_DATA_DIR`/`MISE_CACHE_DIR` for temporary probes; local paths do not prevent other side effects.
32325. For activation warnings, identify all loaded activation files and their generators before editing.
33 Fix the owning generator or confirmed duplicate, not the generated symptom; use `nushell` for `.nu` syntax and `linux-userland` for Linux HOME/XDG boundaries.
33 Fix the owning generator or confirmed duplicate, not the generated symptom; use `nushell` for `.nu` syntax and [linux-userland](../lnx/linux-userland/SKILL.md) for Linux HOME/XDG boundaries.
34346. Treat config writes, installs/removals, activation-file writes, bootstrap, and cleanup as mutations even with local scope.
3535 Make the smallest authorized change, validate config/task structure, and verify affected behavior.

pi/agent/skillz/niri/SKILL.md

Modified

+1 / −1 text lines

11---
22name: niri
33os: lnx
4description: "Edit niri Wayland compositor config in KDL — input, keyboard, touchpad, outputs, key bindings, window rules, layout, animations, gestures, VRR, Xwayland, and niri msg IPC commands. Use when: editing ~/.config/niri/config.kdl, configuring niri, mentioned niri-WM, or niri window manager."
4description: "Use for niri Wayland compositor configuration and IPC."
55license: MIT
66---

pi/agent/skillz/quickshell/README.md

Deleted
deleted file mode 100644

+0 / −62 text lines

1# quickshell skill
2
3Guidance and small examples for building Linux desktop components with Quickshell.
4Read [`SKILL.md`](SKILL.md) first.
5
6## Contents
7
8```text
9quickshell/
10├── SKILL.md
11├── references/
12├── examples/
13├── bin/
14└── package.json
15```
17The references intentionally avoid broad service API summaries.
18Resolve the installed `qs` version and consult its official type pages before writing service, IPC, windowing, or authentication code.
20## Examples
22The examples cover:
241. a single panel
252. one panel per screen
263. a clock panel
274. PipeWire volume display and control
285. a volume OSD
296. typed IPC functions
307. a composite bar
318. a minimal notification daemon
33Examples are teaching inputs, not proof of target-desktop behavior.
34Do not launch them on the user's real desktop as routine validation.
35Notification and authentication components can claim session-global protocols or services.
37## Validation levels
39- `npm test` checks the Node helper tools.
40- `qmllint` checks supported QML structure and installed imports without launching the shell.
41- An offscreen load check establishes load behavior only.
42- Interaction acceptance requires exercising input, IPC, timers, hotplug, and service events.
43- Visual acceptance requires observing mapped surfaces on the target display setup.
45Runtime checks belong in a nested compositor with isolated runtime and session services.
46A nested compositor without an isolated D-Bus and service environment is insufficient for notification, tray, Polkit, greetd, or similar checks.
47Never claim interaction or visual validation from static or offscreen checks.
49### Upstream tooling boundary
51[Quickshell recommends `qmlls` with generated `.qmlls.ini`](https://quickshell.org/docs/v0.3.1/guide/install-setup/#language-server) and explicitly documents unresolved `PanelWindow` types.
52Its runtime backend registration is not fully described by static `.qmltypes`; [issue #543](https://github.com/quickshell-mirror/quickshell/issues/543) tracks related false positives.
53Use Qt6 tooling, not an unverified executable named `qmllint` that may belong to Qt5.
54The earlier claim that typed `IpcHandler` functions cause an independent linter defect was incorrect: minimal typed IPC passes with Qt6 and the existing project lint policy.
55Keep that policy unchanged; do not add warning suppressions or fabricated metadata.
56The offscreen Qt platform has no Quickshell `PanelWindow` backend.
57Mapped surfaces, services, and interaction require an isolated nested compositor rather than more offscreen retries.
59## Helpers
61See [`bin/README.md`](bin/README.md).
62The helpers use Node built-ins and have no package dependencies.

pi/agent/skillz/quickshell/SKILL.md

Deleted
deleted file mode 100644

+0 / −143 text lines

1---
2name: quickshell
3os: lnx
4license: LGPL-3.0
5description: "Use for building, reviewing, or debugging Quickshell desktop components and qs IPC. Not general QML or compositor config."
6---
7
8# Quickshell
9
10## Start with the installed version
12**Do not write Quickshell APIs from memory.**
13Quickshell changes between releases, especially service modules.
151. Run `qs --version`.
162. Read the matching official guide and type pages under `https://quickshell.org/docs/v<version>/`.
173. When local and web versions may differ, inspect the installed `*.qmltypes` files under `/usr/lib/qt6/qml/Quickshell/` or the platform's equivalent QML import path.
184. Cross-check a nearby official example before using a service or compositor-specific API.
20Use [`references/getting-fresh-docs.md`](references/getting-fresh-docs.md) for the lookup procedure.
21If cloning upstream examples is necessary, use the `git_clone_safe` tool with the repository URL and an isolated destination.
22It is a tool, not a shell command.
24## Model
26A Quickshell entry file has one QML root object.
27There is no rule that it must be `ShellRoot` or `Scope`.
28A single `PanelWindow` and a per-screen `Variants` object are both valid roots.
29`ShellRoot` is optional and provides inline shell settings.
30`Scope` groups non-visual reloadable objects.
32```qml
33import QtQuick
34import Quickshell
36PanelWindow {
37 anchors { top: true; left: true; right: true }
38 implicitHeight: 30
39 Text { anchors.centerIn: parent; text: "hello" }
40}
41```
43For one instance per screen:
45```qml
46import QtQuick
47import Quickshell
49Variants {
50 model: Quickshell.screens
51 delegate: Component {
52 PanelWindow {
53 required property var modelData
54 screen: modelData
55 anchors { top: true; left: true; right: true }
56 implicitHeight: 30
57 }
58 }
59}
60```
62Use:
64- `PanelWindow` for anchored panels and layer-shell surfaces.
65- `FloatingWindow` for ordinary desktop windows.
66- `PopupWindow` for a popup anchored to another Quickshell window.
67- `ShellRoot` when the entry needs multiple child objects or inline shell settings.
68- `Scope` when non-visual objects need a common reload scope.
70`WlrLayershell` is an attached object on `PanelWindow`, not on `FloatingWindow`.
71See [`references/windowing.md`](references/windowing.md).
73## QML rules that matter here
75- Keep state reactive with property bindings.
76- Implicit size flows from child to parent; actual size flows from parent to child.
77- Do not use `childrenRect` as a generic container sizing shortcut because it commonly creates binding loops.
78- For a service-backed `Slider`, bind `value` to service state and write user movement in `onMoved`.
79 Do not replace the binding with imperative synchronization handlers.
80- Use `Connections` for signals from a changing external object.
81- Use `PwObjectTracker` when the matching installed PipeWire docs require tracking an object.
83See [`references/patterns.md`](references/patterns.md) for the small set of retained patterns.
85## Services and privileged components
87For notifications, PipeWire, MPRIS, PAM, greetd, Polkit, Bluetooth, networking, and system tray APIs,
88read the installed-version type page before coding.
89Do not advertise a notification capability unless the implementation actually provides it.
90Do not improvise PAM, greetd, or Polkit conversations.
91Use the official installed-version example and keep prompts separate from user responses.
93See [`references/services.md`](references/services.md).
95## Tooling: follow upstream first
97Read the installed version's [official tooling recommendations](https://quickshell.org/docs/v0.3.1/guide/install-setup/#language-server) before diagnosing a linter or inventing metadata.
98Upstream recommends `qmlls` and an empty `.qmlls.ini` beside the entry point.
99Quickshell generates the machine-specific configuration; gitignore it and do not hand-maintain its paths.
100Use the matching Qt major version for both `qmlls` and `qmllint`.
101On Arch, `/usr/lib/qt6/bin/qmllint` is Qt6; the bare `qmllint` command may be Qt5.
103Upstream explicitly documents that `PanelWindow` cannot be resolved by the language server.
104Its runtime backend registration is not fully represented in static metadata; see [issue #543](https://github.com/quickshell-mirror/quickshell/issues/543).
105This is not evidence that valid panel QML or typed IPC functions are broken.
106Capture complete stdout/stderr from a minimal reproduction with the correct Qt tool before attributing a failure.
107Do not fabricate type metadata, remove typing, or disable additional warning categories to obtain a pass.
108Keep project-approved lint policy and verify actual loading in a nested compositor.
110## Validation
112Separate these evidence levels:
1141. **Static:** `qmllint` resolves supported imports and QML structure.
1152. **Load:** Quickshell loads the configuration without diagnostics.
1163. **Interaction:** input, IPC, timers, hotplug, and service events behave correctly.
1174. **Visual:** placement, sizing, clipping, color, typography, and animation are accepted on target displays.
119A static or offscreen load check proves neither interaction nor visual correctness.
120Do not claim UI validation without observing and exercising the mapped surfaces.
122**Never test desktop components against the user's real desktop session by default.**
123A test instance can claim D-Bus names, notification ownership, layer-shell surfaces, session-lock protocols, or authentication agents.
124Use a nested compositor plus isolated runtime, D-Bus, and service state for runtime checks.
125Offscreen validation is limited to parsing or loading and must be reported as such.
126Never run live authentication or lockscreen tests without an explicit isolated test plan.
128Run helper tests from this skill directory:
130```sh
131npm test
132```
134## References
136- [`references/getting-fresh-docs.md`](references/getting-fresh-docs.md)
137- [`references/patterns.md`](references/patterns.md)
138- [`references/windowing.md`](references/windowing.md)
139- [`references/services.md`](references/services.md)
140- [`references/resources.md`](references/resources.md)
141- [`references/packaging.md`](references/packaging.md)
142- [`examples/`](examples/)
143- `qml` skill for QML language and layout details

pi/agent/skillz/quickshell/bin/README.md

Deleted
deleted file mode 100644

+0 / −69 text lines

1# quickshell CLI helpers
2
3Three cross-platform CLI tools written in Node.js ESM (`.mjs` files). No npm dependencies, only Node built-ins. Run with `node <tool>.mjs` or directly (`./<tool>.mjs` after `chmod +x`).
4
5## qs-version
6
7Print the installed `qs` version and the matching docs URL.
8
9```sh
10$ qs-version
11Quickshell 0.3.0
12https://quickshell.org/docs/v0.3.0/
13```
15## qs-scaffold
17Scaffold a new Quickshell config from an example. Copies `shell.qml` (and any supporting `*.qml` files), the `README.md`, and creates an empty `.qmlls.ini` (LSP marker).
19```sh
20qs-scaffold mybar # uses 02-per-monitor-bar (default)
21qs-scaffold foo --from 03-clock # specific example
22qs-scaffold bar --from 07-composite-bar # multi-file: copies Bar.qml too
23```
25Result:
27```
28~/.config/quickshell/mybar/
29├── shell.qml
30├── Bar.qml (if the source example has one)
31├── README.md
32└── .qmlls.ini (empty; quickshell will populate)
33```
35Then run with `qs -c mybar`.
37Refuses to clobber an existing target.
39## qs-doc
41Print or open the docs URL for a type, namespaced or not.
43```sh
44qs-doc PanelWindow # bare type
45https://quickshell.org/docs/v0.3.0/types/Quickshell/PanelWindow
47qs-doc Quickshell.Services.Pipewire.Pipewire # namespaced
48https://quickshell.org/docs/v0.3.0/types/Quickshell/Services/Pipewire/Pipewire
50qs-doc --list # full type index
51https://quickshell.org/docs/v0.3.0/types
53qs-doc PanelWindow --open # open in browser
54```
56## Cross-platform
58- No shell, no POSIX assumptions; pure `node:child_process`, `node:fs`, `node:os`, `node:path`.
59- `xdg-open` on Linux, `open` on macOS, `cmd /c start` on Windows for `--open`.
60- `XDG_CONFIG_HOME` honored; falls back to `~/.config` (Linux/macOS) or `%APPDATA%` (Windows).
62## Testing
64Tests are in `test/` and use the built-in Node test runner.
65Run all from the skill root:
67```sh
68npm test
69```

pi/agent/skillz/quickshell/bin/qs-doc.mjs

Deleted
deleted file mode 100755

+0 / −104 text lines

1#!/usr/bin/env node
2// qs-doc.mjs: open or print docs for the installed Quickshell version.
3// Cross-platform: no shell, no POSIX assumptions. Pure Node builtins.
4//
5// Usage:
6// qs-doc <Type> # print URL for a type
7// qs-doc --list # print type index URL
8// qs-doc <Type> --open # open in default browser
9// qs-doc <Type> --print # print URL (explicit; same as default)
10//
11// Type names use the dot-path shown in the docs (e.g. PanelWindow,
12// Quickshell.Services.Pipewire.Pipewire).
14import { spawnSync } from "node:child_process";
15import { platform } from "node:os";
17function getVersion() {
18 for (const bin of ["qs", "quickshell"]) {
19 const r = spawnSync(bin, ["--version"], { encoding: "utf8" });
20 if (r.status === 0) {
21 const m = r.stdout.match(/(\d+\.\d+\.\d+)/);
22 if (m) return m[1];
23 }
24 }
25 return null;
26}
28function usage() {
29 process.stderr.write(
30 "usage: qs-doc <Type> [--open|--print]\n" +
31 " qs-doc --list\n" +
32 " Type: doc path like PanelWindow or Quickshell.Services.Pipewire.Pipewire\n" +
33 " --open open the URL in the default browser\n" +
34 " --print print the URL to stdout (default if stdout is a tty)\n",
35 );
36}
38function openUrl(url) {
39 const os = platform();
40 // Try each platform's open command. Each is a separate spawn without a shell.
41 const candidates =
42 os === "darwin"
43 ? [["open", [url]]]
44 : os === "win32"
45 ? [["cmd", ["/c", "start", "", url]]]
46 : [
47 ["xdg-open", [url]],
48 ["wslview", [url]],
49 ["sensible-browser", [url]],
50 ];
51 for (const [cmd, args] of candidates) {
52 const r = spawnSync(cmd, args, { stdio: "ignore" });
53 if (r.status === 0) return true;
54 }
55 return false;
56}
58const argv = process.argv.slice(2);
59if (argv.length === 0) {
60 usage();
61 process.exit(1);
62}
63const wantList = argv[0] === "--list";
64const wantOpen = argv.includes("--open");
65const wantPrint = argv.includes("--print") || !wantOpen;
66const type = wantList ? null : argv.find((a) => !a.startsWith("--"));
68if (!wantList && !type) {
69 usage();
70 process.exit(1);
71}
73const version = getVersion();
74if (!version) {
75 process.stderr.write("qs-doc: cannot find `qs` or `quickshell` on PATH\n");
76 process.exit(1);
77}
79const url = wantList
80 ? `https://quickshell.org/docs/v${version}/types`
81 : (() => {
82 // Type path: "PanelWindow" -> "Quickshell/PanelWindow",
83 // "Quickshell.Services.Pipewire.Pipewire" -> "Quickshell/Services/Pipewire/Pipewire"
84 const path = type.includes("/")
85 ? type
86 : type.startsWith("Quickshell")
87 ? type.replace(/\./g, "/")
88 : `Quickshell/${type.replace(/\./g, "/")}`;
89 return `https://quickshell.org/docs/v${version}/types/${path}`;
90 })();
92if (wantOpen) {
93 if (!openUrl(url)) {
94 process.stderr.write(`qs-doc: could not open browser; URL: ${url}\n`);
95 process.exit(1);
96 }
97 process.stdout.write(`${url}\n`);
98 process.exit(0);
99}
101if (wantPrint) {
102 process.stdout.write(`${url}\n`);
103 process.exit(0);
104}

pi/agent/skillz/quickshell/bin/qs-scaffold.mjs

Deleted
deleted file mode 100755

+0 / −125 text lines

1#!/usr/bin/env node
2// qs-scaffold.mjs: scaffold a new Quickshell config from an example.
3// Cross-platform: no shell, no POSIX assumptions. Pure Node builtins.
4//
5// Usage:
6// qs-scaffold <name> [--from <example-name>]
7//
8// Default example: 02-per-monitor-bar (canonical per-monitor shape).
9
10import {
11 copyFileSync,
12 existsSync,
13 mkdirSync,
14 readdirSync,
15 statSync,
16 writeFileSync,
17} from "node:fs";
18import { dirname, join } from "node:path";
19import { fileURLToPath } from "node:url";
21const __dirname = dirname(fileURLToPath(import.meta.url));
22const SKILL_ROOT = join(__dirname, "..");
23const EXAMPLES_DIR = join(SKILL_ROOT, "examples");
25const DEFAULT_EXAMPLE = "02-per-monitor-bar";
27function usage() {
28 process.stderr.write("usage: qs-scaffold <name> [--from <example-name>]\n");
29 process.stderr.write(
30 " example-name: e.g. 01-hello-bar, 07-composite-bar (omit the .qml)\n",
31 );
32}
34function parseArgs(argv) {
35 const out = { name: null, from: DEFAULT_EXAMPLE };
36 for (let i = 2; i < argv.length; i++) {
37 const a = argv[i];
38 if (a === "-h" || a === "--help") {
39 usage();
40 process.exit(0);
41 }
42 if (a === "--from") {
43 const v = argv[++i];
44 if (!v) {
45 process.stderr.write("qs-scaffold: --from requires a value\n");
46 process.exit(1);
47 }
48 out.from = v;
49 continue;
50 }
51 if (a.startsWith("--")) {
52 process.stderr.write(`qs-scaffold: unknown flag ${a}\n`);
53 process.exit(1);
54 }
55 if (!out.name) {
56 out.name = a;
57 continue;
58 }
59 process.stderr.write(`qs-scaffold: unexpected positional arg ${a}\n`);
60 process.exit(1);
61 }
62 return out;
63}
65function xdgConfigHome() {
66 if (process.env.XDG_CONFIG_HOME) return process.env.XDG_CONFIG_HOME;
67 if (process.env.HOME) return join(process.env.HOME, ".config");
68 // Windows fallback.
69 if (process.env.APPDATA) return process.env.APPDATA;
70 process.stderr.write(
71 "qs-scaffold: cannot determine config dir (set XDG_CONFIG_HOME or HOME)\n",
72 );
73 process.exit(1);
74}
76const { name, from } = parseArgs(process.argv);
77if (!name) {
78 usage();
79 process.exit(1);
80}
82function requirePathSegment(label, value) {
83 if (!/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(value)) {
84 process.stderr.write(
85 `qs-scaffold: ${label} must be a single path segment: ${value}\n`,
86 );
87 process.exit(1);
88 }
89}
91requirePathSegment("name", name);
92requirePathSegment("example name", from);
94// Validate example dir.
95const exampleDir = join(EXAMPLES_DIR, from);
96if (!existsSync(exampleDir) || !statSync(exampleDir).isDirectory()) {
97 process.stderr.write(
98 `qs-scaffold: example not found: ${from} (looked in ${EXAMPLES_DIR})\n`,
99 );
100 process.exit(1);
101}
103const configRoot = join(xdgConfigHome(), "quickshell");
104const target = join(configRoot, name);
106if (existsSync(target)) {
107 process.stderr.write(`qs-scaffold: target already exists: ${target}\n`);
108 process.exit(1);
109}
111mkdirSync(target, { recursive: true });
113// Copy the example dir's QML + README. Skip hidden / non-source files.
114for (const entry of readdirSync(exampleDir, { withFileTypes: true })) {
115 if (!entry.isFile()) continue;
116 if (entry.name.startsWith(".")) continue;
117 if (!(entry.name.endsWith(".qml") || entry.name.endsWith(".md"))) continue;
118 copyFileSync(join(exampleDir, entry.name), join(target, entry.name));
119}
121// Touch .qmlls.ini for LSP.
122writeFileSync(join(target, ".qmlls.ini"), "");
124process.stdout.write(`Scaffolded ${target}\n`);
125process.stdout.write(`Run: qs -c ${name}\n`);

pi/agent/skillz/quickshell/bin/qs-version.mjs

Deleted
deleted file mode 100755

+0 / −28 text lines

1#!/usr/bin/env node
2// qs-version.mjs: print the installed qs version and matching docs URL.
3// Cross-platform: no shell, no POSIX assumptions. Pure Node builtins.
4
5import { spawnSync } from "node:child_process";
6
7function getVersion() {
8 for (const bin of ["qs", "quickshell"]) {
9 const r = spawnSync(bin, ["--version"], { encoding: "utf8" });
10 if (r.status === 0) {
11 // Output looks like: "Quickshell 0.3.0 (revision , distributed by Arch Linux)"
12 const m = r.stdout.match(/(\d+\.\d+\.\d+)/);
13 if (m) return m[1];
14 }
15 }
16 return null;
17}
19const version = getVersion();
20if (!version) {
21 process.stderr.write(
22 "qs-version: cannot find `qs` or `quickshell` on PATH\n",
23 );
24 process.exit(1);
25}
27process.stdout.write(`Quickshell ${version}\n`);
28process.stdout.write(`https://quickshell.org/docs/v${version}/\n`);

pi/agent/skillz/quickshell/bin/test/qs-doc.test.mjs

Deleted
deleted file mode 100644

+0 / −59 text lines

1// qs-doc.test.mjs
2// Run: node --test bin/test/qs-doc.test.mjs
3
4import assert from "node:assert/strict";
5import { spawnSync } from "node:child_process";
6import { dirname, join } from "node:path";
7import { test } from "node:test";
8import { fileURLToPath } from "node:url";
9
10const __dirname = dirname(fileURLToPath(import.meta.url));
11const BIN = join(__dirname, "..", "qs-doc.mjs");
13test("qs-doc with no args prints usage", () => {
14 const result = spawnSync("node", [BIN], { encoding: "utf8" });
15 assert.notEqual(result.status, 0);
16 assert.match(result.stderr, /usage/i);
17});
19test("qs-doc <Type> prints the type's docs URL for the current qs version", () => {
20 const result = spawnSync("node", [BIN, "PanelWindow"], { encoding: "utf8" });
21 assert.equal(result.status, 0, `stderr: ${result.stderr}`);
22 // Must contain a quickshell.org URL matching the installed version.
23 assert.match(
24 result.stdout,
25 /https?:\/\/quickshell\.org\/docs\/v\d+\.\d+\.\d+\/types\/Quickshell\/PanelWindow/,
26 );
27});
29test("qs-doc accepts a namespaced type like Quickshell.Services.Pipewire.Pipewire", () => {
30 const result = spawnSync(
31 "node",
32 [BIN, "Quickshell.Services.Pipewire.Pipewire"],
33 { encoding: "utf8" },
34 );
35 assert.equal(result.status, 0, `stderr: ${result.stderr}`);
36 assert.match(
37 result.stdout,
38 /https?:\/\/quickshell\.org\/docs\/v\d+\.\d+\.\d+\/types\/Quickshell\/Services\/Pipewire\/Pipewire/,
39 );
40});
42test("qs-doc with --list prints type index URL", () => {
43 const result = spawnSync("node", [BIN, "--list"], { encoding: "utf8" });
44 assert.equal(result.status, 0, `stderr: ${result.stderr}`);
45 assert.match(
46 result.stdout,
47 /https?:\/\/quickshell\.org\/docs\/v\d+\.\d+\.\d+\/types/,
48 );
49});
51test("qs-doc --open <Type> uses xdg-open (Linux) or platform equivalent", () => {
52 // Just verify the --open flag is recognized (exit 0, no usage message).
53 // We don't actually open a browser in the test (no display guarantee).
54 const result = spawnSync("node", [BIN, "PanelWindow", "--print"], {
55 encoding: "utf8",
56 });
57 assert.equal(result.status, 0, `stderr: ${result.stderr}`);
58 assert.match(result.stdout, /PanelWindow/);
59});

pi/agent/skillz/quickshell/bin/test/qs-scaffold.test.mjs

Deleted
deleted file mode 100644

+0 / −182 text lines

1// qs-scaffold.test.mjs
2// Run: node --test bin/test/qs-scaffold.test.mjs
3
4import assert from "node:assert/strict";
5import { spawnSync } from "node:child_process";
6import {
7 existsSync,
8 mkdirSync,
9 mkdtempSync,
10 readdirSync,
11 readFileSync,
12 rmSync,
13 writeFileSync,
14} from "node:fs";
15import { tmpdir } from "node:os";
16import { dirname, join } from "node:path";
17import { test } from "node:test";
18import { fileURLToPath } from "node:url";
20const __dirname = dirname(fileURLToPath(import.meta.url));
21const BIN = join(__dirname, "..", "qs-scaffold.mjs");
23function makeTmp() {
24 const dir = mkdtempSync(join(tmpdir(), "qs-scaffold-test-"));
25 return dir;
26}
28test("qs-scaffold creates a config dir with shell.qml from default example", () => {
29 const tmp = makeTmp();
30 try {
31 const result = spawnSync("node", [BIN, "mybar"], {
32 encoding: "utf8",
33 env: { ...process.env, XDG_CONFIG_HOME: tmp },
34 });
35 assert.equal(result.status, 0, `stderr: ${result.stderr}`);
36 const target = join(tmp, "quickshell", "mybar");
37 assert.ok(existsSync(target), `target dir not created: ${target}`);
38 assert.ok(existsSync(join(target, "shell.qml")), "shell.qml missing");
39 // The default example is 02-per-monitor-bar (canonical per-monitor shape).
40 const content = readFileSync(join(target, "shell.qml"), "utf8");
41 assert.match(content, /Variants/);
42 assert.match(content, /Quickshell\.screens/);
43 } finally {
44 rmSync(tmp, { recursive: true, force: true });
45 }
46});
48test("qs-scaffold with --from 01 uses 01-hello-bar", () => {
49 const tmp = makeTmp();
50 try {
51 const result = spawnSync("node", [BIN, "mybar", "--from", "01-hello-bar"], {
52 encoding: "utf8",
53 env: { ...process.env, XDG_CONFIG_HOME: tmp },
54 });
55 assert.equal(result.status, 0, `stderr: ${result.stderr}`);
56 const shell = readFileSync(
57 join(tmp, "quickshell", "mybar", "shell.qml"),
58 "utf8",
59 );
60 assert.match(shell, /hello quickshell/i);
61 } finally {
62 rmSync(tmp, { recursive: true, force: true });
63 }
64});
66test("qs-scaffold with --from 07-composite-bar copies Bar.qml too", () => {
67 const tmp = makeTmp();
68 try {
69 const result = spawnSync(
70 "node",
71 [BIN, "mybar", "--from", "07-composite-bar"],
72 {
73 encoding: "utf8",
74 env: { ...process.env, XDG_CONFIG_HOME: tmp },
75 },
76 );
77 assert.equal(result.status, 0, `stderr: ${result.stderr}`);
78 const target = join(tmp, "quickshell", "mybar");
79 const files = readdirSync(target);
80 assert.ok(files.includes("shell.qml"), "shell.qml missing");
81 assert.ok(
82 files.includes("Bar.qml"),
83 "Bar.qml missing (multi-file example not fully copied)",
84 );
85 } finally {
86 rmSync(tmp, { recursive: true, force: true });
87 }
88});
90test("qs-scaffold touches .qmlls.ini for LSP", () => {
91 const tmp = makeTmp();
92 try {
93 const result = spawnSync("node", [BIN, "mybar"], {
94 encoding: "utf8",
95 env: { ...process.env, XDG_CONFIG_HOME: tmp },
96 });
97 assert.equal(result.status, 0, `stderr: ${result.stderr}`);
98 assert.ok(
99 existsSync(join(tmp, "quickshell", "mybar", ".qmlls.ini")),
100 ".qmlls.ini missing",
101 );
102 } finally {
103 rmSync(tmp, { recursive: true, force: true });
104 }
105});
107test("qs-scaffold without args exits non-zero with usage", () => {
108 const result = spawnSync("node", [BIN], { encoding: "utf8" });
109 assert.notEqual(result.status, 0);
110 assert.match(result.stderr, /usage/i);
111});
113test("qs-scaffold with bad --from exits non-zero", () => {
114 const tmp = makeTmp();
115 try {
116 const result = spawnSync(
117 "node",
118 [BIN, "mybar", "--from", "99-does-not-exist"],
119 {
120 encoding: "utf8",
121 env: { ...process.env, XDG_CONFIG_HOME: tmp },
122 },
123 );
124 assert.notEqual(result.status, 0);
125 assert.match(result.stderr, /not found|does not exist/i);
126 } finally {
127 rmSync(tmp, { recursive: true, force: true });
128 }
129});
131test("qs-scaffold rejects a config name that escapes the config root", () => {
132 const tmp = makeTmp();
133 try {
134 const result = spawnSync("node", [BIN, "../escaped"], {
135 encoding: "utf8",
136 env: { ...process.env, XDG_CONFIG_HOME: tmp },
137 });
138 assert.notEqual(result.status, 0);
139 assert.match(result.stderr, /single path segment/i);
140 assert.equal(existsSync(join(tmp, "escaped")), false);
141 } finally {
142 rmSync(tmp, { recursive: true, force: true });
143 }
144});
146test("qs-scaffold rejects an example name containing path traversal", () => {
147 const tmp = makeTmp();
148 try {
149 const result = spawnSync(
150 "node",
151 [BIN, "mybar", "--from", "../01-hello-bar"],
152 {
153 encoding: "utf8",
154 env: { ...process.env, XDG_CONFIG_HOME: tmp },
155 },
156 );
157 assert.notEqual(result.status, 0);
158 assert.match(result.stderr, /single path segment/i);
159 assert.equal(existsSync(join(tmp, "quickshell", "mybar")), false);
160 } finally {
161 rmSync(tmp, { recursive: true, force: true });
162 }
163});
165test("qs-scaffold with existing target dir exits non-zero (no clobber)", () => {
166 const tmp = makeTmp();
167 try {
168 const target = join(tmp, "quickshell", "mybar");
169 mkdirSync(target, { recursive: true });
170 writeFileSync(join(target, "preexisting.txt"), "do not clobber");
171 const result = spawnSync("node", [BIN, "mybar"], {
172 encoding: "utf8",
173 env: { ...process.env, XDG_CONFIG_HOME: tmp },
174 });
175 assert.notEqual(result.status, 0);
176 // Preexisting file must still exist with original content.
177 const still = readFileSync(join(target, "preexisting.txt"), "utf8");
178 assert.equal(still, "do not clobber");
179 } finally {
180 rmSync(tmp, { recursive: true, force: true });
181 }
182});

pi/agent/skillz/quickshell/bin/test/qs-version.test.mjs

Deleted
deleted file mode 100644

+0 / −49 text lines

1// qs-version.test.mjs
2// Run: node --test bin/test/qs-version.test.mjs
3
4import assert from "node:assert/strict";
5import { spawnSync } from "node:child_process";
6import { dirname, join } from "node:path";
7import { test } from "node:test";
8import { fileURLToPath } from "node:url";
9
10const __dirname = dirname(fileURLToPath(import.meta.url));
11const BIN = join(__dirname, "..", "qs-version.mjs");
13test("qs-version prints version + docs URL when qs is in PATH", () => {
14 // We rely on the system `qs` being installed (it's in /usr/bin on this box).
15 const result = spawnSync("node", [BIN], { encoding: "utf8" });
16 assert.equal(result.status, 0, `stderr: ${result.stderr}`);
17 // Output must contain "Quickshell" (or "quickshell"), a version, and a docs URL.
18 assert.match(
19 result.stdout,
20 /Quickshell\s+\d+\.\d+\.\d+/i,
21 "must print version",
22 );
23 assert.match(
24 result.stdout,
25 /https?:\/\/quickshell\.org\/docs\/v\d+\.\d+\.\d+\//,
26 "must print docs URL",
27 );
28 // The docs URL must match the version line.
29 const versionMatch = result.stdout.match(/(\d+\.\d+\.\d+)/);
30 assert.ok(versionMatch, "must find a version");
31 assert.ok(
32 result.stdout.includes(`/docs/v${versionMatch[1]}/`),
33 `docs URL must include /docs/v${versionMatch[1]}/`,
34 );
35});
37test("qs-version exit code 0 on success", () => {
38 const result = spawnSync("node", [BIN], { encoding: "utf8" });
39 assert.equal(result.status, 0);
40});
42test("qs-version output is 2-3 lines", () => {
43 const result = spawnSync("node", [BIN], { encoding: "utf8" });
44 const lines = result.stdout.trim().split("\n");
45 assert.ok(
46 lines.length >= 2 && lines.length <= 3,
47 `got ${lines.length} lines: ${result.stdout}`,
48 );
49});

pi/agent/skillz/quickshell/examples/01-hello-bar/README.md

Deleted
deleted file mode 100644

+0 / −13 text lines

1# 01: hello bar
2
3A `PanelWindow` can be the root object of `shell.qml`.
4This example anchors one 30-pixel panel to the top edge and renders centered text.
5
6Static check:
7
8```sh
9qmllint -I /usr/lib/qt6/qml examples/01-hello-bar/shell.qml
10```
12Do not launch it on the real desktop merely to validate the skill.
13Mapped placement and appearance require separate visual acceptance in a nested compositor or explicitly approved session.

pi/agent/skillz/quickshell/examples/01-hello-bar/shell.qml

Deleted
deleted file mode 100644

+0 / −22 text lines

1// 01-hello-bar/shell.qml
2// Smallest valid Quickshell shell: one panel on the focused monitor, "hello world".
3// Run with: qs -p examples/01-hello-bar/shell.qml
4
5import QtQuick
6import Quickshell
7
8PanelWindow {
9 anchors {
10 top: true
11 left: true
12 right: true
13 }
14 implicitHeight: 30
15 color: "#cc1e1e2e"
17 Text {
18 anchors.centerIn: parent
19 text: "hello quickshell"
20 color: "white"
21 }
22}

pi/agent/skillz/quickshell/examples/02-per-monitor-bar/Bar.qml

Deleted
deleted file mode 100644

+0 / −52 text lines

1// 02-per-monitor-bar/Bar.qml
2// The bar component. Imported from shell.qml with `import "."`.
3
4import QtQuick
5import QtQuick.Layouts
6import Quickshell
7
8PanelWindow {
9 id: bar
11 // Anchored to top, full-width.
12 anchors {
13 top: true
14 left: true
15 right: true
16 }
17 implicitHeight: 32
18 color: "#cc1e1e2e"
20 // The screen is set by the Variants delegate in shell.qml.
22 // Instantiate the clock; precision defaults to Seconds.
23 SystemClock {
24 id: clock
25 precision: SystemClock.Seconds
26 }
28 Row {
29 anchors.fill: parent
30 anchors.leftMargin: 12
31 anchors.rightMargin: 12
32 spacing: 16
34 // Left side: workspace label (just static here; see Hyprland example for live).
35 Text {
36 text: "Bar"
37 color: "white"
38 font.pointSize: 11
39 anchors.verticalCenter: parent.verticalCenter
40 }
42 Item { width: 1 } // spacer; the Row stretches
44 // Right side: a clock. Uses Qt.formatDateTime for formatting.
45 Text {
46 text: Qt.formatDateTime(clock.date, "yyyy-MM-dd hh:mm:ss")
47 color: "white"
48 font.pointSize: 11
49 anchors.verticalCenter: parent.verticalCenter
50 }
51 }
52}

pi/agent/skillz/quickshell/examples/02-per-monitor-bar/README.md

Deleted
deleted file mode 100644

+0 / −15 text lines

1# 02: per-monitor bar
2
3`Variants` is the entry root and creates a `Bar` for each item in `Quickshell.screens`.
4The delegate exposes each screen as `modelData` and binds it to the panel's `screen` property.
5
6`Bar.qml` is a local PascalCase component imported by `import "."` in `shell.qml`.
7Check the installed guide before changing local imports to `qs.*` module imports.
8
9Static check:
11```sh
12qmllint -I /usr/lib/qt6/qml examples/02-per-monitor-bar/shell.qml
13```
15Static checking does not exercise monitor hotplug or confirm one correctly placed surface per display.

pi/agent/skillz/quickshell/examples/02-per-monitor-bar/shell.qml

Deleted
deleted file mode 100644

+0 / −19 text lines

1// 02-per-monitor-bar/shell.qml
2// Per-monitor bar: one bar per connected screen, via Variants + Quickshell.screens.
3// Run with: qs -p examples/02-per-monitor-bar/shell.qml
4
5import QtQuick
6import Quickshell
7import "."
8
9// Variants creates one delegate instance per item in `model`.
10// `modelData` is the per-iteration value; mark it `required` so qmlls catches misses.
11Variants {
12 model: Quickshell.screens
13 delegate: Component {
14 Bar {
15 required property var modelData
16 screen: modelData
17 }
18 }
19}

pi/agent/skillz/quickshell/examples/03-clock/README.md

Deleted
deleted file mode 100644

+0 / −17 text lines

1# 03: clock panel
2
3This example uses `PanelWindow`, not `FloatingWindow`.
4`PanelWindow` provides screen-edge anchors and margins.
5`SystemClock.date` gives the text binding a reactive dependency.
6
7The panel anchors to the top edge and uses a calculated left margin for horizontal placement.
8It does not use `WlrLayershell` on a `FloatingWindow`.
9
10Static check:
12```sh
13qmllint -I /usr/lib/qt6/qml examples/03-clock/shell.qml
14```
16Static checking does not prove final placement, typography, or appearance above other windows.
17Those require visual acceptance in an isolated compositor or explicitly approved session.

pi/agent/skillz/quickshell/examples/03-clock/shell.qml

Deleted
deleted file mode 100644

+0 / −55 text lines

1// 03-clock/shell.qml
2// A floating-style clock panel: appears at top-center of the focused monitor.
3// Uses PanelWindow (not FloatingWindow) so we get anchors + margins + layer-shell by default.
4// Run with: qs -p examples/03-clock/shell.qml
5
6import QtQuick
7import Quickshell
8
9PanelWindow {
10 // Center horizontally via margins; no `anchors.horizontalCenter` on PanelWindow.
11 anchors { top: true }
12 margins {
13 top: 60
14 left: (screen.width - implicitWidth) / 2
15 }
17 implicitWidth: 380
18 implicitHeight: 90
19 color: "#dd1e1e2e"
21 // Do not reserve screen space because this is an overlay, not a bar.
22 exclusiveZone: 0
24 // Round corners via an inner Rectangle (PanelWindow itself can't be rounded).
25 Rectangle {
26 anchors.fill: parent
27 radius: 12
28 color: "transparent" // fill the panel
30 Column {
31 anchors.centerIn: parent
32 spacing: 4
34 SystemClock {
35 id: clock
36 precision: SystemClock.Seconds
37 }
39 Text {
40 text: Qt.formatTime(clock.date, "HH:mm:ss")
41 color: "white"
42 font.pointSize: 28
43 font.bold: true
44 anchors.horizontalCenter: parent.horizontalCenter
45 }
47 Text {
48 text: Qt.formatDate(clock.date, "dddd, MMMM d")
49 color: "#ccd0d0d0"
50 font.pointSize: 12
51 anchors.horizontalCenter: parent.horizontalCenter
52 }
53 }
54 }
55}

pi/agent/skillz/quickshell/examples/04-pipewire-volume/Bar.qml

Deleted
deleted file mode 100644

+0 / −70 text lines

1// 04-pipewire-volume/Bar.qml
2// A bar showing the default audio sink volume. Drag the slider to change it.
3
4import QtQuick
5import QtQuick.Controls
6import QtQuick.Layouts
7import Quickshell
8import Quickshell.Services.Pipewire
9import Quickshell.Widgets
11PanelWindow {
12 id: bar
13 anchors { top: true; left: true; right: true }
14 implicitHeight: 36
15 color: "#cc1e1e2e"
16 readonly property var sinkAudio: Pipewire.defaultAudioSink ? Pipewire.defaultAudioSink.audio : null
18 // Keep the default sink tracked so its audio object remains available.
19 PwObjectTracker {
20 objects: [ Pipewire.defaultAudioSink ]
21 }
23 RowLayout {
24 anchors.fill: parent
25 anchors.leftMargin: 12
26 anchors.rightMargin: 12
27 spacing: 12
29 // Icon. `Quickshell.iconPath` resolves against the system icon theme.
30 IconImage {
31 implicitSize: 18
32 source: Quickshell.iconPath(
33 bar.sinkAudio && bar.sinkAudio.muted
34 ? "audio-volume-muted-symbolic"
35 : "audio-volume-high-symbolic"
36 )
37 }
39 // Mute toggle. The `Connections` watches the service for changes.
40 Text {
41 text: "Mute"
42 color: "white"
43 font.pointSize: 11
44 MouseArea {
45 anchors.fill: parent
46 cursorShape: Qt.PointingHandCursor
47 onClicked: if (bar.sinkAudio) bar.sinkAudio.muted = !bar.sinkAudio.muted
48 }
49 }
51 Item { Layout.fillWidth: true; Layout.preferredWidth: 1 } // spacer
53 // Service changes update the slider through the value binding.
54 // User movement writes back through onMoved without reacting to initialization.
55 Slider {
56 Layout.preferredWidth: 240
57 from: 0
58 to: 1.5
59 value: bar.sinkAudio ? bar.sinkAudio.volume : 0
60 onMoved: if (bar.sinkAudio) bar.sinkAudio.volume = value
61 }
63 Text {
64 text: `${Math.floor((bar.sinkAudio ? bar.sinkAudio.volume : 0) * 100)}%`
65 color: "white"
66 font.pointSize: 11
67 Layout.preferredWidth: 40
68 }
69 }
70}

pi/agent/skillz/quickshell/examples/04-pipewire-volume/README.md

Deleted
deleted file mode 100644

+0 / −14 text lines

1# 04: PipeWire volume
2
3This example tracks the default audio sink, displays its state, and binds a slider to its volume.
4The slider writes back only from `onMoved`, so initialization and service-driven updates do not cause writes.
5The write checks that the audio object exists.
6
7Static check:
8
9```sh
10qmllint -I /usr/lib/qt6/qml examples/04-pipewire-volume/shell.qml
11```
13This does not exercise PipeWire discovery or volume mutation.
14A runtime service test needs an isolated PipeWire environment and explicit interaction assertions.

pi/agent/skillz/quickshell/examples/04-pipewire-volume/shell.qml

Deleted
deleted file mode 100644

+0 / −19 text lines

1// 04-pipewire-volume/shell.qml
2// A bar with the default sink's volume, read and written via PwObjectTracker and Slider.
3// Run with: qs -p examples/04-pipewire-volume/shell.qml
4
5import QtQuick
6import QtQuick.Layouts
7import Quickshell
8import Quickshell.Services.Pipewire
9import "."
11Variants {
12 model: Quickshell.screens
13 delegate: Component {
14 Bar {
15 required property var modelData
16 screen: modelData
17 }
18 }
19}

pi/agent/skillz/quickshell/examples/05-osd-volume/README.md

Deleted
deleted file mode 100644

+0 / −21 text lines

1# 05: volume OSD
2
3This example follows the structural OSD pattern:
4
5- `Scope` groups the non-visual objects under one reload scope.
6- `Connections` reacts to changes from the current default sink audio object.
7- `Timer` controls visibility duration.
8- `LazyLoader` creates the window only while needed.
9- `PanelWindow` provides anchored layer-shell placement.
10- an empty `Region` makes the surface click-through.
12It does not use `FloatingWindow` with `WlrLayershell`.
14Static check:
16```sh
17qmllint -I /usr/lib/qt6/qml examples/05-osd-volume/shell.qml
18```
20Do not trigger the real session's audio service during routine validation.
21Appearance, timing, click-through behavior, and service reaction require separate isolated interaction and visual checks.

pi/agent/skillz/quickshell/examples/05-osd-volume/shell.qml

Deleted
deleted file mode 100644

+0 / −109 text lines

1// 05-osd-volume/shell.qml
2// OSD volume: appears for 1s when the default sink's volume changes.
3// Pattern: Scope (shared state) + Connections (signal) + Timer (debounce) + LazyLoader (memory-aware) + PanelWindow (default layer).
4// Run with: qs -p examples/05-osd-volume/shell.qml
5// Try: `wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.5` in another terminal to trigger.
6
7import QtQuick
8import QtQuick.Layouts
9import Quickshell
10import Quickshell.Services.Pipewire
11import Quickshell.Widgets
13Scope {
14 id: root
15 readonly property var sinkAudio: Pipewire.defaultAudioSink ? Pipewire.defaultAudioSink.audio : null
17 // Keep the default sink tracked. The Connections below needs it to be live.
18 PwObjectTracker { objects: [ Pipewire.defaultAudioSink ] }
20 // Show OSD for 1s after every volume change.
21 Connections {
22 target: root.sinkAudio
23 function onVolumeChanged() {
24 root.shouldShowOsd = true
25 hideTimer.restart()
26 }
27 function onMutedChanged() {
28 root.shouldShowOsd = true
29 hideTimer.restart()
30 }
31 }
33 property bool shouldShowOsd: false
35 Timer {
36 id: hideTimer
37 interval: 1000
38 onTriggered: root.shouldShowOsd = false
39 }
41 // LazyLoader: only exists when shouldShowOsd. Frees memory between events.
42 // PanelWindow, not FloatingWindow, provides layer-shell placement.
43 LazyLoader {
44 active: root.shouldShowOsd
46 PanelWindow {
47 // The compositor picks the current focused monitor when no screen is set.
48 anchors.bottom: true
49 margins.bottom: screen.height / 5
50 exclusiveZone: 0
52 implicitWidth: 400
53 implicitHeight: 60
54 color: "transparent"
56 // Empty region = click-through. Clicks pass to whatever's behind.
57 mask: Region {}
59 Rectangle {
60 anchors.fill: parent
61 radius: height / 2
62 color: "#aa000000"
64 RowLayout {
65 anchors {
66 fill: parent
67 leftMargin: 14
68 rightMargin: 18
69 }
70 spacing: 12
72 IconImage {
73 implicitSize: 28
74 source: Quickshell.iconPath(
75 root.sinkAudio && root.sinkAudio.muted
76 ? "audio-volume-muted-symbolic"
77 : "audio-volume-high-symbolic"
78 )
79 }
81 Rectangle {
82 Layout.fillWidth: true
83 implicitHeight: 8
84 radius: 4
85 color: "#33ffffff"
87 Rectangle {
88 anchors {
89 left: parent.left
90 top: parent.top
91 bottom: parent.bottom
92 }
93 implicitWidth: parent.width * Math.min(1, root.sinkAudio ? root.sinkAudio.volume : 0)
94 radius: 4
95 color: "white"
96 }
97 }
99 Text {
100 text: `${Math.floor((root.sinkAudio ? root.sinkAudio.volume : 0) * 100)}%`
101 color: "white"
102 font.pointSize: 13
103 Layout.preferredWidth: 50
104 }
105 }
106 }
107 }
108 }
109}

pi/agent/skillz/quickshell/examples/06-ipc-control/README.md

Deleted
deleted file mode 100644

+0 / −24 text lines

1# 06: IPC control
2
3This example exposes explicitly typed functions through `IpcHandler`.
4The handler target is `mybar`.
5
6After starting the configuration in an isolated runtime, inspect and call it with the installed CLI:
7
8```sh
9qs ipc show
10qs ipc call mybar show
11qs ipc call mybar hide
12qs ipc call mybar toggle
13qs ipc call mybar setText "hello"
14```
16`IpcHandler` signals are observed with `qs ipc wait` or `qs ipc listen` when supported by the installed version.
17They are not consumed through an invented cross-process `IpcHandler.ipcBus` object.
19The installed `qmllint` may not handle dynamically declared, explicitly typed `IpcHandler` functions.
20A non-zero result without diagnostics is not proof that the example is invalid or valid.
21Cross-check the exact function syntax against the installed `IpcHandler` type page,
22then use an isolated load and IPC test.
24Static checking does not prove IPC registration or calls.

pi/agent/skillz/quickshell/examples/06-ipc-control/shell.qml

Deleted
deleted file mode 100644

+0 / −40 text lines

1// 06-ipc-control/shell.qml
2// IpcHandler: expose show/hide/toggle/text functions callable from outside the shell.
3// Run with: qs -p examples/06-ipc-control/shell.qml
4// Try:
5// qs -c ... ipc call mybar show
6// qs -c ... ipc call mybar hide
7// qs -c ... ipc call mybar toggle
8// qs -c ... ipc call mybar setText "hello from outside"
9
10import QtQuick
11import Quickshell
12import Quickshell.Io
14Scope {
15 id: root
16 property string label: "idle"
18 IpcHandler {
19 target: "mybar" // IPC namespace for qs ipc call
21 function show(): void { bar.visible = true }
22 function hide(): void { bar.visible = false }
23 function toggle(): void { bar.visible = !bar.visible }
24 function setText(s: string): void { root.label = s }
25 }
27 PanelWindow {
28 id: bar
29 visible: false
30 anchors { top: true; left: true; right: true }
31 implicitHeight: 40
32 color: "#cc1e1e2e"
34 Text {
35 anchors.centerIn: parent
36 text: root.label
37 color: "white"
38 }
39 }
40}

pi/agent/skillz/quickshell/examples/07-composite-bar/Bar.qml

Deleted
deleted file mode 100644

+0 / −67 text lines

1// 07-composite-bar/Bar.qml
2import QtQuick
3import QtQuick.Layouts
4import Quickshell
5import Quickshell.Services.Pipewire
6import Quickshell.Services.UPower
7import Quickshell.Hyprland
8import Quickshell.Widgets
9
10PanelWindow {
11 id: bar
12 anchors { top: true; left: true; right: true }
13 implicitHeight: 36
14 color: "#cc1e1e2e"
15 readonly property var sinkAudio: Pipewire.defaultAudioSink ? Pipewire.defaultAudioSink.audio : null
17 // Keep Pipewire nodes alive for state binding.
18 PwObjectTracker { objects: [ Pipewire.defaultAudioSink ] }
20 SystemClock { id: clock; precision: SystemClock.Seconds }
22 RowLayout {
23 anchors.fill: parent
24 anchors.leftMargin: 12
25 anchors.rightMargin: 12
26 spacing: 16
28 // Left: Hyprland workspace indicator (live from Hyprland IPC).
29 Text {
30 color: "white"
31 font.pointSize: 11
32 text: Hyprland.focusedWorkspace ? `${Hyprland.focusedWorkspace.id}` : "?"
33 }
35 Item { Layout.fillWidth: true }
37 // Center: SystemClock live time.
38 Text {
39 color: "white"
40 font.pointSize: 11
41 text: Qt.formatDateTime(clock.date, "HH:mm:ss")
42 }
44 Item { Layout.fillWidth: true }
46 // Right cluster: battery + volume.
47 Text {
48 color: "white"
49 font.pointSize: 11
50 text: UPower.displayDevice ? `${Math.floor(UPower.displayDevice.chargePercentage * 100)}%` : "n/a"
51 }
53 IconImage {
54 implicitSize: 16
55 source: Quickshell.iconPath(
56 bar.sinkAudio && bar.sinkAudio.muted
57 ? "audio-volume-muted-symbolic"
58 : "audio-volume-high-symbolic"
59 )
60 }
61 Text {
62 color: "white"
63 font.pointSize: 11
64 text: `${Math.floor((bar.sinkAudio ? bar.sinkAudio.volume : 0) * 100)}%`
65 }
66 }
67}

pi/agent/skillz/quickshell/examples/07-composite-bar/README.md

Deleted
deleted file mode 100644

+0 / −14 text lines

1# 07: composite bar
2
3This example combines a per-screen panel with `SystemClock`, PipeWire, UPower, and the Hyprland module.
4It is intentionally compositor-specific because it imports `Quickshell.Hyprland`.
5Do not claim that the Hyprland workspace binding is a generic Sway, i3, or Niri interface.
6
7Static check:
8
9```sh
10qmllint -I /usr/lib/qt6/qml examples/07-composite-bar/shell.qml
11```
13Static checking only establishes that the installed imports and QML structure resolve.
14Service values, workspace updates, per-screen placement, and appearance require isolated runtime and visual checks.

pi/agent/skillz/quickshell/examples/07-composite-bar/shell.qml

Deleted
deleted file mode 100644

+0 / −22 text lines

1// 07-composite-bar/shell.qml
2// Composite: per-monitor bar combining Variants, SystemClock, Pipewire, UPower, Hyprland.
3// Real-world "give me one of every module on my bar" stress test.
4// Run with: qs -p examples/07-composite-bar/shell.qml
5import QtQuick
6import QtQuick.Layouts
7import Quickshell
8import Quickshell.Services.Pipewire
9import Quickshell.Services.UPower
10import Quickshell.Hyprland
11import Quickshell.Widgets
12import "."
14Variants {
15 model: Quickshell.screens
16 delegate: Component {
17 Bar {
18 required property var modelData
19 screen: modelData
20 }
21 }
22}

pi/agent/skillz/quickshell/examples/08-notification-daemon/README.md

Deleted
deleted file mode 100644

+0 / −21 text lines

1# 08: minimal notification daemon
2
3This example tracks notifications and renders plain summary and body text.
4It explicitly disables action, persistence, inline-reply, markup, hyperlink, and image capability flags because the UI does not implement them.
5
6For a positive `expireTimeout`, which the installed-version docs express in seconds, the example converts to milliseconds for QML `Timer.interval` and calls `Notification.expire()`.
7Zero leaves the notification visible; a negative timeout requests daemon policy, here five seconds.
8Each window owns its expiry timer, so removing the notification also removes its timer.
9`Variants` creates the windows; a Qt Quick `Repeater` cannot use non-Item window delegates.
10This example has no history, manual dismissal, overflow management, or multi-monitor policy and is not a production daemon.
12Static check:
14```sh
15qmllint -I /usr/lib/qt6/qml examples/08-notification-daemon/shell.qml
16```
18**Do not launch this against the user's real session during routine validation.**
19`NotificationServer` attempts to own the session notification service.
20A runtime test requires an isolated session bus and notification clients.
21Static checking does not prove ownership, expiry, stacking, interaction, or appearance.

pi/agent/skillz/quickshell/examples/08-notification-daemon/shell.qml

Deleted
deleted file mode 100644

+0 / −90 text lines

1// Minimal plain-text notification example, not a production daemon.
2// Run only with an isolated session bus and nested compositor.
3
4pragma ComponentBehavior: Bound
5
6import QtQuick
7import Quickshell
8import Quickshell.Services.Notifications
9
10Scope {
11 NotificationServer {
12 id: server
14 actionsSupported: false
15 bodyMarkupSupported: false
16 persistenceSupported: false
17 bodyHyperlinksSupported: false
18 bodyImagesSupported: false
19 inlineReplySupported: false
21 onNotification: notification => notification.tracked = true
22 }
24 // Variants can instantiate windows; Repeater delegates must be Items.
25 Variants {
26 model: server.trackedNotifications
28 delegate: Component {
29 PanelWindow {
30 id: popup
31 required property var modelData
33 anchors {
34 bottom: true
35 right: true
36 }
37 margins {
38 bottom: 30 + server.trackedNotifications.values.indexOf(popup.modelData) * 88
39 right: 16
40 }
41 exclusiveZone: 0
42 implicitWidth: 360
43 implicitHeight: 80
44 color: "transparent"
45 mask: Region {}
47 // Quickshell uses seconds: zero persists, negative requests daemon policy.
48 Timer {
49 interval: popup.modelData.expireTimeout > 0 ? popup.modelData.expireTimeout * 1000 : 5000
50 running: popup.modelData.expireTimeout !== 0
51 repeat: false
52 onTriggered: popup.modelData.expire()
53 }
55 Rectangle {
56 anchors.fill: parent
57 radius: 8
58 color: "#dd1e1e2e"
59 border.color: "#444"
60 border.width: 1
62 Column {
63 anchors.fill: parent
64 anchors.margins: 12
65 spacing: 4
67 Text {
68 text: popup.modelData.summary
69 textFormat: Text.PlainText
70 color: "white"
71 font.pointSize: 12
72 font.bold: true
73 elide: Text.ElideRight
74 width: parent.width
75 }
76 Text {
77 text: popup.modelData.body
78 textFormat: Text.PlainText
79 color: "#ccc"
80 font.pointSize: 10
81 elide: Text.ElideRight
82 width: parent.width
83 visible: text.length > 0
84 }
85 }
86 }
87 }
88 }
89 }
90}

pi/agent/skillz/quickshell/examples/README.md

Deleted
deleted file mode 100644

+0 / −26 text lines

1# Quickshell examples
2
3These examples demonstrate small configuration shapes.
4Before adapting one, resolve the installed Quickshell version and check its official type pages.
5
6| Example | Demonstrates |
7| ------------------------ | ------------------------------------------------------------------------------- |
8| `01-hello-bar` | A `PanelWindow` as the entry root |
9| `02-per-monitor-bar` | A `Variants` root and one panel per screen |
10| `03-clock` | A top-anchored clock panel |
11| `04-pipewire-volume` | Tracked PipeWire state and reactive slider binding |
12| `05-osd-volume` | `Scope`, `Connections`, `Timer`, `LazyLoader`, and `PanelWindow` |
13| `06-ipc-control` | Explicitly typed `IpcHandler` functions |
14| `07-composite-bar` | Several installed services in one panel |
15| `08-notification-daemon` | Plain notification summary/body rendering without unsupported capability claims |
17## Validation boundary
19Use `qmllint` for static structure and imports.
20Do not launch these examples on the user's real desktop merely to validate the skill.
21A panel maps a desktop surface, and the notification example attempts to own the session notification service.
23Runtime checks require a nested compositor and isolated runtime and service state.
24Interaction and visual acceptance are separate from static or offscreen loading.
26The authentication and lockscreen APIs are intentionally not represented by runnable examples here because routine validation must not start live authentication or session-lock flows.

pi/agent/skillz/quickshell/package.json

Deleted
deleted file mode 100644

+0 / −6 text lines

1{
2 "private": true,
3 "scripts": {
4 "test": "node --test bin/test/*.test.mjs"
5 }
6}

pi/agent/skillz/quickshell/references/getting-fresh-docs.md

Deleted
deleted file mode 100644

+0 / −62 text lines

1# Getting fresh Quickshell documentation
2
3Quickshell APIs change between releases.
4Resolve the installed version before designing or changing a component.
5
6## 1. Identify the installed version
7
8```sh
9qs --version
10```
12Use the exact reported version in official URLs:
14- Guide: `https://quickshell.org/docs/v<version>/guide/`
15- Type index: `https://quickshell.org/docs/v<version>/types/`
16- Changelog: `https://quickshell.org/changelog/`
18## 2. Inspect each type used
20For every Quickshell type, verify:
22- import module
23- creatable versus singleton status
24- properties and their units
25- signals and handler parameters
26- invokable methods
27- platform or protocol restrictions
29Do not infer one service's shape from another service.
30Do not preserve a guessed fallback API for older versions.
31Target the installed version unless the user explicitly requests multiple versions.
33## 3. Resolve local and web disagreement
35The installed module describes what the local binary exposes.
36On a typical Qt 6 Linux installation, inspect:
38```text
39/usr/lib/qt6/qml/Quickshell/**/qmldir
40/usr/lib/qt6/qml/Quickshell/**/*.qmltypes
41```
43Use the equivalent QML import directory on other systems.
44`*.qmltypes` establishes names, properties, signals, methods, and enums,
45but prose docs remain necessary for semantics such as units and lifecycle.
47## 4. Cross-check official examples
49Use the official examples repository only when the guide and type pages are insufficient.
50Call the `git_clone_safe` tool with URL `https://github.com/quickshell-mirror/quickshell-examples` and an isolated destination.
51Do not invoke it as a shell command.
53Read the example nearest to the requested component.
54Do not treat community configuration files as API documentation because they may target another Quickshell revision.
56## 5. Record evidence honestly
58`qmllint` provides static evidence only.
59An offscreen Quickshell load provides load evidence only.
60Neither proves mapped surfaces, input, compositor behavior, or service integration.
61Runtime service checks require an isolated D-Bus and service environment.
62Visual and interaction acceptance require a nested compositor or an explicitly approved target session.

pi/agent/skillz/quickshell/references/packaging.md

Deleted
deleted file mode 100644

+0 / −32 text lines

1# Installation and packaging
2
3Package availability and build dependencies change.
4Use the install guide matching the desired Quickshell release:
5
6```text
7https://quickshell.org/docs/v<version>/guide/install-setup/
8```
9
10For an existing machine, inspect before changing anything:
12```sh
13qs --version
14qs --help
15```
17Prefer the distribution's supported package path unless the user asks for a source build or another packaging model.
18Do not add blanket package pinning, source-build scaffolding, compatibility branches, or version gates.
19If multiple versions are an explicit requirement, define the supported versions and test each one.
21## Editor setup
23Follow the installed guide for `qmlls` setup.
24A `.qmlls.ini` file contains machine-specific paths and should not be copied as portable configuration.
26## Troubleshooting order
281. Capture the exact `qs` version and full diagnostic output.
292. Verify the QML import paths and installed modules.
303. Check the matching official type page for every unresolved symbol.
314. Distinguish a static or load failure from a mapped-surface, compositor-protocol, or service failure.
325. Reproduce runtime behavior only in an isolated environment when the configuration can claim desktop protocols or services.

pi/agent/skillz/quickshell/references/patterns.md

Deleted
deleted file mode 100644

+0 / −150 text lines

1# Retained patterns
2
3Verify every Quickshell type against the installed-version docs before using these patterns.
4These examples show structure, not cross-version compatibility.
5
6## Single panel root
7
8A `PanelWindow` can be the entry file's root object.
9It does not need a `ShellRoot` wrapper.
11```qml
12import QtQuick
13import Quickshell
15PanelWindow {
16 anchors { top: true; left: true; right: true }
17 implicitHeight: 30
18 Text { anchors.centerIn: parent; text: "hello" }
19}
20```
22## One panel per screen
24A `Variants` object can also be the entry root.
26```qml
27import QtQuick
28import Quickshell
30Variants {
31 model: Quickshell.screens
32 delegate: Component {
33 PanelWindow {
34 required property var modelData
35 screen: modelData
36 }
37 }
38}
39```
41`required property var modelData` exposes the model item to the delegate.
43## Reactive clock
45```qml
46SystemClock {
47 id: clock
48 precision: SystemClock.Seconds
49}
51Text {
52 text: Qt.formatTime(clock.date, "HH:mm:ss")
53}
54```
56The binding updates when `clock.date` changes.
57A direct `new Date()` expression has no changing QML dependency.
59## Process output
61```qml
62import Quickshell.Io
64Process {
65 command: ["some-program", "--argument"]
66 running: true
67 stdout: StdioCollector {
68 onStreamFinished: output.text = this.text
69 }
70}
71```
73Pass command arguments as a list.
74Do not invoke a shell unless shell syntax is explicitly required and trusted.
76For line-oriented output, use `SplitParser` and its `onRead` signal after verifying the installed type page.
78## Service-backed slider
80Assuming the containing object declares
81`readonly property var sinkAudio: Pipewire.defaultAudioSink ? Pipewire.defaultAudioSink.audio : null`:
83```qml
84Slider {
85 value: sinkAudio ? sinkAudio.volume : 0
86 onMoved: if (sinkAudio) sinkAudio.volume = value
87}
88```
90The `value` binding keeps external service changes reactive.
91`onMoved` limits writes to user movement instead of reacting to initialization or service-driven updates.
93## Changing signal target
95```qml
96Connections {
97 target: sinkAudio
98 function onVolumeChanged() {
99 showVolumeOsd()
100 }
101}
102```
104Bind `target` to the current service object because the object may appear, disappear, or be replaced.
106## Conditional non-Item object
108```qml
109LazyLoader {
110 active: shouldShow
111 PanelWindow { /* content */ }
112}
113```
115Use `LazyLoader` for a conditionally instantiated window.
116Use ordinary `visible` when retaining the object is intentional.
118## Click-through panel
120```qml
121PanelWindow {
122 color: "transparent"
123 mask: Region {}
124}
125```
127An empty `Region` makes the window's input mask empty.
128Confirm interaction in a nested compositor because static loading cannot prove click-through behavior.
130## IPC callable
132```qml
133import Quickshell.Io
135IpcHandler {
136 target: "mybar"
137 function toggle(): void {
138 panel.visible = !panel.visible
139 }
140}
141```
143IPC function argument and return types must be explicit and supported by the installed version.
144Inspect registered handlers with `qs ipc show`, then call the function with `qs ipc call mybar toggle`.
146## Multi-file configuration
148Neighboring PascalCase QML files can define local types.
149For subdirectories, follow the installed guide's `qs.*` import rules.
150Do not add compatibility imports or version gates unless the user explicitly requires multiple Quickshell versions.

pi/agent/skillz/quickshell/references/resources.md

Deleted
deleted file mode 100644

+0 / −78 text lines

1# Resources and I/O
2
3Verify these APIs against the installed-version type pages before using them.
4
5## Paths
6
7- `Qt.resolvedUrl("asset.png")` resolves relative to the current QML file.
8- `Quickshell.cachePath(...)`, `dataPath(...)`, and `statePath(...)` return shell-specific paths when exposed by the installed version.
9- `Quickshell.env("NAME")` reads an environment variable.
11Choose cache, data, and state according to XDG semantics.
12Do not claim that a path helper itself persists QML properties.
14## Icons
16```qml
17import Quickshell.Widgets
19IconImage {
20 source: Quickshell.iconPath("audio-volume-high-symbolic")
21 implicitSize: 24
22}
23```
25Check the installed `Quickshell.iconPath` overloads before adding fallback behavior.
26An icon name still depends on the active icon theme.
28## FileView and JsonAdapter
30`JsonAdapter` is an adapter owned by `FileView`.
31It does not have a `path` property and does not infer arbitrary properties from a JSON file.
32Declare the adapter properties explicitly.
34```qml
35import Quickshell.Io
37FileView {
38 path: Qt.resolvedUrl("config.json")
39 watchChanges: true
40 onFileChanged: reload()
42 JsonAdapter {
43 property string accent: "blue"
44 }
45}
46```
48Read the installed `FileView` and `JsonAdapter` pages before enabling writes.
49Writing configuration requires an explicit save policy and data-loss handling.
51## Reload state
53`PersistentProperties` carries declared properties across a Quickshell configuration reload.
54It does not provide durable persistence across process restarts.
55Use its documented `reloadableId` behavior and do not describe it as disk storage.
57## IPC
59`IpcHandler` exposes explicitly typed functions, properties, and signals through `qs ipc`.
61```qml
62import Quickshell.Io
64IpcHandler {
65 target: "mybar"
66 function setText(value: string): void {
67 label.text = value
68 }
69 signal changed(value: string)
70}
71```
73- Inspect registrations with `qs ipc show`.
74- Call functions with `qs ipc call mybar setText "value"`.
75- Observe exported signals with the installed CLI's `qs ipc wait` or `qs ipc listen` commands.
76- Do not invent an `IpcHandler.ipcBus` singleton or use `Connections` as cross-process IPC.
78Function argument and return types must be explicit and supported by the installed version.

pi/agent/skillz/quickshell/references/services.md

Deleted
deleted file mode 100644

+0 / −90 text lines

1# Services
2
3**Service APIs are version-sensitive and can mutate the user's session.**
4Start from the installed-version type index, not from a remembered recipe.
5Inspect local `*.qmltypes` files when the installed module and web docs may differ.
6
7## PipeWire
8
9The retained default-sink shape is:
11```qml
12import QtQuick
13import Quickshell
14import Quickshell.Services.Pipewire
16PanelWindow {
17 id: root
18 anchors { top: true; left: true; right: true }
19 implicitHeight: 30
20 readonly property var sinkAudio: Pipewire.defaultAudioSink ? Pipewire.defaultAudioSink.audio : null
22 PwObjectTracker {
23 objects: [Pipewire.defaultAudioSink]
24 }
26 Text {
27 anchors.centerIn: parent
28 text: `${Math.floor((root.sinkAudio ? root.sinkAudio.volume : 0) * 100)}%`
29 }
30}
31```
33For a slider, keep the service-to-control binding declarative and write only user movement:
35```qml
36Slider {
37 value: root.sinkAudio ? root.sinkAudio.volume : 0
38 onMoved: if (root.sinkAudio) root.sinkAudio.volume = value
39}
40```
42Verify the tracker and node properties against the installed PipeWire module before extending this shape.
44## Notifications
46Creating `NotificationServer` attempts to become the session notification daemon.
47Do not run it alongside the user's real notification daemon during tests.
49Capability properties advertise behavior to clients.
50Set `actionsSupported`, `persistenceSupported`, `inlineReplySupported`, markup, hyperlinks, images, or action icons to true only when the UI implements that behavior.
51Receiving a property from `Notification` does not mean the daemon implements its presentation or interaction.
53A received notification must be marked `tracked` in `onNotification` if it should remain in `trackedNotifications`.
54`Notification.expireTimeout` is expressed in seconds in the installed-version docs checked for this skill.
55Use `expire()` for timeout expiry and `dismiss()` for an explicit user dismissal because they report different close reasons.
56Re-check these semantics for the installed version.
58The bundled notification example intentionally renders only plain summary and body text.
59It does not advertise actions, persistence, inline reply, markup, hyperlinks, or images.
61## PAM
63Never send the PAM prompt text back as the response.
64The prompt is display state.
65The response comes from the user's input and may be sent only while `responseRequired` is true.
66Honor `responseVisible` when deciding whether user input may be shown.
68Do not use an abbreviated PAM recipe for a lockscreen.
69Read the complete installed-version `PamContext` page and official lockscreen example.
70Do not run live PAM or lockscreen checks during routine skill validation.
72## greetd and Polkit
74These components participate in authentication and session authorization.
75Do not guess method names, lifecycle order, or response objects.
76Use the installed-version type pages and official examples.
77Test only in an isolated environment with a recovery path.
79## MPRIS, system tray, UPower, Bluetooth, and networking
81Look up the installed module name and exported types before importing them.
82Module names and singleton shapes are not uniform across these services.
83If the installed API cannot support a requested feature, report the blocker.
84Do not silently delete requested behavior or add guessed adapters and compatibility branches.
86## Runtime isolation
88A nested compositor alone does not isolate D-Bus or per-user services.
89For service tests, isolate the runtime directory, session bus, and relevant service daemons as well.
90Static `qmllint` and offscreen loading do not validate service ownership, events, or interaction.

pi/agent/skillz/quickshell/references/windowing.md

Deleted
deleted file mode 100644

+0 / −78 text lines

1# Windowing
2
3Read the installed-version type page for each window and attached property before coding.
4
5## PanelWindow
6
7Use `PanelWindow` for a decorationless surface attached to screen edges.
8It can be the root object of `shell.qml`.
9
10```qml
11import Quickshell
13PanelWindow {
14 anchors { top: true; left: true; right: true }
15 implicitHeight: 30
16 margins { top: 4; left: 4; right: 4 }
17}
18```
20Opposite anchors force the corresponding dimension to span the screen between margins.
21The exclusion zone only takes effect with the anchor combinations documented by the installed `PanelWindow` type page.
23For click-through rendering:
25```qml
26PanelWindow {
27 color: "transparent"
28 mask: Region {}
29}
30```
32## FloatingWindow
34Use `FloatingWindow` for an ordinary desktop window controlled by the window manager.
35Do not use panel anchors or `WlrLayershell` on it.
37```qml
38import Quickshell
40FloatingWindow {
41 width: 600
42 height: 400
43}
44```
46## PopupWindow
48Use `PopupWindow` only when the popup is anchored to another Quickshell window.
49Its anchor API is version-sensitive, so read the installed `PopupWindow` and `PopupAnchor` pages rather than copying a recipe from this skill.
51## Layer shell
53`WlrLayershell` is an attached object on `PanelWindow`.
54It is not attached to `FloatingWindow`.
56```qml
57import Quickshell
58import Quickshell.Wayland
60PanelWindow {
61 WlrLayershell.layer: WlrLayer.Overlay
62 WlrLayershell.namespace: "my-osd"
63}
64```
66Layer-shell support depends on the compositor protocol, not on a blanket "Wayland" or "wlroots" label.
67Niri is not wlroots-based.
68i3 is an X11 window manager; Sway is its Wayland counterpart.
69Verify the target compositor's protocol support independently.
71## Session lock
73`WlSessionLock` and `WlSessionLockSurface` are security-sensitive protocol objects.
74Do not derive a lockscreen from an abbreviated recipe.
75Use the official example matching the installed Quickshell version and review the complete PAM conversation.
77Never launch a lockscreen or authentication flow on the real session during routine validation.
78Use a nested compositor and isolated authentication setup with an explicit recovery path.

pi/agent/skillz/wezterm/SKILL.md

Modified

+1 / −1 text lines

11---
22name: wezterm
33which: wezterm
4description: "WezTerm terminal emulator configuration: Lua config, panes, tabs, domains, key bindings, and appearance. Use for configuring WezTerm itself; use terminal-harness to drive interactive terminal programs."
4description: "Use for WezTerm config: Lua, panes, tabs, domains, key bindings, appearance. Use terminal-harness to drive interactive programs."
55---
77# WezTerm Skill