@xynogen/pix-skills 0.7.6 → 0.7.8

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/README.md CHANGED
@@ -7,7 +7,7 @@ Pi coding agent extension — skill loader tool + skills bundle.
7
7
  | Resource | Type | Description |
8
8
  |---|---|---|
9
9
  | `read_skills` | tool | Browse local skills, search Skills.sh, explicitly fetch/cache a selected public GitHub skill, read references, and copy bundled resources. |
10
- | `skills/` | skills | 27 bundled skills (off-context by default — discovered on demand via `read_skills`) |
10
+ | `skills/` | skills | 29 bundled skills (off-context by default — discovered on demand via `read_skills`) |
11
11
 
12
12
  ## New: Skills.sh search and remote skill cache
13
13
 
@@ -155,6 +155,7 @@ as `/skill:<name>` slash commands.
155
155
  | `finish` | Structured branch completion — verify, decide, clean up |
156
156
  | `graphify` | Codebase questions via a persistent knowledge graph |
157
157
  | `handoff` | Toggle session handoff — write or read+delete `HANDOFF.md` |
158
+ | `human` | Audit and rewrite content to remove AI writing patterns ("AI-isms") |
158
159
  | `plan` | Write detailed, bite-sized implementation plans before coding |
159
160
  | `readme` | Create or update a deployment-focused README in a fixed style |
160
161
  | `review` | Architectural review and quality assurance |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xynogen/pix-skills",
3
- "version": "0.7.6",
3
+ "version": "0.7.8",
4
4
  "description": "Pi extension — agent skill loader (skill tool + skills bundle)",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -48,7 +48,7 @@
48
48
  "dependencies": {
49
49
  "@xynogen/pix-data": "^0.4.0",
50
50
  "@xynogen/pix-gate": "^0.2.0",
51
- "@xynogen/pix-pretty": "^1.7.20",
51
+ "@xynogen/pix-pretty": "^1.10.0",
52
52
  "@xynogen/pix-runtime": "^0.4.0"
53
53
  }
54
54
  }
@@ -0,0 +1,93 @@
1
+ ---
2
+ name: composio-mcp
3
+ description: Use when calling Composio MCP tools (any app it proxies). Prefer a direct MCP server if one exists; introspect object shape before mutating; ask the user with options instead of guessing IDs, names, or field paths.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Composio MCP: introspect before you mutate
8
+
9
+ Field names, type names, and enum options differ per workspace and are not
10
+ guessable. Read the shape before you write — a guessed name burns a round-trip
11
+ or silently writes bad data.
12
+
13
+ ## Rules
14
+
15
+ 0. **Prefer a direct server over the proxy.** Before reaching for Composio, list
16
+ configured servers with `mcp()` (no args) and check whether the target app
17
+ has its own dedicated MCP server. If it does, use it — `mcp(server:"<app>")`
18
+ to discover, then call the native tool directly. One native call typically
19
+ replaces the whole Composio
20
+ `SEARCH_TOOLS → GET_TOOL_SCHEMAS → REMOTE_WORKBENCH → EXECUTE` chain. Composio
21
+ is the fallback only for apps with no direct server.
22
+ 1. **Never invent a slug or arg.** Get them from `COMPOSIO_SEARCH_TOOLS` (returns
23
+ `input_schema` inline for most tools). Only call `COMPOSIO_GET_TOOL_SCHEMAS`
24
+ when a result carries `schemaRef` instead of `input_schema`.
25
+ 2. **Let Composio resolve IDs for you.** Put stable hints in `known_fields`
26
+ (`"<key>:<value>"`, e.g. a name or slug) so search resolves missing IDs —
27
+ before you go introspect them by hand.
28
+ 3. **Read model ≠ write model.** The name a field reads back as is often not the
29
+ name you write to; labels are not identifiers. Single-selects and custom
30
+ fields are frequently backed by a separate internal identifier or
31
+ auto-generated type (opaque suffixes, generated key strings, backing-type
32
+ names). Get the write name from the schema, not the query result.
33
+ 4. **Resolve option/relation values by reading a live record**, not by assuming
34
+ its label or id.
35
+ 5. **Ask, don't guess, on human choices.** If the target entity/project/state
36
+ doesn't uniquely resolve, or the user's word maps to 2+ candidates, use
37
+ `ask_user` with the candidates as options. One ask beats three wrong writes.
38
+ 6. **Flag shared-scope side effects first.** Renaming an enum option, deleting a
39
+ type, retargeting a relation hits *every* record using it. Say so; if
40
+ irreversible, confirm before doing it.
41
+ 7. **If a response says a tool/toolkit is restricted, STOP** and tell the user.
42
+ No workarounds.
43
+
44
+ ## Loop (mutations against an unfamiliar schema)
45
+
46
+ ```text
47
+ 0. direct? mcp() -> is there a dedicated server for this app? if yes:
48
+ mcp(server:"<app>") -> use the native tool, done
49
+ 1. search COMPOSIO_SEARCH_TOOLS(queries:[{use_case, known_fields}], session:{generate_id:true})
50
+ 2. schema only if the result shows schemaRef (not input_schema)
51
+ 3. resolve read live records -> concrete ids/write-names
52
+ 4. (ambiguous?) ask_user with options
53
+ 5. mutate CREATE / UPDATE with confirmed names + ids
54
+ 6. verify only if the response didn't echo the field, or it's a no-op-prone
55
+ kind (rich text, attachment, computed)
56
+ ```
57
+
58
+ For plain reads, or a tool whose schema you already fetched this session, skip
59
+ the loop and go direct.
60
+
61
+ ## Session + multi-execute (exact shapes)
62
+
63
+ - **Session is asymmetric.** `SEARCH_TOOLS` takes nested `session:{generate_id:true}`
64
+ (new) or `session:{id:"…"}` (continue) and returns the id. Every *other* meta
65
+ tool takes flat `session_id:"…"`. Pass it on all of them.
66
+ - **`COMPOSIO_MULTI_EXECUTE_TOOL` shape** — verify against `mcp(describe:…)` if
67
+ unsure:
68
+ - `tools: [{tool_slug, arguments, account?}]` — ≤50, logically independent only
69
+ - `thought`, `session_id`, `current_step` — **top-level**, not per-item
70
+ - `sync_response_to_workbench` — **required** bool
71
+ - Batch independent writes in one call (e.g. set a field on 10 records at once).
72
+ - Response is structured for direct use — don't reprocess it through bash/
73
+ workbench by default. Only when a response is spilled to a workbench file
74
+ (path is in the response) use `COMPOSIO_REMOTE_BASH_TOOL` + `jq` to extract.
75
+ - Paginate when a response returns a page token and completeness is implied;
76
+ don't report partial results as complete.
77
+
78
+ ## Shape traps that generalize across apps
79
+
80
+ - **List roots may not be the entities.** A query root can return groups/columns
81
+ (statuses, boards, channels) whose real records live one level down in a nested
82
+ collection. Read one result fully before assuming its shape.
83
+ - **Some fields can't be written by the generic update tool.** Rich text, file
84
+ attachments, computed fields often need a dedicated tool/endpoint or a token.
85
+ On rejection or silent no-op: check for a purpose-built tool first (e.g. an
86
+ append-document or add-comment tool), then tell the user and offer an
87
+ alternative — don't retry blindly.
88
+ - **The internal name in an error is the source of truth, not the label.** On
89
+ `type-not-found` / `field-not-found`, fetch the schema for the real name before
90
+ retrying — don't re-guess.
91
+ - **Connection is per-toolkit.** `SEARCH_TOOLS` reports it. If inactive, initiate
92
+ via `COMPOSIO_MANAGE_CONNECTIONS` (+ `COMPOSIO_WAIT_FOR_CONNECTIONS`); don't
93
+ fire calls that will 401.
package/src/index.ts CHANGED
@@ -18,7 +18,11 @@ import { dirname, isAbsolute, join, relative, resolve, win32 } from "node:path";
18
18
  import { fileURLToPath } from "node:url";
