pi-share — скилл для Claude Code: что делает и установка
Скилл pi-share для Claude Code загружает расшаренные сессии pi и разбирает историю диалога. Анализирует сообщения, вызовы инструментов и действия человека.
Apache-2.0 125 установок ★ 3 224 обновлён 2026-09-27
npx skills add mitsuhiko/agent-stuff --skill pi-share -a claude-codeЧто делает pi-share
pi-share принимает URL сессии или gist ID, получает экспорт из GitHub Gist и извлекает данные разговора. Результат включает заголовок сессии, сообщения, смены модели, изменения уровня рассуждений и события сокращения контекста.
Внутри есть скрипт fetch-session.mjs. Он умеет выводить всю сессию, только заголовок, записи в формате JSON Lines, системный промпт или описания инструментов. Флаг --human-summary формирует краткий разбор действий человека: целей, повторных запросов, правок и стиля промптинга.
Для --human-summary используется claude-haiku-4-5 через pi -p, поэтому этот режим требует доступного pi. Обычная загрузка и разбор сессии выполняются отдельными режимами скрипта.
Какие задачи решает
- загрузить историю сессии по gist ID
- вытащить сообщения и вызовы инструментов
- получить системный промпт из экспорта
- посмотреть описания доступных инструментов
- разобрать действия человека в сессии
Примеры запросов агенту
- Загрузи полную историю сессии по переданному gist ID.
- Покажи записи сессии в формате JSON Lines и оставь только сообщения пользователя.
- Сделай человеческое резюме сессии с помощью
--human-summary.
Как установить pi-share
1Через Skills CLI (Vercel)
npx skills add mitsuhiko/agent-stuff --skill pi-share -a claude-code2Вручную: положить файлы
~/.claude/skills/pi-share/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/pi-share/
1Через Skills CLI (Vercel)
npx skills add mitsuhiko/agent-stuff --skill pi-share -a codex2Вручную: положить файлы
.agents/skills/pi-share/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add mitsuhiko/agent-stuff --skill pi-share -a cursor2Вручную: положить файлы
.cursor/skills/pi-share/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install mitsuhiko/agent-stuff skills/pi-share2Вручную: положить файлы
.github/skills/pi-share/SKILL.md1Через Skills CLI (Vercel)
npx skills add mitsuhiko/agent-stuff --skill pi-share -a gemini-cli2Командой платформы
gemini skills install https://github.com/mitsuhiko/agent-stuff --path skills/pi-shareВручную: положить файлы
.devin/skills/pi-share/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add mitsuhiko/agent-stuff --skill pi-share -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о pi-share
Как установить pi-share в Claude Code?
Выполни npx skills add mitsuhiko/agent-stuff --skill pi-share -a claude-code, затем проверь файл ~/.claude/skills/pi-share/SKILL.md.
Что делает pi-share?
Скилл получает экспорт сессии из GitHub Gist, декодирует данные и извлекает историю разговора. Он также умеет отдельно выводить заголовок, записи, системный промпт и инструменты.
Что нужно для режима --human-summary?
Этот режим анализирует сокращённую стенограмму через pi -p и использует claude-haiku-4-5. Для него нужен доступный pi.
Исходный текст
SKILL.md · Apache-2.0
---
name: pi-share
description: "Load and parse session transcripts from shittycodingagent.ai/buildwithpi.ai/buildwithpi.com/pi.dev (pi-share) URLs. Fetches gists, decodes embedded session data, and extracts conversation history."
---
# pi-share / buildwithpi Session Loader
Load and parse session transcripts from pi-share URLs (shittycodingagent.ai, buildwithpi.ai, buildwithpi.com, pi.dev).
## When to Use
**Loading sessions:** Use this skill when the user provides a URL like:
- `https://shittycodingagent.ai/session/?<gist_id>`
- `https://buildwithpi.ai/session/?<gist_id>`
- `https://buildwithpi.com/session/?<gist_id>`
- `https://pi.dev/session/?<gist_id>`
- `https://pi.dev/session/#<gist_id>`
- Or just a gist ID like `46aee35206aefe99257bc5d5e60c6121`
- Or hash-prefixed shorthand like `#46aee35206aefe99257bc5d5e60c6121`
**Human summaries:** Use `--human-summary` when the user asks you to:
- Summarize what a human did in a pi/coding agent session
- Understand how a user interacted with an agent
- Analyze user behavior, steering patterns, or prompting style
- Get a human-centric view of a session (not what the agent did, but what the human did)
The human summary focuses on: initial goals, re-prompts, steering/corrections, interventions, and overall prompting style.
## How It Works
1. Session exports are stored as GitHub Gists
2. The URL contains a gist ID after the `?`
3. The gist contains a `session.html` file with base64-encoded session data
4. The helper script fetches and decodes this to extract the full conversation
## Usage
```bash
# Get full session data (default)
node ~/.pi/agent/skills/pi-share/fetch-session.mjs "<url-or-gist-id>"
# Get just the header
node ~/.pi/agent/skills/pi-share/fetch-session.mjs <gist-id> --header
# Get entries as JSON lines (one entry per line)
node ~/.pi/agent/skills/pi-share/fetch-session.mjs <gist-id> --entries
# Get the system prompt
node ~/.pi/agent/skills/pi-share/fetch-session.mjs <gist-id> --system
# Get tool definitions
node ~/.pi/agent/skills/pi-share/fetch-session.mjs <gist-id> --tools
# Get human-centric summary (what did the human do in this session?)
node ~/.pi/agent/skills/pi-share/fetch-session.mjs <gist-id> --human-summary
```
## Human Summary
The `--human-summary` flag generates a ~300 word summary focused on the human's experience:
- What was their initial goal?
- How often did they re-prompt or steer the agent?
- What kind of interventions did they make? (corrections, clarifications, frustration)
- How specific or vague were their instructions?
This uses claude-haiku-4-5 via `pi -p` to analyze the condensed session transcript.
## Session Data Structure
The decoded session contains:
```typescript
interface SessionData {
header: {
type: "session";
version: number;
id: string; // Session UUID
timestamp: string; // ISO timestamp
cwd: string; // Working directory
};
entries: SessionEntry[]; // Conversation entries (JSON lines format)
leafId: string | null; // Current branch leaf
systemPrompt?: string; // System prompt text
tools?: { name: string; description: string }[];
}
```
Entry types include:
- `message` - User/assistant/toolResult messages with content blocks
- `model_change` - Model switches
- `thinking_level_change` - Thinking mode changes
- `compaction` - Context compaction events
Message content block types:
- `text` - Text content
- `toolCall` - Tool invocation with `toolName` and `args`
- `thinking` - Model thinking content
- `image` - Embedded images
## Example: Analyze a Session
```bash
# Pipe entries through jq to filter
node ~/.pi/agent/skills/pi-share/fetch-session.mjs "<url>" --entries | jq 'select(.type == "message" and .message.role == "user")'
# Count tool calls
node ~/.pi/agent/skills/pi-share/fetch-session.mjs "<url>" --entries | jq -s '[.[] | select(.type == "message") | .message.content[]? | select(.type == "toolCall")] | length'
```
© mitsuhiko · Apache-2.0 · mitsuhiko/agent-stuff