thepopebot 1.2.72-beta.13 → 1.2.72-beta.14

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 (34) hide show
  1. package/README.md +2 -2
  2. package/bin/cli.js +23 -6
  3. package/lib/ai/agent.js +2 -2
  4. package/lib/ai/tools.js +5 -5
  5. package/lib/paths.js +2 -2
  6. package/package.json +1 -1
  7. package/setup/setup.mjs +3 -3
  8. package/templates/.gitignore.template +3 -2
  9. package/templates/CLAUDE.md.template +8 -6
  10. package/templates/config/EVENT_HANDLER.md +11 -11
  11. package/templates/config/{PI_SKILL_GUIDE.md → SKILL_BUILDING_GUIDE.md} +12 -12
  12. package/templates/docker/job-claude-code/entrypoint.sh +8 -0
  13. package/templates/docker/job-pi-coding-agent/entrypoint.sh +2 -2
  14. package/templates/{pi-skills → skills}/README.md +2 -2
  15. package/templates/{pi-skills → skills}/brave-search/SKILL.md +9 -9
  16. package/templates/{pi-skills → skills}/browser-tools/SKILL.md +12 -12
  17. package/templates/{.pi/skills → skills}/llm-secrets/SKILL.md +1 -1
  18. package/templates/{.pi/skills → skills}/modify-self/SKILL.md +1 -1
  19. /package/templates/{pi-skills → skills}/LICENSE +0 -0
  20. /package/templates/{pi-skills → skills}/brave-search/content.js +0 -0
  21. /package/templates/{pi-skills → skills}/brave-search/package-lock.json +0 -0
  22. /package/templates/{pi-skills → skills}/brave-search/package.json +0 -0
  23. /package/templates/{pi-skills → skills}/brave-search/search.js +0 -0
  24. /package/templates/{pi-skills → skills}/browser-tools/browser-content.js +0 -0
  25. /package/templates/{pi-skills → skills}/browser-tools/browser-cookies.js +0 -0
  26. /package/templates/{pi-skills → skills}/browser-tools/browser-eval.js +0 -0
  27. /package/templates/{pi-skills → skills}/browser-tools/browser-hn-scraper.js +0 -0
  28. /package/templates/{pi-skills → skills}/browser-tools/browser-nav.js +0 -0
  29. /package/templates/{pi-skills → skills}/browser-tools/browser-pick.js +0 -0
  30. /package/templates/{pi-skills → skills}/browser-tools/browser-screenshot.js +0 -0
  31. /package/templates/{pi-skills → skills}/browser-tools/browser-start.js +0 -0
  32. /package/templates/{pi-skills → skills}/browser-tools/package-lock.json +0 -0
  33. /package/templates/{pi-skills → skills}/browser-tools/package.json +0 -0
  34. /package/templates/{.pi/skills → skills}/llm-secrets/llm-secrets.js +0 -0
package/README.md CHANGED
@@ -289,7 +289,7 @@ See [docs/RUNNING_DIFFERENT_MODELS.md](docs/RUNNING_DIFFERENT_MODELS.md) for the
289
289
  | [Auto-Merge](docs/AUTO_MERGE.md) | Auto-merge controls, ALLOWED_PATHS configuration |
290
290
  | [Deployment](docs/DEPLOYMENT.md) | VPS setup, Docker Compose, HTTPS with Let's Encrypt |
291
291
  | [Claude Code vs Pi](docs/CLAUDE_CODE_VS_PI.md) | Comparing the two agent backends (subscription vs API credits) |
292
- | [How to Use Pi](docs/HOW_TO_USE_PI.md) | Guide to the Pi coding agent |
292
+ | [How to Build Skills](docs/HOW_TO_BUILD_SKILLS.md) | Guide to building and activating agent skills |
293
293
  | [Pre-Release](docs/PRE_RELEASE.md) | Installing beta/alpha builds |
294
294
  | [Security](docs/SECURITY.md) | Security disclaimer, local development risks |
295
295
  | [Upgrading](docs/UPGRADE.md) | Automated upgrades, recovering from failed upgrades |
@@ -298,4 +298,4 @@ See [docs/RUNNING_DIFFERENT_MODELS.md](docs/RUNNING_DIFFERENT_MODELS.md) for the
298
298
 
299
299
  | Document | Description |
300
300
  |----------|-------------|
