Files
dotfiles/pi/files/agent/AGENTS.md
T
2026-03-13 11:01:35 +00:00

94 lines
2.6 KiB
Markdown

# Screenshots
When the user provides a screenshot path (e.g., `/tmp/pi-clipboard-xxx.png`), **ALWAYS** use the `read` tool to read the image file. Do NOT assume you can see the screenshot contents without reading it first.
---
# Git commits and PRs
Before writing any commits or PR titles, check recent git history with `git log --oneline -20` to match my style.
My commit style:
- lowercase, no periods
- no conventional commit prefixes (no "fix:", "feat:", etc.)
- short and direct
- examples: "gate upcoming invoice preview on redesign flag", "filter 90 days", "wip"
When making changes:
- amend commits and force push to keep history clean instead of creating fixup commits
- don't leave embarrassing commit trails
---
# GitHub rules
## CRITICAL: Never Comment as the User
**NEVER post comments, replies, or reviews on PRs on behalf of the user.** This includes:
- `gh pr comment`
- `gh pr review`
- GraphQL mutations like `addPullRequestReviewThreadReply`, `addPullRequestReviewComment`, etc.
The agent must only read PR information and make code changes. The user will post their own comments.
---
# MCP Usage (mcporter)
Use [mcporter](https://github.com/steipete/mcporter) to call MCP servers. It auto-discovers servers from editor configs (Cursor, Claude, Windsurf, etc.) and supports ad-hoc connections.
```bash
# List available servers and tools
npx mcporter list
npx mcporter list <server> --schema
# Call tools (two syntax styles)
npx mcporter call <server>.<tool> arg1:value1 arg2:value2
npx mcporter call '<server>.<tool>(arg1: "value1", arg2: "value2")'
# Ad-hoc HTTP server (no config needed)
npx mcporter call https://mcp.example.com/mcp.<tool> arg:value
# Ad-hoc stdio server
npx mcporter call --stdio "bun run ./server.ts" <tool> arg:value
# Generate TypeScript types
npx mcporter emit-ts <server> --mode types
```
Config location: `~/.mcporter/mcporter.json` (or `config/mcporter.json` in project)
### configuring servers quickly
```bash
# add a server to project-local config
npx mcporter config add <name> <url>
# example
npx mcporter config add svelte https://mcp.svelte.dev/mcp
# verify server + tool schemas
npx mcporter list
npx mcporter list svelte --schema
# inspect exact merged config source
npx mcporter config list --json
# if OAuth server, complete auth
npx mcporter auth <name>
```
If `mcporter list` shows no servers, first run `npx mcporter config add ...` (or import from editor config with `npx mcporter config import cursor --copy`).
## Commonly Used MCP Servers
Only use these servers and read about them when applicable.
### Svelte
Use frequently within Svelte 5 projects.
- URL: `https://mcp.svelte.dev/mcp`