@pikku/skills 0.12.1

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.
Files changed (88) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +38 -0
  3. package/dist/index.d.ts +22 -0
  4. package/dist/index.js +74 -0
  5. package/dist/skills.gen.d.ts +1 -0
  6. package/dist/skills.gen.js +7 -0
  7. package/package.json +36 -0
  8. package/skills/pikku-addon/SKILL.md +243 -0
  9. package/skills/pikku-addon/references/addon-package-manifest.md +63 -0
  10. package/skills/pikku-ai-agent/SKILL.md +231 -0
  11. package/skills/pikku-ai-vercel/SKILL.md +82 -0
  12. package/skills/pikku-ai-voice/SKILL.md +88 -0
  13. package/skills/pikku-audit/SKILL.md +175 -0
  14. package/skills/pikku-aws/SKILL.md +111 -0
  15. package/skills/pikku-backblaze/SKILL.md +71 -0
  16. package/skills/pikku-better-auth/SKILL.md +298 -0
  17. package/skills/pikku-cli/SKILL.md +198 -0
  18. package/skills/pikku-cli/references/complete-example.md +82 -0
  19. package/skills/pikku-concepts/SKILL.md +250 -0
  20. package/skills/pikku-concepts/references/concept-mapping.md +556 -0
  21. package/skills/pikku-concepts/references/packages.md +29 -0
  22. package/skills/pikku-config/SKILL.md +212 -0
  23. package/skills/pikku-cron/SKILL.md +214 -0
  24. package/skills/pikku-deploy-azure/SKILL.md +71 -0
  25. package/skills/pikku-deploy-cloudflare/SKILL.md +82 -0
  26. package/skills/pikku-deploy-express/SKILL.md +86 -0
  27. package/skills/pikku-deploy-fastify/SKILL.md +73 -0
  28. package/skills/pikku-deploy-lambda/SKILL.md +110 -0
  29. package/skills/pikku-deploy-nextjs/SKILL.md +78 -0
  30. package/skills/pikku-deploy-uws/SKILL.md +88 -0
  31. package/skills/pikku-deps/SKILL.md +98 -0
  32. package/skills/pikku-emails/SKILL.md +163 -0
  33. package/skills/pikku-fabric/SKILL.md +318 -0
  34. package/skills/pikku-fabric-debug/SKILL.md +112 -0
  35. package/skills/pikku-feature/SKILL.md +258 -0
  36. package/skills/pikku-gateway-slack/SKILL.md +115 -0
  37. package/skills/pikku-http/SKILL.md +220 -0
  38. package/skills/pikku-http/references/http-options.md +55 -0
  39. package/skills/pikku-i18n/SKILL.md +137 -0
  40. package/skills/pikku-info/SKILL.md +100 -0
  41. package/skills/pikku-jose/SKILL.md +105 -0
  42. package/skills/pikku-kysely/SKILL.md +219 -0
  43. package/skills/pikku-machine-auth/SKILL.md +183 -0
  44. package/skills/pikku-mcp/SKILL.md +241 -0
  45. package/skills/pikku-middleware/SKILL.md +231 -0
  46. package/skills/pikku-middleware/references/middleware-patterns.md +61 -0
  47. package/skills/pikku-mongodb/SKILL.md +105 -0
  48. package/skills/pikku-n8n-import/SKILL.md +109 -0
  49. package/skills/pikku-n8n-import/SPEC.md +84 -0
  50. package/skills/pikku-n8n-import/references/addon-mapping.md +121 -0
  51. package/skills/pikku-n8n-import/references/code-translation.md +121 -0
  52. package/skills/pikku-n8n-import/references/loops-and-control.md +87 -0
  53. package/skills/pikku-paraglide/SKILL.md +117 -0
  54. package/skills/pikku-permissions/SKILL.md +192 -0
  55. package/skills/pikku-pino/SKILL.md +79 -0
  56. package/skills/pikku-product-second-opinion/README.md +43 -0
  57. package/skills/pikku-product-second-opinion/SKILL.md +158 -0
  58. package/skills/pikku-product-second-opinion/example/sample-report.md +90 -0
  59. package/skills/pikku-product-second-opinion/references/report-template.md +73 -0
  60. package/skills/pikku-queue/SKILL.md +240 -0
  61. package/skills/pikku-react/SKILL.md +212 -0
  62. package/skills/pikku-react-query/SKILL.md +242 -0
  63. package/skills/pikku-realtime/SKILL.md +236 -0
  64. package/skills/pikku-realtime/references/other-routes.md +23 -0
  65. package/skills/pikku-redis/SKILL.md +90 -0
  66. package/skills/pikku-rpc/SKILL.md +171 -0
  67. package/skills/pikku-rtl/SKILL.md +219 -0
  68. package/skills/pikku-scenario/SKILL.md +382 -0
  69. package/skills/pikku-schedule/SKILL.md +57 -0
  70. package/skills/pikku-schema-ajv/SKILL.md +62 -0
  71. package/skills/pikku-schema-cfworker/SKILL.md +63 -0
  72. package/skills/pikku-security/SKILL.md +108 -0
  73. package/skills/pikku-services/SKILL.md +248 -0
  74. package/skills/pikku-services/references/audit-wire-service.md +34 -0
  75. package/skills/pikku-software-archaeology/README.md +70 -0
  76. package/skills/pikku-software-archaeology/SKILL.md +186 -0
  77. package/skills/pikku-software-archaeology/references/blueprint.schema.json +625 -0
  78. package/skills/pikku-software-archaeology/references/pikku-mapping.md +49 -0
  79. package/skills/pikku-software-archaeology/scripts/validate.mjs +173 -0
  80. package/skills/pikku-tag-middleware/SKILL.md +13 -0
  81. package/skills/pikku-template-clone/SKILL.md +40 -0
  82. package/skills/pikku-trigger/SKILL.md +181 -0
  83. package/skills/pikku-versioning/SKILL.md +173 -0
  84. package/skills/pikku-websocket/SKILL.md +243 -0
  85. package/skills/pikku-workflow/SKILL.md +172 -0
  86. package/skills/pikku-workflow/references/workflow-reference.md +63 -0
  87. package/skills/pikku-workflows-client/SKILL.md +150 -0
  88. package/skills/pikku-ws/SKILL.md +47 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 - present Yasser Fadl and Pikku contributors
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,38 @@
1
+ # @pikku/skills
2
+
3
+ The Pikku agent skills — the instruction set coding agents read to build, wire and
4
+ deploy Pikku projects. **MIT licensed**, deliberately: the format and the skills are
5
+ the open core, so any harness can adopt them without taking on the Pikku CLI's
6
+ Business Source License.
7
+
8
+ Each directory under `skills/` is one skill: a `SKILL.md` with YAML frontmatter
9
+ (`name`, `description`, optional `installGroups`) plus any `references/` it needs.
10
+ The frontmatter shape is the one Claude Code, opencode and pi.dev all parse.
11
+
12
+ ## Installing them
13
+
14
+ You do not normally depend on this package directly — the CLI installs from it:
15
+
16
+ ```bash
17
+ npx pikku skills install # → .claude/skills/
18
+ npx pikku skills install --core --fabric # the Fabric sandbox skill set
19
+ npx pikku skills install --agent pi # → .pi/skills/
20
+ ```
21
+
22
+ ## Reading them programmatically
23
+
24
+ ```ts
25
+ import { listSkillNames, listSkillFiles, readSkillFile } from '@pikku/skills'
26
+
27
+ for (const name of await listSkillNames()) {
28
+ for (const path of await listSkillFiles(name)) {
29
+ console.log(path, (await readSkillFile(path))?.length)
30
+ }
31
+ }
32
+ ```
33
+
34
+ Reads prefer the `skills/` directory on disk, so editing a `SKILL.md` is live
35
+ immediately. `SKILL_FILES` is the same content as an embedded path → contents map,
36
+ which is what makes the skills available inside the `bun --compile` CLI binaries
37
+ where no filesystem copy exists. Regenerate it with `yarn embed` after changing
38
+ anything under `skills/`.
@@ -0,0 +1,22 @@
1
+ import { SKILL_FILES } from './skills.gen.js';
2
+ export { SKILL_FILES };
3
+ /**
4
+ * Absolute path to the `skills/` directory shipped beside this module, or `null`
5
+ * when there is no filesystem copy to read.
6
+ *
7
+ * Both `dist/` (published, and `src/` under tsx) sit one level below the package
8
+ * root, so the directory is always `../skills` when a real filesystem is in play.
9
+ * It is `null` inside the `bun --compile` CLI binaries, whose modules load from a
10
+ * virtual path — that is the case `SKILL_FILES` exists to cover.
11
+ */
12
+ export declare const skillsDir: string | null;
13
+ /**
14
+ * Reading prefers the filesystem so that editing a SKILL.md is immediately live
15
+ * for `pikku skills install` without re-running `yarn embed`; the manifest is the
16
+ * fallback for bundled contexts. The two are identical after a build.
17
+ */
18
+ export declare const listSkillNames: () => Promise<string[]>;
19
+ /** Every file belonging to one skill, as paths relative to the skills root. */
20
+ export declare const listSkillFiles: (name: string) => Promise<string[]>;
21
+ /** Contents of one file, by its path relative to the skills root. */
22
+ export declare const readSkillFile: (path: string) => Promise<string | null>;
package/dist/index.js ADDED
@@ -0,0 +1,74 @@
1
+ import { existsSync } from 'fs';
2
+ import { readdir, readFile } from 'fs/promises';
3
+ import { dirname, join, relative, sep } from 'path';
4
+ import { fileURLToPath } from 'url';
5
+ import { SKILL_FILES } from './skills.gen.js';
6
+ export { SKILL_FILES };
7
+ /**
8
+ * Absolute path to the `skills/` directory shipped beside this module, or `null`
9
+ * when there is no filesystem copy to read.
10
+ *
11
+ * Both `dist/` (published, and `src/` under tsx) sit one level below the package
12
+ * root, so the directory is always `../skills` when a real filesystem is in play.
13
+ * It is `null` inside the `bun --compile` CLI binaries, whose modules load from a
14
+ * virtual path — that is the case `SKILL_FILES` exists to cover.
15
+ */
16
+ export const skillsDir = (() => {
17
+ const candidate = join(dirname(fileURLToPath(import.meta.url)), '..', 'skills');
18
+ return existsSync(candidate) ? candidate : null;
19
+ })();
20
+ const toPosix = (path) => path.split(sep).join('/');
21
+ /**
22
+ * Reading prefers the filesystem so that editing a SKILL.md is immediately live
23
+ * for `pikku skills install` without re-running `yarn embed`; the manifest is the
24
+ * fallback for bundled contexts. The two are identical after a build.
25
+ */
26
+ export const listSkillNames = async () => {
27
+ if (skillsDir) {
28
+ const entries = await readdir(skillsDir, { withFileTypes: true });
29
+ return entries
30
+ .filter((entry) => entry.isDirectory())
31
+ .map((entry) => entry.name)
32
+ .sort();
33
+ }
34
+ const names = new Set();
35
+ for (const path of Object.keys(SKILL_FILES)) {
36
+ const name = path.split('/')[0];
37
+ if (name)
38
+ names.add(name);
39
+ }
40
+ return [...names].sort();
41
+ };
42
+ /** Every file belonging to one skill, as paths relative to the skills root. */
43
+ export const listSkillFiles = async (name) => {
44
+ if (skillsDir) {
45
+ const root = join(skillsDir, name);
46
+ if (!existsSync(root))
47
+ return [];
48
+ const out = [];
49
+ const walk = async (dir) => {
50
+ for (const entry of await readdir(dir, { withFileTypes: true })) {
51
+ const full = join(dir, entry.name);
52
+ if (entry.isDirectory())
53
+ await walk(full);
54
+ else if (entry.isFile())
55
+ out.push(toPosix(relative(skillsDir, full)));
56
+ }
57
+ };
58
+ await walk(root);
59
+ return out.sort();
60
+ }
61
+ return Object.keys(SKILL_FILES)
62
+ .filter((path) => path.startsWith(`${name}/`))
63
+ .sort();
64
+ };
65
+ /** Contents of one file, by its path relative to the skills root. */
66
+ export const readSkillFile = async (path) => {
67
+ if (skillsDir) {
68
+ const full = join(skillsDir, ...path.split('/'));
69
+ if (!existsSync(full))
70
+ return null;
71
+ return readFile(full, 'utf-8');
72
+ }
73
+ return SKILL_FILES[path] ?? null;
74
+ };
@@ -0,0 +1 @@
1
+ export declare const SKILL_FILES: Record<string, string>;