301
- | [NPM](docs/NPM.md) | Updating pi-skills, versioning, and publishing releases |
301
+ | [NPM](docs/NPM.md) | Updating skills, versioning, and publishing releases |
package/bin/cli.js CHANGED
@@ -207,17 +207,34 @@ async function init() {
207
207
  }
208
208
  }
209
209
 
210
- // Create default skill symlinks (brave-search, browser-tools)
211
- const defaultSkills = ['browser-tools'];
210
+ // Create default skill activation symlinks
211
+ const defaultSkills = ['browser-tools', 'llm-secrets', 'modify-self'];
212
+ const activeDir = path.join(cwd, 'skills', 'active');
213
+ fs.mkdirSync(activeDir, { recursive: true });
212
214
  for (const skill of defaultSkills) {
213
- const symlink = path.join(cwd, '.pi', 'skills', skill);
215
+ const symlink = path.join(activeDir, skill);
214
216
  if (!fs.existsSync(symlink)) {
215
- fs.mkdirSync(path.dirname(symlink), { recursive: true });
216
- createDirLink(`../../pi-skills/${skill}`, symlink);
217
- console.log(` Created .pi/skills/${skill} → ../../pi-skills/${skill}`);
217
+ createDirLink(`../${skill}`, symlink);
218
+ console.log(` Created skills/active/${skill} → ../${skill}`);
218
219
  }
219
220
  }
220
221
 
222
+ // Create .pi/skills → ../skills/active symlink
223
+ const piSkillsLink = path.join(cwd, '.pi', 'skills');
224
+ if (!fs.existsSync(piSkillsLink)) {
225
+ fs.mkdirSync(path.dirname(piSkillsLink), { recursive: true });
226
+ createDirLink('../skills/active', piSkillsLink);
227
+ console.log(' Created .pi/skills → ../skills/active');
228
+ }
229
+
230
+ // Create .claude/skills → ../skills/active symlink
231
+ const claudeSkillsLink = path.join(cwd, '.claude', 'skills');
232
+ if (!fs.existsSync(claudeSkillsLink)) {
233
+ fs.mkdirSync(path.dirname(claudeSkillsLink), { recursive: true });
234
+ createDirLink('../skills/active', claudeSkillsLink);
235
+ console.log(' Created .claude/skills → ../skills/active');
236
+ }
237
+
221
238
  // Report updated managed files
