Skip to content

feat(skill): show GitHub star prompt on first successful generation#778

Merged
ChuxiJ merged 2 commits intomainfrom
feat/skill-github-star-prompt
Mar 6, 2026
Merged

feat(skill): show GitHub star prompt on first successful generation#778
ChuxiJ merged 2 commits intomainfrom
feat/skill-github-star-prompt

Conversation

@ChuxiJ
Copy link
Contributor

@ChuxiJ ChuxiJ commented Mar 6, 2026

Summary

  • Add a one-time GitHub star prompt that displays after the user's first successful music generation via the ACE-Step CLI skill
  • Uses a local marker file (.first_gen_done) to ensure the prompt only appears once
  • Covers both API modes: completion mode (send_completion_request) and native polling mode (wait_for_job)
  • Marker file added to .gitignore to avoid committing local state

Preview

After first successful generation, the user will see:

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  ACE-Step is free and open-source.
  If you enjoyed this, a ★ Star on GitHub means a lot to us!
  → https://github.com/ace-step/ACE-Step
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Test plan

  • Verified first call shows the star prompt
  • Verified second call does NOT show the prompt (marker file exists)
  • Verified marker file cleanup resets the prompt

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Adds a one-time GitHub star prompt that appears after a user's first successful generation or save, shown only once per environment to avoid repeated prompts.

Display a one-time friendly reminder to star the ACE-Step GitHub repo
after the user's first successful music generation via the CLI skill.
The prompt is shown only once, tracked by a local marker file.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 6, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4ef7bac6-e194-494b-a0f9-ea72d5e08cb5

📥 Commits

Reviewing files that changed from the base of the PR and between f13deb2 and 412c9b2.

📒 Files selected for processing (1)
  • .claude/skills/acestep/scripts/acestep.sh
🚧 Files skipped from review as they are similar to previous changes (1)
  • .claude/skills/acestep/scripts/acestep.sh

📝 Walkthrough

Walkthrough

Adds a one-time GitHub star prompt to ACE-Step by creating a marker file and a show_star_prompt() function; the prompt is invoked after successful saves in both direct completion and polling completion flows and is suppressed on subsequent runs by the marker file.

Changes

Cohort / File(s) Summary
ACE-Step prompt and marker
.claude/skills/acestep/scripts/acestep.sh
Adds STAR_MARKER_FILE variable and show_star_prompt() function; calls show_star_prompt after successful save in send_completion_request() and after completion detected in wait_for_job() (status 1).
Ignore marker file
.gitignore
Adds .claude/skills/acestep/scripts/.first_gen_done to prevent the one-time marker file from being committed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

A little rabbit hops to say,
"First-time spark — please star today!" ✨
A marker tucked beneath the shoe,
Once it shows, it stays true. 🐇⭐

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(skill): show GitHub star prompt on first successful generation' accurately and specifically describes the main change: adding a one-time GitHub star prompt displayed after the first successful music generation.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/skill-github-star-prompt

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.claude/skills/acestep/scripts/acestep.sh:
- Line 715: The one-time prompt function show_star_prompt is only called in
synchronous completion flows (via wait_for_job()), so async native jobs started
with "generate --no-wait" never see it; update the async success path in
cmd_status() (the branch that currently saves/downloads the finished result
around the success handling at lines ~431-433) to invoke show_star_prompt after
the result is persisted, or refactor both sync and async completion paths to
call a shared success handler that calls show_star_prompt; ensure the change
covers both invocation sites noted (around Line 715 and Line 760) so the prompt
is shown for both sync and --no-wait completions.
- Around line 30-43: The script persists runtime state into the repository via
STAR_MARKER_FILE and unguarded touch inside show_star_prompt, which can fail
under read-only/shared installs and abort due to set -e; change STAR_MARKER_FILE
to a user-writable state location (e.g. use XDG_STATE_HOME or fallback to
$HOME/.local/state and a subdir for this script) and update show_star_prompt to
create the directory if needed and perform the touch in a non-fatal way (ensure
failures are ignored so the script continues under set -e). Reference
STAR_MARKER_FILE and the show_star_prompt function when making the change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5405728a-d692-4286-99c3-21a4195230f3

📥 Commits

Reviewing files that changed from the base of the PR and between 26c3cf5 and f13deb2.

📒 Files selected for processing (2)
  • .claude/skills/acestep/scripts/acestep.sh
  • .gitignore

Comment on lines +30 to +43
STAR_MARKER_FILE="${SCRIPT_DIR}/.first_gen_done"

# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
CYAN='\033[0;36m'
NC='\033[0m'
BOLD='\033[1m'

