@ifi/oh-pi-skills 0.4.4 → 0.5.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 CHANGED
@@ -5,6 +5,7 @@ On-demand skill packs for pi.
5
5
  ## What this package includes
6
6
 
7
7
  This package bundles reusable skills for common workflows, including areas like:
8
+
8
9
  - web search and fetch
9
10
  - debugging
10
11
  - git workflow help
package/package.json CHANGED
@@ -1,27 +1,27 @@
1
1
  {
2
2
  "name": "@ifi/oh-pi-skills",
3
- "version": "0.4.4",
3
+ "version": "0.5.0",
4
4
  "description": "On-demand skill packs for pi: web-search, debug-helper, git-workflow, and more.",
5
5
  "keywords": [
6
6
  "pi-package"
7
7
  ],
8
- "pi": {
9
- "skills": [
10
- "./skills"
11
- ]
8
+ "homepage": "https://github.com/ifiokjr/oh-pi/tree/main/packages/skills",
9
+ "bugs": {
10
+ "url": "https://github.com/ifiokjr/oh-pi/issues"
12
11
  },
13
- "files": [
14
- "skills",
15
- "README.md"
16
- ],
17
12
  "license": "MIT",
18
13
  "repository": {
19
14
  "type": "git",
20
15
  "url": "git+https://github.com/ifiokjr/oh-pi.git",
21
16
  "directory": "packages/skills"
22
17
  },
23
- "homepage": "https://github.com/ifiokjr/oh-pi/tree/main/packages/skills",
24
- "bugs": {
25
- "url": "https://github.com/ifiokjr/oh-pi/issues"
18
+ "files": [
19
+ "skills",
20
+ "README.md"
21
+ ],
22
+ "pi": {
23
+ "skills": [
24
+ "./skills"
25
+ ]
26
26
  }
27
27
  }
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: claymorphism
3
- description:
4
- Claymorphism design system skill. Use when building soft, puffy, clay-like UI components with
3
+ description: Claymorphism design system skill. Use when building soft, puffy, clay-like UI components with
5
4
  large radii, dual inner shadows, and offset outer shadows.
6
5
  version: 1.0.0
7
6
  tags: [design, css, ui, claymorphism]
@@ -24,10 +23,10 @@ Reference: [references/tokens.css](references/tokens.css)
24
23
  @import "references/tokens.css";
25
24
 
26
25
  .clay-card {
27
- background: var(--clay-bg-card);
28
- border-radius: var(--clay-radius-lg);
29
- box-shadow: var(--clay-shadow);
30
- color: var(--clay-text);
26
+ background: var(--clay-bg-card);
27
+ border-radius: var(--clay-radius-lg);
28
+ box-shadow: var(--clay-shadow);
29
+ color: var(--clay-text);
31
30
  }
32
31
  ```
33
32
 
@@ -37,11 +36,11 @@ Reference: [references/tokens.css](references/tokens.css)
37
36
 
38
37
  ```css
39
38
  .clay-card {
40
- background: var(--clay-bg-card);
41
- border-radius: var(--clay-radius-lg);
42
- box-shadow: var(--clay-shadow);
43
- padding: 1.5rem;
44
- color: var(--clay-text);
39
+ background: var(--clay-bg-card);
40
+ border-radius: var(--clay-radius-lg);
41
+ box-shadow: var(--clay-shadow);
42
+ padding: 1.5rem;
43
+ color: var(--clay-text);
45
44
  }
46
45
  ```
47
46
 
@@ -49,20 +48,20 @@ Reference: [references/tokens.css](references/tokens.css)
49
48
 
50
49
  ```css
51
50
  .clay-btn {
52
- background: var(--clay-bg-button);
53
- border: none;
54
- border-radius: var(--clay-radius-pill);
55
- box-shadow: var(--clay-shadow);
56
- padding: 0.75rem 1.5rem;
57
- color: var(--clay-text);
58
- cursor: pointer;
59
- transition: box-shadow 0.2s;
51
+ background: var(--clay-bg-button);
52
+ border: none;
53
+ border-radius: var(--clay-radius-pill);
54
+ box-shadow: var(--clay-shadow);
55
+ padding: 0.75rem 1.5rem;
56
+ color: var(--clay-text);
57
+ cursor: pointer;
58
+ transition: box-shadow 0.2s;
60
59
  }
61
60
  .clay-btn:hover {
62
- box-shadow: var(--clay-shadow-elevated);
61
+ box-shadow: var(--clay-shadow-elevated);
63
62
  }
64
63
  .clay-btn:active {
65
- box-shadow: var(--clay-shadow-pressed);
64
+ box-shadow: var(--clay-shadow-pressed);
66
65
  }
67
66
  ```
68
67
 
@@ -70,16 +69,16 @@ Reference: [references/tokens.css](references/tokens.css)
70
69
 
71
70
  ```css
72
71
  .clay-input {
73
- background: var(--clay-bg);
74
- border: none;
75
- border-radius: var(--clay-radius);
76
- box-shadow: var(--clay-shadow-pressed);
77
- padding: 0.75rem 1rem;
78
- color: var(--clay-text);
72
+ background: var(--clay-bg);
73
+ border: none;
74
+ border-radius: var(--clay-radius);
75
+ box-shadow: var(--clay-shadow-pressed);
76
+ padding: 0.75rem 1rem;
77
+ color: var(--clay-text);
79
78
  }
80
79
  .clay-input:focus {
81
- outline: 2px solid var(--clay-accent);
82
- outline-offset: 2px;
80
+ outline: 2px solid var(--clay-accent);
81
+ outline-offset: 2px;
83
82
  }
84
83
  ```
85
84
 
@@ -87,19 +86,19 @@ Reference: [references/tokens.css](references/tokens.css)
87
86
 
88
87
  ```css
89
88
  .clay-toggle {
90
- width: 56px;
91
- height: 30px;
92
- background: var(--clay-bg-card);
93
- border-radius: var(--clay-radius-pill);
94
- box-shadow: var(--clay-shadow-pressed);
89
+ width: 56px;
90
+ height: 30px;
91
+ background: var(--clay-bg-card);
92
+ border-radius: var(--clay-radius-pill);
93
+ box-shadow: var(--clay-shadow-pressed);
95
94
  }
96
95
  .clay-toggle-knob {
97
- width: 24px;
98
- height: 24px;
99
- background: var(--clay-bg);
100
- border-radius: 50%;
101
- box-shadow: var(--clay-shadow);
102
- transition: transform 0.2s;
96
+ width: 24px;
97
+ height: 24px;
98
+ background: var(--clay-bg);
99
+ border-radius: 50%;
100
+ box-shadow: var(--clay-shadow);
101
+ transition: transform 0.2s;
103
102
  }
104
103
  ```
105
104
 
@@ -120,8 +119,8 @@ Reference: [references/tokens.css](references/tokens.css)
120
119
 
121
120
  ```css
122
121
  @media (prefers-contrast: more) {
123
- .clay-card {
124
- box-shadow: 0 0 0 2px var(--clay-text);
125
- }
122
+ .clay-card {
123
+ box-shadow: 0 0 0 2px var(--clay-text);
124
+ }
126
125
  }
127
126
  ```
@@ -1,52 +1,46 @@
1
1
  :root {
2
- /* Backgrounds — soft, muted pastels */
3
- --clay-bg: #f0e6db;
4
- --clay-bg-card: #e8ddd4;
5
- --clay-bg-button: #d4c4b0;
6
- --clay-accent: #c4a882;
2
+ /* Backgrounds — soft, muted pastels */
3
+ --clay-bg: #f0e6db;
4
+ --clay-bg-card: #e8ddd4;
5
+ --clay-bg-button: #d4c4b0;
6
+ --clay-accent: #c4a882;
7
7
 
8
- /* Radius — large, rounded, puffy */
9
- --clay-radius: 20px;
10
- --clay-radius-lg: 32px;
11
- --clay-radius-pill: 50px;
8
+ /* Radius — large, rounded, puffy */
9
+ --clay-radius: 20px;
10
+ --clay-radius-lg: 32px;
11
+ --clay-radius-pill: 50px;
12
12
 
13
- /* Shadows — dual inner + offset outer */
14
- --clay-shadow:
15
- 8px 8px 16px rgba(0, 0, 0, 0.12),
16
- inset -4px -4px 8px rgba(0, 0, 0, 0.08),
17
- inset 4px 4px 8px rgba(255, 255, 255, 0.6);
18
- --clay-shadow-elevated:
19
- 12px 12px 24px rgba(0, 0, 0, 0.15),
20
- inset -6px -6px 12px rgba(0, 0, 0, 0.1),
21
- inset 6px 6px 12px rgba(255, 255, 255, 0.7);
22
- --clay-shadow-pressed:
23
- 2px 2px 6px rgba(0, 0, 0, 0.1),
24
- inset -6px -6px 12px rgba(0, 0, 0, 0.12),
25
- inset 6px 6px 12px rgba(255, 255, 255, 0.5);
13
+ /* Shadows — dual inner + offset outer */
14
+ --clay-shadow:
15
+ 8px 8px 16px rgba(0, 0, 0, 0.12), inset -4px -4px 8px rgba(0, 0, 0, 0.08),
16
+ inset 4px 4px 8px rgba(255, 255, 255, 0.6);
17
+ --clay-shadow-elevated:
18
+ 12px 12px 24px rgba(0, 0, 0, 0.15), inset -6px -6px 12px rgba(0, 0, 0, 0.1),
19
+ inset 6px 6px 12px rgba(255, 255, 255, 0.7);
20
+ --clay-shadow-pressed:
21
+ 2px 2px 6px rgba(0, 0, 0, 0.1), inset -6px -6px 12px rgba(0, 0, 0, 0.12),
22
+ inset 6px 6px 12px rgba(255, 255, 255, 0.5);
26
23
 
27
- /* Text */
28
- --clay-text: #4a3f35;
29
- --clay-text-muted: #8a7e72;
24
+ /* Text */
25
+ --clay-text: #4a3f35;
26
+ --clay-text-muted: #8a7e72;
30
27
  }
31
28
 
32
29
  /* Dark mode */
33
30
  [data-theme="dark"] {
34
- --clay-bg: #2a2520;
35
- --clay-bg-card: #352f28;
36
- --clay-bg-button: #443c33;
37
- --clay-accent: #6b5d4f;
38
- --clay-shadow:
39
- 8px 8px 16px rgba(0, 0, 0, 0.35),
40
- inset -4px -4px 8px rgba(0, 0, 0, 0.25),
41
- inset 4px 4px 8px rgba(255, 255, 255, 0.05);
42
- --clay-shadow-elevated:
43
- 12px 12px 24px rgba(0, 0, 0, 0.4),
44
- inset -6px -6px 12px rgba(0, 0, 0, 0.3),
45
- inset 6px 6px 12px rgba(255, 255, 255, 0.06);
46
- --clay-shadow-pressed:
47
- 2px 2px 6px rgba(0, 0, 0, 0.3),
48
- inset -6px -6px 12px rgba(0, 0, 0, 0.35),
49
- inset 6px 6px 12px rgba(255, 255, 255, 0.04);
50
- --clay-text: #d4c8bc;
51
- --clay-text-muted: #8a7e72;
31
+ --clay-bg: #2a2520;
32
+ --clay-bg-card: #352f28;
33
+ --clay-bg-button: #443c33;
34
+ --clay-accent: #6b5d4f;
35
+ --clay-shadow:
36
+ 8px 8px 16px rgba(0, 0, 0, 0.35), inset -4px -4px 8px rgba(0, 0, 0, 0.25),
37
+ inset 4px 4px 8px rgba(255, 255, 255, 0.05);
38
+ --clay-shadow-elevated:
39
+ 12px 12px 24px rgba(0, 0, 0, 0.4), inset -6px -6px 12px rgba(0, 0, 0, 0.3),
40
+ inset 6px 6px 12px rgba(255, 255, 255, 0.06);
41
+ --clay-shadow-pressed:
42
+ 2px 2px 6px rgba(0, 0, 0, 0.3), inset -6px -6px 12px rgba(0, 0, 0, 0.35),
43
+ inset 6px 6px 12px rgba(255, 255, 255, 0.04);
44
+ --clay-text: #d4c8bc;
45
+ --clay-text-muted: #8a7e72;
52
46
  }
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: context7
3
- description:
4
- Search and query up-to-date documentation for any programming library via Context7 API. Use when
3
+ description: Search and query up-to-date documentation for any programming library via Context7 API. Use when
5
4
  you need current docs, code examples, or API references for libraries and frameworks.
6
5
  ---
7
6
 
@@ -1,13 +1,24 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  const [libraryId, query] = process.argv.slice(2);
4
- if (!libraryId || !query) { console.error("Usage: docs.js <libraryId> <query>"); process.exit(1); }
4
+ if (!libraryId || !query) {
5
+ console.error("Usage: docs.js <libraryId> <query>");
6
+ process.exit(1);
7
+ }
5
8
 
6
9
  const res = await fetch("https://mcp.context7.com/mcp", {
7
- method: "POST",
8
- headers: { "Content-Type": "application/json", "Accept": "application/json, text/event-stream" },
9
- body: JSON.stringify({ jsonrpc: "2.0", id: 1, method: "tools/call", params: { name: "query-docs", arguments: { libraryId, query } } })
10
+ body: JSON.stringify({
11
+ jsonrpc: "2.0",
12
+ id: 1,
13
+ method: "tools/call",
14
+ params: { name: "query-docs", arguments: { libraryId, query } },
15
+ }),
16
+ headers: { Accept: "application/json, text/event-stream", "Content-Type": "application/json" },
17
+ method: "POST",
10
18
  });
11
19
  const data = await res.json();
12
- if (data.error) { console.error("Error:", data.error.message); process.exit(1); }
20
+ if (data.error) {
21
+ console.error("Error:", data.error.message);
22
+ process.exit(1);
23
+ }
13
24
  console.log(data.result.content[0].text);
@@ -1,13 +1,24 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  const [libraryName, query = libraryName] = process.argv.slice(2);
4
- if (!libraryName) { console.error("Usage: search.js <libraryName> [query]"); process.exit(1); }
4
+ if (!libraryName) {
5
+ console.error("Usage: search.js <libraryName> [query]");
6
+ process.exit(1);
7
+ }
5
8
 
6
9
  const res = await fetch("https://mcp.context7.com/mcp", {
7
- method: "POST",
8
- headers: { "Content-Type": "application/json", "Accept": "application/json, text/event-stream" },
9
- body: JSON.stringify({ jsonrpc: "2.0", id: 1, method: "tools/call", params: { name: "resolve-library-id", arguments: { query, libraryName } } })
10
+ body: JSON.stringify({
11
+ jsonrpc: "2.0",
12
+ id: 1,
13
+ method: "tools/call",
14
+ params: { name: "resolve-library-id", arguments: { query, libraryName } },
15
+ }),
16
+ headers: { Accept: "application/json, text/event-stream", "Content-Type": "application/json" },
17
+ method: "POST",
10
18
  });
11
19
  const data = await res.json();
12
- if (data.error) { console.error("Error:", data.error.message); process.exit(1); }
20
+ if (data.error) {
21
+ console.error("Error:", data.error.message);
22
+ process.exit(1);
23
+ }
13
24
  console.log(data.result.content[0].text);
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: debug-helper
3
- description:
4
- Debug assistant for error analysis, log interpretation, and performance profiling. Use when user
3
+ description: Debug assistant for error analysis, log interpretation, and performance profiling. Use when user
5
4
  encounters errors, crashes, or performance issues.
6
5
  ---
7
6
 
@@ -0,0 +1,233 @@
1
+ # devenv Reference
2
+
3
+ ## Recommended `devenv.nix` layout
4
+
5
+ This is the preferred structure, adapted from the monochange project. Adjust packages,
6
+ scripts, and hooks for each project's needs.
7
+
8
+ ```nix
9
+ {
10
+ pkgs,
11
+ lib,
12
+ config,
13
+ inputs,
14
+ ...
15
+ }:
16
+
17
+ let
18
+ extra = inputs.ifiokjr-nixpkgs.packages.${pkgs.stdenv.system};
19
+ in
20
+ {
21
+ packages =
22
+ with pkgs;
23
+ [
24
+ # Add project-specific packages here
25
+ ]
26
+ ++ lib.optionals stdenv.isDarwin [
27
+ coreutils
28
+ ];
29
+
30
+ enterShell = ''
31
+ # Keep shell entry fast. Only bootstrap missing toolchains here;
32
+ # explicit updates happen via install/update tasks instead of every shell.
33
+ export PATH="$DEVENV_ROOT/scripts:$PATH"
34
+ '';
35
+
36
+ # Disable dotenv if using direnv
37
+ dotenv.disableHint = true;
38
+
39
+ git-hooks = {
40
+ hooks = {
41
+ # Add pre-commit and pre-push hooks here
42
+ };
43
+ };
44
+
45
+ scripts = {
46
+ # Colon-namespaced scripts: build:*, test:*, lint:*, fix:*, etc.
47
+ "build:all" = {
48
+ exec = ''
49
+ set -e
50
+ # Project-specific build commands
51
+ '';
52
+ description = "Build everything.";
53
+ binary = "bash";
54
+ };
55
+
56
+ "test:all" = {
57
+ exec = ''
58
+ set -e
59
+ # Project-specific test commands
60
+ '';
61
+ description = "Run all tests.";
62
+ binary = "bash";
63
+ };
64
+
65
+ "lint:all" = {
66
+ exec = ''
67
+ set -e
68
+ # Project-specific lint commands
69
+ '';
70
+ description = "Run all checks.";
71
+ binary = "bash";
72
+ };
73
+
74
+ "fix:all" = {
75
+ exec = ''
76
+ set -e
77
+ # Project-specific autofix commands
78
+ '';
79
+ description = "Fix all autofixable problems.";
80
+ binary = "bash";
81
+ };
82
+
83
+ "docs:check" = {
84
+ exec = ''
85
+ set -e
86
+ mdt check
87
+ '';
88
+ description = "Check that shared documentation blocks are synchronized.";
89
+ binary = "bash";
90
+ };
91
+
92
+ "docs:update" = {
93
+ exec = ''
94
+ set -e
95
+ mdt update
96
+ '';
97
+ description = "Update shared documentation blocks.";
98
+ binary = "bash";
99
+ };
100
+ };
101
+ }
102
+ ```
103
+
104
+ ## Script definition options
105
+
106
+ Each script in the `scripts` block accepts:
107
+
108
+ | Field | Required | Description |
109
+ | ------------- | ----------- | ---------------------------------------------------- |
110
+ | `exec` | Yes | Shell command body. Use `"$@"` to forward arguments. |
111
+ | `description` | Recommended | Short description shown by `devenv scan`. |
112
+ | `binary` | Optional | Shell binary (default: `bash`). |
113
+
114
+ ## Key variables available in `exec`
115
+
116
+ - `$DEVENV_ROOT` — project root directory
117
+ - `$DEVENV_PROFILE` — path to the devenv profile (contains `bin/`)
118
+ - `$PWD` — current working directory
119
+
120
+ ## `enterShell` best practices
121
+
122
+ - Keep it fast. Avoid expensive operations like full installs.
123
+ - Only bootstrap missing toolchains (e.g. `rustup toolchain list | grep`).
124
+ - Add custom script directories to PATH: `export PATH="$DEVENV_ROOT/scripts:$PATH"`.
125
+ - Shell activation happens on every `devenv test` or `direnv` reload.
126
+
127
+ ## Git hooks in devenv
128
+
129
+ Git hooks are defined under `git-hooks.hooks`. Each hook accepts:
130
+
131
+ | Field | Description |
132
+ | ---------------- | ------------------------------------------------------ |
133
+ | `enable` | Whether the hook is active |
134
+ | `verbose` | Print hook output |
135
+ | `pass_filenames` | Pass staged filenames to the entry command |
136
+ | `name` | Display name |
137
+ | `description` | What the hook does |
138
+ | `entry` | Command to run (can reference `${pkgs.tool}/bin/tool`) |
139
+ | `stages` | `pre-commit` or `pre-push` |
140
+
141
+ ### Common hook patterns
142
+
143
+ ```nix
144
+ "lint:all" = {
145
+ enable = true;
146
+ verbose = true;
147
+ pass_filenames = false;
148
+ name = "lint and test";
149
+ description = "Run lint and test before push.";
150
+ entry = "${config.env.DEVENV_PROFILE}/bin/lint:all && ${config.env.DEVENV_PROFILE}/bin/test:all";
151
+ stages = [ "pre-push" ];
152
+ };
153
+
154
+ "gitleaks" = {
155
+ enable = true;
156
+ verbose = true;
157
+ pass_filenames = true;
158
+ name = "secrets";
159
+ description = "Scan for leaked secrets.";
160
+ entry = "${pkgs.gitleaks}/bin/gitleaks protect --staged --verbose --redact";
161
+ stages = [ "pre-commit" ];
162
+ };
163
+ ```
164
+
165
+ ## Processes and services
166
+
167
+ devenv can manage background processes:
168
+
169
+ ```nix
170
+ processes = {
171
+ server.exec = "cargo run --bin my-server";
172
+ };
173
+
174
+ services.postgres = {
175
+ enable = true;
176
+ package = pkgs.postgresql_16;
177
+ initialDatabases = [{ name = "myapp"; }];
178
+ };
179
+ ```
180
+
181
+ Run with:
182
+
183
+ ```bash
184
+ devenv up # Start all processes and services
185
+ ```
186
+
187
+ ## `devenv.yaml` inputs
188
+
189
+ Use `devenv.yaml` to declare external flake inputs:
190
+
191
+ ```yaml
192
+ inputs:
193
+ nixpkgs:
194
+ url: github:NixOS/nixpkgs/nixpkgs-unstable
195
+ ifiokjr-nixpkgs:
196
+ url: github:ifiokjr/nixpkgs
197
+ ```
198
+
199
+ Then reference them in `devenv.nix` as `inputs.ifiokjr-nixpkgs.packages.${pkgs.stdenv.system}`.
200
+
201
+ ## Common commands reference
202
+
203
+ | Command | Purpose |
204
+ | ------------------------- | --------------------------------- |
205
+ | `devenv test` | Enter the development shell |
206
+ | `devenv shell <cmd>` | Run a single command in the shell |
207
+ | `devenv up` | Start processes and services |
208
+ | `devenv update` | Update flake inputs |
209
+ | `devenv gc` | Garbage collect old generations |
210
+ | `devenv processes status` | Show running processes |
211
+ | `devenv scan` | List available scripts |
212
+
213
+ ## Troubleshooting
214
+
215
+ ### Command not found outside the shell
216
+
217
+ If `pnpm`, `cargo`, or other tools are not available on your system PATH, always prefix:
218
+
219
+ ```bash
220
+ devenv shell pnpm install
221
+ devenv shell cargo build
222
+ ```
223
+
224
+ ### Stale environment
225
+
226
+ ```bash
227
+ devenv test # Re-enters the shell, re-evaluating enterShell
228
+ ```
229
+
230
+ ### Shell activation is slow
231
+
232
+ Check that `enterShell` doesn't run expensive operations. Move one-time setup into named
233
+ scripts like `install:toolchains` instead.