本文へ移動
cccskills
無料GitHub で公開

pi-dev-rules

Authoritative reference for Pi (@earendil-works/pi-coding-agent): install, configure, run, and extend it. Use for the CLI and configuration, providers and models, extensions, skills, MCP, the SDK/RPC, security and trust, design philosophy, and the pi repository's internals and contribution rules.

インストール方法を見る

含まれるファイル(26)

  • SKILL.md12.1 KB
  • .skillspector-baseline.yaml2.5 KB
  • assets/workflow-en.drawio4.3 KB
  • assets/workflow-en.png139.8 KB
  • assets/workflow-zh.drawio4.3 KB
  • assets/workflow-zh.png124.5 KB
  • references/agent-harness.md75.4 KB
  • references/changelog.md5.1 KB
  • references/chord.md64.0 KB
  • references/cli-and-usage.md51.0 KB
  • references/development.md22.1 KB
  • references/durable-spec.md231.9 KB
  • references/extending-pi.md49.2 KB
  • references/mcp.md19.4 KB
  • references/philosophy-and-design.md11.1 KB
  • references/platform-setup.md20.0 KB
  • references/programmatic.md63.0 KB
  • references/providers-and-models.md35.2 KB
  • references/security-and-containerization.md14.1 KB
  • references/session-format.md22.8 KB
  • references/settings-and-compaction.md39.8 KB
  • references/tui-components.md8.8 KB
  • scripts/build-changelog.py5.1 KB
  • scripts/build-references.py11.0 KB
  • scripts/README.md1.1 KB
  • scripts/refresh.sh1.3 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Pi Dev Rules

Pi is a minimal terminal coding harness: lightweight core, extended through TypeScript customizations. Package: @earendil-works/pi-coding-agent. Maintained by Earendil Inc. (MIT). This skill mirrors the official docs at https://pi.dev/docs/latest so you can answer Pi questions and build Pi customizations without re-fetching. Four further bundles describe material that has no page on the website: the internal monorepo architecture (the Chord composition runtime, the durable agent harness with its Pico5 specification, the agent core, telemetry) and the repository's own development/contribution rules. They are built from the pi source tree.

When to use this skill

  • Installing, authenticating, or launching Pi; explaining CLI flags / slash commands.
  • Configuring providers, API keys, custom models (models.json), or proxies.
  • Editing settings.json, keybindings, themes; understanding sessions & compaction.
  • Understanding the project-trust security model and running Pi in containers/sandboxes.
  • Extending Pi: writing extensions, skills, prompt templates, packages, custom providers, TUI UI.
  • Checking Pi's version history / what changed in a recent release.
  • Driving Pi programmatically via the SDK, RPC mode, or JSON event-stream mode.
  • Setting up Pi on Windows/Termux/tmux/specific terminals, or building it from source.
  • Understanding why Pi is designed the way it is: the creator's philosophy (minimal core, 4 tools, YOLO by default; the 2025-11-30 manifesto lists MCP, plan mode, to-dos, and sub-agents as deliberate non-features, and built-in MCP landed later, on 2026-09-29) and how to configure or extend Pi along those lines instead of against them.
  • Working inside the pi monorepo: the @earendil-works/chord composition runtime (plugin loading, service catalogue, RPC transport, delta/replicated state), the durable harness (@earendil-works/pi-durable, Pico5), the agent core, telemetry, and the experimental server/client/protocol packages.

Reference index: load the file you need

FileCovers
references/cli-and-usage.mdInstall, auth, launching, how Pi works (agent loop, context assembly, session tree), the full CLI reference (commands, flags, modes), slash commands, message queue, context files, environment variables (incl. bash-tool PI_SESSION_*/PI_MODEL), sessions, keybindings
references/providers-and-models.mdSubscription & API-key providers (30+), llama.cpp local router, auth.json (+ scoped env), cloud providers (Azure/Bedrock/Vertex/Cloudflare), custom models in models.json, compat, custom-provider extensions
references/settings-and-compaction.mdConfiguration layout (agent directory vs project .pi/, context files), settings.json schema + example, trust/analytics/retry/transport keys, compaction (auto/manual) and branch summarization
references/extending-pi.mdExtension API (events, tools, commands, UI), Skills (SKILL.md), Prompt Templates, Themes, Packages, virtual models (pi.registerVirtualModel)
references/mcp.mdBuilt-in MCP support (2026-09-29): mcp.json global and project servers, stdio vs streamable HTTP, pi mcp add/remove/list, OAuth sign-in, exposure modes (codemode, codemode-deferred, deferred, direct, hidden) with toolExposure, codemode/tool_search tools, resources, permissions, servers from extensions, SDK wiring
references/tui-components.mdTUI component system for custom extension/tool UIs (components, overlays, theming, custom editor)
references/security-and-containerization.mdProject-trust model (trust.json, defaultProjectTrust), no built-in sandbox, Gondolin micro-VM, Docker, OpenShell, Docker Sandboxes
references/session-format.mdSession JSONL schema: versions, content blocks, entry types, tree/context building, SessionManager API, plus the model-facing message types
references/programmatic.mdSDK, CLI integration (interactive/print/JSON/RPC mode choice, RpcClient, fork-and-rebrand), JSON event-stream mode, RPC protocol, RPC command reference, RPC extension UI
references/platform-setup.mdWindows, Termux, tmux, per-terminal modified-Enter setup, shell aliases
references/development.mdMonorepo package list, build-from-source and standalone-binary builds, supply-chain rules, AGENTS.md development rules, the CONTRIBUTING.md gate
references/philosophy-and-design.mdCreator Mario Zechner's design manifesto (blog, 2025-11-30; manually curated, not auto-built): minimal prompt <1000 tokens, 4 tools, YOLO by default, the non-features it lists (MCP/plan mode/to-dos/sub-agents/background bash) with their intended alternatives and the MCP entry annotated as superseded since 2026-09-29, multi-provider architecture, Terminal-Bench 2.0 results
references/chord.md@earendil-works/chord: plugin loading/composition/bundling, the service catalogue, RPC transport, bundleFacetPackage + facet bundle loaders, and chord/delta replicated latest-value state. Built from packages/chord/{README.md,PLANNING.md,src/delta/README.md}; PLANNING.md is a plan, not a frozen API
references/agent-harness.mdInternal runtime packages: @earendil-works/pi-durable (durable conversation/task/document harness, experimental API, stored before shown), @earendil-works/pi-agent-core (tool calling and state), @earendil-works/pi-telemetry (vendor-neutral telemetry contracts, adapters, typed schemas). Built from the three package READMEs; not user docs
references/durable-spec.mdThe normative Pico5 specification behind pi-durable (4610 lines): records and lifetimes, documents and mutation ownership, tasks and the effect sandwich, submissions and inbox, extensions/hooks/tools, telemetry. A design document for an experimental package, not a frozen API
references/changelog.mdRelease history: the last 25 versions with their headline change, extracted from packages/coding-agent/CHANGELOG.md (283 release sections; read the file in the checkout for the full text)

Starter plugins

Every Pi user should install these three (same author, battle-tested):

pi install npm:pi-subagents       # subagents / loop / chain / parallel
pi install npm:pi-lens            # real-time LSP diagnostics
pi install npm:pi-web-access      # web search, URL fetch, YouTube, PDF

Then pi list to verify, restart Pi. MCP needs no package: it is built in since 2026-09-29 (see references/mcp.md). An extension that registers /mcp, such as pi-mcp-adapter, replaces the built-in support instead of adding to it.

Cheat sheet

curl -fsSL https://pi.dev/install.sh | sh                         # install (pins dependencies)
npm install -g --ignore-scripts @earendil-works/pi-coding-agent   # npm alternative (no pinned transitive deps)
export ANTHROPIC_API_KEY=sk-ant-...                               # or run /login in-session
cd /path/to/project && pi                                          # start interactive (may prompt to trust the project)

pi update                                 # update Pi itself (pi update self / pi update --self are aliases)
pi list                                   # list installed packages
pi -c                       # continue most recent session
pi -r                       # browse/resume sessions
pi --session <path|id>      # open specific session
pi --fork <path|id>         # fork a session
pi --no-session             # ephemeral (no save)
pi -a / -na                 # trust / don't trust project-local files for this run

pi -p "Summarize this codebase"                 # print mode (non-interactive)
pi @README.md "Summarize this"                  # attach files/images with @
cat file | pi -p "..."                          # pipe stdin
pi --provider openai --model gpt-4o "..."       # pick provider/model
pi --model sonnet:high "..."                    # model:thinkingLevel
pi --tools read,grep,find,ls -p "..."           # allowlist tools (-xt to exclude)
pi --mode json "..." | jq -c 'select(.type=="message_end")'   # JSON stream
pi --mode rpc                                   # JSON-RPC over stdin/stdout

# In-editor: @file (fuzzy), !cmd (run+send), !!cmd (run, hidden), /command, Ctrl+L model, Shift+Tab thinking, Ctrl+X copy
# While the agent runs: Enter queues a steering msg, Alt+Enter a follow-up, Esc aborts + restores

Key locations (global ~/.pi/agent/, project .pi/): settings.json, auth.json, models.json, keybindings.json, trust.json, AGENTS.md, SYSTEM.md, extensions/, skills/, prompts/, themes/, sessions/.

