Skip to content

ohlulu/oh-pi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

oh-pi

English / 中文版

A curated collection of personal pi agent resources — extensions, skills, and prompt templates, tailored for my own workflow.

⚠️ This is a personal configuration. It is designed around my specific habits, tools, and tech stack (Swift / SwiftUI / macOS). I recommend browsing the contents and cherry-picking what fits your needs — copy individual files into your own config.

Table of Contents

Usage

Clone the repo, open it with pi, and explore interactively:

git clone https://github.com/ohlulu/oh-pi.git
cd oh-pi
pi

Use /dig to understand any extension, skill, or prompt before adopting it:

/dig @skills/swift-concurrency
/dig @extensions/ralph-wiggum

/dig outputs in Chinese by default. Non-Chinese speakers: ask pi to translate ./prompts/dig.md to your language and copy it to ~/.pi/agent/prompts/ — then /dig will work in your language everywhere.

Extensions

Reusable pi extensions that add tools, commands, and event hooks to the agent.

Name Description
ask-me Interactive single-choice tool — lets the LLM ask the user a question with selectable options.
ask-me-batch Batch version of ask-me — multiple questions in one pass.
context /context command — displays context window usage, loaded extensions, skills, and session cost.
done-sound Plays a system sound when the agent finishes (macOS).
inject-docs Auto-injects the project docs/ index into the first agent turn on session start.
lazygit /lazygit command — launches lazygit inside the TUI.
open-with /finder and /cursor commands — open cwd in Finder or Cursor editor.
commit /commit command — spawns an isolated Haiku subprocess to analyze and commit changes.
mpd /mpd command — merge feature branch into default, push, and delete local branch in one shot.
ralph-wiggum Long-running iterative dev loops with plan → execute → verify cycles, pacing, and checkpoints.
review /review command — interactive code review based on git diff / PR / files.
statusbar Footer status bar — model name, cwd, git branch with uncommitted count, and context window usage.
tab-status Updates terminal tab title with agent status (☘️ idle · 🔄 working · 🛑 error).
todo File-based todo management tool — the agent can create, update, and query todos.
worktree /wt command — git worktree management.
yazi /yazi command — launches yazi file manager inside the TUI.

Skills

On-demand capability packages loaded by the agent when a task matches.

Name Description
app-store-screenshots App Store screenshot generator — Next.js page that renders iPhone/iPad marketing screenshots and exports at Apple-required resolutions.
clean-architecture Clean Architecture mindset — dependency direction, layer boundaries, abstraction decisions.
commit Structured Conventional Commits workflow — analyze changes, craft message, commit.
deep-research Autonomous multi-step web research — parallel search, source triangulation, cited Markdown report.
dev-principles Language-agnostic development principles and design guidelines.
doc-system Product documentation system — on-demand loading, single source of truth, open-closed structure.
postmortem Blameless postmortem — 5-Whys root cause analysis, structured incident review, actionable lessons.
ralph-wiggum Skill companion for the ralph-wiggum extension — iterative loop pacing.
sdd Spec-Driven Development — Requirements → Plan → Tasks → Verification, with approval gates.
swift-coding-style Swift coding conventions — opaque vs existential types, naming, structure.
swift-concurrency Swift Concurrency best practices — async/await, actors, Sendable, migration to Swift 6.
swift-testing-expert Swift Testing expert — #expect/#require macros, traits, parameterized tests, XCTest migration.
swiftui-expert-skill SwiftUI best practices — state management, view composition, performance, modern APIs.
swiftui-liquid-glass iOS 26+ Liquid Glass — .glassEffect, glass buttons, morphing transitions.
swiftui-performance-audit Audit SwiftUI runtime performance — slow rendering, excessive updates, layout thrash.
swiftui-ui-patterns Best practices and example-driven guidance for building SwiftUI views and components.
swiftui-view-refactor Refactor SwiftUI views for consistent structure, dependency injection, and Observation usage.
ui-design-principles Platform-agnostic UI design principles — typography, color, spacing, motion, interaction, and the "AI slop" test.
update-changelog Update CHANGELOG.md with user-facing changes since the last release.

Third-Party Skills (pi-skills)

The skills/pi-skills/ directory contains skills from badlogic/pi-skills — including brave-search, browser-tools, Google CLI tools, transcription, and more. See the original repo for documentation and updates.

Prompt Templates

Slash-command prompt templates — type /name in the editor to expand.

Command Description
/brainstorming Turn ideas into fully formed designs through Diverge → Converge → Reflect dialogue before any implementation.
/ceo-review CEO/founder-mode plan review — rethink the problem, find the 10-star product, challenge premises. Three modes: expand, hold, or reduce scope.
/dev-loop Automated dev loop — claim todo, branch, develop, code review, merge, repeat.
/dig Deep-dive into a topic — research and explain in a teaching style.
/dig-lite Fast deep-dive — resolve ambiguity and explain what changes decisions.
/handoff Package current state into a handoff report for the next agent.
/pickup Rehydrate context when starting or resuming work.
/spec-workshop Requirements spec workshop — structured discussion before implementation (Chinese).
/tech-stack-decision Tech stack decision workshop — architecture, packages, compiler, and toolchain evaluation.

Shared Prompts

Reusable prompt fragments referenced by extensions or other prompts.

Name Description
review-rubric Code review scoring guidelines — what to flag, severity levels, and review structure.

Shared Scripts

Utility scripts used by skills and extensions.

Name Description
committer Safe git commit wrapper — stages only listed files, validates inputs.
docs-list Lists and validates docs/ directory with front-matter enforcement.
nanobanana Image editing via Gemini's image generation API — pass an image + prompt, get an edited image back.

Docs

Reference documents for agent coordination and workflows.

Name Description
tools CLI tools reference — peekaboo, gh, oracle, mcporter, xcp, tuist, lldb, axe, tmux, and more.

AGENTS.md

AGENTS.md contains my global agent instructions — workflow rules, tool usage, coding conventions, and guardrails.

Note: AGENTS.md is not auto-loaded by pi packages. To use it, manually copy it to your global or project config:

# Global
cp AGENTS.md ~/.pi/agent/AGENTS.md

# Project
cp AGENTS.md .pi/agent/AGENTS.md

FAQ

skill:commit vs /commit — which to use?

Both commit correctly. The difference is context, quality, and cost.

1. Safety

Safety gap: negligible. The core guardrail is the committer script — both use it.

2. Quality

skill:commit (current session) /commit (isolated subprocess + Haiku)
Context ✅ Full conversation history — knows why you changed ❌ Diff only — knows what changed
Commit type Accurate (knows if it's a bug fix or refactor) Best-guess from diff
Subject quality fix(auth): prevent token refresh loop fix(auth): update token logic
Body quality Can explain WHY Can only describe WHAT
Model capability Opus/Sonnet — richer language Haiku — functional but plainer

Quality gap: moderate. Rename/format commits are fine either way. Complex bugfix messages degrade noticeably.

3. Cost

Assuming 30k accumulated input tokens, ~3k output tokens for the commit:

Input tokens Output tokens Estimated cost
skill:commit on Opus ~31k (context + skill) ~3k ~$0.69
skill:commit on Sonnet ~31k ~3k ~$0.14
/commit on Haiku (subprocess) ~2k (prompt + diff only) ~3k ~$0.004

Cost gap: Opus → Haiku saves ~99%.


Rule of thumb: Use skill:commit for commits where why matters (complex bugfixes, non-obvious refactors). Use /commit for mechanical changes (format, rename, chore) or when on an expensive model.

Acknowledgments

Inspiration and reference from these projects:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages