@indiekitai/pi-skills 0.1.0 → 1.0.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/README.md +42 -41
- package/package.json +4 -13
- package/skills/env-audit/SKILL.md +49 -0
- package/skills/glamour/SKILL.md +54 -0
- package/skills/just/SKILL.md +64 -0
- package/skills/lipgloss/SKILL.md +47 -0
- package/skills/llm-context/SKILL.md +40 -0
- package/skills/pg-diff/SKILL.md +34 -0
- package/skills/pg-health/SKILL.md +36 -0
- package/skills/pg-inspect/SKILL.md +40 -0
- package/skills/pg-top/SKILL.md +40 -0
- package/skills/pg2ts/SKILL.md +37 -0
- package/skills/throttled/SKILL.md +49 -0
- package/inspect/SKILL.md +0 -33
- package/pg-complete/SKILL.md +0 -30
- package/pg-diff/SKILL.md +0 -28
- package/pg-inspect/SKILL.md +0 -38
- package/pg-toolkit/SKILL.md +0 -75
- package/pg-top/SKILL.md +0 -32
- package/throttled/SKILL.md +0 -42
package/README.md
CHANGED
|
@@ -1,58 +1,59 @@
|
|
|
1
1
|
# @indiekitai/pi-skills
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Developer tools as agent skills for [Pi](https://pi.dev), [Claude Code](https://docs.anthropic.com/en/docs/claude-code), [Codex CLI](https://github.com/openai/codex), and [Amp](https://amp.dev).
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
|
+
### Pi
|
|
7
8
|
```bash
|
|
8
|
-
|
|
9
|
+
pi install npm:@indiekitai/pi-skills
|
|
9
10
|
```
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
### Claude Code
|
|
13
13
|
```bash
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
...
|
|
14
|
+
git clone https://github.com/indiekitai/pi-skills ~/indiekit-skills
|
|
15
|
+
mkdir -p ~/.claude/skills
|
|
16
|
+
for skill in ~/indiekit-skills/skills/*/; do
|
|
17
|
+
ln -s "$skill" ~/.claude/skills/$(basename "$skill")
|
|
18
|
+
done
|
|
40
19
|
```
|
|
41
20
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
## Dependencies
|
|
45
|
-
|
|
46
|
-
Each skill wraps an `@indiekitai/*` npm package. Install the ones you need:
|
|
47
|
-
|
|
21
|
+
### Codex CLI
|
|
48
22
|
```bash
|
|
49
|
-
|
|
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
|
|
23
|
+
git clone https://github.com/indiekitai/pi-skills ~/.codex/skills/indiekit-skills
|
|
54
24
|
```
|
|
55
25
|
|
|
26
|
+
## Available Skills
|
|
27
|
+
|
|
28
|
+
### PostgreSQL Suite
|
|
29
|
+
| Skill | Description |
|
|
30
|
+
|-------|-------------|
|
|
31
|
+
| [pg-health](skills/pg-health/SKILL.md) | Database health diagnostics (20+ checks) |
|
|
32
|
+
| [pg-inspect](skills/pg-inspect/SKILL.md) | Schema inspector (tables, indexes, functions, enums) |
|
|
33
|
+
| [pg-diff](skills/pg-diff/SKILL.md) | Schema diff & migration SQL generator |
|
|
34
|
+
| [pg-top](skills/pg-top/SKILL.md) | Real-time query & lock monitor |
|
|
35
|
+
| [pg2ts](skills/pg2ts/SKILL.md) | Generate TypeScript types from schemas |
|
|
36
|
+
|
|
37
|
+
### Developer Tools
|
|
38
|
+
| Skill | Description |
|
|
39
|
+
|-------|-------------|
|
|
40
|
+
| [env-audit](skills/env-audit/SKILL.md) | Scan codebases for env vars, generate .env.example |
|
|
41
|
+
| [throttled](skills/throttled/SKILL.md) | Rate limiting (fixed/sliding window, token bucket, GCRA) |
|
|
42
|
+
| [llm-context](skills/llm-context/SKILL.md) | Estimate LLM context usage for codebases |
|
|
43
|
+
| [just](skills/just/SKILL.md) | Task runner (Justfile format, like make but better) |
|
|
44
|
+
|
|
45
|
+
### Terminal Rendering
|
|
46
|
+
| Skill | Description |
|
|
47
|
+
|-------|-------------|
|
|
48
|
+
| [glamour](skills/glamour/SKILL.md) | Render Markdown in terminals with themes |
|
|
49
|
+
| [lipgloss](skills/lipgloss/SKILL.md) | CSS-like terminal text styling |
|
|
50
|
+
|
|
51
|
+
## Each tool also has
|
|
52
|
+
|
|
53
|
+
- **CLI** with `--json` output
|
|
54
|
+
- **MCP Server** for direct AI agent integration
|
|
55
|
+
- **npm package** under `@indiekitai/` scope
|
|
56
|
+
|
|
56
57
|
## License
|
|
57
58
|
|
|
58
59
|
MIT
|
package/package.json
CHANGED
|
@@ -1,24 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@indiekitai/pi-skills",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Pi
|
|
5
|
-
"keywords": ["pi", "
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "IndieKit developer tools as Pi/Claude Code/Codex skills — PostgreSQL health, schema diff, type generation, rate limiting, terminal styling, and more",
|
|
5
|
+
"keywords": ["pi-package", "agent-skills", "postgresql", "developer-tools", "indiekit"],
|
|
6
6
|
"author": "IndieKit <hello@indiekit.ai>",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
10
|
"url": "https://github.com/indiekitai/pi-skills.git"
|
|
11
11
|
},
|
|
12
|
-
"homepage": "https://github.com/indiekitai/pi-skills",
|
|
13
12
|
"pi": {
|
|
14
|
-
"skills": [
|
|
15
|
-
"pg-toolkit",
|
|
16
|
-
"pg-inspect",
|
|
17
|
-
"pg-diff",
|
|
18
|
-
"pg-top",
|
|
19
|
-
"pg-complete",
|
|
20
|
-
"inspect",
|
|
21
|
-
"throttled"
|
|
22
|
-
]
|
|
13
|
+
"skills": ["./skills"]
|
|
23
14
|
}
|
|
24
15
|
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: env-audit
|
|
3
|
+
description: Scan codebases for environment variable usage and generate documented .env.example files. Supports Python, Node, Go, Rust, Ruby, Shell, Docker. Use when auditing env vars, creating .env templates, or checking for undocumented variables in CI.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# env-audit
|
|
7
|
+
|
|
8
|
+
Scan source code for environment variable references and generate documented templates.
|
|
9
|
+
|
|
10
|
+
## Setup
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
pip install env-audit # or just download env_audit.py
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Scan current directory, output .env.example format
|
|
20
|
+
python env_audit.py .
|
|
21
|
+
|
|
22
|
+
# JSON output
|
|
23
|
+
python env_audit.py . --json
|
|
24
|
+
|
|
25
|
+
# Stats only
|
|
26
|
+
python env_audit.py . --stats
|
|
27
|
+
|
|
28
|
+
# CI check mode (exit 1 if undocumented vars)
|
|
29
|
+
python env_audit.py . --check
|
|
30
|
+
|
|
31
|
+
# Output to file
|
|
32
|
+
python env_audit.py . -o .env.example
|
|
33
|
+
|
|
34
|
+
# Alternative output formats
|
|
35
|
+
python env_audit.py . --format typescript
|
|
36
|
+
python env_audit.py . --format zod
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Supported Languages
|
|
40
|
+
|
|
41
|
+
Python, JavaScript/TypeScript (Node), Go, Rust, Ruby, Shell/Bash, Docker
|
|
42
|
+
|
|
43
|
+
## Output
|
|
44
|
+
|
|
45
|
+
Categorized environment variables with:
|
|
46
|
+
- Required vs optional detection
|
|
47
|
+
- Sensitive variable marking (passwords, keys, secrets)
|
|
48
|
+
- Default value extraction
|
|
49
|
+
- File location references
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: glamour
|
|
3
|
+
description: Render Markdown beautifully in the terminal with ANSI styling. Supports themes (dark, light, dracula, tokyo-night, etc.), custom styles, and word wrapping. Use when displaying formatted Markdown content in CLI tools or terminal UIs.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# glamour
|
|
7
|
+
|
|
8
|
+
Stylesheet-based Markdown rendering for terminals. TypeScript port of charmbracelet/glamour.
|
|
9
|
+
|
|
10
|
+
## Setup
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install -g @indiekitai/glamour
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## CLI Usage
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Render a Markdown file
|
|
20
|
+
npx @indiekitai/glamour README.md
|
|
21
|
+
|
|
22
|
+
# Choose a theme
|
|
23
|
+
npx @indiekitai/glamour README.md --style dark
|
|
24
|
+
npx @indiekitai/glamour README.md --style dracula
|
|
25
|
+
npx @indiekitai/glamour README.md --style tokyo-night
|
|
26
|
+
|
|
27
|
+
# Set width
|
|
28
|
+
npx @indiekitai/glamour README.md --width 80
|
|
29
|
+
|
|
30
|
+
# JSON output (rendered text + metadata)
|
|
31
|
+
npx @indiekitai/glamour README.md --json
|
|
32
|
+
|
|
33
|
+
# Pipe markdown
|
|
34
|
+
echo "# Hello **world**" | npx @indiekitai/glamour
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Programmatic Usage
|
|
38
|
+
|
|
39
|
+
```typescript
|
|
40
|
+
import { render } from '@indiekitai/glamour';
|
|
41
|
+
|
|
42
|
+
const output = render('# Hello **world**', { style: 'dark', width: 80 });
|
|
43
|
+
console.log(output);
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Built-in Themes
|
|
47
|
+
|
|
48
|
+
dark, light, ascii, notty, pink, dracula, tokyo-night
|
|
49
|
+
|
|
50
|
+
## MCP Tools
|
|
51
|
+
|
|
52
|
+
- `render_markdown` — Render with theme and width options
|
|
53
|
+
- `render_plain` — Strip formatting, plain text output
|
|
54
|
+
- `list_styles` — Show available themes
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: just
|
|
3
|
+
description: JavaScript/TypeScript task runner inspired by casey/just. Define tasks in a Justfile with dependencies, arguments, and shell recipes. Use when you need a simple, modern alternative to make/npm scripts for project automation.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# just-ts
|
|
7
|
+
|
|
8
|
+
Task runner for JavaScript/TypeScript projects. Port of casey/just (Rust).
|
|
9
|
+
|
|
10
|
+
## Setup
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install -g @indiekitai/just-ts
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## CLI Usage
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Run default task
|
|
20
|
+
just
|
|
21
|
+
|
|
22
|
+
# Run specific task
|
|
23
|
+
just build
|
|
24
|
+
just test
|
|
25
|
+
just deploy staging
|
|
26
|
+
|
|
27
|
+
# List available tasks
|
|
28
|
+
just --list
|
|
29
|
+
|
|
30
|
+
# JSON output (task definitions)
|
|
31
|
+
just --json
|
|
32
|
+
|
|
33
|
+
# Dry run
|
|
34
|
+
just --dry-run build
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Justfile Format
|
|
38
|
+
|
|
39
|
+
Create a `Justfile` in your project root:
|
|
40
|
+
|
|
41
|
+
```just
|
|
42
|
+
# Build the project
|
|
43
|
+
build:
|
|
44
|
+
npm run build
|
|
45
|
+
|
|
46
|
+
# Run tests with optional filter
|
|
47
|
+
test filter="":
|
|
48
|
+
npm test -- {{filter}}
|
|
49
|
+
|
|
50
|
+
# Deploy to environment
|
|
51
|
+
deploy env: build test
|
|
52
|
+
./scripts/deploy.sh {{env}}
|
|
53
|
+
|
|
54
|
+
# Clean build artifacts
|
|
55
|
+
clean:
|
|
56
|
+
rm -rf dist node_modules
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Features
|
|
60
|
+
|
|
61
|
+
- **Dependencies**: Tasks can depend on other tasks
|
|
62
|
+
- **Arguments**: Pass arguments to tasks with default values
|
|
63
|
+
- **Shell recipes**: Each line runs in a shell
|
|
64
|
+
- **Comments**: `#` comments become task descriptions in `--list`
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lipgloss
|
|
3
|
+
description: Terminal styling library with CSS-like API. Apply colors, borders, padding, margins, and alignment to terminal text. Use when building beautiful CLI output or terminal UIs in TypeScript/Node.js.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# lipgloss
|
|
7
|
+
|
|
8
|
+
CSS-like terminal styling for TypeScript/Node.js. Port of charmbracelet/lipgloss.
|
|
9
|
+
|
|
10
|
+
## Setup
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install @indiekitai/lipgloss
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## CLI Usage
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Style text from CLI
|
|
20
|
+
npx @indiekitai/lipgloss "Hello World" --fg "#FF69B4" --bold --border rounded --padding 1
|
|
21
|
+
|
|
22
|
+
# JSON output
|
|
23
|
+
npx @indiekitai/lipgloss "Hello World" --fg red --json
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Programmatic Usage
|
|
27
|
+
|
|
28
|
+
```typescript
|
|
29
|
+
import { NewStyle, Color } from '@indiekitai/lipgloss';
|
|
30
|
+
|
|
31
|
+
const style = NewStyle()
|
|
32
|
+
.Foreground(Color('#FF69B4'))
|
|
33
|
+
.Bold(true)
|
|
34
|
+
.Border('rounded')
|
|
35
|
+
.Padding(1, 2)
|
|
36
|
+
.MarginTop(1);
|
|
37
|
+
|
|
38
|
+
console.log(style.Render('Hello World'));
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Features
|
|
42
|
+
|
|
43
|
+
- **Colors**: Hex, ANSI 256, named colors, adaptive (light/dark)
|
|
44
|
+
- **Text**: Bold, italic, underline, strikethrough, faint, blink
|
|
45
|
+
- **Layout**: Padding, margins, width/height, alignment (left/center/right)
|
|
46
|
+
- **Borders**: Rounded, thick, double, hidden, custom
|
|
47
|
+
- **Composition**: JoinHorizontal, JoinVertical, Place
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: llm-context
|
|
3
|
+
description: Scan a codebase and estimate LLM context usage. Shows file sizes, token counts, and identifies large files that may blow context windows. Use when preparing codebases for AI coding agents or optimizing what to include in prompts.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# llm-context
|
|
7
|
+
|
|
8
|
+
Analyze codebase context size for LLM consumption.
|
|
9
|
+
|
|
10
|
+
## Setup
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install -g @indiekitai/llm-context
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Scan current directory
|
|
20
|
+
npx @indiekitai/llm-context .
|
|
21
|
+
|
|
22
|
+
# JSON output
|
|
23
|
+
npx @indiekitai/llm-context . --json
|
|
24
|
+
|
|
25
|
+
# Set context limit (tokens)
|
|
26
|
+
npx @indiekitai/llm-context . --limit 128000
|
|
27
|
+
|
|
28
|
+
# Exclude patterns
|
|
29
|
+
npx @indiekitai/llm-context . --exclude "*.test.ts" --exclude "dist/**"
|
|
30
|
+
|
|
31
|
+
# Show top N largest files
|
|
32
|
+
npx @indiekitai/llm-context . --top 20
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Output
|
|
36
|
+
|
|
37
|
+
- Total token count estimate
|
|
38
|
+
- Per-file token breakdown
|
|
39
|
+
- Files exceeding context budget
|
|
40
|
+
- Suggestions for reducing context size
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pg-diff
|
|
3
|
+
description: PostgreSQL schema diff and migration generator. Compare two database schemas and generate SQL migration statements. Use when planning migrations, reviewing schema 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
|
+
# Compare two databases
|
|
20
|
+
pg-diff --from "postgres://user:pass@host/db1" --to "postgres://user:pass@host/db2"
|
|
21
|
+
|
|
22
|
+
# JSON output
|
|
23
|
+
pg-diff --from "..." --to "..." --json
|
|
24
|
+
|
|
25
|
+
# Generate migration SQL only
|
|
26
|
+
pg-diff --from "..." --to "..." --sql
|
|
27
|
+
|
|
28
|
+
# Exclude specific object types
|
|
29
|
+
pg-diff --from "..." --to "..." --ignore-indexes
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Output
|
|
33
|
+
|
|
34
|
+
Shows schema differences (added/removed/changed tables, columns, indexes, etc.) and generates the SQL needed to migrate from source to target schema.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pg-health
|
|
3
|
+
description: PostgreSQL health checker. Run diagnostics on connection bloat, cache hit ratios, index usage, table stats, vacuum status, and replication lag. Use when analyzing PostgreSQL performance or troubleshooting database issues.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# pg-health
|
|
7
|
+
|
|
8
|
+
PostgreSQL health diagnostics tool. Checks 20+ metrics including connections, cache, indexes, bloat, locks, vacuum, and replication.
|
|
9
|
+
|
|
10
|
+
## Setup
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install -g @indiekitai/pg-health
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Full health check
|
|
20
|
+
pg-health --url "postgres://user:pass@host:5432/db"
|
|
21
|
+
|
|
22
|
+
# JSON output for programmatic use
|
|
23
|
+
pg-health --url "postgres://user:pass@host:5432/db" --json
|
|
24
|
+
|
|
25
|
+
# Check specific category
|
|
26
|
+
pg-health --url "..." --check connections
|
|
27
|
+
pg-health --url "..." --check cache
|
|
28
|
+
pg-health --url "..." --check indexes
|
|
29
|
+
pg-health --url "..." --check bloat
|
|
30
|
+
pg-health --url "..." --check vacuum
|
|
31
|
+
pg-health --url "..." --check replication
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Output
|
|
35
|
+
|
|
36
|
+
Returns health status (healthy/warning/critical) for each check with actionable recommendations. JSON mode outputs structured data suitable for dashboards or CI pipelines.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pg-inspect
|
|
3
|
+
description: PostgreSQL schema inspector. Extract detailed schema information including tables, columns, indexes, constraints, views, functions, enums, and sequences. Use when you need to understand a database structure or generate documentation.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# pg-inspect
|
|
7
|
+
|
|
8
|
+
Inspect PostgreSQL database schemas programmatically. 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
|
+
# Full schema inspection
|
|
20
|
+
pg-inspect --url "postgres://user:pass@host:5432/db"
|
|
21
|
+
|
|
22
|
+
# JSON output
|
|
23
|
+
pg-inspect --url "postgres://user:pass@host:5432/db" --json
|
|
24
|
+
|
|
25
|
+
# Inspect specific objects
|
|
26
|
+
pg-inspect --url "..." --tables
|
|
27
|
+
pg-inspect --url "..." --views
|
|
28
|
+
pg-inspect --url "..." --functions
|
|
29
|
+
pg-inspect --url "..." --indexes
|
|
30
|
+
pg-inspect --url "..." --enums
|
|
31
|
+
pg-inspect --url "..." --sequences
|
|
32
|
+
pg-inspect --url "..." --constraints
|
|
33
|
+
|
|
34
|
+
# Filter by schema
|
|
35
|
+
pg-inspect --url "..." --schema public
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Output
|
|
39
|
+
|
|
40
|
+
Returns structured schema information. JSON mode provides complete schema metadata for code generation, migration planning, or documentation.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pg-top
|
|
3
|
+
description: PostgreSQL real-time activity monitor. Show running queries, locks, blocking chains, and per-database stats. Use when debugging slow queries, investigating locks, or monitoring database load.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# pg-top
|
|
7
|
+
|
|
8
|
+
Real-time PostgreSQL activity monitor. 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
|
+
# Show current activity
|
|
20
|
+
pg-top --url "postgres://user:pass@host:5432/db"
|
|
21
|
+
|
|
22
|
+
# JSON output (snapshot mode)
|
|
23
|
+
pg-top --url "..." --json
|
|
24
|
+
|
|
25
|
+
# Show only active queries
|
|
26
|
+
pg-top --url "..." --active
|
|
27
|
+
|
|
28
|
+
# Show locks and blocking chains
|
|
29
|
+
pg-top --url "..." --locks
|
|
30
|
+
|
|
31
|
+
# Show database-level stats
|
|
32
|
+
pg-top --url "..." --stats
|
|
33
|
+
|
|
34
|
+
# Filter by duration (show queries running > 5s)
|
|
35
|
+
pg-top --url "..." --min-duration 5
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Output
|
|
39
|
+
|
|
40
|
+
Displays running queries with PID, duration, state, and SQL text. Lock mode shows blocking chains. JSON mode provides structured data for automation.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pg2ts
|
|
3
|
+
description: Generate TypeScript types from PostgreSQL schemas. Connects to a database and outputs TypeScript interfaces for all tables. Use when setting up type-safe database access or keeping types in sync with schema.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# pg2ts
|
|
7
|
+
|
|
8
|
+
Generate TypeScript type definitions from PostgreSQL database schemas.
|
|
9
|
+
|
|
10
|
+
## Setup
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
pip install pg2ts # or just download pg2ts.py
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Generate types for all tables
|
|
20
|
+
python pg2ts.py --url "postgres://user:pass@host:5432/db"
|
|
21
|
+
|
|
22
|
+
# Output to file
|
|
23
|
+
python pg2ts.py --url "..." -o types.ts
|
|
24
|
+
|
|
25
|
+
# JSON metadata output
|
|
26
|
+
python pg2ts.py --url "..." --json
|
|
27
|
+
|
|
28
|
+
# Filter by schema
|
|
29
|
+
python pg2ts.py --url "..." --schema public
|
|
30
|
+
|
|
31
|
+
# Include enums
|
|
32
|
+
python pg2ts.py --url "..." --enums
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Output
|
|
36
|
+
|
|
37
|
+
Generates TypeScript interfaces matching database tables, with proper type mappings (int→number, text→string, jsonb→Record, etc.). JSON mode outputs metadata about the generated types.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: throttled
|
|
3
|
+
description: Rate limiting library with multiple strategies (fixed window, sliding window, token bucket, leaky bucket, GCRA). Use when implementing API rate limiting, request throttling, or quota management in TypeScript/Node.js projects.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# throttled
|
|
7
|
+
|
|
8
|
+
Full-featured rate limiting for TypeScript/Node.js. Port of Python's throttled-py.
|
|
9
|
+
|
|
10
|
+
## Setup
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install @indiekitai/throttled
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## CLI Usage
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Test rate limiter interactively
|
|
20
|
+
npx @indiekitai/throttled --strategy fixed-window --rate "10/minute"
|
|
21
|
+
|
|
22
|
+
# JSON output
|
|
23
|
+
npx @indiekitai/throttled --strategy token-bucket --rate "100/hour" --json
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Programmatic Usage
|
|
27
|
+
|
|
28
|
+
```typescript
|
|
29
|
+
import { FixedWindow, SlidingWindow, TokenBucket, LeakyBucket, GCRA } from '@indiekitai/throttled';
|
|
30
|
+
|
|
31
|
+
// Fixed window: 10 requests per minute
|
|
32
|
+
const limiter = new FixedWindow({ rate: 10, period: 60_000 });
|
|
33
|
+
const result = limiter.allow('user-123');
|
|
34
|
+
// { allowed: true, remaining: 9, resetAt: ... }
|
|
35
|
+
|
|
36
|
+
// Token bucket: burst-friendly
|
|
37
|
+
const bucket = new TokenBucket({ rate: 10, period: 60_000, burst: 20 });
|
|
38
|
+
|
|
39
|
+
// Sliding window: smooth distribution
|
|
40
|
+
const sliding = new SlidingWindow({ rate: 100, period: 3600_000 });
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Strategies
|
|
44
|
+
|
|
45
|
+
- **FixedWindow** — Simple time-window counting
|
|
46
|
+
- **SlidingWindow** — Weighted window for smoother limits
|
|
47
|
+
- **TokenBucket** — Allows bursts up to bucket size
|
|
48
|
+
- **LeakyBucket** — Constant drain rate, smooths traffic
|
|
49
|
+
- **GCRA** — Generic Cell Rate Algorithm, telco-grade precision
|
package/inspect/SKILL.md
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
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/pg-complete/SKILL.md
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
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
|
-
```
|
package/pg-diff/SKILL.md
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
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
|
-
```
|
package/pg-inspect/SKILL.md
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
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
|
-
```
|
package/pg-toolkit/SKILL.md
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
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.
|
package/pg-top/SKILL.md
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
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
|
-
```
|
package/throttled/SKILL.md
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
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
|
-
```
|