Hard rules

  • Install package name is exactly @earendil-works/pi-coding-agent. The pi.dev installer (curl -fsSL https://pi.dev/install.sh | sh) pins dependencies and is the recommended path since 1.0.1; a global npm install needs --ignore-scripts and pins nothing.
  • Project context file is AGENTS.md (Pi also reads CLAUDE.md); put it in the project root.
  • Extensions run with full system permissions: treat them as trusted code; gate dangerous ops (rm, sudo, sensitive paths) with ctx.ui.confirm or a tool_call block handler.
  • Project trust is an input-loading guard, not a sandbox. Pi ships no built-in sandbox; a project is "trusted" only to decide whether to load its .pi/ resources (settings/extensions/skills/ prompts/themes); decisions live in ~/.pi/agent/trust.json, governed by defaultProjectTrust (ask/always/never), overridable per run with --approve/--no-approve. For untrusted repos or unattended runs, isolate with a container/VM (Gondolin/Docker/OpenShell); don't mount host ~/.pi/agent unless the sandbox should see host credentials.
  • MCP is built in since 2026-09-29, configured in ~/.pi/agent/mcp.json or a project .pi/ mcp.json; the project file is read only after the project is trusted, because stdio servers run commands. MCP calls go through the tool pipeline, so tool_call handlers and permission gates apply (codemode calls carry parentToolCallId). Installing an extension that registers /mcp (pi-mcp-adapter) disables the built-in support; disable it deliberately with "extensions": ["-builtin:mcp"] or pi config.
  • In extension/SDK tools: throw on error, never return an error flag. Pi wraps a thrown error into an error tool result (isError: true); the docs defer to ToolDefinition in packages/coding-agent/src/core/extensions/types.ts for the exact contract. Limit tool output to ~50KB / 2000 lines (DEFAULT_MAX_BYTES = 50 * 1024). Use StringEnum (from @earendil-works/pi-ai) for LLM-facing enums.
  • Skill name: 1–64 chars, lowercase a-z 0-9 -, no leading/trailing or consecutive hyphens; description ≤1024 chars and must say when to load it (a skill with no description won't load).
  • chord.md, agent-harness.md, and durable-spec.md describe internals, not a stable contract. Chord is published but application-neutral, pi-durable is experimental and its API changes between releases, the Pico5 spec is a design document, and PLANNING.md/server/client/protocol are explicitly experimental. Quote them as the current source tree state (pi@a7229ddc2), not as promised API.
  • auth.json holds API keys and OAuth tokens: Pi writes it 0600, keep it private and out of version control. Credential priority: CLI --api-key → auth.json → env var → custom-provider keys in models.json.
  • Project settings override agent-directory settings, and resource lists are combined rather than replaced (per-model objects such as compaction thresholds merge before the model lookup). Use pi install -l to write a package declaration to .pi/settings.json, which Pi reads only after the project is trusted.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Use when designing, reviewing, or refactoring a CLI that must serve AI agents alongside humans, or when converting an API or SDK into an agent-usable CLI interface.

日本語の概要は準備中です。原文の説明を表示しています。

Agents365-ai/365-skills842026年10月3日 更新

Search free commercial-use creative assets across multiple online sources — photos, illustrations, icons, video footage, music, sound effects, and fonts. Use when the user needs to find assets for videos, PPTs, articles, or any content creation. Trigger on phrases like "find me a photo of", "search for icons", "I need background music", "find video footage", "search fonts", "找一张图片", "搜素材", "帮我找图标/视频/音乐/字体". Covers Pexels, Unsplash, Pixabay, Iconify, Freesound, Google Fonts and more — with API-backed search where available.

日本語の概要は準備中です。原文の説明を表示しています。

Agents365-ai/365-skills842026年10月3日 更新

asta

無料

Query the Semantic Scholar academic corpus through AI2's Asta MCP server: keyword or title search with venue and date filters, who-cited-a-paper traversal, author profiles and publications, DOI/arXiv/PMID lookup, and ~500-word full-text snippets for evidence, with citation counts and h-index. Use when the user asks for papers on a topic, who cited a paper, an author's work, recent literature since a date, or a venue-scoped paper list. Requires the Asta MCP server.

日本語の概要は準備中です。原文の説明を表示しています。

Agents365-ai/365-skills842026年10月3日 更新

Extract and organize frames from a Bilibili video (bangumi episode, UP upload, or a local file) into scenery shots and per-character image groups, using anime-specific person detection + CCIP character-identity embeddings. Two modes — cluster everyone, or pull out one (or several) named characters via reference folders. Use when the user wants to collect, extract, or organize anime frames/screenshots by character or by scenery from a Bilibili video. Read-only download for personal viewing/analysis; uploads nothing.

日本語の概要は準備中です。原文の説明を表示しています。

Agents365-ai/365-skills842026年10月3日 更新

bbc-skill

無料

Fetch Bilibili (哔哩哔哩) video comments for UP主 self-analysis. Use when the user asks to collect, download, export, or analyze comments on a Bilibili video (BV号 / URL / UID). Produces JSONL + summary.json suitable for further Claude Code analysis (sentiment, keywords, audience trends). Read-only; does not post/edit/delete.

日本語の概要は準備中です。原文の説明を表示しています。

Agents365-ai/365-skills842026年10月3日 更新

Use when user requests diagrams, flowcharts, architecture charts, or visualizations. Also use proactively when explaining systems with 3+ components, complex data flows, or relationships that benefit from visual representation. Generates .excalidraw files and exports to PNG/SVG via Kroki API or locally using excalidraw-brute-export-cli.

日本語の概要は準備中です。原文の説明を表示しています。

Agents365-ai/365-skills842026年10月3日 更新

Agents365-ai のスキルをすべて見る

このスキルの問題を報告する