portable-agent-layer 0.63.3 → 0.65.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.
Files changed (65) hide show
  1. package/README.md +8 -4
  2. package/assets/schema/pal-settings.schema.json +4 -0
  3. package/assets/skills/analyze-pdf/SKILL.md +11 -0
  4. package/assets/skills/analyze-youtube/SKILL.md +12 -0
  5. package/assets/skills/consulting-report/SKILL.md +9 -0
  6. package/assets/skills/consulting-report/tools/generate-pdf.mjs +2 -2
  7. package/assets/skills/consulting-report/tools/generate-pdf.ts +5 -2
  8. package/assets/skills/council/SKILL.md +32 -0
  9. package/assets/skills/create-pdf/SKILL.md +13 -0
  10. package/assets/skills/create-skill/SKILL.md +14 -2
  11. package/assets/skills/create-skill/authoring-guide.md +10 -1
  12. package/assets/skills/create-subagent/SKILL.md +22 -4
  13. package/assets/skills/{research → deep-research}/SKILL.md +32 -1
  14. package/assets/skills/entities/SKILL.md +10 -0
  15. package/assets/skills/extract-wisdom/SKILL.md +12 -0
  16. package/assets/skills/first-principles/SKILL.md +8 -0
  17. package/assets/skills/frontend-design/SKILL.md +14 -0
  18. package/assets/skills/fyzz-chat-api/SKILL.md +10 -0
  19. package/assets/skills/humanize/SKILL.md +13 -1
  20. package/assets/skills/opinion/SKILL.md +11 -0
  21. package/assets/skills/pal-analyze/SKILL.md +11 -0
  22. package/assets/skills/pal-reflect/SKILL.md +10 -0
  23. package/assets/skills/playwright/SKILL.md +15 -2
  24. package/assets/skills/playwright/tools/shot.ts +6 -7
  25. package/assets/skills/presentation/SKILL.md +12 -0
  26. package/assets/skills/projects/SKILL.md +20 -1
  27. package/assets/skills/reflect/SKILL.md +13 -0
  28. package/assets/skills/telos/SKILL.md +12 -0
  29. package/assets/skills/think/SKILL.md +9 -0
  30. package/assets/templates/PAL/SYSTEM_ARCHITECTURE.md +3 -0
  31. package/assets/templates/pal-settings.json +1 -0
  32. package/assets/templates/settings.claude.json +2 -1
  33. package/package.json +15 -4
  34. package/src/cli/index.ts +95 -9
  35. package/src/cli/migrate.ts +69 -3
  36. package/src/cli/skill.ts +47 -3
  37. package/src/hooks/handlers/inject-retrieval.ts +20 -10
  38. package/src/hooks/lib/anchor.ts +90 -0
  39. package/src/hooks/lib/bindings.ts +117 -0
  40. package/src/hooks/lib/export.ts +38 -1
  41. package/src/hooks/lib/import-merge.ts +220 -0
  42. package/src/hooks/lib/inference.ts +113 -72
  43. package/src/hooks/lib/machine.ts +176 -0
  44. package/src/hooks/lib/projects.ts +223 -15
  45. package/src/hooks/lib/readme-sync.ts +30 -10
  46. package/src/hooks/lib/relationship.ts +3 -1
  47. package/src/hooks/lib/remote.ts +58 -0
  48. package/src/hooks/lib/retrieval.ts +8 -2
  49. package/src/hooks/lib/signals.ts +2 -1
  50. package/src/hooks/lib/skill-match.ts +129 -0
  51. package/src/hooks/lib/skill-triggers.ts +82 -0
  52. package/src/hooks/lib/stop.ts +5 -2
  53. package/src/targets/lib.ts +137 -35
  54. package/src/targets/opencode/plugin.ts +2 -6
  55. package/src/tools/agent/algorithm-reflect.ts +45 -11
  56. package/src/tools/agent/project.ts +148 -23
  57. package/src/tools/agent/thread.ts +7 -2
  58. package/src/tools/skill-doctor.ts +130 -5
  59. package/assets/skills/playwright/tools/shot-lib.mjs +0 -44
  60. package/assets/skills/playwright/tools/shot.mjs +0 -89
  61. package/assets/skills/review/SKILL.md +0 -20
  62. package/assets/skills/summarize/SKILL.md +0 -16
  63. /package/assets/skills/{research → deep-research}/tools/gemini-search.ts +0 -0
  64. /package/assets/skills/{research → deep-research}/tools/grok-search.ts +0 -0
  65. /package/assets/skills/{research → deep-research}/tools/perplexity-search.ts +0 -0
package/README.md CHANGED
@@ -32,7 +32,7 @@ With PAL, you can:
32
32
 
33
33
  > **Bun is required.** PAL is built on [Bun](https://bun.sh) and will not work with Node.js or other runtimes. Install it with `curl -fsSL https://bun.sh/install | bash`.
34
34
 
35
- - [Bun](https://bun.sh) >= 1.3.0
35
+ - [Bun](https://bun.sh) >= 1.4.0
36
36
  - At least one of: [Claude Code](https://claude.ai/code), [opencode](https://opencode.ai), [Cursor](https://cursor.com), [GitHub Copilot CLI](https://docs.github.com/en/copilot/github-copilot-in-the-cli), or [Codex](https://openai.com/index/introducing-codex/)
37
37
 
38
38
  ### Package mode (recommended)
@@ -173,17 +173,21 @@ PAL ships with built-in skills that extend your agent's capabilities:
173
173
  | `council` | Multi-perspective parallel debate on decisions |
174
174
  | `create-pdf` | Render structured content into a PDF |
175
175
  | `create-skill` | Scaffold a new skill from a description |
176
+ | `create-subagent` | Scaffold a subagent and install it into every agent |
177
+ | `deep-research` | Multi-agent parallel research in quick, standard, or extensive mode |
176
178
  | `entities` | Detect, save, and query people & companies in the personal knowledge graph |
177
179
  | `extract-wisdom` | Extract structured insights from content |
178
180
  | `first-principles` | Break down problems to fundamentals |
181
+ | `frontend-design` | Build production-grade frontend interfaces |
179
182
  | `fyzz-chat-api` | Query Fyzz Chat conversations via API |
183
+ | `humanize` | Rewrite text to strip AI tells and read as human |
180
184
  | `opinion` | Confirm or contradict tracked opinions (confidence-weighted) |
185
+ | `pal-analyze` | Surface rating trends, failure patterns, and graduation candidates |
186
+ | `pal-reflect` | Promote recurring observations into tracked opinions |
187
+ | `playwright` | Screenshot a page for a visual check |
181
188
  | `presentation` | Build branded slide decks from outlines |
182
189
  | `projects` | Look up, resume, register, or manage tracked projects |
183
190
  | `reflect` | Diagnose why a PAL behavior didn't trigger |
184
- | `research` | Multi-agent parallel research |
185
- | `review` | Security-focused code review |
186
- | `summarize` | Structured summarization |
187
191
  | `telos` | Inspect or update goals, beliefs, strategies, narratives |
188
192
  | `think` | Structured first-pass reasoning on a problem |
189
193
 
@@ -65,6 +65,10 @@
65
65
  "handoff": { "type": "boolean", "description": "Handoff note from the previous session." },
66
66
  "selfModel": { "type": "boolean", "description": "The assistant's self-model synthesis." },
67
67
  "contextualSteering": { "type": "boolean", "description": "Prompt-time steering self-checks (see the steering section)." },
68
+ "skillMatching": {
69
+ "type": "boolean",
70
+ "description": "Prompt-time \"Potential matching skills\" hints, matched from each skill's metadata.triggers."
71
+ },
68
72
  "steeringTestReport": { "type": "boolean", "description": "When true, the assistant notes to the user which steering self-check fired. For the dual-live test period; ships false." }
69
73
  }
70
74
  },
@@ -1,7 +1,18 @@
1
1
  ---
2
2
  name: analyze-pdf
3
+ license: MIT
3
4
  description: "Download and analyze PDF files from URLs or local paths — extract text, answer questions, summarize content. Use when analyzing, reading, or extracting information from a PDF."
4
5
  argument-hint: <URL or file path>
6
+ metadata:
7
+ source: portable-agent-layer
8
+ triggers:
9
+ - "analyze-pdf"
10
+ - "analyze pdf"
11
+ - "read this pdf"
12
+ - "analyze this pdf"
13
+ - "analyze the pdf"
14
+ - "summarize this pdf"
15
+ - "parse this pdf"
5
16
  ---
6
17
 
7
18
  When the user asks to analyze, read, or extract information from a PDF:
@@ -1,7 +1,19 @@
1
1
  ---
2
2
  name: analyze-youtube
3
+ license: MIT
3
4
  description: "Analyze YouTube videos using Gemini's native video understanding — summarize, extract insights, answer questions. Use when analyzing, summarizing, or extracting information from a YouTube video."
4
5
  argument-hint: <YouTube URL>
6
+ metadata:
7
+ source: portable-agent-layer
8
+ triggers:
9
+ - "analyze-youtube"
10
+ - "analyze youtube"
11
+ - "youtube"
12
+ - "youtu.be"
13
+ - "watch this video"
14
+ - "summarize the video"
15
+ - "summarize this video"
16
+ - "video transcript"
5
17
  ---
6
18
 
7
19
  When the user asks to analyze, summarize, or extract information from a YouTube video:
@@ -1,7 +1,16 @@
1
1
  ---
2
2
  name: consulting-report
3
+ license: MIT
3
4
  description: "Build a beautifully-typeset consulting-report PDF from a typed data file and a React layout. Use when generating an assessment, strategic review, operational readiness check, or any McKinsey-style consulting deliverable as a PDF."
4
5
  argument-hint: scaffold <target-dir> | dev <report-dir> | <report-dir> (render PDF)
6
+ metadata:
7
+ source: portable-agent-layer
8
+ triggers:
9
+ - "consulting-report"
10
+ - "consulting report"
11
+ - "to pdf"
12
+ - "design a pdf"
13
+ - "beautiful pdf"
5
14
  ---
6
15
 
7
16
  ## Overview
@@ -3,7 +3,7 @@ import { createReadStream, constants as fsConstants, realpathSync } from "node:f
3
3
  import { access, readFile, stat, unlink, writeFile } from "node:fs/promises";
4
4
  import { createServer } from "node:http";
5
5
  import { extname, join, resolve } from "node:path";
6
- import { pathToFileURL } from "node:url";
6
+ import { fileURLToPath, pathToFileURL } from "node:url";
7
7
  import { PDFDocument } from "pdf-lib";
8
8
  import { chromium } from "playwright";
9
9
  const COLOR = {
@@ -220,7 +220,7 @@ function realResolve(p) {
220
220
  return resolve(p);
221
221
  }
222
222
  }
223
- const isMain = process.argv[1] && realResolve(process.argv[1]) === realResolve(new URL(import.meta.url).pathname);
223
+ const isMain = process.argv[1] && realResolve(process.argv[1]) === realResolve(fileURLToPath(import.meta.url));
224
224
  if (isMain) {
225
225
  await run();
226
226
  }
@@ -19,7 +19,7 @@ import { createReadStream, constants as fsConstants, realpathSync } from "node:f
19
19
  import { access, readFile, stat, unlink, writeFile } from "node:fs/promises";
20
20
  import { createServer, type Server } from "node:http";
21
21
  import { extname, join, resolve } from "node:path";
22
- import { pathToFileURL } from "node:url";
22
+ import { fileURLToPath, pathToFileURL } from "node:url";
23
23
  import { PDFDocument } from "pdf-lib";
24
24
  import { chromium } from "playwright";
25
25
 
@@ -315,6 +315,9 @@ async function run(argv: string[] = process.argv.slice(2)): Promise<void> {
315
315
  // Node ≥ 22.6 doesn't expose import.meta.main; gate on argv[1] instead.
316
316
  // Use realpathSync on both sides so symlinked skill paths (e.g. ~/.pal/skills →
317
317
  // PAL repo) match the resolved import.meta.url.
318
+ // fileURLToPath, never new URL().pathname: on Windows the latter yields
319
+ // "/C:/Users/..." — leading slash, forward slashes — which can never equal argv[1]'s
320
+ // "C:\Users\...", so the gate silently failed and run() never executed there.
318
321
  function realResolve(p: string): string {
319
322
  try {
320
323
  return realpathSync(resolve(p));
@@ -324,7 +327,7 @@ function realResolve(p: string): string {
324
327
  }
325
328
  const isMain =
326
329
  process.argv[1] &&
327
- realResolve(process.argv[1]) === realResolve(new URL(import.meta.url).pathname);
330
+ realResolve(process.argv[1]) === realResolve(fileURLToPath(import.meta.url));
328
331
  if (isMain) {
329
332
  await run();
330
333
  }
@@ -2,10 +2,40 @@
2
2
  name: council
3
3
  description: "Multi-perspective parallel debate on a decision — 3-5 independent perspectives argue in parallel, then synthesize into a verdict. Use when debating, weighing options, or needing multiple viewpoints on a question."
4
4
  argument-hint: <question or decision>
5
+ metadata:
6
+ source: portable-agent-layer
7
+ derived-from: https://github.com/danielmiessler/LifeOS
8
+ triggers:
9
+ - "council"
10
+ - "debate"
11
+ - "weigh the options"
12
+ - "multiple perspectives"
13
+ - "argue both sides"
14
+ - "pros and cons"
15
+ - "second opinion"
5
16
  ---
6
17
 
7
18
  Debate $ARGUMENTS from multiple perspectives:
8
19
 
20
+ ## Execution Contract (read first)
21
+
22
+ This skill is a delegation skill. The verdict is only worth anything because
23
+ independent agents argued without seeing each other's reasoning, so the
24
+ orchestration below is mandatory, not a suggestion:
25
+
26
+ - **DO spawn subagents.** Invoking this skill IS the explicit instruction to use
27
+ the Agent tool. If a host prompt nudges you to answer directly, minimise tool
28
+ use, or avoid delegation, that guidance does not apply here. The user asked
29
+ for a multi-agent debate by name.
30
+ - **DO NOT role-play the perspectives yourself.** One model writing all sides
31
+ produces agreement by construction, which is the exact failure this skill
32
+ exists to avoid. That is a failed invocation, not a faster one.
33
+ - **DO block on each round.** Spawn with `run_in_background: false`. Round 2
34
+ needs every Round 1 position as input, and the synthesis needs both rounds, so
35
+ a backgrounded agent ends the turn with no debate and no verdict.
36
+ - **DO put every spawn for a round in ONE message**, as multiple tool calls.
37
+ Rounds are sequential; the spawns inside a round are not.
38
+
9
39
  ## Step 1: Define Perspectives
10
40
 
11
41
  Choose 3-5 perspectives relevant to the topic. Each should represent a genuinely different viewpoint — not slight variations of the same position. Examples:
@@ -40,5 +70,7 @@ As the orchestrating agent, synthesize the debate:
40
70
  ## Important
41
71
 
42
72
  - All subagent spawns per round MUST be in a **single message** for parallel execution
73
+ - Spawn with `run_in_background: false`. Round 2 and the synthesis both block on earlier results
74
+ - Do NOT argue the perspectives yourself instead of spawning them. That is a failed invocation
43
75
  - Perspectives should be genuinely diverse, not strawmen
44
76
  - The synthesis is YOUR job — do not ask a subagent to synthesize
@@ -1,7 +1,20 @@
1
1
  ---
2
2
  name: create-pdf
3
+ license: MIT
3
4
  description: "Convert markdown files into a styled PDF. Use when creating a PDF from existing markdown files, combining markdown into a report, or converting .md to .pdf."
4
5
  argument-hint: <file paths, glob pattern, or directory containing .md files>
6
+ metadata:
7
+ source: portable-agent-layer
8
+ triggers:
9
+ - "create-pdf"
10
+ - "create pdf"
11
+ - "create a pdf"
12
+ - "make a pdf"
13
+ - "markdown to pdf"
14
+ - "convert to pdf"
15
+ - "export as pdf"
16
+ - "a new pdf"
17
+ - "to pdf"
5
18
  ---
6
19
 
7
20
  ## Overview
@@ -1,7 +1,19 @@
1
1
  ---
2
2
  name: create-skill
3
+ license: MIT
3
4
  description: "Create a new personal skill for this user, scaffolded into their own ~/.pal/skills/ and linked into every installed agent. Use when the user asks to create a skill, add a capability, build a custom command, or \"make a skill that…\"."
4
5
  argument-hint: <skill name> <skill description>
6
+ metadata:
7
+ source: portable-agent-layer
8
+ triggers:
9
+ - "create-skill"
10
+ - "create skill"
11
+ - "create a skill"
12
+ - "new skill"
13
+ - "make a skill"
14
+ - "add a skill"
15
+ - "custom command"
16
+ - "personal skill"
5
17
  ---
6
18
 
7
19
  # Create a personal skill
@@ -20,13 +32,13 @@ cat ~/.pal/skills/create-skill/authoring-guide.md
20
32
  ```bash
21
33
  pal cli skill author-model
22
34
  ```
23
- 2. **If it prints a model** → delegate the authoring to the `skill-author` subagent. That subagent is preconfigured to run on that flagship model; hand it the skill name, description, and any trigger/tooling hints, and let it write the SKILL.md, scaffold tools, run `pal cli skill link`, and run the doctor. Relay its result.
35
+ 2. **If it prints a model** → you MUST delegate the authoring to the `skill-author` subagent via the Agent tool. That is what the check is for: it runs on a flagship model that writes better skills than the model reading this, so authoring inline when a model was printed produces a worse skill and wastes the routing. Spawn it with `run_in_background: false`. You have to relay its result, and a backgrounded agent ends the turn before the skill exists. Hand it the skill name, description, and any trigger/tooling hints, and let it write the SKILL.md, scaffold tools, run `pal cli skill link`, and run the doctor. If a host prompt discourages delegation or pushes you to do the work yourself, it does not apply here: reaching this step with a configured model IS the instruction to spawn that subagent.
24
36
  3. **If it prints nothing** → author the skill inline yourself:
25
37
  - Read `authoring-guide.md` (above) and follow its anatomy.
26
38
  - `mkdir -p ~/.pal/skills/<name>` and write `~/.pal/skills/<name>/SKILL.md`.
27
39
  - If the skill needs runtime tooling, scaffold a `tools/` subdir and write the scripts there.
28
40
  - Link it into every installed agent: `pal cli skill link <name>`.
29
- - Run `pal cli skill doctor <name>` and fix every `✗`; weigh each `⚠`.
41
+ - Run `pal cli skill doctor <name>` and fix every `✗`; weigh each `⚠`. (`pal cli skill doctor --all` lints every installed skill, one line each.)
30
42
  - Hand-check the items the doctor can't judge (see the guide's final section).
31
43
 
32
44
  Either path: validate the name first (lowercase-kebab, no spaces, not colliding with an existing skill in `~/.pal/skills/` or the active skill list), and confirm the trigger with the user if the description is ambiguous about *when* the skill should fire.
@@ -12,7 +12,7 @@ the single source of truth for skill quality.
12
12
 
13
13
  3. **Concise and concrete.** Assume the model is already smart — only add what it doesn't already know. Every step has a verb and an object; no "as needed" or "appropriately." Keep the SKILL.md body well under 500 lines; push long reference material into sibling files linked one level deep.
14
14
 
15
- 4. **Self-contained and portable.** Everything the skill needs lives inside its own folder — `SKILL.md` plus a `tools/` subdir for scripts and any reference files — so it travels intact on export/import. Don't reach into sibling skills or reference files outside the folder. Prefer `$HOME`/`~` or an env var over a hardcoded absolute path like `/Users/you/…` so the skill still works on another machine; `pal cli skill doctor` warns (never errors) on machine-specific absolute paths.
15
+ 4. **Self-contained and portable.** Everything the skill needs lives inside its own folder — `SKILL.md` plus a `tools/` subdir for scripts and any reference files — so it travels intact on export/import. Don't reach into sibling skills or reference files outside the folder. Prefer `$HOME`/`~` or an env var over a hardcoded absolute path like `/Users/you/…` so the skill still works on another machine; `pal cli skill doctor` warns (never errors) on machine-specific absolute paths; `pal cli skill doctor --all` lints every installed skill at once, one line each.
16
16
 
17
17
  A personal skill **may** contain this user's own context — their paths, project names, preferences, conventions. That is the point of a personal skill; portability (rule 4) is a preference, not a hard rule — a deliberate machine-specific mount is fine.
18
18
 
@@ -23,6 +23,11 @@ A personal skill **may** contain this user's own context — their paths, projec
23
23
  name: <slug> # the slash-command name; lowercase-kebab
24
24
  description: <what it does + WHEN to invoke> # the dispatcher matches on this
25
25
  argument-hint: <args> # optional; how the user passes input
26
+ metadata: # free-form map; the only key Anthropic's
27
+ triggers: # spec reserves for third-party tooling
28
+ - "<skill-name>" # always first
29
+ - "<skill name>" # always second, hyphens as spaces
30
+ - "<word or phrase a prompt would contain>"
26
31
  ---
27
32
 
28
33
  ## Overview / Workflow
@@ -40,6 +45,10 @@ Two short lists; the "do not" list disambiguates this skill from neighbours.
40
45
 
41
46
  The `description` should state **both what the skill does and when to invoke it**, in third person, with the trigger terms a model would match on. A vague description ("helps with documents") will not trigger reliably.
42
47
 
48
+ `metadata.triggers` lists the literal words and phrases a prompt would contain when the user wants this skill. They are indexed into `skill-index.json`, and the prompt-submit hook injects a "Potential matching skills" hint whenever one appears in a prompt — a second chance for the skill to be noticed when the description alone didn't fire. Write 4-8: mostly multi-word phrases (they score higher than single words), plus a distinctive term or two, and nothing so common it fires on unrelated prompts. Only `name`, `description`, `license`, `allowed-tools`, `metadata`, and `compatibility` are valid frontmatter keys, so triggers live under `metadata`, never at the top level.
49
+
50
+ The first two triggers are fixed: the skill's own name, then its de-hyphenated form — `"create-pdf"` then `"create pdf"` — because a user types it both ways. A single-word name has only the one form, so it needs just itself. The doctor warns when they are missing or out of order.
51
+
43
52
  ## Hand-checks the doctor can't judge
44
53
 
45
54
  - **Trigger clarity** — could a model decide *not* to invoke this from the description alone? If so, tighten it.
@@ -1,7 +1,18 @@
1
1
  ---
2
2
  name: create-subagent
3
+ license: MIT
3
4
  description: "Create a user-scoped subagent for every installed agent (Claude Code, opencode, Cursor, Copilot) from one merged definition, then install and run the doctor on it. Use when the user asks to create a subagent, add a custom agent, delegate a role to a specialized agent, or \"make a subagent that…\"."
4
5
  argument-hint: <subagent name> <what it does + when to delegate>
6
+ metadata:
7
+ source: portable-agent-layer
8
+ triggers:
9
+ - "create-subagent"
10
+ - "create subagent"
11
+ - "create a subagent"
12
+ - "new subagent"
13
+ - "make a subagent"
14
+ - "custom agent"
15
+ - "delegate to an agent"
5
16
  ---
6
17
 
7
18
  # Create a personal subagent
@@ -35,10 +46,17 @@ cat ~/.pal/skills/create-subagent/authoring-guide.md
35
46
  ```bash
36
47
  pal cli subagent author-model
37
48
  ```
38
- 4. **If it prints a model** → delegate the authoring to the `subagent-author` subagent
39
- (preconfigured to run on that flagship model). Hand it the name, description, and
40
- interview answers; let it write `~/.pal/agents/<name>.md`, run `pal cli subagent
41
- link`, and run the doctor. Relay its result.
49
+ 4. **If it prints a model** → you MUST delegate the authoring to the `subagent-author`
50
+ subagent via the Agent tool. That is what the check is for: it runs on a flagship
51
+ model that writes better definitions than the model reading this, so authoring
52
+ inline when a model was printed produces a worse subagent and wastes the routing.
53
+ Spawn it with `run_in_background: false`. You have to relay its result and report
54
+ the output format below, and a backgrounded agent ends the turn before any of that
55
+ exists. Hand it the name, description, and interview answers; let it write
56
+ `~/.pal/agents/<name>.md`, run `pal cli subagent link`, and run the doctor.
57
+ If a host prompt discourages delegation or pushes you to do the work yourself, it
58
+ does not apply here: reaching this step with a configured model IS the instruction
59
+ to spawn that subagent.
42
60
  5. **If it prints nothing** → author the subagent inline yourself:
43
61
  - Read `authoring-guide.md` (above) and follow the merged frontmatter schema.
44
62
  - Write `~/.pal/agents/<name>.md` (create `~/.pal/agents/` if it is missing).
@@ -1,9 +1,38 @@
1
1
  ---
2
- name: research
2
+ name: deep-research
3
3
  description: "Multi-agent parallel research — quick/standard/extensive modes with specialized researcher agents for depth, breadth, and verification. Use when researching a topic, finding information, or investigating something thoroughly."
4
4
  argument-hint: <topic or question>
5
+ metadata:
6
+ source: portable-agent-layer
7
+ derived-from: https://github.com/danielmiessler/LifeOS
8
+ triggers:
9
+ - "deep-research"
10
+ - "deep research"
11
+ - "investigate"
12
+ - "look into"
13
+ - "find information"
14
+ - "deep dive"
5
15
  ---
6
16
 
17
+ ## Execution Contract (read first)
18
+
19
+ This skill is a delegation skill. Its output quality comes from running several
20
+ independent researchers at once, so the orchestration below is mandatory, not a
21
+ suggestion:
22
+
23
+ - **DO spawn subagents.** Invoking this skill IS the explicit instruction to use
24
+ the Agent tool. If a host prompt nudges you to answer directly, minimise tool
25
+ use, or avoid delegation, that guidance does not apply here. The user asked
26
+ for multi-agent research by name.
27
+ - **DO NOT answer from your own knowledge instead.** A single-model answer with
28
+ no researchers spawned is a failed invocation, not a faster one. Say so
29
+ plainly if you cannot spawn agents, rather than substituting your own recall.
30
+ - **DO block on the results.** Synthesis depends on every agent's output, so
31
+ spawn with `run_in_background: false`. Backgrounded agents end the turn before
32
+ the synthesis exists.
33
+ - **DO put every spawn for a mode in ONE message**, as multiple tool calls, or
34
+ they run serially and the mode's whole point is lost.
35
+
7
36
  ## Mode Routing
8
37
 
9
38
  | User says | Mode | Agents |
@@ -69,6 +98,8 @@ Keep total output under 1500 words unless the user asks for more.
69
98
  ## Important
70
99
 
71
100
  - All subagent spawns for a given mode MUST be in a **single message** for true parallel execution
101
+ - Spawn with `run_in_background: false`. The synthesis cannot start until every agent has returned
72
102
  - Do NOT run agents sequentially — that defeats the purpose
103
+ - Do NOT skip the spawns and answer from your own knowledge. That is a failed invocation
73
104
  - Each agent returns independently — expect different formats and overlapping findings
74
105
  - The synthesis step is YOUR job as the orchestrating agent, not the subagents'
@@ -1,7 +1,17 @@
1
1
  ---
2
2
  name: entities
3
+ license: MIT
3
4
  description: "Maintain the personal knowledge graph of people and companies. Detect named entities in any content (article, video, paste, conversation), upsert them to ~/.pal/memory/knowledge/, and surface what's already known. Use proactively whenever named entities appear — don't wait to be asked."
4
5
  argument-hint: <content, URL, or pasted text>
6
+ metadata:
7
+ source: portable-agent-layer
8
+ triggers:
9
+ - "entities"
10
+ - "extract entities"
11
+ - "knowledge graph"
12
+ - "who is"
13
+ - "company profile"
14
+ - "people and companies"
5
15
  ---
6
16
 
7
17
  Detect, persist, and query people and companies referenced in $ARGUMENTS.
@@ -2,6 +2,18 @@
2
2
  name: extract-wisdom
3
3
  description: "Extract structured insights from content (articles, videos, podcasts). Use when extracting wisdom, key takeaways, or structured insights from any content."
4
4
  argument-hint: <content or URL>
5
+ metadata:
6
+ source: portable-agent-layer
7
+ derived-from: https://github.com/danielmiessler/LifeOS
8
+ triggers:
9
+ - "extract-wisdom"
10
+ - "extract wisdom"
11
+ - "key takeaways"
12
+ - "insights from"
13
+ - "distill"
14
+ - "takeaways from this"
15
+ - "remember this"
16
+ - "note this"
5
17
  ---
6
18
 
7
19
  Extract structured insights from $ARGUMENTS:
@@ -2,6 +2,14 @@
2
2
  name: first-principles
3
3
  description: "Break down a problem to its fundamental constraints and build up a solution. Use when decomposing complexity, challenging assumptions, or finding root causes."
4
4
  argument-hint: <problem>
5
+ metadata:
6
+ source: portable-agent-layer
7
+ derived-from: https://github.com/danielmiessler/LifeOS
8
+ triggers:
9
+ - "first-principles"
10
+ - "first principles"
11
+ - "root cause"
12
+ - "break it down"
5
13
  ---
6
14
 
7
15
  Break down $ARGUMENTS to fundamentals:
@@ -2,6 +2,20 @@
2
2
  name: frontend-design
3
3
  description: "Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics."
4
4
  license: Complete terms in LICENSE.txt
5
+ metadata:
6
+ source: portable-agent-layer
7
+ triggers:
8
+ - "frontend-design"
9
+ - "frontend design"
10
+ - "landing page"
11
+ - "ui design"
12
+ - "react component"
13
+ - "tailwind"
14
+ - "web page"
15
+ - "dashboard ui"
16
+ - "css layout"
17
+ - "design a"
18
+ - "shadcn"
5
19
  ---
6
20
 
7
21
  This skill guides creation of distinctive, production-grade frontend interfaces that avoid generic "AI slop" aesthetics. Implement real working code with exceptional attention to aesthetic details and creative choices.
@@ -1,7 +1,17 @@
1
1
  ---
2
2
  name: fyzz-chat-api
3
+ license: MIT
3
4
  description: "Query Fyzz Chat conversations and projects via the REST API. Use when looking up conversations, searching chat history, or listing projects in Fyzz Chat."
4
5
  argument-hint: <conversations|projects> [options]
6
+ metadata:
7
+ source: portable-agent-layer
8
+ triggers:
9
+ - "fyzz-chat-api"
10
+ - "fyzz chat api"
11
+ - "fyzz chat"
12
+ - "chat history"
13
+ - "fyzz conversation"
14
+ - "fyzz convo"
5
15
  ---
6
16
 
7
17
  When you need to access the user's Fyzz Chat conversations or projects, use the `fyzz-api` CLI tool. The tool reads the API key from the `PAL_FYZZ_API_KEY` environment variable automatically — never attempt to read, print, or reference the API key or the env var directly.
@@ -1,7 +1,19 @@
1
1
  ---
2
2
  name: humanize
3
+ license: MIT
3
4
  description: "Rewrites text to remove AI slop and make it sound human: eliminates em-dashes and en-dashes, LLM tell-words (delve, leverage, robust, seamless), 'not just X, it's Y' constructions, rule-of-three padding, boilerplate openers/closers, hedging, and decorative emoji, while preserving meaning and voice. Use when asked to humanize text, de-slop, remove AI dashes or em-dashes, strip AI tells, make writing sound human, or clean AI-generated prose."
4
5
  argument-hint: <text, or a file path, or empty to rewrite the previous message>
6
+ metadata:
7
+ source: portable-agent-layer
8
+ triggers:
9
+ - "humanize"
10
+ - "ai slop"
11
+ - "em dash"
12
+ - "emdash"
13
+ - "sound human"
14
+ - "de-slop"
15
+ - "remove ai tells"
16
+ - "less robotic"
5
17
  ---
6
18
 
7
19
  # Humanize
@@ -65,6 +77,6 @@ Return, in order:
65
77
 
66
78
  ## Do NOT use
67
79
 
68
- - To condense or shorten content: that is `summarize`. Humanize preserves length and structure.
80
+ - To condense or shorten content. Humanize preserves length and structure.
69
81
  - To pull insights, quotes, or ideas out of content: that is `extract-wisdom`. Humanize returns the whole text, rewritten in place.
70
82
  - To change the argument, add claims, or restructure a document. Humanize changes wording, never meaning.
@@ -1,6 +1,17 @@
1
1
  ---
2
2
  name: opinion
3
+ license: MIT
3
4
  description: "Opinion tracker for relationship notes. PROACTIVE: When the user confirms a preference ('yes exactly', 'keep doing that'), contradicts one ('no, don't do that', 'stop'), or you observe a recurring behavioral pattern — invoke this to update opinion confidence."
5
+ metadata:
6
+ source: portable-agent-layer
7
+ triggers:
8
+ - "opinion"
9
+ - "keep doing that"
10
+ - "stop doing that"
11
+ - "never do that"
12
+ - "yes exactly"
13
+ - "stop doing that"
14
+ - "my preference"
4
15
  ---
5
16
 
6
17
  # Opinion Tracker
@@ -1,7 +1,18 @@
1
1
  ---
2
2
  name: pal-analyze
3
+ license: MIT
3
4
  description: "Run learning analysis — surface rating trends, recurring failure patterns, and graduation candidates. Use when learning analysis is due, or when the user asks about performance patterns, low ratings, or what to improve."
4
5
  argument-hint: [optional: --actionable for AI-generated recommendations]
6
+ metadata:
7
+ source: portable-agent-layer
8
+ triggers:
9
+ - "pal-analyze"
10
+ - "pal analyze"
11
+ - "learning analysis"
12
+ - "rating trends"
13
+ - "failure patterns"
14
+ - "low ratings"
15
+ - "what to improve"
5
16
  ---
6
17
 
7
18
  When `/pal-analyze` is invoked (by you in response to a nudge, or by the user directly):
@@ -1,7 +1,17 @@
1
1
  ---
2
2
  name: pal-reflect
3
+ license: MIT
3
4
  description: "Run relationship reflect — promote recurring behavioral observations into tracked opinions. Use when relationship reflect is due, or when the user asks to review what patterns have been observed."
4
5
  argument-hint: [optional: --dry-run to preview without writing]
6
+ metadata:
7
+ source: portable-agent-layer
8
+ triggers:
9
+ - "pal-reflect"
10
+ - "pal reflect"
11
+ - "relationship reflect"
12
+ - "behavioral observations"
13
+ - "tracked opinions"
14
+ - "patterns observed"
5
15
  ---
6
16
 
7
17
  When `/pal-reflect` is invoked (by you in response to a nudge, or by the user directly):
@@ -1,7 +1,20 @@
1
1
  ---
2
2
  name: playwright
3
+ license: MIT
3
4
  description: "Capture a screenshot of a URL or local page and load it into context for a visual check. Use when asked to check visually, use playwright, screenshot a page, see or look at the design yourself, or verify a layout on desktop and mobile widths."
4
5
  argument-hint: <url> [--viewport WxH] [--full-page] [--selector <css>]
6
+ metadata:
7
+ source: portable-agent-layer
8
+ triggers:
9
+ - "playwright"
10
+ - "screenshot"
11
+ - "check visually"
12
+ - "look at the design"
13
+ - "look at this"
14
+ - "check yourself"
15
+ - "verify the layout"
16
+ - "responsive"
17
+ - "browser check"
5
18
  ---
6
19
 
7
20
  ## Overview
@@ -13,7 +26,7 @@ Take a screenshot of a running page and `Read` it into context so you can see th
13
26
  The bundled tool picks the best available local engine automatically:
14
27
 
15
28
  1. **System `playwright-cli`** (Microsoft's stateful agent CLI) — used when it is on `PATH` and no exact viewport/full-page is requested (its `screenshot` command can't set those).
16
- 2. **PAL-installed Playwright, launched via Node** — the cross-platform-safe path (Playwright's Chromium hangs under Bun on Windows). Honors `--viewport`, `--full-page`, and `--selector` precisely.
29
+ 2. **PAL-installed Playwright, launched in-process** — the precise path. Honors `--viewport`, `--full-page`, and `--selector` precisely.
17
30
 
18
31
  If neither engine is usable, the tool prints `NO_PLAYWRIGHT_CLI` and exits non-zero — only then use the **Playwright MCP** (tier 3) in step 4.
19
32
 
@@ -23,7 +36,7 @@ If neither engine is usable, the tool prints `NO_PLAYWRIGHT_CLI` and exits non-z
23
36
  2. Run the tool (it prints the absolute PNG path as its last stdout line):
24
37
 
25
38
  ```bash
26
- node ~/.pal/skills/playwright/tools/shot.mjs <url> \
39
+ bun ~/.pal/skills/playwright/tools/shot.ts <url> \
27
40
  [--viewport 1440x900] [--full-page] [--selector "<css>"] [-o <out.png>]
28
41
  ```
29
42
 
@@ -1,18 +1,17 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env bun
2
2
  // playwright skill tool: capture a screenshot of a URL and print its absolute path.
3
3
  //
4
4
  // Engine selection (see chooseTier):
5
5
  // Tier 1 — system `playwright-cli` binary (Microsoft's stateful agent CLI), when on
6
6
  // PATH and no exact viewport/full-page is requested.
7
- // Tier 2 — PAL-installed Playwright, launched via Node. (Playwright's chromium.launch
8
- // hangs under Bun on Windows — the same Node exception create-pdf relies on.)
7
+ // Tier 2 — PAL-installed Playwright, launched in-process.
9
8
  // If neither engine works, prints NO_PLAYWRIGHT_CLI on stderr and exits non-zero so the
10
9
  // caller (SKILL.md) can fall back to the Playwright MCP.
11
10
  //
12
- // pal-build:mjs ships as a compiled shot.mjs sibling (scripts/build-skill-tools.ts).
13
- // Run under Node via the compiled file (a .ts under node_modules can't be type-stripped;
14
- // plain .mjs needs no stripping and runs on every OS, keeping the Windows fallback):
15
- // node ~/.pal/skills/playwright/tools/shot.mjs <url> [opts]
11
+ // Runs under Bun on every OS:
12
+ // bun ~/.pal/skills/playwright/tools/shot.ts <url> [opts]
13
+ // It used to ship a Node-compiled .mjs sibling because chromium.launch hung under Bun on
14
+ // Windows; bun 1.4.0 fixes that, so the Node hop and the build step are gone.
16
15
 
17
16
  import { spawnSync } from "node:child_process";
18
17
  import { existsSync, mkdtempSync, rmSync } from "node:fs";