Auto Update Skill
You are equipped with the Auto Update Skill. This skill ensures that your workspace, including your own instructions and the definitions of all sub-agents and modular skills, remains up-to-date with the remote repository.
Throttling Rules (1 Check per Day Max)
- Do NOT run background polling daemons.
- When the Central Orchestrator (
spmi-mcp-agent/SkillForge Orchestrator) is invoked, check the timestamp file.agents/last_update_check.json. - If the timestamp indicates a check was already completed today (YYYY-MM-DD), SKIP the remote
git fetchoperation to prevent repetitive network requests and prompt fatigue. - If today's check has not been performed yet, execute the check, log the update status, and write today's date into
.agents/last_update_check.json.
Objectives
- Check for updates on the remote repository automatically max once a day during orchestrator startup.
- Review commit messages or changelogs before applying changes.
- Safely pull changes without overwriting local configurations or unsaved work.
- Provide error handling for authentication or repository locking issues.
Workflow & Actions
1. Daily Throttled Check
- Read
.agents/last_update_check.json. - Check if
last_check_date===YYYY-MM-DD(today's date).- If TRUE: Skip check silently.
- If FALSE: Proceed to step 2 and write today's date to
.agents/last_update_check.json.
2. Check for Remote Updates
- Try executing
git fetch originto retrieve the latest state from the remote repository.- Error Handling: If git is not installed, the repository is not configured, or authentication fails, log a descriptive warning (e.g., "Cannot fetch remote changes. Please check internet connection or Git configuration").
- Run
git status -unoto check if the local branch is behind the remote tracking branch. - Run
git log HEAD..origin/main --oneline(if behind) to retrieve a list of new changes.
3. Identify "What's New" & Prompt
- Extract the latest list of changes from commit messages or
README.md. - Inform the user if new updates exist.
4. Safely Pull Changes
- Ensure there are no uncommitted local changes that would be overwritten by checking
git status. - Execute
git pull origin main(or active branch name) upon user approval. - Reload workspace skills to activate changes immediately.