@xynogen/pix-skills 0.10.9 → 0.10.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -5
- package/skills/lint.md +2 -2
- package/skills/lsp.md +2 -2
- package/skills/search.md +2 -2
- package/skills/task.md +6 -20
- package/src/index.ts +20 -16
- package/src/picker.ts +9 -3
- package/src/remote.ts +1 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xynogen/pix-skills",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.11",
|
|
4
4
|
"description": "Pi extension — agent skill loader (skill tool + skills bundle)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
11
|
"src",
|
|
12
|
-
"!src/**/*.test.*",
|
|
13
12
|
"skills",
|
|
14
13
|
"README.md",
|
|
15
14
|
"LICENSE"
|
|
@@ -47,8 +46,8 @@
|
|
|
47
46
|
"@earendil-works/pi-tui": "*"
|
|
48
47
|
},
|
|
49
48
|
"dependencies": {
|
|
50
|
-
"@xynogen/pix-gate": "^0.4.
|
|
51
|
-
"@xynogen/pix-pretty": "^1.
|
|
52
|
-
"@xynogen/pix-runtime": "^0.
|
|
49
|
+
"@xynogen/pix-gate": "^0.4.11",
|
|
50
|
+
"@xynogen/pix-pretty": "^2.1.0",
|
|
51
|
+
"@xynogen/pix-runtime": "^0.20.0"
|
|
53
52
|
}
|
|
54
53
|
}
|
package/skills/lint.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: lint
|
|
3
|
-
description: Selects and runs the project's linter (
|
|
3
|
+
description: Selects and runs the project's linter (lsp diagnostics, then the project script, config, or a language default) and fixes findings. Use when asked to lint, fix lint errors, or check code quality.
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
6
|
# Project Lint
|
|
@@ -9,7 +9,7 @@ Pix does not bundle linters. Use the project toolchain.
|
|
|
9
9
|
|
|
10
10
|
## Selection order
|
|
11
11
|
|
|
12
|
-
1. Run `
|
|
12
|
+
1. Run `lsp` with `action: "diagnostics"` for language-server diagnostics.
|
|
13
13
|
2. Prefer the project's `lint` or `check` script.
|
|
14
14
|
3. Use the tool named by a project config file.
|
|
15
15
|
4. Use the language default below only when the project has no choice.
|
package/skills/lsp.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: lsp
|
|
3
|
-
description: Selects, installs with consent, and configures a project language server in .pi/lsp.json for pix-diagnostics, then confirms it with
|
|
3
|
+
description: Selects, installs with consent, and configures a project language server in .pi/lsp.json for pix-diagnostics, then confirms it with lsp diagnostics. Use when LSP diagnostics or navigation are missing, unavailable, or need setup for a language.
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
6
|
# Project LSP Setup
|
|
@@ -14,7 +14,7 @@ installation. Configure it in `<project>/.pi/lsp.json`.
|
|
|
14
14
|
2. Prefer an existing server in project dependencies or on `PATH`.
|
|
15
15
|
3. Ask before installing a missing server. Prefer a project-local install (dev dependency, `uv` group). For servers with no local form (`gopls`, `rust-analyzer`, `clangd`, `terraform-ls`, `lua-language-server`), ask how the user wants it installed.
|
|
16
16
|
4. Add only the selected language to `.pi/lsp.json`. Never add every language.
|
|
17
|
-
5. Run `
|
|
17
|
+
5. Run `lsp` with `action: "diagnostics"`, `source: "lsp"` on one source file.
|
|
18
18
|
6. Report: language, server, config path, and the result. If the server fails to start or returns an error, report it and stop. Do not try another server without asking.
|
|
19
19
|
|
|
20
20
|
## Common choices
|
package/skills/search.md
CHANGED
|
@@ -10,8 +10,8 @@ Goal: the full map, not the first match.
|
|
|
10
10
|
## Tools
|
|
11
11
|
|
|
12
12
|
- **Unknown location, text, config, comments** → the `grep` and `find` tools, then `read` the hits.
|
|
13
|
-
- **Known symbol** → `
|
|
14
|
-
- **Code graph available** (`.pi/graph/graph.json`) → `graph` query first.
|
|
13
|
+
- **Known symbol** → `lsp` with `action: "navigate"` and `operation` `definition`, `references`, `implementation`, `callHierarchy`, or `hover`. LSP results are exact; prefer them over grep for symbols.
|
|
14
|
+
- **Code graph available** (`.pi/pix-graph/graph.json`) → `graph` query first.
|
|
15
15
|
|
|
16
16
|
Start broad with grep, then switch to LSP for exact navigation.
|
|
17
17
|
|
package/skills/task.md
CHANGED
|
@@ -1,36 +1,22 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: task
|
|
3
|
-
description:
|
|
3
|
+
description: Carries a multi-step change through to a verified result using conversation context and proportionate planning. Use for multi-file work or short follow-ups such as "do it" or "fix that".
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
6
|
# Task
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## Approach
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
2. **Map the impact**: affected files, tests, docs, configs, and consumers. Flag breaking changes.
|
|
12
|
-
3. **Check the state**: paths, versions, permissions, and a clean starting point.
|
|
10
|
+
Use the whole conversation to resolve the goal and target. Inspect relevant code and any reference project before asking the user to fill gaps. Make routine implementation decisions yourself; ask only about unresolved choices that materially affect scope, cost, or safety.
|
|
13
11
|
|
|
14
12
|
## Execute
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
Write each step as:
|
|
19
|
-
|
|
20
|
-
```
|
|
21
|
-
Step N: [action]
|
|
22
|
-
- Files: [exact paths]
|
|
23
|
-
- Command: [exact command]
|
|
24
|
-
- Expected: [what success looks like]
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
- Do one step, check its result, then start the next.
|
|
28
|
-
- For long plans, report after every batch of about 3 steps. Continue unless the user must decide something.
|
|
14
|
+
Plan only as much as the change needs. Group related edits and checks; do not narrate every tool call or wait for approval between routine steps. Preserve unrelated work and respect permission boundaries.
|
|
29
15
|
|
|
30
16
|
## Blocked
|
|
31
17
|
|
|
32
|
-
|
|
18
|
+
Diagnose failures and use available alternatives within the authorized scope. Stop for missing permission, a consequential user decision, or a blocker you cannot resolve safely. Report the specific cause and what is needed; do not retry blindly.
|
|
33
19
|
|
|
34
20
|
## Finish
|
|
35
21
|
|
|
36
|
-
|
|
22
|
+
Check the result against the user's goal with relevant tests and a diff review, following repo requirements. Report the outcome, evidence, and anything still unverified. Do not treat successful edits or tool calls as proof that the task is complete.
|
package/src/index.ts
CHANGED
|
@@ -11,24 +11,34 @@
|
|
|
11
11
|
* body on demand. This keeps baseline context flat as the skill set grows.
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
import { existsSync, readdirSync, readFileSync } from "node:fs";
|
|
15
|
-
import { copyFile, mkdir, readFile, realpath, rename, rm, stat } from "node:fs/promises";
|
|
16
14
|
import { dirname, isAbsolute, join, relative, resolve, win32 } from "node:path";
|
|
17
|
-
import { type ExtensionAPI, stripFrontmatter } from "@earendil-works/pi-coding-agent";
|
|
18
|
-
import { Text } from "@earendil-works/pi-tui";
|
|
19
15
|
import { type FadeTheme, fadeTextRow } from "@xynogen/pix-pretty/text";
|
|
16
|
+
import { Text } from "@xynogen/pix-pretty/tui";
|
|
20
17
|
import {
|
|
21
18
|
dotJoin,
|
|
22
|
-
formatCollapsedToolRow,
|
|
23
|
-
formatToolCallTitle,
|
|
24
19
|
frameToolResult,
|
|
25
20
|
getErrorMessage,
|
|
26
21
|
getTextContent,
|
|
27
22
|
hideCollapsedToolCall,
|
|
28
23
|
humanSize,
|
|
29
24
|
moreLines,
|
|
25
|
+
renderRow,
|
|
26
|
+
renderTitle,
|
|
30
27
|
} from "@xynogen/pix-pretty/utils";
|
|
31
28
|
import { type CollapseState, tickCollapse } from "@xynogen/pix-runtime/collapse";
|
|
29
|
+
import {
|
|
30
|
+
copyFile,
|
|
31
|
+
existsSync,
|
|
32
|
+
mkdir,
|
|
33
|
+
readdirSync,
|
|
34
|
+
readFile,
|
|
35
|
+
readFileSync,
|
|
36
|
+
realpath,
|
|
37
|
+
rename,
|
|
38
|
+
rm,
|
|
39
|
+
stat,
|
|
40
|
+
} from "@xynogen/pix-runtime/fs";
|
|
41
|
+
import { type ExtensionAPI, stripFrontmatter } from "@xynogen/pix-runtime/host";
|
|
32
42
|
import { ioTimeoutMs } from "@xynogen/pix-runtime/io";
|
|
33
43
|
import { once } from "@xynogen/pix-runtime/once";
|
|
34
44
|
import { agentDir, moduleFile } from "@xynogen/pix-runtime/paths";
|
|
@@ -107,7 +117,7 @@ function scanSkillsDir(root: string): SkillEntry[] {
|
|
|
107
117
|
* Scan sibling `@xynogen/*` packages that declare `pi.skills` in their manifest.
|
|
108
118
|
* pix-skills lives in the same scope dir (node_modules/@xynogen in an install,
|
|
109
119
|
* packages/ in dev), so other pix packages can own their own skills (e.g.
|
|
110
|
-
* pix-graph ships `graph`) and still be found by `read_skills`. Pi's host loads
|
|
120
|
+
* pix-graph ships `pix-graph`) and still be found by `read_skills`. Pi's host loads
|
|
111
121
|
* these via the manifest too; this keeps the agent-facing loader in sync.
|
|
112
122
|
*/
|
|
113
123
|
export function scanSiblingPackageSkills(scope?: string): SkillEntry[] {
|
|
@@ -705,7 +715,7 @@ function registerSkillLoader(pi: ExtensionAPI): void {
|
|
|
705
715
|
return component;
|
|
706
716
|
const label = formatSkillCallLabel(args as SkillCallArgs);
|
|
707
717
|
component.setText(
|
|
708
|
-
`${
|
|
718
|
+
`${renderTitle(theme, "read_skills", renderCtx)} ${theme.fg("dim", label)}`,
|
|
709
719
|
);
|
|
710
720
|
return component;
|
|
711
721
|
},
|
|
@@ -726,13 +736,7 @@ function registerSkillLoader(pi: ExtensionAPI): void {
|
|
|
726
736
|
)
|
|
727
737
|
) {
|
|
728
738
|
component.setText(
|
|
729
|
-
|
|
730
|
-
theme,
|
|
731
|
-
"read_skills",
|
|
732
|
-
text?.split("\n")[0] ?? "failed",
|
|
733
|
-
"",
|
|
734
|
-
"error",
|
|
735
|
-
),
|
|
739
|
+
renderRow(theme, "read_skills", text?.split("\n")[0] ?? "failed", "", "error"),
|
|
736
740
|
);
|
|
737
741
|
return component;
|
|
738
742
|
}
|
|
@@ -742,7 +746,7 @@ function registerSkillLoader(pi: ExtensionAPI): void {
|
|
|
742
746
|
// Collapsed row mirrors the call label: `<action> <target> · <meta>` so
|
|
743
747
|
// the summary reads the same way the call did (no action/target reorder).
|
|
744
748
|
const { target, meta } = collapsedSkillRow(details);
|
|
745
|
-
component.setText(
|
|
749
|
+
component.setText(renderRow(theme, "read_skills", target, meta));
|
|
746
750
|
return component;
|
|
747
751
|
}
|
|
748
752
|
if (details.mode === "search" && details.results) {
|
package/src/picker.ts
CHANGED
|
@@ -6,14 +6,20 @@
|
|
|
6
6
|
* shows the loaded skill as a collapsible card, the same as `/skill:name`.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { CustomEditor, type ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
10
|
-
import { fuzzyFilter, matchesKey, mixColors, type TUI } from "@earendil-works/pi-tui";
|
|
11
9
|
import { chipTag, SKILL_TAG } from "@xynogen/pix-pretty/chips";
|
|
12
10
|
import { frameLines, modalWidth } from "@xynogen/pix-pretty/modal-frame";
|
|
13
11
|
import { fadeLine } from "@xynogen/pix-pretty/text";
|
|
14
12
|
import { showTransientMessage } from "@xynogen/pix-pretty/transient-error";
|
|
13
|
+
import {
|
|
14
|
+
CustomEditor,
|
|
15
|
+
fuzzyFilter,
|
|
16
|
+
matchesKey,
|
|
17
|
+
mixColors,
|
|
18
|
+
type TUI,
|
|
19
|
+
} from "@xynogen/pix-pretty/tui";
|
|
15
20
|
import type { ThemeLike } from "@xynogen/pix-pretty/types";
|
|
16
21
|
import { getErrorMessage } from "@xynogen/pix-pretty/utils";
|
|
22
|
+
import type { ExtensionAPI } from "@xynogen/pix-runtime/host";
|
|
17
23
|
|
|
18
24
|
const MAX_VISIBLE = 10;
|
|
19
25
|
const SEARCH_DELAY_MS = 300;
|
|
@@ -269,7 +275,7 @@ export function registerSkillPicker(
|
|
|
269
275
|
(tui, theme, _kb, done) => {
|
|
270
276
|
const picker = new SkillPicker({
|
|
271
277
|
local: listLocal(),
|
|
272
|
-
theme
|
|
278
|
+
theme,
|
|
273
279
|
search,
|
|
274
280
|
done,
|
|
275
281
|
onChange: () => tui.requestRender(),
|
package/src/remote.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { existsSync } from "node:fs";
|
|
2
|
-
import { mkdir, readFile, rename, rm, writeFile } from "node:fs/promises";
|
|
3
1
|
import { dirname, isAbsolute, join, relative, resolve } from "node:path";
|
|
2
|
+
import { existsSync, mkdir, readFile, rename, rm, writeFile } from "@xynogen/pix-runtime/fs";
|
|
4
3
|
import { cacheDir } from "@xynogen/pix-runtime/paths";
|
|
5
4
|
|
|
6
5
|
const SKILLS_SH = "https://skills.sh";
|