19
19
  import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
20
20
  import { Text } from "@earendil-works/pi-tui";
21
- import { formatCollapsedToolRow, hideCollapsedToolCall } from "@xynogen/pix-pretty/utils";
21
+ import {
22
+ formatCollapsedToolRow,
23
+ hideCollapsedToolCall,
24
+ humanSize,
25
+ } from "@xynogen/pix-pretty/utils";
22
26
  import { type CollapseState, tickCollapse } from "@xynogen/pix-runtime/collapse";
23
27
  import { ioTimeoutMs } from "@xynogen/pix-runtime/io";
24
28
  import { once } from "@xynogen/pix-runtime/once";
@@ -327,11 +331,6 @@ export type SkillResultDetails =
327
331
  | { mode: "reference"; name: string; resource: string; bytes: number }
328
332
  | { mode: "copy"; name: string; resource: string; output: string; bytes: number };
329
333
 
330
- function formatBytes(bytes: number): string {
331
- if (bytes < 1024) return `${bytes} B`;
332
- return `${(bytes / 1024).toFixed(1)} KiB`;
333
- }
334
-
335
334
  export function formatSkillCallLabel(args: SkillCallArgs): string {
336
335
  if (args.search) return `search · ${args.search}`;
337
336
  if (args.source && args.name) return `remote · ${args.source}@${args.name}`;
@@ -355,9 +354,9 @@ export function formatCollapsedSkillResult(details: SkillResultDetails): string
355
354
  case "instructions":
356
355
  return `${details.name} · ${details.lines} instruction lines`;
357
356
  case "reference":
358
- return `${details.name} · reference · ${formatBytes(details.bytes)}`;
357
+ return `${details.name} · reference · ${humanSize(details.bytes)}`;
359
358
  case "copy":
360
- return `copied · ${details.output} · ${formatBytes(details.bytes)}`;
359
+ return `copied · ${details.output} · ${humanSize(details.bytes)}`;
361
360
  }
362
361
  }
363
362
 
@@ -397,9 +396,9 @@ export function formatExpandedSkillResult(details: SkillResultDetails, text: str
397
396
  return `INSTRUCTIONS · ${details.name} · ${details.lines} lines\n${preview}`;
398
397
  }
399
398
  case "reference":
400
- return `REFERENCE · ${details.name}\n${details.resource} · ${formatBytes(details.bytes)}\n${text}`;
399
+ return `REFERENCE · ${details.name}\n${details.resource} · ${humanSize(details.bytes)}\n${text}`;
401
400
  case "copy":
402
- return `COPIED · ${details.name}\n${details.resource} → ${details.output} · ${formatBytes(details.bytes)}`;
401
+ return `COPIED · ${details.name}\n${details.resource} → ${details.output} · ${humanSize(details.bytes)}`;
403
402
  }
404
403
  }
405
404