# badlogic/pi-skills architecture

> Architecture diagram of the GitHub repository badlogic/pi-skills, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/badlogic/pi-skills
- Repository: https://github.com/badlogic/pi-skills

## Overview

pi-skills is a collection of agent-invoked skills, not a single application: an agent selects a capability and runs its instructions or command-line helper to obtain results from an external service or browser. The README documents search, browser automation, Google Calendar/Drive/Gmail, transcription, VS Code, and YouTube transcript capabilities. Sampled code shows Brave search and extraction, several independent Chrome tools, Hacker News scraping, and transcript retrieval. Google, transcription, and VS Code implementations were not sampled; their nodes reflect README descriptions and skill paths only.

Main entry points: [`brave-search/search.js`](https://github.com/badlogic/pi-skills/blob/main/brave-search/search.js) (Web search), [`gccli/SKILL.md`](https://github.com/badlogic/pi-skills/blob/main/gccli/SKILL.md) (Calendar skill), [`gdcli/SKILL.md`](https://github.com/badlogic/pi-skills/blob/main/gdcli/SKILL.md) (Drive skill), [`gmcli/SKILL.md`](https://github.com/badlogic/pi-skills/blob/main/gmcli/SKILL.md) (Gmail skill)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_search["Search and extraction"]
  node_brave_skill["Brave skill<br/>[SKILL.md]"]
  node_brave_search["Web search<br/>[search.js]"]
  node_brave_content["Page extraction<br/>[content.js]"]
end

subgraph group_browser["Browser tools"]
  node_browser_skill["Browser skill<br/>[SKILL.md]"]
  node_browser_start["Chrome startup<br/>[browser-start.js]"]
  node_browser_nav["Navigation<br/>[browser-nav.js]"]
  node_browser_eval["Page evaluation<br/>[browser-eval.js]"]
  node_browser_pick["Element picking<br/>[browser-pick.js]"]
  node_browser_content["Browser extraction<br/>[browser-content.js]"]
  node_browser_cookies["Cookie inspection<br/>[browser-cookies.js]"]
  node_browser_screenshot["Screenshots"]
  node_hn_scraper["HN scraper"]
end

subgraph group_google["Google services"]
  node_calendar_skill["Calendar skill<br/>[SKILL.md]"]
  node_drive_skill["Drive skill<br/>[SKILL.md]"]
  node_gmail_skill["Gmail skill<br/>[SKILL.md]"]
end

subgraph group_media["Media tools"]
  node_transcribe_skill["Transcription skill<br/>[SKILL.md]"]
  node_transcribe_script["Transcription helper<br/>[transcribe.sh]"]
  node_youtube_skill["YouTube skill<br/>[SKILL.md]"]
  node_youtube_transcript["Transcript fetch<br/>[transcript.js]"]
end

subgraph group_editor["Editor integration"]
  node_vscode_skill["VS Code skill<br/>[SKILL.md]"]
end

node_agent(("Coding agent"))
node_brave_api{{"Brave Search API"}}
node_web_pages{{"Web pages"}}
node_chrome{{"Chrome CDP"}}
node_hn{{"Hacker News"}}
node_groq{{"Groq Whisper API"}}
node_youtube{{"YouTube"}}

node_agent -->|"selects skill"| node_brave_skill
node_agent -->|"selects skill"| node_browser_skill
node_agent -->|"selects skill"| node_calendar_skill
node_agent -->|"selects skill"| node_drive_skill
node_agent -->|"selects skill"| node_gmail_skill
node_agent -->|"selects skill"| node_transcribe_skill
node_agent -->|"selects skill"| node_youtube_skill
node_agent -->|"selects skill"| node_vscode_skill
node_brave_search -->|"queries"| node_brave_api
node_brave_search -->|"fetches pages"| node_web_pages
node_brave_content -->|"fetches page"| node_web_pages
node_browser_start -->|"starts Chrome"| node_chrome
node_browser_nav -->|"controls tabs"| node_chrome
node_browser_eval -->|"evaluates page"| node_chrome
node_browser_pick -->|"selects elements"| node_chrome
node_browser_content -->|"reads page"| node_chrome
node_browser_cookies -->|"reads cookies"| node_chrome
node_browser_screenshot -->|"captures screen"| node_chrome
node_hn_scraper -->|"scrapes front page"| node_hn
node_youtube_transcript -->|"fetches transcript"| node_youtube
node_transcribe_script -.->|"transcribes audio"| node_groq
node_calendar_skill -.->|"provides instructions"| node_agent
node_drive_skill -.->|"provides instructions"| node_agent
node_gmail_skill -.->|"provides instructions"| node_agent
node_vscode_skill -.->|"provides instructions"| node_agent

click node_brave_skill "https://github.com/badlogic/pi-skills/blob/main/brave-search/SKILL.md"
click node_brave_search "https://github.com/badlogic/pi-skills/blob/main/brave-search/search.js"
click node_brave_content "https://github.com/badlogic/pi-skills/blob/main/brave-search/content.js"
click node_browser_skill "https://github.com/badlogic/pi-skills/blob/main/browser-tools/SKILL.md"
click node_browser_start "https://github.com/badlogic/pi-skills/blob/main/browser-tools/browser-start.js"
click node_browser_nav "https://github.com/badlogic/pi-skills/blob/main/browser-tools/browser-nav.js"
click node_browser_eval "https://github.com/badlogic/pi-skills/blob/main/browser-tools/browser-eval.js"
click node_browser_pick "https://github.com/badlogic/pi-skills/blob/main/browser-tools/browser-pick.js"
click node_browser_content "https://github.com/badlogic/pi-skills/blob/main/browser-tools/browser-content.js"
click node_browser_cookies "https://github.com/badlogic/pi-skills/blob/main/browser-tools/browser-cookies.js"
click node_browser_screenshot "https://github.com/badlogic/pi-skills/blob/main/browser-tools/browser-screenshot.js"
click node_hn_scraper "https://github.com/badlogic/pi-skills/blob/main/browser-tools/browser-hn-scraper.js"
click node_calendar_skill "https://github.com/badlogic/pi-skills/blob/main/gccli/SKILL.md"
click node_drive_skill "https://github.com/badlogic/pi-skills/blob/main/gdcli/SKILL.md"
click node_gmail_skill "https://github.com/badlogic/pi-skills/blob/main/gmcli/SKILL.md"
click node_transcribe_skill "https://github.com/badlogic/pi-skills/blob/main/transcribe/SKILL.md"
click node_transcribe_script "https://github.com/badlogic/pi-skills/blob/main/transcribe/transcribe.sh"
click node_youtube_skill "https://github.com/badlogic/pi-skills/blob/main/youtube-transcript/SKILL.md"
click node_youtube_transcript "https://github.com/badlogic/pi-skills/blob/main/youtube-transcript/transcript.js"
click node_vscode_skill "https://github.com/badlogic/pi-skills/blob/main/vscode/SKILL.md"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_brave_skill,node_brave_search,node_brave_content toneBlue
class node_browser_skill,node_browser_start,node_browser_nav,node_browser_eval,node_browser_pick,node_browser_content,node_browser_cookies,node_browser_screenshot,node_hn_scraper toneAmber
class node_calendar_skill,node_drive_skill,node_gmail_skill,node_brave_api,node_groq toneMint
class node_transcribe_skill,node_transcribe_script,node_youtube_skill,node_youtube_transcript toneRose
class node_vscode_skill,node_agent,node_web_pages,node_chrome,node_hn,node_youtube toneIndigo
```

## Components

### Search and extraction

- [Brave skill](https://github.com/badlogic/pi-skills/blob/main/brave-search/SKILL.md): `brave-search/SKILL.md`
- [Web search](https://github.com/badlogic/pi-skills/blob/main/brave-search/search.js): `brave-search/search.js`
- [Page extraction](https://github.com/badlogic/pi-skills/blob/main/brave-search/content.js): `brave-search/content.js`

### Browser tools

- [Browser skill](https://github.com/badlogic/pi-skills/blob/main/browser-tools/SKILL.md): `browser-tools/SKILL.md`
- [Chrome startup](https://github.com/badlogic/pi-skills/blob/main/browser-tools/browser-start.js): `browser-tools/browser-start.js`
- [Navigation](https://github.com/badlogic/pi-skills/blob/main/browser-tools/browser-nav.js): `browser-tools/browser-nav.js`
- [Page evaluation](https://github.com/badlogic/pi-skills/blob/main/browser-tools/browser-eval.js): `browser-tools/browser-eval.js`
- [Element picking](https://github.com/badlogic/pi-skills/blob/main/browser-tools/browser-pick.js): `browser-tools/browser-pick.js`
- [Browser extraction](https://github.com/badlogic/pi-skills/blob/main/browser-tools/browser-content.js): `browser-tools/browser-content.js`
- [Cookie inspection](https://github.com/badlogic/pi-skills/blob/main/browser-tools/browser-cookies.js): `browser-tools/browser-cookies.js`
- [Screenshots](https://github.com/badlogic/pi-skills/blob/main/browser-tools/browser-screenshot.js): `browser-tools/browser-screenshot.js`
- [HN scraper](https://github.com/badlogic/pi-skills/blob/main/browser-tools/browser-hn-scraper.js): `browser-tools/browser-hn-scraper.js`

### Google services

- [Calendar skill](https://github.com/badlogic/pi-skills/blob/main/gccli/SKILL.md): `gccli/SKILL.md`
- [Drive skill](https://github.com/badlogic/pi-skills/blob/main/gdcli/SKILL.md): `gdcli/SKILL.md`
- [Gmail skill](https://github.com/badlogic/pi-skills/blob/main/gmcli/SKILL.md): `gmcli/SKILL.md`

### Media tools

- [Transcription skill](https://github.com/badlogic/pi-skills/blob/main/transcribe/SKILL.md): `transcribe/SKILL.md`
- [Transcription helper](https://github.com/badlogic/pi-skills/blob/main/transcribe/transcribe.sh): `transcribe/transcribe.sh`
- [YouTube skill](https://github.com/badlogic/pi-skills/blob/main/youtube-transcript/SKILL.md): `youtube-transcript/SKILL.md`
- [Transcript fetch](https://github.com/badlogic/pi-skills/blob/main/youtube-transcript/transcript.js): `youtube-transcript/transcript.js`

### Editor integration

- [VS Code skill](https://github.com/badlogic/pi-skills/blob/main/vscode/SKILL.md): `vscode/SKILL.md`

### Other components

- **Coding agent**
- **Brave Search API**
- **Web pages**
- **Chrome CDP**
- **Hacker News**
- **Groq Whisper API**
- **YouTube**

## Connections

- Coding agent → Brave skill: selects skill (evidence: `README.md`)
- Coding agent → Browser skill: selects skill (evidence: `README.md`)
- Coding agent → Calendar skill: selects skill (evidence: `README.md`)
- Coding agent → Drive skill: selects skill (evidence: `README.md`)
- Coding agent → Gmail skill: selects skill (evidence: `README.md`)
- Coding agent → Transcription skill: selects skill (evidence: `README.md`)
- Coding agent → YouTube skill: selects skill (evidence: `README.md`)
- Coding agent → VS Code skill: selects skill (evidence: `README.md`)
- Web search → Brave Search API: queries (evidence: `brave-search/search.js`)
- Web search → Web pages: fetches pages (evidence: `brave-search/search.js`)
- Page extraction → Web pages: fetches page (evidence: `brave-search/content.js`)
- Chrome startup → Chrome CDP: starts Chrome (evidence: `browser-tools/browser-start.js`)
- Navigation → Chrome CDP: controls tabs (evidence: `browser-tools/browser-nav.js`)
- Page evaluation → Chrome CDP: evaluates page (evidence: `browser-tools/browser-eval.js`)
- Element picking → Chrome CDP: selects elements (evidence: `browser-tools/browser-pick.js`)
- Browser extraction → Chrome CDP: reads page (evidence: `browser-tools/browser-content.js`)
- Cookie inspection → Chrome CDP: reads cookies (evidence: `browser-tools/browser-cookies.js`)
- Screenshots → Chrome CDP: captures screen (evidence: `browser-tools/browser-screenshot.js`)
- HN scraper → Hacker News: scrapes front page (evidence: `browser-tools/browser-hn-scraper.js`)
- Transcript fetch → YouTube: fetches transcript (evidence: `youtube-transcript/transcript.js`)
- Transcription helper → Groq Whisper API: transcribes audio
- Calendar skill → Coding agent: provides instructions
- Drive skill → Coding agent: provides instructions
- Gmail skill → Coding agent: provides instructions
- VS Code skill → Coding agent: provides instructions
