openclaw - 💡(How to fix) Fix Feature Request: Auto-execute commands after skill installation [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#55504Fetched 2026-04-08 01:38:46
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Participants
RAW_BUFFERClick to expand / collapse

Feature Request: Auto-execute custom commands after skill installation

Requested by: Steven.Yang


Problem:

When a user runs "clawhub install <skill>", the process ends as soon as the skill files are downloaded. There is no way to guide the user to the next step. Users have to manually find and read the SKILL.md to understand what to do next.

For many skills, installation is only the first step. For example, a webchat enhancement skill requires the user to:

  • Install a browser extension
  • Visit GreasyFork and click install
  • Run additional setup commands

If the skill cannot guide the user through these steps automatically, the user experience suffers significantly.


Proposed Solution:

Allow SKILL.md to define a post-install action that gets executed automatically after the skill is downloaded. This could be:

  1. Auto-open a URL in the browser (e.g., GreasyFork install page)
  2. Auto-execute a shell command (e.g., "curl ... | bash")
  3. Display a customized message with next-step instructions
  4. Run a post-install script included in the skill folder

Example use cases:

  • Open GreasyFork automatically so the user can complete script installation with one click
  • Execute "curl ... | bash" to download and run an installer
  • Display a reminder to complete certain manual steps

Suggested Implementation:

Option 1 - Add a postInstall field in SKILL.md:

"""yaml postInstall: "open https://greasyfork.org/scripts/xxx" """

Option 2 - Include a scripts directory in the skill folder:

""" my-skill/ SKILL.md scripts/ post-install.sh # auto-executed after installation """


Benefits:

  • Dramatically improves user onboarding for skills
  • Enables one-command installation experiences for complex setups
  • Reduces user confusion about what to do after installing
  • Maintains backward compatibility (post-install is optional)
  • No breaking changes to existing skill behavior

This feature would significantly enhance the OpenClaw user experience and make skills much easier for non-technical users.

Thank you!

extent analysis

Fix Plan

To implement the proposed solution, we will add a postInstall field in SKILL.md and modify the clawhub install command to execute the specified action after installation.

Step 1: Update SKILL.md Format

Add a postInstall field in SKILL.md with the desired action:

postInstall: "open https://greasyfork.org/scripts/xxx"

Alternatively, include a scripts directory in the skill folder with a post-install.sh script:

my-skill/
  SKILL.md
  scripts/
    post-install.sh

Step 2: Modify clawhub install Command

Update the clawhub install command to parse the postInstall field and execute the specified action:

import yaml
import subprocess
import webbrowser

# ...

def install_skill(skill_name):
    # ...
    with open('SKILL.md', 'r') as f:
        skill_config = yaml.safe_load(f)
    
    if 'postInstall' in skill_config:
        post_install_action = skill_config['postInstall']
        if post_install_action.startswith('open '):
            url = post_install_action[5:]
            webbrowser.open(url)
        elif post_install_action.startswith('exec '):
            command = post_install_action[5:]
            subprocess.run(command, shell=True)
        else:
            print(post_install_action)
    elif os.path.exists('scripts/post-install.sh'):
        subprocess.run('./scripts/post-install.sh', shell=True)

Step 3: Handle Script Execution

Ensure that the post-install.sh script has execute permissions and is executed in a safe environment.

Verification

To verify the fix, create a test skill with a postInstall field or a post-install.sh script and run the clawhub install command. The specified action should be executed automatically after installation.

Extra Tips

  • Validate user input to prevent arbitrary command execution.
  • Consider adding support for multiple post-install actions.
  • Document the new feature and provide examples for skill developers.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING