@pikku/skills 0.12.14 → 0.12.15

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pikku/skills",
3
- "version": "0.12.14",
3
+ "version": "0.12.15",
4
4
  "description": "The Pikku agent skills — the instruction set coding agents read to build, wire and deploy Pikku projects",
5
5
  "author": "yasser.fadl@gmail.com",
6
6
  "license": "MIT",
@@ -6,6 +6,7 @@ description: >-
6
6
  VercelAgentRunner, user asks about Vercel AI SDK integration, AI agent runners, or
7
7
  @pikku/ai-vercel. DO NOT TRIGGER when: user asks about AI agent wiring (use pikku-agent) or
8
8
  voice I/O (use pikku-ai-voice).
9
+ installGroups: [fabric]
9
10
  ---
10
11
 
11
12
  # Pikku AI Vercel (Agent Runner)
@@ -10,6 +10,7 @@ description: >-
10
10
  user asks about ANY form of authentication, login, logout, sessions, or user identity — always
11
11
  answer with this skill. DO NOT TRIGGER when: user asks about JWT middleware (use pikku-security)
12
12
  or custom session services (use pikku-services).
13
+ installGroups: [fabric]
13
14
  ---
14
15
 
15
16
  # Pikku Better Auth Integration
@@ -5,7 +5,7 @@ description: >-
5
5
  options, parameters, custom renderers, and nested command groups. TRIGGER when: code uses
6
6
  wireCLI/pikkuCLICommand, user asks about CLI commands, terminal tools, command-line interface,
7
7
  or adding subcommands. DO NOT TRIGGER when: user asks about the pikku CLI tool itself (use
8
- pikku-info) or HTTP endpoints (use pikku-http).
8
+ pikku-meta) or HTTP endpoints (use pikku-http).
9
9
  installGroups: [core]
10
10
  ---
11
11
 
@@ -10,6 +10,7 @@ description: >-
10
10
  email (verification, password reset, invitation, receipt), wire email sending, or translate an
11
11
  email. DO NOT TRIGGER when: user asks about i18n for the app UI (use pikku-i18n) or auth flows
12
12
  in general (use pikku-better-auth).
13
+ installGroups: [fabric]
13
14
  ---
14
15
 
15
16
  # Pikku Emails
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: pikku-i18n
3
3
  description: 'Wire i18n into a Pikku frontend with Paraglide JS (inlang). English by default, every user-facing string is a typed message function (`m.some__key()`) compiled from `messages/<locale>.json`, and additional languages are served under `/fr` `/de` URL prefixes. TRIGGER when: scaffolding or editing a frontend and writing user-facing text, adding a second language, or asked to "make this translatable / use tokens / add i18n". DO NOT TRIGGER for backend functions, error messages thrown from functions, or log output.'
4
- installGroups: [client]
4
+ installGroups: [client, fabric]
5
5
  ---
6
6
 
7
7
  # Pikku i18n (Paraglide JS)
@@ -6,6 +6,7 @@ description: >-
6
6
  code uses JoseJWTService, user asks about JWT setup, token signing, token verification, or
7
7
  @pikku/jose. DO NOT TRIGGER when: user asks about session middleware (use pikku-security) or
8
8
  general service setup (use pikku-services).
9
+ installGroups: [fabric]
9
10
  ---
10
11
 
11
12
  # Pikku Jose (JWT Service)
@@ -11,6 +11,7 @@ description: >-
11
11
  PikkuKysely, KyselyChannelStore, KyselyWorkflowService, KyselySecretService, or the user asks
12
12
  about SQL setup with Pikku. DO NOT TRIGGER when: user asks about MongoDB (use pikku-mongodb) or
13
13
  Redis (use pikku-redis).
14
+ installGroups: [fabric]
14
15
  ---
15
16
 
16
17
  # Pikku Kysely (SQL Database Services)
@@ -9,6 +9,7 @@ description: >-
9
9
  credentials, sandbox/worker tokens, or resolving a better-auth session in a Pikku function. DO
10
10
  NOT TRIGGER when: user asks about end-user HTTP session/cookie auth only (use pikku-http + the
11
11
  app betterAuth config) or about WebSocket channel mechanics (use pikku-websocket).
12
+ installGroups: [fabric]
12
13
  ---
13
14
 
14
15
  # Pikku Machine Auth
@@ -0,0 +1,139 @@
1
+ ---
2
+ name: pikku-meta
3
+ description: >-
4
+ Read and change a Pikku project's declarations without grepping or hand-editing — functions
5
+ (with their transport, middleware and permissions), schemas, workflows, wires, tags, middleware
6
+ and permission definitions, plus `pikku meta apply` to set config on them. TRIGGER when: user
7
+ asks "what functions exist?", "show me the project structure", "list routes/middleware/
8
+ permissions", needs a function's input/output shape, or wants to add a permission, retag a
9
+ function, or change a declaration's config. DO NOT TRIGGER when: user is writing a NEW function
10
+ or wiring (use the specific wiring skill) or asking about Pikku concepts (use pikku-concepts).
11
+ installGroups: [core]
12
+ allowed-tools: Bash(yarn pikku meta *), Bash(yarn pikku info *)
13
+ argument-hint: '[context|functions|schemas|workflows|middleware|permissions|wires|apply]'
14
+ ---
15
+
16
+ # Pikku Project Metadata
17
+
18
+ `pikku meta` is the machine-readable view of the project and the write path to it.
19
+ `pikku info` is the same ground as human-readable tables. Prefer `meta` when you are
20
+ going to act on the output; prefer `info` when a person is going to read it.
21
+
22
+ ## Agent Operating Procedure
23
+
24
+ Use this skill as an execution checklist, not reference material.
25
+
26
+ 1. Discover before editing. Run the relevant `pikku meta ... --json` command and inspect only the focused output you need.
27
+ 2. Identify the source files that own the behavior. Do not start by reading generated output, `.pikku`, `node_modules`, vendored packages, or broad build artifacts.
28
+ 3. Change a declaration's config with `pikku meta apply`, not by hand-editing the file.
29
+ 4. Make the smallest source change that satisfies the task. Keep generated files generated, and avoid hand-editing SDKs, schema output, or typegen.
30
+ 5. Validate with the narrowest relevant command first, then run `pikku-verify` or `pikku all` when functions, wirings, schemas, or generated clients may have changed.
31
+ 6. If validation fails, fix the source cause and rerun validation. Do not paper over generated errors by editing generated files.
32
+
33
+ ## Reading
34
+
35
+ | Command | What it answers |
36
+ | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
37
+ | `pikku meta context` | Everything a planner needs in one call — functions, wires, middleware, permissions, workflows, capabilities, layout. Start here. |
38
+ | `pikku meta functions get <id>` | One function's input/output schema names, source file, tags, expose/readonly |
39
+ | `pikku meta schemas get <name>` | One generated JSON schema |
40
+ | `pikku meta workflows get <id>` | One workflow's steps |
41
+ | `pikku meta permissions list` | What permissions exist and where they are defined |
42
+ | `pikku meta middleware list` | What middleware exists |
43
+ | `pikku meta wires list` | Wires by transport (http, channel, scheduler, queue, trigger) |
44
+ | `pikku meta clients` | Exposed RPCs/workflows/channels with their type names — what a frontend can call |
45
+
46
+ `list` is the default for each group, so `pikku meta functions` and `pikku meta functions list`
47
+ are the same call.
48
+
49
+ A function's input/output shape comes from here. Do not infer it by reading the
50
+ function body, and do not cast a call site to make it compile — the schema is the type.
51
+
52
+ ## Changing
53
+
54
+ `pikku meta apply` applies a batch of edits to your own source. Pass JSON as a file
55
+ or on stdin:
56
+
57
+ ```bash
58
+ pikku meta apply ops.json
59
+ ```
60
+
61
+ ```json
62
+ {
63
+ "operations": [
64
+ {
65
+ "kind": "functionConfig",
66
+ "sourceFile": "src/functions/todos.functions.ts",
67
+ "exportedName": "listTodos",
68
+ "changes": { "title": "List Todos", "tags": ["todos", "read"] }
69
+ },
70
+
71
+ {
72
+ "kind": "functionConfig",
73
+ "sourceFile": "src/functions/todos.functions.ts",
74
+ "exportedName": "listTodos",
75
+ "changes": {
76
+ "permissions": {
77
+ "functionLevel": {
78
+ "name": "isTodoOwner",
79
+ "from": "../permissions.js"
80
+ }
81
+ }
82
+ }
83
+ }
84
+ ]
85
+ }
86
+ ```
87
+
88
+ Three kinds: `functionConfig`, `agentConfig`, `functionBody`. Every operation names
89
+ a `sourceFile` and the `exportedName` declared in it.
90
+
91
+ `functionConfig` changes: `title`, `description`, `summary`, `tags`, `errors`,
92
+ `expose`, `remote`, `mcp`, `readonly`, `approvalRequired`, `permissions`.
93
+ `agentConfig` changes: `name`, `description`, `instructions`, `role`, `personality`,
94
+ `goal`, `model`, `maxSteps`, `temperature`, `toolChoice`, `tools`, `tags`.
95
+
96
+ `null` removes a property. Edits are spliced into the original text, so formatting,
97
+ comments and JSDoc survive.
98
+
99
+ `permissions` and `tools` are written as identifiers rather than literals, so each
100
+ one carries the module it comes from (`{"name": "isTodoOwner", "from": "../permissions.js"}`)
101
+ and the missing import is added for you — widening an existing import from that
102
+ module rather than adding a second one.
103
+
104
+ ### Why batch
105
+
106
+ The whole batch either lands or it does not: every operation is resolved before
107
+ anything is written, so a failure leaves every file untouched and names the
108
+ operation that caused it. Batching is also what makes one codegen pass correct —
109
+ **run `pikku all` once after the batch**, not once per property. The response tells
110
+ you whether it is needed:
111
+
112
+ ```json
113
+ {
114
+ "schemaVersion": "meta-apply.v1",
115
+ "applied": 2,
116
+ "files": ["src/functions/todos.functions.ts"],
117
+ "generatedMetaIsStale": true
118
+ }
119
+ ```
120
+
121
+ ## Human-readable tables (`pikku info`)
122
+
123
+ Four subcommands only — `functions`, `tags`, `middleware`, `permissions`. Routes,
124
+ channels, schedulers and queues are not subcommands; they are the _transport_ column
125
+ of `info functions --verbose`.
126
+
127
+ ```bash
128
+ yarn pikku info functions --verbose --silent
129
+ yarn pikku info tags --silent
130
+ yarn pikku info middleware --verbose --silent
131
+ yarn pikku info permissions --verbose --silent
132
+ ```
133
+
134
+ `--silent` suppresses the banner and inspector diagnostics. It works, but it is not
135
+ declared as an option, so every run also prints `Warning: Unknown option: --silent
136
+ (ignored)` — the warning is wrong. Ignore that one line.
137
+
138
+ `--limit N` caps rows (default 50); the footer says how many were withheld.
139
+ On `tags`, `--verbose` swaps counts for names; elsewhere it adds columns.
@@ -3,6 +3,7 @@ name: pikku-n8n-import
3
3
  description: 'Use to import an n8n workflow JSON export into a runnable Pikku workflow. Triggers when the user says "import this n8n workflow", "convert this n8n export to pikku", points at an n8n `.json` export or a directory of them, or picks up after `pikku import n8n` left throwing stub functions (`STUB — generated from n8n …`, `— implement me`) or a `<workflow>.integrations.json` manifest. Owns the whole flow: run the importer, triage what it could not map, fill each stub, report any missing `@pikku/addon-*` integrations, and verify the result compiles and runs with no surviving stubs. DO NOT TRIGGER for hand-written addon wiring unrelated to an n8n import (use pikku-addon), or for authoring workflows from scratch (use pikku-workflow).'
4
4
  metadata:
5
5
  version: 1.0.0
6
+ installGroups: [fabric]
6
7
  ---
7
8
 
8
9
  # n8n → Pikku Import
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: pikku-react-query
3
3
  description: 'Use the Pikku auto-generated React Query hooks (`usePikkuQuery`, `usePikkuMutation`, `usePikkuInfiniteQuery`) to call backend RPC functions from a React frontend with full type safety. TRIGGER when: writing React components that need to call a Pikku function, fetch data, mutate data, or paginate; user mentions React Query, useQuery, useMutation, or building a frontend that talks to a Pikku backend. DO NOT TRIGGER when: working on the backend (use pikku-rpc / pikku-feature) or wiring a non-React frontend.'
4
- installGroups: [client]
4
+ installGroups: [client, fabric]
5
5
  ---
6
6
 
7
7
  # Pikku React Query Hooks
@@ -6,6 +6,7 @@ description: >-
6
6
  TRIGGER when: code uses wire.rpc or expose: true, user asks about calling one Pikku function
7
7
  from another, function composition, or RPC endpoints. DO NOT TRIGGER when: user asks about HTTP
8
8
  routes (use pikku-http) or addon cross-package calls (use pikku-addon).
9
+ installGroups: [fabric]
9
10
  ---
10
11
 
11
12
  # Pikku RPC Wiring
@@ -5,6 +5,7 @@ description: >-
5
5
  adapter for Pikku channels. TRIGGER when: code uses @pikku/ws, user asks about ws library
6
6
  WebSocket server, or Node.js WebSocket runtime. DO NOT TRIGGER when: user asks about WebSocket
7
7
  wiring/channels (use pikku-websocket) or uWebSockets (use pikku-deploy-uws).
8
+ installGroups: [fabric]
8
9
  ---
9
10
 
10
11
  # Pikku WS (WebSocket Server Runtime)
@@ -1,109 +0,0 @@
1
- ---
2
- name: pikku-info
3
- description: >-
4
- Discover what exists in a Pikku project — functions (with their transport, middleware and
5
- permissions), tags, middleware and permission definitions. Use when you need to understand the
6
- project structure, find existing functions, or check what middleware and permissions are
7
- defined. TRIGGER when: user asks "what functions exist?", "show me the project structure", "list
8
- routes/middleware/permissions", or needs to understand an existing Pikku codebase. DO NOT
9
- TRIGGER when: user is writing new code (use the specific wiring skill) or asking about Pikku
10
- concepts (use pikku-concepts).
11
- allowed-tools: Bash(yarn pikku info *)
12
- argument-hint: '[functions|tags|middleware|permissions] [--verbose] [--limit N]'
13
- ---
14
-
15
- # Pikku Project Discovery
16
-
17
- ## Agent Operating Procedure
18
-
19
- Use this skill as an execution checklist, not reference material.
20
-
21
- 1. Discover before editing. Run the relevant `pikku meta ... --json` command and inspect only the focused output you need.
22
- 2. Identify the source files that own the behavior. Do not start by reading generated output, `.pikku`, `node_modules`, vendored packages, or broad build artifacts.
23
- 3. Make the smallest source change that satisfies the task. Keep generated files generated, and avoid hand-editing SDKs, schema output, or typegen.
24
- 4. Validate with the narrowest relevant command first, then run `pikku-verify` or `pikku all` when functions, wirings, schemas, or generated clients may have changed.
25
- 5. If validation fails, fix the source cause and rerun validation. Do not paper over generated errors by editing generated files.
26
-
27
- Use the `pikku info` CLI commands to inspect this Pikku project. Run the commands below and present the results to the user in a clear summary.
28
-
29
- There are exactly four subcommands — `functions`, `tags`, `middleware`,
30
- `permissions`. Routes, channels, schedulers and queues are not separate
31
- subcommands; they show up as the _transport_ column of `info functions --verbose`.
32
-
33
- ## Available Commands
34
-
35
- `--silent` suppresses the banner and the inspector's diagnostics, which is what
36
- you want when parsing the table. It is read by the CLI but not declared as an
37
- option, so every run also prints `Warning: Unknown option: --silent (ignored)` —
38
- the warning is wrong, the flag works. Ignore that one line.
39
-
40
- For anything you intend to parse rather than read, prefer `--json` (alias
41
- `-j`, or `--output json`), which emits NDJSON instead of a formatted table.
42
-
43
- ### Functions
44
-
45
- List all registered pikku functions:
46
-
47
- ```bash
48
- yarn pikku info functions --silent
49
- ```
50
-
51
- For full details including transport type (http/channel/scheduler/queue/workflow/mcp/cli/trigger), middleware, permissions, and source file:
52
-
53
- ```bash
54
- yarn pikku info functions --verbose --silent
55
- ```
56
-
57
- ### Tags
58
-
59
- List all tags with counts of associated functions and middleware:
60
-
61
- ```bash
62
- yarn pikku info tags --silent
63
- ```
64
-
65
- For full names instead of counts:
66
-
67
- ```bash
68
- yarn pikku info tags --verbose --silent
69
- ```
70
-
71
- ### Middleware
72
-
73
- List all middleware definitions:
74
-
75
- ```bash
76
- yarn pikku info middleware --silent
77
- ```
78
-
79
- For full details including source file, required services, and description:
80
-
81
- ```bash
82
- yarn pikku info middleware --verbose --silent
83
- ```
84
-
85
- ### Permissions
86
-
87
- List all permission definitions:
88
-
89
- ```bash
90
- yarn pikku info permissions --silent
91
- ```
92
-
93
- For full details including source file, required services, and description:
94
-
95
- ```bash
96
- yarn pikku info permissions --verbose --silent
97
- ```
98
-
99
- ## Instructions
100
-
101
- 1. If the user specifies a subcommand (e.g., `/pikku-info functions`), run only that command.
102
- 2. If no subcommand is specified, run all four commands to give a complete project overview.
103
- 3. Always use `--silent` to suppress the Pikku banner and inspector logs, and disregard the spurious "Unknown option" warning it prints.
104
- 4. Use `--verbose` when the user asks for details, file paths, or "more info". On `tags` it swaps counts for names; elsewhere it adds columns.
105
- 5. Use `--limit N` to control output size (default is 50 rows) — the footer tells you how many were withheld.
106
- 6. After running the commands, summarize the findings concisely:
107
- - Total count of functions, tags, middleware, and permissions
108
- - Notable patterns (e.g., which transport types are in use, which tags group the most functions)
109
- - Any functions without tags or transport types (potential issues)