@indiekitai/pi-skills 0.1.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 IndieKit
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,58 @@
1
+ # @indiekitai/pi-skills
2
+
3
+ [Pi coding agent](https://pi.dev) skills for PostgreSQL development, rate limiting, and debugging.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install -g @indiekitai/pi-skills
9
+ ```
10
+
11
+ Or add to your project:
12
+
13
+ ```bash
14
+ npm install --save-dev @indiekitai/pi-skills
15
+ ```
16
+
17
+ Pi auto-discovers skills from installed packages.
18
+
19
+ ## Skills
20
+
21
+ | Skill | Description | Backed by |
22
+ |-------|-------------|-----------|
23
+ | `pg-toolkit` | All-in-one PG CLI: inspect, diff, top, health, types, analyze | [@indiekitai/pg-toolkit](https://www.npmjs.com/package/@indiekitai/pg-toolkit) |
24
+ | `pg-inspect` | Schema introspection: tables, columns, indexes, views, functions | [@indiekitai/pg-inspect](https://www.npmjs.com/package/@indiekitai/pg-inspect) |
25
+ | `pg-diff` | Compare schemas & generate migration SQL | [@indiekitai/pg-diff](https://www.npmjs.com/package/@indiekitai/pg-diff) |
26
+ | `pg-top` | Real-time monitoring (htop for Postgres) | [@indiekitai/pg-top](https://www.npmjs.com/package/@indiekitai/pg-top) |
27
+ | `pg-complete` | SQL autocompletion engine | [@indiekitai/pg-complete](https://www.npmjs.com/package/@indiekitai/pg-complete) |
28
+ | `inspect` | Pretty-print objects (like Python's Rich inspect) | [@indiekitai/inspect](https://www.npmjs.com/package/@indiekitai/inspect) |
29
+ | `throttled` | Rate limiting (fixed/sliding window, token bucket, GCRA) | [@indiekitai/throttled](https://www.npmjs.com/package/@indiekitai/throttled) |
30
+
31
+ ## Usage in Pi
32
+
33
+ Once installed, skills appear automatically. Use them via:
34
+
35
+ ```
36
+ /skill:pg-toolkit
37
+ /skill:pg-inspect
38
+ /skill:pg-diff
39
+ ...
40
+ ```
41
+
42
+ Or just describe your task — Pi will pick the right skill based on descriptions.
43
+
44
+ ## Dependencies
45
+
46
+ Each skill wraps an `@indiekitai/*` npm package. Install the ones you need:
47
+
48
+ ```bash
49
+ # All PG tools at once
50
+ npm install -g @indiekitai/pg-toolkit
51
+
52
+ # Or individual tools
53
+ npm install -g @indiekitai/pg-inspect @indiekitai/pg-diff @indiekitai/pg-top
54
+ ```
55
+
56
+ ## License
57
+
58
+ MIT
@@ -0,0 +1,33 @@
1
+ ---
2
+ name: inspect
3
+ description: "Pretty-print any JavaScript/TypeScript object with full details: properties, methods, prototype chain, types. Like Python's Rich inspect(). Use when debugging or exploring objects."
4
+ ---
5
+
6
+ # inspect
7
+
8
+ Beautiful object inspection for Node.js. TypeScript port of Python Rich's inspect().
9
+
10
+ ## Setup
11
+
12
+ ```bash
13
+ npm install -g @indiekitai/inspect
14
+ ```
15
+
16
+ ## Usage (CLI)
17
+
18
+ ```bash
19
+ npx @indiekitai/inspect '{"name": "test", "count": 42}'
20
+ npx @indiekitai/inspect --methods Array
21
+ npx @indiekitai/inspect --all Promise
22
+ npx @indiekitai/inspect --json '{"name": "test"}'
23
+ ```
24
+
25
+ ## Usage (API)
26
+
27
+ ```typescript
28
+ import { inspect } from '@indiekitai/inspect';
29
+
30
+ inspect(myObject); // Pretty print
31
+ inspect(myObject, { methods: true }); // Include methods
32
+ inspect(myObject, { all: true }); // Include private/dunder
33
+ ```
package/package.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "@indiekitai/pi-skills",
3
+ "version": "0.1.0",
4
+ "description": "Pi coding agent skills for PostgreSQL, rate limiting, and object inspection — powered by IndieKit",
5
+ "keywords": ["pi", "coding-agent", "skills", "postgresql", "rate-limiting", "developer-tools"],
6
+ "author": "IndieKit <hello@indiekit.ai>",
7
+ "license": "MIT",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/indiekitai/pi-skills.git"
11
+ },
12
+ "homepage": "https://github.com/indiekitai/pi-skills",
13
+ "pi": {
14
+ "skills": [
15
+ "pg-toolkit",
16
+ "pg-inspect",
17
+ "pg-diff",
18
+ "pg-top",
19
+ "pg-complete",
20
+ "inspect",
21
+ "throttled"
22
+ ]
23
+ }
24
+ }
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: pg-complete
3
+ description: "PostgreSQL SQL autocompletion engine: table names, columns, functions, keywords, joins. Use when building SQL editors, REPLs, or any tool that needs SQL completion."
4
+ ---
5
+
6
+ # pg-complete
7
+
8
+ PostgreSQL SQL autocompletion engine. TypeScript port of pgcli's completer.
9
+
10
+ ## Setup
11
+
12
+ ```bash
13
+ npm install -g @indiekitai/pg-complete
14
+ ```
15
+
16
+ ## Usage
17
+
18
+ ```bash
19
+ export DATABASE_URL="postgresql://user:pass@host:5432/dbname"
20
+
21
+ pg-complete "SELECT * FROM u" # Complete table names
22
+ pg-complete "SELECT users." --context # Complete column names
23
+ pg-complete --json "SELECT * FROM u" # JSON output
24
+ ```
25
+
26
+ ## MCP Server
27
+
28
+ ```bash
29
+ pg-complete --mcp # Start as MCP server
30
+ ```
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: pg-diff
3
+ description: "Compare two PostgreSQL databases and generate migration SQL. Use when migrating schemas, reviewing database changes, or syncing environments."
4
+ ---
5
+
6
+ # pg-diff
7
+
8
+ Compare PostgreSQL schemas and generate migration SQL. TypeScript port of Python's migra.
9
+
10
+ ## Setup
11
+
12
+ ```bash
13
+ npm install -g @indiekitai/pg-diff
14
+ ```
15
+
16
+ ## Usage
17
+
18
+ ```bash
19
+ pg-diff --from $DB_SOURCE --to $DB_TARGET # Show diff
20
+ pg-diff --from $DB_SOURCE --to $DB_TARGET --sql # Generate migration SQL
21
+ pg-diff --from $DB_SOURCE --to $DB_TARGET --json # JSON output
22
+ ```
23
+
24
+ ## MCP Server
25
+
26
+ ```bash
27
+ pg-diff --mcp # Start as MCP server (2 tools)
28
+ ```
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: pg-inspect
3
+ description: "Introspect PostgreSQL schemas: tables, columns, indexes, constraints, views, functions, enums, sequences, extensions. Use when you need to understand a database structure or generate documentation."
4
+ ---
5
+
6
+ # pg-inspect
7
+
8
+ PostgreSQL schema introspection. TypeScript port of Python's schemainspect.
9
+
10
+ ## Setup
11
+
12
+ ```bash
13
+ npm install -g @indiekitai/pg-inspect
14
+ ```
15
+
16
+ ## Usage
17
+
18
+ ```bash
19
+ export DATABASE_URL="postgresql://user:pass@host:5432/dbname"
20
+
21
+ pg-inspect # Full schema summary
22
+ pg-inspect --tables # List tables with columns
23
+ pg-inspect --table users # Specific table details
24
+ pg-inspect --indexes # All indexes
25
+ pg-inspect --constraints # All constraints
26
+ pg-inspect --views # All views
27
+ pg-inspect --functions # All functions
28
+ pg-inspect --enums # All enums
29
+ pg-inspect --sequences # All sequences
30
+ pg-inspect --extensions # All extensions
31
+ pg-inspect --json # JSON output (all of the above)
32
+ ```
33
+
34
+ ## MCP Server
35
+
36
+ ```bash
37
+ pg-inspect --mcp # Start as MCP server (9 tools)
38
+ ```
@@ -0,0 +1,75 @@
1
+ ---
2
+ name: pg-toolkit
3
+ description: "All-in-one PostgreSQL toolkit: inspect schemas, diff databases, monitor live queries, health checks, generate TypeScript types, and detect N+1/EAV anti-patterns. Use when working with PostgreSQL databases."
4
+ ---
5
+
6
+ # pg-toolkit
7
+
8
+ Unified PostgreSQL CLI that combines schema inspection, diffing, monitoring, health checks, type generation, and query analysis.
9
+
10
+ ## Setup
11
+
12
+ ```bash
13
+ npm install -g @indiekitai/pg-toolkit
14
+ ```
15
+
16
+ ## Usage
17
+
18
+ Set your database connection:
19
+
20
+ ```bash
21
+ export DATABASE_URL="postgresql://user:pass@host:5432/dbname"
22
+ ```
23
+
24
+ ### Inspect schema
25
+
26
+ ```bash
27
+ pg-toolkit inspect # Full schema overview
28
+ pg-toolkit inspect --tables # List all tables
29
+ pg-toolkit inspect --table users # Inspect specific table
30
+ pg-toolkit inspect --functions # List functions
31
+ pg-toolkit inspect --indexes # List indexes
32
+ pg-toolkit inspect --json # JSON output
33
+ ```
34
+
35
+ ### Diff two databases
36
+
37
+ ```bash
38
+ pg-toolkit diff --from $DB_A --to $DB_B # Show differences
39
+ pg-toolkit diff --from $DB_A --to $DB_B --sql # Generate migration SQL
40
+ pg-toolkit diff --from $DB_A --to $DB_B --json # JSON output
41
+ ```
42
+
43
+ ### Monitor live queries
44
+
45
+ ```bash
46
+ pg-toolkit top # Live dashboard (like htop for PG)
47
+ pg-toolkit top --json # Snapshot as JSON
48
+ pg-toolkit top --sort duration # Sort by duration
49
+ ```
50
+
51
+ ### Health check
52
+
53
+ ```bash
54
+ pg-toolkit health # Run all health checks
55
+ pg-toolkit health --json # JSON output
56
+ ```
57
+
58
+ ### Generate TypeScript types
59
+
60
+ ```bash
61
+ pg-toolkit types # Generate types for all tables
62
+ pg-toolkit types --table users # Specific table
63
+ pg-toolkit types --output types.ts # Write to file
64
+ ```
65
+
66
+ ### Analyze queries (detect N+1, EAV)
67
+
68
+ ```bash
69
+ pg-toolkit analyze # Detect anti-patterns
70
+ pg-toolkit analyze --json # JSON output
71
+ ```
72
+
73
+ ## JSON Output
74
+
75
+ All subcommands support `--json` for structured output, making this tool ideal for AI agent consumption.
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: pg-top
3
+ description: "Monitor PostgreSQL in real-time: active queries, locks, connections, replication lag. Like htop for Postgres. Use when debugging slow queries or monitoring database load."
4
+ ---
5
+
6
+ # pg-top
7
+
8
+ Real-time PostgreSQL monitoring. TypeScript port of Python's pg_activity.
9
+
10
+ ## Setup
11
+
12
+ ```bash
13
+ npm install -g @indiekitai/pg-top
14
+ ```
15
+
16
+ ## Usage
17
+
18
+ ```bash
19
+ export DATABASE_URL="postgresql://user:pass@host:5432/dbname"
20
+
21
+ pg-top # Live TUI dashboard
22
+ pg-top --json # One-shot JSON snapshot
23
+ pg-top --sort duration # Sort by query duration
24
+ pg-top --sort cpu # Sort by CPU usage
25
+ pg-top --filter waiting # Show only waiting queries
26
+ ```
27
+
28
+ ## MCP Server
29
+
30
+ ```bash
31
+ pg-top --mcp # Start as MCP server (5 tools)
32
+ ```
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: throttled
3
+ description: "Rate limiting for Node.js: fixed window, sliding window, token bucket, GCRA, leaky bucket. Use when implementing API rate limiting or request throttling."
4
+ ---
5
+
6
+ # throttled
7
+
8
+ Production-grade rate limiting. TypeScript port of Python's throttled-py.
9
+
10
+ ## Setup
11
+
12
+ ```bash
13
+ npm install -g @indiekitai/throttled
14
+ ```
15
+
16
+ ## Usage (API)
17
+
18
+ ```typescript
19
+ import { RateLimiter, FixedWindowStrategy, MemoryStore } from '@indiekitai/throttled';
20
+
21
+ const limiter = new RateLimiter({
22
+ strategy: new FixedWindowStrategy({ limit: 100, window: '1m' }),
23
+ store: new MemoryStore(),
24
+ });
25
+
26
+ const result = await limiter.hit('user:123');
27
+ // { allowed: true, remaining: 99, resetAt: ... }
28
+ ```
29
+
30
+ ## Strategies
31
+
32
+ - Fixed Window
33
+ - Sliding Window
34
+ - Token Bucket
35
+ - GCRA (Generic Cell Rate Algorithm)
36
+ - Leaky Bucket
37
+
38
+ ## MCP Server
39
+
40
+ ```bash
41
+ npx @indiekitai/throttled --mcp # Start as MCP server (3 tools)
42
+ ```