agentleFS
sskarzsskarz/nanoclawbster/.claude/skills/update/SKILL.md

update

Skill2 starsChanged 8 months agoMITView on GitHub

Update NanoClawbster from upstream. Fetches latest changes, merges with your customizations and skills, runs migrations. Triggers on \"update\", \"pull upstream\", \"sync with upstream\", \"get latest changes\".

  • Deletes or force-pushes

65 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use pause, end and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • kennethleungtySkill

    pause

    Pause — stop the music (alias for /stop)

    Also in 4 projects that use this

  • torarnvSkill

    end

    Wrap up a work session. Updates memory files, logs decisions and lessons, appends to the session log.

    Also in 3 projects that use this

  • MicrosoftSkill

    create

    Also in 4 projects that use this

  • bitwize-music-studioSkill

    tutorial

    Provides interactive guided album creation for new users. Use when the user is new to the plugin or asks for a walkthrough of the album creation process.

    Also in 3 projects that use this

  • MicrosoftSkill

    help

    Entry point for the MedImageInsight plugin, covering the getting-started walkthrough, how the skills work, what MI2 is, and troubleshooting.

    Also in 8 projects that use this

  • jholhewresSkill

    backup

    Backup and restore — files, databases, and system backups

    Also in 3 projects that use this

  • +1 more from microsoft

The file

Show its rules and text

We split this skill into the rules it gives an agent

22 rules. 0 are common, 11 are distinctive, and 11 are very specific to this project.

  • 0

    Common

    Most of the 63 edited versions we read keep these.

  • 11

    Distinctive

    This author's own choices. Worth a look.

  • 11

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    UX Note: Use AskUserQuestion for all user-facing questions.

    line 12
  2. Distinctive:

    Check that the skills system is initialized:

    line 16
  3. Very specific:

    If NOT_INITIALIZED: Run initSkillsSystem() first:

    line 22
  4. Distinctive:

    Check for uncommitted git changes:

    line 28
  5. Distinctive:

    Run the fetch script:

    line 38
  6. Distinctive:

    Run the preview to show what will change:

    line 57
  7. Very specific:

    If conflictRisk is non-empty: "These files have skill modifications and may conflict: {list}"

    line 68
  8. Very specific:

    If customPatchesAtRisk is non-empty: "These custom patches may need re-application: {list}"

    line 69
  9. Very specific:

    If filesDeleted is non-empty: "{N} files will be removed"

    line 70
  10. Very specific:

    Use AskUserQuestion: "Apply this update?" with options:

    line 74
  11. Very specific:

    If cancelled, clean up the temp dir (rm -rf <TEMP_DIR>) and stop.

    line 78
  12. Very specific:

    Read the file — it contains conflict markers (<<<<<<<, =======, >>>>>>>)

    line 101
  13. Very specific:

    Check if there's an intent file for this path in any applied skill (e.g., .claude/skills/<skill>/modify/<path>.intent.md)

    line 102
  14. Distinctive:

    Use the intent file and your understanding of the codebase to resolve the conflict

    line 103
  15. Distinctive:

    Write the resolved file

    line 104
  16. Distinctive:

    After resolving all conflicts:

    line 106
  17. Distinctive:

    Run migrations between the old and new versions:

    line 118
  18. Distinctive:

    Run build and tests:

    line 132
  19. Distinctive:

    Remove the temp directory:

    line 148
  20. Distinctive:

    Merge conflicts in many files: Consider whether the user has heavily customized core files.

    line 164
  21. Very specific:

    Build fails after update: Check if package.json dependencies changed.

    line 166
  22. Very specific:

    Rollback: If something goes wrong after applying but before cleanup, the backup is still in .nanoclawbster/backup/.

    line 168

“Common” is measured: kept by at least 6 in 10 of the 63 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Update NanoClawbster

Pull upstream changes and merge them with the user's installation, preserving skills and customizations. Scripts live in .claude/skills/update/scripts/.

Principle: Handle everything automatically. Only pause for user confirmation before applying changes, or when merge conflicts need human judgment.

UX Note: Use AskUserQuestion for all user-facing questions.

1. Pre-flight

Check that the skills system is initialized:

test -d .nanoclawbster && echo "INITIALIZED" || echo "NOT_INITIALIZED"

If NOT_INITIALIZED: Run initSkillsSystem() first:

npx tsx -e "import { initNanoclawDir } from './skills-engine/init.js'; initNanoclawDir();"

Check for uncommitted git changes:

git status --porcelain