# Show GitHub star prompt on first successful generation
show_star_prompt() {
if [ ! -f "$STAR_MARKER_FILE" ]; then
touch "$STAR_MARKER_FILE"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify the code at the specified lines and check set -e status

FILE=".claude/skills/acestep/scripts/acestep.sh"

# Check if file exists
if [ ! -f "$FILE" ]; then
  echo "File not found: $FILE"
  exit 1
fi

# Show lines 1-60 to see context including set -e and the marker file
echo "=== Code from lines 1-60 ==="
head -60 "$FILE" | cat -n

echo ""
echo "=== Checking for set -e ==="
grep -n "set -e" "$FILE" | head -5

echo ""
echo "=== Show star prompt function ==="
sed -n '30,50p' "$FILE" | cat -n

Repository: ace-step/ACE-Step-1.5

Length of output: 3433


Don't persist runtime state inside the checked-out scripts directory.

Line 30 places the marker file at .claude/skills/acestep/scripts/.first_gen_done, and Line 43 writes it unguarded. In read-only or shared installs, the first successful generation fails after saving files because set -e (Line 19) treats the touch failure as fatal. Move the marker to a user-writable state directory and make marker-write failures non-fatal.

Proposed fix
-STAR_MARKER_FILE="${SCRIPT_DIR}/.first_gen_done"
+STAR_STATE_DIR="${XDG_STATE_HOME:-$HOME/.local/state}/acestep"
+STAR_MARKER_FILE="${STAR_STATE_DIR}/first_gen_done"
@@
 show_star_prompt() {
+    mkdir -p "$STAR_STATE_DIR" 2>/dev/null || return 0
     if [ ! -f "$STAR_MARKER_FILE" ]; then
-        touch "$STAR_MARKER_FILE"
+        touch "$STAR_MARKER_FILE" 2>/dev/null || return 0
         echo ""
         echo -e "${YELLOW}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
         echo -e "${BOLD}  ACE-Step is free and open-source.${NC}"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
STAR_MARKER_FILE="${SCRIPT_DIR}/.first_gen_done"
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
CYAN='\033[0;36m'
NC='\033[0m'
BOLD='\033[1m'
# Show GitHub star prompt on first successful generation
show_star_prompt() {
if [ ! -f "$STAR_MARKER_FILE" ]; then
touch "$STAR_MARKER_FILE"
STAR_STATE_DIR="${XDG_STATE_HOME:-$HOME/.local/state}/acestep"
STAR_MARKER_FILE="${STAR_STATE_DIR}/first_gen_done"
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
CYAN='\033[0;36m'
NC='\033[0m'
BOLD='\033[1m'
# Show GitHub star prompt on first successful generation
show_star_prompt() {
mkdir -p "$STAR_STATE_DIR" 2>/dev/null || return 0
if [ ! -f "$STAR_MARKER_FILE" ]; then
touch "$STAR_MARKER_FILE" 2>/dev/null || return 0
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/skills/acestep/scripts/acestep.sh around lines 30 - 43, The script
persists runtime state into the repository via STAR_MARKER_FILE and unguarded
touch inside show_star_prompt, which can fail under read-only/shared installs
and abort due to set -e; change STAR_MARKER_FILE to a user-writable state
location (e.g. use XDG_STATE_HOME or fallback to $HOME/.local/state and a subdir
for this script) and update show_star_prompt to create the directory if needed
and perform the touch in a non-fatal way (ensure failures are ignored so the
script continues under set -e). Reference STAR_MARKER_FILE and the
show_star_prompt function when making the change.


echo ""
echo -e "${GREEN}Done! Files saved to: $OUTPUT_DIR${NC}"
show_star_prompt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

--no-wait native jobs never hit this prompt.

Line 715 and Line 760 only cover synchronous completion paths. generate --no-wait bypasses wait_for_job(), and the cmd_status() success path around Line 431-Line 433 saves/downloads the finished result without calling show_star_prompt(), so async native users never see the one-time prompt.

Minimal fix
@@
             # Save and download
             save_result "$job_id" "$response"
             download_audios "$api_url" "$job_id" "$result_file"
+            show_star_prompt
             rm -f "$result_file"

Also applies to: 760-760

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/skills/acestep/scripts/acestep.sh at line 715, The one-time prompt
function show_star_prompt is only called in synchronous completion flows (via
wait_for_job()), so async native jobs started with "generate --no-wait" never
see it; update the async success path in cmd_status() (the branch that currently
saves/downloads the finished result around the success handling at lines
~431-433) to invoke show_star_prompt after the result is persisted, or refactor
both sync and async completion paths to call a shared success handler that calls
show_star_prompt; ensure the change covers both invocation sites noted (around
Line 715 and Line 760) so the prompt is shown for both sync and --no-wait
completions.

@ChuxiJ ChuxiJ merged commit 5435e69 into main Mar 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant