Skip to content

Commit 2292a61

Browse files
committed
fix(command): fix get-unpublished-changes shell injection bugs
- Change model to anthropic/claude-haiku-4 - Fix local-version: use node -p instead of broken sed pattern - Fix commits/diff: use xargs -I{} pipeline instead of subshell 🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
1 parent d1a527c commit 2292a61

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
description: Compare HEAD with the latest published npm version and list all unpublished changes
3+
model: anthropic/claude-haiku-4-5
4+
---
5+
6+
<command-instruction>
7+
Analyze the unpublished changes since the last npm release and provide a structured summary.
8+
9+
Your task:
10+
1. Review the context below (auto-injected via shell)
11+
2. Summarize changes grouped by type (feat, fix, refactor, docs, chore)
12+
3. Highlight breaking changes if any
13+
4. Suggest next version bump (major/minor/patch) based on conventional commits
14+
</command-instruction>
15+
16+
<version-context>
17+
<published-version>
18+
!`npm view oh-my-opencode version 2>/dev/null || echo "not published"`
19+
</published-version>
20+
<local-version>
21+
!`node -p "require('./package.json').version" 2>/dev/null || echo "unknown"`
22+
</local-version>
23+
<latest-tag>
24+
!`git tag --sort=-v:refname | head -1 2>/dev/null || echo "no tags"`
25+
</latest-tag>
26+
</version-context>
27+
28+
<git-context>
29+
<commits-since-release>
30+
!`npm view oh-my-opencode version 2>/dev/null | xargs -I{} git log "v{}"..HEAD --oneline 2>/dev/null || echo "no commits since release"`
31+
</commits-since-release>
32+
<diff-stat>
33+
!`npm view oh-my-opencode version 2>/dev/null | xargs -I{} git diff "v{}"..HEAD --stat 2>/dev/null || echo "no diff available"`
34+
</diff-stat>
35+
<files-changed-summary>
36+
!`npm view oh-my-opencode version 2>/dev/null | xargs -I{} git diff "v{}"..HEAD --stat 2>/dev/null | tail -1 || echo ""`
37+
</files-changed-summary>
38+
</git-context>
39+
40+
<output-format>
41+
## Unpublished Changes (v{published} → HEAD)
42+
43+
### Commits ({count})
44+
| Type | Scope | Description |
45+
|------|-------|-------------|
46+
| ... | ... | ... |
47+
48+
### Files Changed
49+
{diff-stat summary}
50+
51+
### Suggested Version Bump
52+
- **Recommendation**: {patch|minor|major}
53+
- **Reason**: {brief explanation}
54+
</output-format>

0 commit comments

Comments
 (0)