222
239
  if (updated.length > 0) {
223
240
  console.log('\n Updated managed files:');
package/lib/ai/agent.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { createReactAgent } from '@langchain/langgraph/prebuilt';
2
2
  import { SystemMessage } from '@langchain/core/messages';
3
3
  import { createModel } from './model.js';
4
- import { createJobTool, getJobStatusTool, getSystemTechnicalSpecsTool, getPiSkillCreationGuideTool } from './tools.js';
4
+ import { createJobTool, getJobStatusTool, getSystemTechnicalSpecsTool, getSkillBuildingGuideTool } from './tools.js';
5
5
  import { SqliteSaver } from '@langchain/langgraph-checkpoint-sqlite';
6
6
  import { eventHandlerMd, thepopebotDb } from '../paths.js';
7
7
  import { render_md } from '../utils/render-md.js';
@@ -16,7 +16,7 @@ let _agent = null;
16
16
  export async function getAgent() {
17
17
  if (!_agent) {
18
18
  const model = await createModel();
19
- const tools = [createJobTool, getJobStatusTool, getSystemTechnicalSpecsTool, getPiSkillCreationGuideTool];
19
+ const tools = [createJobTool, getJobStatusTool, getSystemTechnicalSpecsTool, getSkillBuildingGuideTool];
20
20
  const checkpointer = SqliteSaver.fromConnString(thepopebotDb);
21
21
 
22
22
  _agent = createReactAgent({
package/lib/ai/tools.js CHANGED
@@ -60,12 +60,12 @@ const getSystemTechnicalSpecsTool = tool(
60
60
  {
61
61
  name: 'get_system_technical_specs',
62
62
  description:
63
- 'Read the system architecture and technical documentation (CLAUDE.md). You MUST call this before modifying any config file (CRONS.json, TRIGGERS.json, etc.) or system infrastructure — config entries have advanced fields (per-entry LLM overrides, webhook options, etc.) that are only documented here. Also use this when you need to understand how the system works — event handler, Docker agent, API routes, database, GitHub Actions, deployment, or file structure. NOT for Pi skill creation (use get_pi_skill_creation_guide for that).',
63
+ 'Read the system architecture and technical documentation (CLAUDE.md). You MUST call this before modifying any config file (CRONS.json, TRIGGERS.json, etc.) or system infrastructure — config entries have advanced fields (per-entry LLM overrides, webhook options, etc.) that are only documented here. Also use this when you need to understand how the system works — event handler, Docker agent, API routes, database, GitHub Actions, deployment, or file structure. NOT for skill creation (use get_skill_building_guide for that).',
64
64
  schema: z.object({}),
65
65
  }
66
66
  );
67
67
 
68
- const getPiSkillCreationGuideTool = tool(
68
+ const getSkillBuildingGuideTool = tool(
69
69
  async () => {
70
70
  try {
71
71
  return fs.readFileSync(skillGuidePath, 'utf8');
@@ -74,11 +74,11 @@ const getPiSkillCreationGuideTool = tool(
74
74
  }
75
75
  },
76
76
  {
77
- name: 'get_pi_skill_creation_guide',
77
+ name: 'get_skill_building_guide',
78
78
  description:
79
- 'Load the guide for creating, modifying, and understanding Pi agent skills (pi-skills). You MUST call this before creating or modifying any skill — the guide contains required file structure, naming conventions, SKILL.md frontmatter format, {baseDir} patterns, activation steps, and testing procedures that are only documented there. This is about Pi skills specifically — the lightweight bash/Node.js wrappers that extend what the Docker agent can do. NOT for understanding the system architecture (use get_system_technical_specs for that).',
79
+ 'Load the guide for creating, modifying, and understanding agent skills. You MUST call this before creating or modifying any skill — the guide contains required file structure, naming conventions, SKILL.md frontmatter format, activation steps, and testing procedures that are only documented there. Skills are lightweight bash/Node.js wrappers in `skills/` that extend what agents can do. NOT for understanding the system architecture (use get_system_technical_specs for that).',
80
80
  schema: z.object({}),
81
81
  }
82
82
  );
83
83
 
84
- export { createJobTool, getJobStatusTool, getSystemTechnicalSpecsTool, getPiSkillCreationGuideTool };
84
+ export { createJobTool, getJobStatusTool, getSystemTechnicalSpecsTool, getSkillBuildingGuideTool };
package/lib/paths.js CHANGED
@@ -19,9 +19,9 @@ export const eventHandlerMd = path.join(PROJECT_ROOT, 'config', 'EVENT_HANDLER.m
19
19
  export const jobSummaryMd = path.join(PROJECT_ROOT, 'config', 'JOB_SUMMARY.md');
20
20
  export const soulMd = path.join(PROJECT_ROOT, 'config', 'SOUL.md');
21
21
  export const claudeMd = path.join(PROJECT_ROOT, 'CLAUDE.md');
22
- export const skillGuidePath = path.join(PROJECT_ROOT, 'config', 'PI_SKILL_GUIDE.md');
22
+ export const skillGuidePath = path.join(PROJECT_ROOT, 'config', 'SKILL_BUILDING_GUIDE.md');
23
23
 
24
- // Pi skills
24
+ // Active skills (resolves through .pi/skills → skills/active symlink)
25
25
  export const piSkillsDir = path.join(PROJECT_ROOT, '.pi', 'skills');
26
26
 
27
27
  // Working directories for command-type actions
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thepopebot",
3
- "version": "1.2.72-beta.13",
3
+ "version": "1.2.72-beta.14",
4
4
  "type": "module",
5
5
  "description": "Create autonomous AI agents with a two-layer architecture: Next.js Event Handler + Docker Agent.",
6
6
  "bin": {
package/setup/setup.mjs CHANGED
@@ -601,15 +601,15 @@ async function main() {
601
601
  clack.log.success(`Brave Search key added (${maskSecret(braveKey)})`);
602
602
 
603
603
  // Enable brave-search skill symlink
604
- const braveSymlink = path.join(process.cwd(), '.pi', 'skills', 'brave-search');
604
+ const braveSymlink = path.join(process.cwd(), 'skills', 'active', 'brave-search');
605
605
  if (!fs.existsSync(braveSymlink)) {
606
606
  fs.mkdirSync(path.dirname(braveSymlink), { recursive: true });
607
- createDirLink('../../pi-skills/brave-search', braveSymlink);
607
+ createDirLink('../brave-search', braveSymlink);
608
608
  clack.log.success('Enabled brave-search skill');
609
609
 
610
610
  // Commit and push the symlink so the Docker agent can use it
611
611
  try {
612
- execSync('git add .pi/skills/brave-search', { stdio: 'ignore' });
612
+ execSync('git add skills/active/brave-search', { stdio: 'ignore' });
613
613
  execSync('git commit -m "enable brave-search skill [no ci]"', { stdio: 'ignore' });
614
614
  const remote = execSync('git remote get-url origin', { encoding: 'utf-8' }).trim();
615
615
  const authedUrl = remote.replace('https://github.com/', `https://x-access-token:${pat}@github.com/`);
@@ -6,12 +6,13 @@
6
6
  *.key
7
7
 
8
8
  .claude/*
9
+ !.claude/skills
9
10
 
10
11
  # Pi system prompt (generated at runtime from SOUL.md)
11
12
  .pi/SYSTEM.md
12
13
 
13
- # Pi skills dependencies (installed at runtime in Docker for correct arch)
14
- pi-skills/*/node_modules/
14
+ # Skills dependencies (installed at runtime in Docker for correct arch)
15
+ skills/*/node_modules/
15
16
 
16
17
  # Node
17
18
  node_modules/
@@ -31,14 +31,16 @@ project-root/
31
31
  │ ├── AGENT.md # Agent runtime environment docs
32
32
  │ ├── JOB_SUMMARY.md # Prompt for summarizing completed jobs
33
33
  │ ├── HEARTBEAT.md # Self-monitoring / heartbeat behavior
34
- │ ├── PI_SKILL_GUIDE.md # Guide for Pi agent skills
34
+ │ ├── SKILL_BUILDING_GUIDE.md # Guide for building agent skills
35
35
  │ ├── CRONS.json # Scheduled job definitions
36
36
  │ └── TRIGGERS.json # Webhook trigger definitions
37
37
 
38
38
  ├── .github/workflows/ # GitHub Actions
39
39
  ├── docker/ # Docker files (job agent + event handler)
40
- ├── .pi/skills/ # Symlinks to active skills
41
- ├── pi-skills/ # All available Pi agent skills
40
+ ├── skills/ # All available agent skills
41
+ │ └── active/ # Symlinks to active skills (shared by Pi + Claude Code)
42
+ ├── .pi/skills → skills/active # Pi reads skills from here
43
+ ├── .claude/skills → skills/active # Claude Code reads skills from here
42
44
  ├── cron/ # Scripts for command-type cron actions
43
45
  ├── triggers/ # Scripts for command-type trigger actions
44
46
  ├── logs/ # Per-job output (logs/<JOB_ID>/job.md + session .jsonl)
@@ -290,9 +292,9 @@ SQLite via Drizzle ORM at `data/thepopebot.sqlite`. Auto-initialized and auto-mi
290
292
 
291
293
  ## Customization
292
294
 
293
- User-editable config files in `config/`: `SOUL.md` (personality), `EVENT_HANDLER.md` (LLM system prompt), `AGENT.md` (runtime docs), `JOB_SUMMARY.md` (job summaries), `HEARTBEAT.md` (self-monitoring), `PI_SKILL_GUIDE.md` (skill guide), `CRONS.json` (scheduled jobs), `TRIGGERS.json` (webhook triggers).
295
+ User-editable config files in `config/`: `SOUL.md` (personality), `EVENT_HANDLER.md` (LLM system prompt), `AGENT.md` (runtime docs), `JOB_SUMMARY.md` (job summaries), `HEARTBEAT.md` (self-monitoring), `SKILL_BUILDING_GUIDE.md` (skill guide), `CRONS.json` (scheduled jobs), `TRIGGERS.json` (webhook triggers).
294
296
 
295
- Skills in `pi-skills/` are activated by symlinking into `.pi/skills/`. Scripts for command-type actions go in `cron/` and `triggers/`.
297
+ Skills in `skills/` are activated by symlinking into `skills/active/`. Both `.pi/skills` and `.claude/skills` point to `skills/active/`. Scripts for command-type actions go in `cron/` and `triggers/`.
296
298
 
297
299
  ### Markdown includes and variables
298
300
 
@@ -302,4 +304,4 @@ Config markdown files support includes and built-in variables (processed by the
302
304
  |--------|-------------|
303
305
  | `{{ filepath.md }}` | Include another file (relative to project root, recursive with circular detection) |
304
306
  | `{{datetime}}` | Current ISO timestamp |
305
- | `{{skills}}` | Dynamic bullet list of active skill descriptions from `.pi/skills/*/SKILL.md` frontmatter — never hardcode skill names, this is resolved at runtime |
307
+ | `{{skills}}` | Dynamic bullet list of active skill descriptions from `skills/active/*/SKILL.md` frontmatter — never hardcode skill names, this is resolved at runtime |
@@ -10,7 +10,7 @@ You have four tools:
10
10
  - **`create_job`** — dispatch a job for autonomous execution
11
11
  - **`get_job_status`** — check on running or completed jobs
12
12
  - **`get_system_technical_specs`** — read the system architecture docs (event handler, Docker agent, APIs, config, deployment). Use before planning jobs that modify system configuration.
13
- - **`get_pi_skill_creation_guide`** — load the Pi skill creation guide (skill format, examples, activation, testing). Use when discussing or creating skills with the user.
13
+ - **`get_skill_building_guide`** — load the skill building guide (skill format, examples, activation, testing). Use when discussing or creating skills with the user.
14
14
 
15
15
  ---
16
16
 
@@ -29,17 +29,17 @@ These 7 tools are all Pi needs to accomplish most tasks. It can write code, inst
29
29
  ### What Pi can do with these tools
30
30
 
31
31
  - **Self-modification** — update config files in `config/` (CRONS.json, TRIGGERS.json, SOUL.md, EVENT_HANDLER.md, AGENT.md, etc.). Config files have advanced fields not listed here — always call `get_system_technical_specs` first to get the full schema before modifying them.
32
- - **Create new skills** — build new tools in `pi-skills/` and activate them with symlinks to `.pi/skills/`
32
+ - **Create new skills** — build new tools in `skills/` and activate them with symlinks in `skills/active/`
33
33
  - **Code changes** — add features, fix bugs, refactor, build entire applications
34
34
  - **Git** — commits changes, creates PRs automatically
35
35
 
36
- ### Active skills (extend Pi's abilities)
36
+ ### Active skills
37
37
 
38
- Skills are lightweight wrappers (usually bash scripts) that give Pi access to external services. Pi reads the skill documentation, then invokes them via bash.
38
+ Skills are lightweight wrappers (usually bash scripts) that give the agent access to external services. The agent reads the skill documentation, then invokes them via bash.
39
39
 
40
40
  {{skills}}
41
41
 
42
- If no skill exists for what the user needs, Pi can build more.
42
+ If no skill exists for what the user needs, the agent can build more.
43
43
 
44
44
  ### Writing good job descriptions
45
45
 
@@ -94,9 +94,9 @@ The job description text becomes Pi's task prompt:
94
94
 
95
95
  ## Skills
96
96
 
97
- Skills extend what Pi can do — they're lightweight wrappers (usually bash scripts) that give Pi access to external services. If a user wants something no current skill covers, suggest creating one.
97
+ Skills extend what the agent can do — they're lightweight wrappers (usually bash scripts) that give the agent access to external services. If a user wants something no current skill covers, suggest creating one.
98
98
 
99
- When discussing or creating skills, use `get_pi_skill_creation_guide` to load the detailed skill creation guide. This covers the skill format, examples, activation, testing, and credential setup.
99
+ When discussing or creating skills, use `get_skill_building_guide` to load the skill building guide. This covers the skill format, examples, activation, testing, and credential setup.
100
100
 
101
101
  ### Credential setup (handle in conversation, before creating the job)
102
102
 
@@ -200,12 +200,12 @@ Browser scraping:
200
200
  > Navigate to https://example.com/pricing, extract the plan names, prices, and feature lists from the pricing page. Save the data as JSON at `data/pricing.json`.
201
201
 
202
202
  New skill creation:
203
- > Create a new skill at `pi-skills/slack-post/`:
203
+ > Create a new skill at `skills/slack-post/`:
204
204
  >
205
- > 1. Create `SKILL.md` with frontmatter (name: slack-post, description: "Post messages to Slack channels via incoming webhook.") and usage docs referencing `{baseDir}/post.sh <message>`
205
+ > 1. Create `SKILL.md` with frontmatter (name: slack-post, description: "Post messages to Slack channels via incoming webhook.") and usage docs referencing `skills/slack-post/post.sh <message>`
206
206
  > 2. Create `post.sh` — bash script that takes a message argument, sends it to the Slack webhook URL via curl using $SLACK_WEBHOOK_URL. Make it executable.
207
- > 3. Activate: `ln -s ../../pi-skills/slack-post .pi/skills/slack-post`
208
- > 4. Test: run `post.sh "test message from thepopebot"` and verify successful delivery. Fix any issues before committing.
207
+ > 3. Activate: `ln -s ../slack-post skills/active/slack-post`
208
+ > 4. Test: run `skills/slack-post/post.sh "test message from thepopebot"` and verify successful delivery. Fix any issues before committing.
209
209
 
210
210
  ---
211
211
 
@@ -1,19 +1,19 @@
1
- # Skill Creation Guide
1
+ # Skill Building Guide
2
2
 
3
3
  ## What is a skill?
4
4
 
5
- Skills are lightweight wrappers that extend Pi's abilities. They live in `pi-skills/<skill-name>/` and are activated by symlinking to `.pi/skills/`.
5
+ Skills are lightweight wrappers that extend agent abilities. They live in `skills/<skill-name>/` and are activated by symlinking into `skills/active/`. Both Pi and Claude Code discover skills from the same shared directory.
6
6
 
7
7
  ## Skill structure
8
8
 
9
9
  - **`SKILL.md`** (required) — YAML frontmatter + markdown documentation
10
- - **Scripts** (optional) — prefer bash (.sh). Pi works primarily in bash.
10
+ - **Scripts** (optional) — prefer bash (.sh) for simplicity
11
11
  - **`package.json`** (optional) — only if Node.js dependencies are truly needed
12
12
 
13
13
  ## SKILL.md format
14
14
 
15
- The `description` from frontmatter appears in the event handler's system prompt under "Active skills."
16
- The `{baseDir}` placeholder is replaced at runtime with the skill's actual directory path.
15
+ The `description` from frontmatter appears in the system prompt under "Active skills."
16
+ Use project-root-relative paths in documentation (e.g., `skills/<skill-name>/script.sh`).
17
17
 
18
18
  ```
19
19
  ---
@@ -26,7 +26,7 @@ description: One sentence describing what the skill does and when to use it.
26
26
  ## Usage
27
27
 
28
28
  ```bash
29
- {baseDir}/script.sh <args>
29
+ skills/skill-name/script.sh <args>
30
30
  ```
31
31
  ```
32
32
 
@@ -34,7 +34,7 @@ description: One sentence describing what the skill does and when to use it.
34
34
 
35
35
  The built-in `transcribe` skill — a SKILL.md and a single bash script:
36
36
 
37
- **pi-skills/transcribe/SKILL.md:**
37
+ **skills/transcribe/SKILL.md:**
38
38
  ```
39
39
  ---
40
40
  name: transcribe
@@ -50,11 +50,11 @@ Requires GROQ_API_KEY environment variable.
50
50
 
51
51
  ## Usage
52
52
  ```bash
53
- {baseDir}/transcribe.sh <audio-file>
53
+ skills/transcribe/transcribe.sh <audio-file>
54
54
  ```
55
55
  ```
56
56
 
57
- **pi-skills/transcribe/transcribe.sh:**
57
+ **skills/transcribe/transcribe.sh:**
58
58
  ```bash
59
59
  #!/bin/bash
60
60
  if [ -z "$1" ]; then echo "Usage: transcribe.sh <audio-file>"; exit 1; fi
@@ -68,18 +68,18 @@ curl -s -X POST "https://api.groq.com/openai/v1/audio/transcriptions" \
68
68
 
69
69
  ## Example: Skill with Node.js dependencies
70
70
 
71
- The built-in `brave-search` skill uses Node.js for HTML parsing (jsdom, readability, turndown). It has a `package.json` and `.js` scripts. Pi runs `npm install` in the skill directory automatically. Use this pattern only when bash + curl isn't sufficient.
71
+ The built-in `brave-search` skill uses Node.js for HTML parsing (jsdom, readability, turndown). It has a `package.json` and `.js` scripts. Dependencies are installed automatically in Docker. Use this pattern only when bash + curl isn't sufficient.
72
72
 
73
73
  ## Activation
74
74
 
75
75
  After creating skill files, symlink to activate:
76
76
  ```bash
77
- ln -s ../../pi-skills/skill-name .pi/skills/skill-name
77
+ ln -s ../skill-name skills/active/skill-name
78
78
  ```
79
79
 
80
80
  ## Always build AND test in the same job
81
81
 
82
- Tell Pi to test the skill with real input after creating it and fix any issues before committing. Don't create untested skills.
82
+ Tell the agent to test the skill with real input after creating it and fix any issues before committing. Don't create untested skills.
83
83
 
84
84
  ## Credential setup
85
85
 
@@ -41,6 +41,14 @@ fi
41
41
 
42
42
  cd /job
43
43
 
44
+ # Install npm deps for active skills (native deps need correct Linux arch)
45
+ for skill_dir in /job/skills/active/*/; do
46
+ if [ -f "${skill_dir}package.json" ]; then
47
+ echo "Installing skill deps: $(basename "$skill_dir")"
48
+ (cd "$skill_dir" && npm install --omit=dev --no-package-lock)
49
+ fi
50
+ done
51
+
44
52
  # Setup logs
45
53
  LOG_DIR="/job/logs/${JOB_ID}"
46
54
  mkdir -p "${LOG_DIR}"
@@ -41,8 +41,8 @@ cd /job
41
41
  # Create temp directory for agent use (gitignored via tmp/)
42
42
  mkdir -p /job/tmp
43
43
 
44
- # Install npm deps for symlinked skills (native deps need correct Linux arch)
45
- for skill_dir in /job/.pi/skills/*/; do
44
+ # Install npm deps for active skills (native deps need correct Linux arch)
45
+ for skill_dir in /job/skills/active/*/; do
46
46
  if [ -f "${skill_dir}package.json" ]; then
47
47
  echo "Installing skill deps: $(basename "$skill_dir")"
48
48
  (cd "$skill_dir" && npm install --omit=dev --no-package-lock)
@@ -95,10 +95,10 @@ description: Short description shown to agent
95
95
  # Instructions
96
96
 
97
97
  Detailed instructions here...
98
- Helper files available at: {baseDir}/
98
+ Helper files available at: skills/skill-name/
99
99
  ```
100
100
 
101
- The `{baseDir}` placeholder is replaced with the skill's directory path at runtime.
101
+ Skills use project-root-relative paths (e.g., `skills/brave-search/search.js`).
102
102
 
103
103
  ## Requirements
104
104
 
@@ -20,20 +20,20 @@ Requires a Brave Search API account with a free subscription. A credit card is r
20
20
  ```
21
21
  5. Install dependencies (run once):
22
22
  ```bash
23
- cd {baseDir}
23
+ cd skills/brave-search
24
24
  npm install
25
25
  ```
26
26
 
27
27
  ## Search
28
28
 
29
29
  ```bash
30
- {baseDir}/search.js "query" # Basic search (5 results)
31
- {baseDir}/search.js "query" -n 10 # More results (max 20)
32
- {baseDir}/search.js "query" --content # Include page content as markdown
33
- {baseDir}/search.js "query" --freshness pw # Results from last week
34
- {baseDir}/search.js "query" --freshness 2024-01-01to2024-06-30 # Date range
35
- {baseDir}/search.js "query" --country DE # Results from Germany
36
- {baseDir}/search.js "query" -n 3 --content # Combined options
30
+ skills/brave-search/search.js "query" # Basic search (5 results)
31
+ skills/brave-search/search.js "query" -n 10 # More results (max 20)
32
+ skills/brave-search/search.js "query" --content # Include page content as markdown
33
+ skills/brave-search/search.js "query" --freshness pw # Results from last week
34
+ skills/brave-search/search.js "query" --freshness 2024-01-01to2024-06-30 # Date range
35
+ skills/brave-search/search.js "query" --country DE # Results from Germany
36
+ skills/brave-search/search.js "query" -n 3 --content # Combined options
37
37
  ```
38
38
 
39
39
  ### Options
@@ -51,7 +51,7 @@ Requires a Brave Search API account with a free subscription. A credit card is r
51
51
  ## Extract Page Content
52
52
 
53
53
  ```bash
54
- {baseDir}/content.js https://example.com/article
54
+ skills/brave-search/content.js https://example.com/article
55
55
  ```
56
56
 
57
57
  Fetches a URL and extracts readable content as markdown.
@@ -12,15 +12,15 @@ Chrome DevTools Protocol tools for agent-assisted web automation. These tools co
12
12
  Run once before first use:
13
13
 
14
14
  ```bash
15
- cd {baseDir}/browser-tools
15
+ cd skills/browser-tools
16
16
  npm install
17
17
  ```
18
18
 
19
19
  ## Start Chrome
20
20
 
21
21
  ```bash
22
- {baseDir}/browser-start.js # Fresh profile
23
- {baseDir}/browser-start.js --profile # Copy user's profile (cookies, logins)
22
+ skills/browser-tools/browser-start.js # Fresh profile
23
+ skills/browser-tools/browser-start.js --profile # Copy user's profile (cookies, logins)
24
24
  ```
25
25
 
26
26
  Launch Chrome with remote debugging on `:9222`. Use `--profile` to preserve user's authentication state.
@@ -28,8 +28,8 @@ Launch Chrome with remote debugging on `:9222`. Use `--profile` to preserve user
28
28
  ## Navigate
29
29
 
30
30
  ```bash
31
- {baseDir}/browser-nav.js https://example.com
32
- {baseDir}/browser-nav.js https://example.com --new
31
+ skills/browser-tools/browser-nav.js https://example.com
32
+ skills/browser-tools/browser-nav.js https://example.com --new
33
33
  ```
34
34
 
35
35
  Navigate to URLs. Use `--new` flag to open in a new tab instead of reusing current tab.
@@ -37,8 +37,8 @@ Navigate to URLs. Use `--new` flag to open in a new tab instead of reusing curre
37
37
  ## Evaluate JavaScript
38
38
 
39
39
  ```bash
40
- {baseDir}/browser-eval.js 'document.title'
41
- {baseDir}/browser-eval.js 'document.querySelectorAll("a").length'
40
+ skills/browser-tools/browser-eval.js 'document.title'
41
+ skills/browser-tools/browser-eval.js 'document.querySelectorAll("a").length'
42
42
  ```
43
43
 
44
44
  Execute JavaScript in the active tab. Code runs in async context. Use this to extract data, inspect page state, or perform DOM operations programmatically.
@@ -46,7 +46,7 @@ Execute JavaScript in the active tab. Code runs in async context. Use this to ex
46
46
  ## Screenshot
47
47
 
48
48
  ```bash
49
- {baseDir}/browser-screenshot.js
49
+ skills/browser-tools/browser-screenshot.js
50
50
  ```
51
51
 
52
52
  Capture current viewport and return temporary file path. Use this to visually inspect page state or verify UI changes.
@@ -54,7 +54,7 @@ Capture current viewport and return temporary file path. Use this to visually in
54
54
  ## Pick Elements
55
55
 
56
56
  ```bash
57
- {baseDir}/browser-pick.js "Click the submit button"
57
+ skills/browser-tools/browser-pick.js "Click the submit button"
58
58
  ```
59
59
 
60
60
  **IMPORTANT**: Use this tool when the user wants to select specific DOM elements on the page. This launches an interactive picker that lets the user click elements to select them. The user can select multiple elements (Cmd/Ctrl+Click) and press Enter when done. The tool returns CSS selectors for the selected elements.
@@ -67,7 +67,7 @@ Common use cases:
67
67
  ## Cookies
68
68
 
69
69
  ```bash
70
- {baseDir}/browser-cookies.js
70
+ skills/browser-tools/browser-cookies.js
71
71
  ```
72
72
 
73
73
  Display all cookies for the current tab including domain, path, httpOnly, and secure flags. Use this to debug authentication issues or inspect session state.
@@ -75,7 +75,7 @@ Display all cookies for the current tab including domain, path, httpOnly, and se
75
75
  ## Extract Page Content
76
76
 
77
77
  ```bash
78
- {baseDir}/browser-content.js https://example.com
78
+ skills/browser-tools/browser-content.js https://example.com
79
79
  ```
80
80
 
81
81
  Navigate to a URL and extract readable content as markdown. Uses Mozilla Readability for article extraction and Turndown for HTML-to-markdown conversion. Works on pages with JavaScript content (waits for page to load).
@@ -174,7 +174,7 @@ Extract structured state in one call:
174
174
  If DOM updates after actions, add a small delay with bash:
175
175
 
176
176
  ```bash
177
- sleep 0.5 && {baseDir}/browser-eval.js '...'
177
+ sleep 0.5 && skills/browser-tools/browser-eval.js '...'
178
178
  ```
179
179
 
180
180
  ### Investigate Before Interacting
@@ -6,7 +6,7 @@ description: List available LLM-accessible credentials. Use when you need API ke
6
6
  # List Available Secrets
7
7
 
8
8
  ```bash
9
- /job/.pi/skills/llm-secrets/llm-secrets.js
9
+ skills/llm-secrets/llm-secrets.js
10
10
  ```
11
11
 
12
12
  Shows the names of available secret keys (not values). Output example:
@@ -8,5 +8,5 @@ description: Use when a job requires modifying the agent's own code, configurati
8
8
  Before making any changes, read the project documentation for a full understanding of the system architecture:
9
9
 
10
10
  ```bash
11
- cat /job/CLAUDE.md
11
+ cat CLAUDE.md
12
12
  ```
File without changes