mitsupi 1.1.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +49 -31
  3. package/intercepted-commands/pip +7 -0
  4. package/intercepted-commands/pip3 +7 -0
  5. package/intercepted-commands/poetry +3 -0
  6. package/intercepted-commands/python +64 -0
  7. package/intercepted-commands/python3 +64 -0
  8. package/package.json +1 -1
  9. package/pi-extensions/answer.ts +1 -1
  10. package/pi-extensions/context.ts +578 -0
  11. package/pi-extensions/control.ts +251 -5
  12. package/pi-extensions/files.ts +2 -9
  13. package/pi-extensions/go-to-bed.ts +188 -0
  14. package/pi-extensions/loop.ts +1 -1
  15. package/pi-extensions/notify.ts +88 -0
  16. package/pi-extensions/prompt-editor.ts +1315 -0
  17. package/pi-extensions/review.ts +967 -233
  18. package/pi-extensions/session-breakdown.ts +1152 -0
  19. package/pi-extensions/todos.ts +1 -1
  20. package/pi-extensions/uv.ts +33 -0
  21. package/pi-extensions/whimsical.ts +1 -1
  22. package/skills/apple-mail/SKILL.md +72 -0
  23. package/skills/apple-mail/apple-mail.sh +388 -0
  24. package/skills/google-workspace/SKILL.md +92 -0
  25. package/skills/google-workspace/package-lock.json +1401 -0
  26. package/skills/google-workspace/package.json +9 -0
  27. package/skills/google-workspace/scripts/auth.js +134 -0
  28. package/skills/google-workspace/scripts/common.js +546 -0
  29. package/skills/google-workspace/scripts/workspace.js +429 -0
  30. package/skills/librarian/SKILL.md +65 -0
  31. package/skills/librarian/checkout.sh +264 -0
  32. package/skills/mermaid/SKILL.md +34 -0
  33. package/skills/mermaid/tools/validate.sh +53 -0
  34. package/skills/native-web-search/SKILL.md +47 -0
  35. package/skills/native-web-search/search.mjs +554 -0
  36. package/skills/summarize/SKILL.md +58 -0
  37. package/skills/summarize/to-markdown.mjs +249 -0
  38. package/skills/uv/SKILL.md +37 -0
  39. package/skills/uv/build.md +65 -0
  40. package/skills/uv/scripts.md +106 -0
  41. package/pi-extensions/cwd-history.ts +0 -237
  42. package/pi-extensions/qna.ts +0 -167
  43. package/skills/improve-skill/SKILL.md +0 -155
  44. package/skills/improve-skill/scripts/extract-session.js +0 -349
package/CHANGELOG.md CHANGED
@@ -2,6 +2,38 @@
2
2
 
3
3
  All notable changes to agent-stuff are documented here.
4
4
 
5
+ ## Unreleased
6
+
7
+ ## 1.4.0
8
+
9
+ * Added a prompt editor extension for managing prompt modes (create, rename, delete, and edit), with persistence and detection fixes.
10
+ * Added a loop-fixing mode to `/review` with improved blocking-aware detection, plus branch/commit filtering and related review flow improvements. (#10)
11
+ * Added new skills for native web search, cached repository checkout (`librarian`), Google Workspace, and Apple Mail.
12
+ * Added a CLI interface for session control and gated control tool registration behind `--session-control`.
13
+ * Added the `go-to-bed` late-night safety guard and improved auto-disable behavior.
14
+ * Improved `/files` labels by appending git status information.
15
+ * Improved `uv` command handling by blocking `py_compile` and suggesting AST-based syntax checks.
16
+
17
+ ## 1.3.0
18
+
19
+ * Added `/session-breakdown` command with interactive TUI showing sessions, messages, tokens, and cost over the last 7/30/90 days with a GitHub-style contribution calendar.
20
+ * Added messages/tokens tracking and large-count abbreviations to `/session-breakdown`.
21
+ * Added progress reporting while analyzing sessions in `/session-breakdown`.
22
+ * Added `/context` command for viewing context overview.
23
+ * Added folder snapshot review mode to `/review`.
24
+ * Improved review rubric with lessons from codex.
25
+ * Added a `summarize` skill for converting files/URLs to Markdown via `markitdown`.
26
+
27
+ ## 1.2.0
28
+
29
+ * Updated pi-extensions to use the new `ToolDefinition.execute` parameter order.
30
+ * Fixed notify extension notifications to render plain Markdown.
31
+
32
+ ## 1.1.1
33
+
34
+ * Removed the deprecated `qna` extension.
35
+ * Added `uv` extension and skill for uv integration.
36
+
5
37
  ## 1.1.0
6
38
 
7
39
  * Added project review guidelines and preserved review state across navigation.
package/README.md CHANGED
@@ -1,51 +1,69 @@
1
1
  # Agent Stuff
2
2
 
3
- This repository contains skills and extensions that I use in some form with projects. Note that I usually fine-tune these for projects so they might not work without modification for you.
3
+ This repository contains skills and extensions that I use across projects. Note that I often fine-tune these for specific repos, so some items may need small adjustments before reuse.
4
4
 
5
5
  It is released on npm as `mitsupi` for use with the [Pi](https://buildwithpi.ai/) package loader.
6
6
 
7
7
  ## Skills
8
8
 
9
- All skill files are in the [`skills`](skills) folder:
9
+ All skills live in the [`skills`](skills) folder:
10
10
 
11
- * [`/commit`](skills/commit) - Claude Skill for creating git commits using concise Conventional Commits-style subjects
12
- * [`/update-changelog`](skills/update-changelog) - Claude Skill for updating changelogs with notable user-facing changes
13
- * [`/ghidra`](skills/ghidra) - Claude Skill for reverse engineering binaries using Ghidra's headless analyzer
14
- * [`/github`](skills/github) - Claude Skill for interacting with GitHub via the `gh` CLI (issues, PRs, runs, and APIs)
15
- * [`/openscad`](skills/openscad) - Claude Skill for creating and rendering OpenSCAD 3D models and exporting STL files
16
- * [`/web-browser`](skills/web-browser) - Claude Skill for using Puppeteer in a Node environment to browse the web
17
- * [`/tmux`](skills/tmux) - Claude Skill for driving tmux directly with keystrokes and pane output scraping
18
- * [`/sentry`](skills/sentry) - Alternative way to access Sentry as a Claude Skill for reading issues
19
- * [`/improve-skill`](skills/improve-skill) - Claude Skill for analyzing coding agent sessions to improve or create new skills
20
- * [`/pi-share`](skills/pi-share) - Claude Skill for loading and parsing session transcripts from shittycodingagent.ai
21
- * [`/anachb`](skills/anachb) - Claude Skill for querying Austrian public transport (VOR AnachB) for departures, routes, and disruptions
22
- * [`/oebb-scotty`](skills/oebb-scotty) - Claude Skill for Austrian rail travel planning via ÖBB Scotty API
23
- * [`/frontend-design`](skills/frontend-design) - Claude Skill for designing and implementing distinctive frontend interfaces
11
+ * [`/anachb`](skills/anachb) - Query Austrian public transport (VOR AnachB) for departures, routes, and disruptions.
12
+ * [`/apple-mail`](skills/apple-mail) - Search/read Apple Mail local storage and extract attachments.
13
+ * [`/commit`](skills/commit) - Create git commits using concise Conventional Commits-style subjects.
14
+ * [`/frontend-design`](skills/frontend-design) - Design and implement distinctive frontend interfaces.
15
+ * [`/ghidra`](skills/ghidra) - Reverse engineer binaries using Ghidra's headless analyzer.
16
+ * [`/github`](skills/github) - Interact with GitHub using the `gh` CLI (issues, PRs, runs, APIs).
17
+ * [`/google-workspace`](skills/google-workspace) - Access Google Workspace APIs via local helper scripts.
18
+ * [`/librarian`](skills/librarian) - Cache and refresh remote git repositories in `~/.cache/checkouts`.
19
+ * [`/mermaid`](skills/mermaid) - Create and validate Mermaid diagrams with Mermaid CLI tooling.
20
+ * [`/native-web-search`](skills/native-web-search) - Trigger native web search with concise summaries and source URLs.
21
+ * [`/oebb-scotty`](skills/oebb-scotty) - Plan Austrian rail journeys via ÖBB Scotty API.
22
+ * [`/openscad`](skills/openscad) - Create/render OpenSCAD models and export STL files.
23
+ * [`/pi-share`](skills/pi-share) - Load and parse session transcripts from shittycodingagent.ai/buildwithpi URLs.
24
+ * [`/sentry`](skills/sentry) - Fetch and analyze Sentry issues, events, transactions, and logs.
25
+ * [`/summarize`](skills/summarize) - Convert files/URLs to Markdown via `uvx markitdown` and summarize.
26
+ * [`/tmux`](skills/tmux) - Drive tmux sessions via keystrokes and pane output scraping.
27
+ * [`/update-changelog`](skills/update-changelog) - Update changelogs with notable user-facing changes.
28
+ * [`/uv`](skills/uv) - Use `uv` for Python dependency management and script execution.
29
+ * [`/web-browser`](skills/web-browser) - Browser automation via Chrome/Chromium CDP.
24
30
 
25
- ## PI Coding Agent Extensions
31
+ ## Pi Coding Agent Extensions
26
32
 
27
- Custom extensions for the PI Coding Agent can be found in the [`pi-extensions`](pi-extensions) folder:
33
+ Custom extensions for Pi Coding Agent are in [`pi-extensions`](pi-extensions):
28
34
 
29
- * [`qna.ts`](pi-extensions/qna.ts) - Extracts questions from the last assistant message into the editor for easy answering. Uses Claude Haiku for cost-efficient extraction when available.
30
- * [`answer.ts`](pi-extensions/answer.ts) - Alternative to `qna.ts` with a custom interactive TUI for answering questions one by one.
31
- * [`review.ts`](pi-extensions/review.ts) - Code review command inspired by Codex. Supports reviewing uncommitted changes, against a base branch (PR style), specific commits, or with custom instructions. Includes Ctrl+R shortcut.
32
- * [`loop.ts`](pi-extensions/loop.ts) - Runs a prompt loop for rapid iterative coding with optional auto-continue control.
33
- * [`files.ts`](pi-extensions/files.ts) - Unified file browser that merges git status (dirty first) with session references, plus reveal/open/edit and diff actions.
34
- * [`cwd-history.ts`](pi-extensions/cwd-history.ts) - Displays and manages recent working directory history inside the PI Coding Agent.
35
- * [`codex-tuning.ts`](pi-extensions/codex-tuning.ts) - Codex tuning helper for collecting samples and tagging outcomes during agent sessions.
36
- * [`todos.ts`](pi-extensions/todos.ts) - Todo manager extension with file-backed storage and a TUI for listing and editing todos.
37
- * [`whimsical.ts`](pi-extensions/whimsical.ts) - Replaces the default "Thinking..." message with random whimsical phrases like "Reticulating splines...", "Consulting the void...", or "Bribing the compiler...".
35
+ * [`answer.ts`](pi-extensions/answer.ts) - Interactive TUI for answering questions one by one.
36
+ * [`context.ts`](pi-extensions/context.ts) - Context breakdown (extensions, skills, AGENTS.md/CLAUDE.md) + token usage, including loaded-skill highlighting.
37
+ * [`control.ts`](pi-extensions/control.ts) - Session control helpers (list controllable sessions, etc.).
38
+ * [`files.ts`](pi-extensions/files.ts) - Unified file browser with git status + session references and reveal/open/edit/diff actions.
39
+ * [`go-to-bed.ts`](pi-extensions/go-to-bed.ts) - Late-night safety guard with explicit confirmation after midnight.
40
+ * [`loop.ts`](pi-extensions/loop.ts) - Prompt loop for rapid iterative coding with optional auto-continue.
41
+ * [`notify.ts`](pi-extensions/notify.ts) - Native desktop notifications when the agent finishes.
42
+ * [`prompt-editor.ts`](pi-extensions/prompt-editor.ts) - In-editor prompt mode selector with persistence, history, config, and shortcuts.
43
+ * [`review.ts`](pi-extensions/review.ts) - Code review command (working tree, PR-style diff, commits, custom instructions, optional fix loop).
44
+ * [`session-breakdown.ts`](pi-extensions/session-breakdown.ts) - TUI for 7/30/90-day session and cost analysis with usage graph.
45
+ * [`todos.ts`](pi-extensions/todos.ts) - Todo manager extension with file-backed storage and TUI.
46
+ * [`uv.ts`](pi-extensions/uv.ts) - Helpers for uv-based Python workflows.
47
+ * [`whimsical.ts`](pi-extensions/whimsical.ts) - Replaces the default thinking message with random whimsical phrases.
38
48
 
39
- ## PI Coding Agent Themes
49
+ ## Pi Coding Agent Themes
40
50
 
41
- This repository includes custom themes for the PI Coding Agent. The themes can be found in the [`pi-themes`](pi-themes) folder and customize the appearance and behavior of the agent interface.
51
+ Custom themes are in [`pi-themes`](pi-themes):
52
+
53
+ * [`nightowl.json`](pi-themes/nightowl.json) - Night Owl-inspired theme.
42
54
 
43
55
  ## Plumbing Commands
44
56
 
45
57
  These command files need customization before use. They live in [`plumbing-commands`](plumbing-commands):
46
58
 
47
- * [`/make-release`](plumbing-commands/make-release.md) - Automates repository release with version management
59
+ * [`/make-release`](plumbing-commands/make-release.md) - Automates repository release with version management.
60
+
61
+ ## Intercepted Commands
48
62
 
49
- ### Release Management
63
+ Command wrappers live in [`intercepted-commands`](intercepted-commands):
50
64
 
51
- The plumbing release commands do not work without tuning! But you can put claude to them and derive actually working ones. I for instance use them in [absurd](h>
65
+ * [`pip`](intercepted-commands/pip)
66
+ * [`pip3`](intercepted-commands/pip3)
67
+ * [`poetry`](intercepted-commands/poetry)
68
+ * [`python`](intercepted-commands/python)
69
+ * [`python3`](intercepted-commands/python3)
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+ echo "Error: pip is disabled. Use uv instead:" >&2
3
+ echo "" >&2
4
+ echo " To install a package for a script: uv run --with PACKAGE python script.py" >&2
5
+ echo " To add a dependency to the project: uv add PACKAGE" >&2
6
+ echo "" >&2
7
+ exit 1
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+ echo "Error: pip3 is disabled. Use uv instead:" >&2
3
+ echo "" >&2
4
+ echo " To install a package for a script: uv run --with PACKAGE python script.py" >&2
5
+ echo " To add a dependency to the project: uv add PACKAGE" >&2
6
+ echo "" >&2
7
+ exit 1
@@ -0,0 +1,3 @@
1
+ #!/bin/bash
2
+ echo "Error: Use uv instead of poetry (uv init, uv add, uv sync, uv run)" >&2
3
+ exit 1
@@ -0,0 +1,64 @@
1
+ #!/bin/bash
2
+
3
+ # Check for disallowed module invocations
4
+ for arg in "$@"; do
5
+ case "$arg" in
6
+ -mpip|-m\ pip|pip)
7
+ echo "Error: 'python -m pip' is disabled. Use uv instead:" >&2
8
+ echo "" >&2
9
+ echo " To install a package for a script: uv run --with PACKAGE python script.py" >&2
10
+ echo " To add a dependency to the project: uv add PACKAGE" >&2
11
+ echo "" >&2
12
+ exit 1
13
+ ;;
14
+ -mvenv|-m\ venv|venv)
15
+ echo "Error: 'python -m venv' is disabled. Use uv instead:" >&2
16
+ echo "" >&2
17
+ echo " To create a virtual environment: uv venv" >&2
18
+ echo "" >&2
19
+ exit 1
20
+ ;;
21
+ -mpy_compile|-m\ py_compile|py_compile)
22
+ echo "Error: 'python -m py_compile' is disabled because it writes .pyc files to __pycache__." >&2
23
+ echo "" >&2
24
+ echo " To verify syntax without bytecode output: uv run python -m ast path/to/file.py >/dev/null" >&2
25
+ echo "" >&2
26
+ exit 1
27
+ ;;
28
+ esac
29
+ done
30
+
31
+ # Check for -m flag followed by pip or venv
32
+ prev=""
33
+ for arg in "$@"; do
34
+ if [ "$prev" = "-m" ]; then
35
+ case "$arg" in
36
+ pip)
37
+ echo "Error: 'python -m pip' is disabled. Use uv instead:" >&2
38
+ echo "" >&2
39
+ echo " To install a package for a script: uv run --with PACKAGE python script.py" >&2
40
+ echo " To add a dependency to the project: uv add PACKAGE" >&2
41
+ echo "" >&2
42
+ exit 1
43
+ ;;
44
+ venv)
45
+ echo "Error: 'python -m venv' is disabled. Use uv instead:" >&2
46
+ echo "" >&2
47
+ echo " To create a virtual environment: uv venv" >&2
48
+ echo "" >&2
49
+ exit 1
50
+ ;;
51
+ py_compile)
52
+ echo "Error: 'python -m py_compile' is disabled because it writes .pyc files to __pycache__." >&2
53
+ echo "" >&2
54
+ echo " To verify syntax without bytecode output: uv run python -m ast path/to/file.py >/dev/null" >&2
55
+ echo "" >&2
56
+ exit 1
57
+ ;;
58
+ esac
59
+ fi
60
+ prev="$arg"
61
+ done
62
+
63
+ # Dispatch to uv run python
64
+ exec uv run python "$@"
@@ -0,0 +1,64 @@
1
+ #!/bin/bash
2
+
3
+ # Check for disallowed module invocations
4
+ for arg in "$@"; do
5
+ case "$arg" in
6
+ -mpip|-m\ pip|pip)
7
+ echo "Error: 'python3 -m pip' is disabled. Use uv instead:" >&2
8
+ echo "" >&2
9
+ echo " To install a package for a script: uv run --with PACKAGE python script.py" >&2
10
+ echo " To add a dependency to the project: uv add PACKAGE" >&2
11
+ echo "" >&2
12
+ exit 1
13
+ ;;
14
+ -mvenv|-m\ venv|venv)
15
+ echo "Error: 'python3 -m venv' is disabled. Use uv instead:" >&2
16
+ echo "" >&2
17
+ echo " To create a virtual environment: uv venv" >&2
18
+ echo "" >&2
19
+ exit 1
20
+ ;;
21
+ -mpy_compile|-m\ py_compile|py_compile)
22
+ echo "Error: 'python3 -m py_compile' is disabled because it writes .pyc files to __pycache__." >&2
23
+ echo "" >&2
24
+ echo " To verify syntax without bytecode output: uv run python -m ast path/to/file.py >/dev/null" >&2
25
+ echo "" >&2
26
+ exit 1
27
+ ;;
28
+ esac
29
+ done
30
+
31
+ # Check for -m flag followed by pip or venv
32
+ prev=""
33
+ for arg in "$@"; do
34
+ if [ "$prev" = "-m" ]; then
35
+ case "$arg" in
36
+ pip)
37
+ echo "Error: 'python3 -m pip' is disabled. Use uv instead:" >&2
38
+ echo "" >&2
39
+ echo " To install a package for a script: uv run --with PACKAGE python script.py" >&2
40
+ echo " To add a dependency to the project: uv add PACKAGE" >&2
41
+ echo "" >&2
42
+ exit 1
43
+ ;;
44
+ venv)
45
+ echo "Error: 'python3 -m venv' is disabled. Use uv instead:" >&2
46
+ echo "" >&2
47
+ echo " To create a virtual environment: uv venv" >&2
48
+ echo "" >&2
49
+ exit 1
50
+ ;;
51
+ py_compile)
52
+ echo "Error: 'python3 -m py_compile' is disabled because it writes .pyc files to __pycache__." >&2
53
+ echo "" >&2
54
+ echo " To verify syntax without bytecode output: uv run python -m ast path/to/file.py >/dev/null" >&2
55
+ echo "" >&2
56
+ exit 1
57
+ ;;
58
+ esac
59
+ fi
60
+ prev="$arg"
61
+ done
62
+
63
+ # Dispatch to uv run python
64
+ exec uv run python "$@"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mitsupi",
3
- "version": "1.1.0",
3
+ "version": "1.4.0",
4
4
  "description": "Armin's pi coding agent commands, skills, extensions, and themes",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Q&A extraction hook - extracts questions from assistant responses
3
3
  *
4
- * Alternative to qna.ts with a custom interactive TUI for answering questions.
4
+ * Custom interactive TUI for answering questions.
5
5
  *
6
6
  * Demonstrates the "prompt generator" pattern with custom TUI:
7
7
  * 1. /answer command gets the last assistant message