If there are uncommitted changes: Warn the user: "You have uncommitted changes. It's recommended to commit or stash them before updating. Continue anyway?" Use AskUserQuestion with options: "Continue anyway", "Abort (I'll commit first)". If they abort, stop here.

2. Fetch upstream

Run the fetch script:

./.claude/skills/update/scripts/fetch-upstream.sh

Parse the structured status block between <<< STATUS and STATUS >>> markers. Extract:

  • TEMP_DIR — path to extracted upstream files
  • REMOTE — which git remote was used
  • CURRENT_VERSION — version from local package.json
  • NEW_VERSION — version from upstream package.json
  • STATUS — "success" or "error"

If STATUS=error: Show the error output and stop.

If CURRENT_VERSION equals NEW_VERSION: Tell the user they're already up to date. Ask if they want to force the update anyway (there may be non-version-bumped changes). If no, clean up the temp dir and stop.

3. Preview

Run the preview to show what will change:

npx tsx scripts/update-core.ts --json --preview-only <TEMP_DIR>

This outputs JSON with: currentVersion, newVersion, filesChanged, filesDeleted, conflictRisk, customPatchesAtRisk.

Present to the user:

  • "Updating from {currentVersion} to {newVersion}"
  • "{N} files will be changed" — list them if <= 20, otherwise summarize
  • If conflictRisk is non-empty: "These files have skill modifications and may conflict: {list}"
  • If customPatchesAtRisk is non-empty: "These custom patches may need re-application: {list}"
  • If filesDeleted is non-empty: "{N} files will be removed"

4. Confirm

Use AskUserQuestion: "Apply this update?" with options:

  • "Yes, apply update"
  • "No, cancel"

If cancelled, clean up the temp dir (rm -rf <TEMP_DIR>) and stop.

5. Apply

Run the update:

npx tsx scripts/update-core.ts --json <TEMP_DIR>

Parse the JSON output. The result has: success, previousVersion, newVersion, mergeConflicts, backupPending, customPatchFailures, skillReapplyResults, error.

If success=true with no issues: Continue to step 7.

If customPatchFailures exist: Warn the user which custom patches failed to re-apply. These may need manual attention after the update.

If skillReapplyResults has false entries: Warn the user which skill tests failed after re-application.

6. Handle conflicts

If backupPending=true: There are unresolved merge conflicts.

For each file in mergeConflicts:

  1. Read the file — it contains conflict markers (<<<<<<<, =======, >>>>>>>)
  2. Check if there's an intent file for this path in any applied skill (e.g., .claude/skills/<skill>/modify/<path>.intent.md)
  3. Use the intent file and your understanding of the codebase to resolve the conflict
  4. Write the resolved file

After resolving all conflicts:

npx tsx scripts/post-update.ts

This clears the backup, confirming the resolution.

If you cannot confidently resolve a conflict: Show the user the conflicting sections and ask them to choose or provide guidance.

7. Run migrations

Run migrations between the old and new versions:

npx tsx scripts/run-migrations.ts <CURRENT_VERSION> <NEW_VERSION> <TEMP_DIR>

Parse the JSON output. It contains: migrationsRun (count), results (array of {version, success, error?}).

If any migration fails: Show the error to the user. The update itself is already applied — the migration failure needs manual attention.

If no migrations found: This is normal (most updates won't have migrations). Continue silently.

8. Verify

Run build and tests:

npm run build && npm test

If build fails: Show the error. Common causes:

  • Type errors from merged files — read the error, fix the file, retry
  • Missing dependencies — run npm install first, retry

If tests fail: Show which tests failed. Try to diagnose and fix. If you can't fix automatically, report to the user.

If both pass: Report success.

9. Cleanup

Remove the temp directory:

rm -rf <TEMP_DIR>

Report final status:

  • "Updated from {previousVersion} to {newVersion}"
  • Number of files changed
  • Any warnings (failed custom patches, failed skill tests, migration issues)
  • Build and test status

Troubleshooting

No upstream remote: The fetch script auto-adds upstream pointing to https://github.com/qwibitai/nanoclawbster.git. If the user forked from a different URL, they should set the remote manually: git remote add upstream <url>.

Merge conflicts in many files: Consider whether the user has heavily customized core files. Suggest using the skills system for modifications instead of direct edits, as skills survive updates better.

Build fails after update: Check if package.json dependencies changed. Run npm install to pick up new dependencies.

Rollback: If something goes wrong after applying but before cleanup, the backup is still in .nanoclawbster/backup/. Run:

npx tsx -e "import { restoreBackup, clearBackup } from './skills-engine/backup.js'; restoreBackup(); clearBackup();"

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.