@xynogen/pix-skills 0.7.7 → 0.7.12

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 | 28 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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xynogen/pix-skills",
3
- "version": "0.7.7",
3
+ "version": "0.7.12",
4
4
  "description": "Pi extension — agent skill loader (skill tool + skills bundle)",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -46,9 +46,9 @@
46
46
  "@earendil-works/pi-tui": "*"
47
47
  },
48
48
  "dependencies": {
49
- "@xynogen/pix-data": "^0.4.0",
50
- "@xynogen/pix-gate": "^0.2.0",
51
- "@xynogen/pix-pretty": "^1.10.0",
52
- "@xynogen/pix-runtime": "^0.4.0"
49
+ "@xynogen/pix-data": "^0.4.3",
50
+ "@xynogen/pix-gate": "^0.2.6",
51
+ "@xynogen/pix-pretty": "^1.11.2",
52
+ "@xynogen/pix-runtime": "^0.5.3"
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/skills/tdd.md ADDED
@@ -0,0 +1,47 @@
1
+ ---
2
+ name: tdd
3
+ description: Pragmatic test-driven development for any language or framework. Use when building features or fixing bugs test-first without dogma — red-green loop, seams, vertical slices, with sanctioned exceptions.
4
+ ---
5
+ # Pragmatic TDD
6
+
7
+ Test-first by default, not test-first as religion. The loop is the tool; keeping momentum matters more than ritual purity.
8
+
9
+ ## The Loop
10
+
11
+ 1. **RED** — write one small failing test for the next behavior. Run it. It must fail because the behavior is missing (a typo or setup error doesn't count as red).
12
+ 2. **GREEN** — write the simplest code that passes. No speculative features, no drive-by refactors.
13
+ 3. **REFACTOR** — once green, clean names and duplication. Tests stay green. No new behavior.
14
+ 4. Repeat, one vertical slice at a time: one test → one implementation → next test. Never write all tests up front.
15
+
16
+ ## Where tests go: seams
17
+
18
+ Test at public boundaries — the interface a caller actually uses — never internals. A good test reads like a spec ("rejects empty email") and survives refactors because it doesn't know how the code works, only what it does.
19
+
20
+ - Don't test private helpers directly; test them through the public seam.
21
+ - Prefer real code over mocks. Mock only unowned boundaries (network, clock, filesystem when slow).
22
+ - Expected values come from an independent source (spec, worked example, known literal) — never recomputed the same way the code computes them.
23
+
24
+ ## Sanctioned exceptions — no guilt, but say so
25
+
26
+ Test-after or no-test is fine for:
27
+
28
+ - **Spikes/exploration** — explore freely, then either throw it away and redo test-first, or backfill tests before merging. Backfilled tests must be broken on purpose once (mutate the code, watch them fail) to prove they bite.
29
+ - **Trivial glue** — one-line delegations, config, generated code, pure declarations.
30
+ - **UI layout/styling** — assert behavior if any, not pixels.
31
+ - **Hard-to-harness legacy code** — add a characterization test at the nearest seam you *can* reach, then proceed.
32
+
33
+ When you skip test-first, state it in one line ("skipping TDD: config-only change"). Silent skipping is the failure mode, not the skipping itself.
34
+
35
+ ## Non-negotiables (the relaxed variant still keeps these)
36
+
37
+ - **Bug fixes always get a failing test first.** Reproducing the bug in a test is the fix's proof and the regression guard.
38
+ - **A test you never saw fail proves nothing.** Watch red at least once — fresh or via deliberate mutation.
39
+ - **Green means all green.** Other tests breaking is your problem now, not later.
40
+ - **Never weaken an assertion to get to green.** Fix the code or renegotiate the requirement, out loud.
41
+
42
+ ## Smells to stop on
43
+
44
+ - Test needs heavy mocking → the design is too coupled; simplify the interface before writing more tests.
45
+ - Test setup is huge → extract helpers, or the seam is wrong.
46
+ - Test breaks when you refactor without behavior change → it's coupled to implementation; rewrite it against the seam.
47
+ - Assertion is `expect(f(a,b)).toBe(a+b)` style → tautological; use a literal.