update-agent-skills
Update Agent Skills
Goal
Refresh installed agent skills with the standard skills CLI workflow.
Use the normal update command first. If the skills were installed with project scope and the CLI does not detect upstream changes, reinstall each tracked project skill explicitly from its recorded source.
For project-scoped installs, treat a no-change npx skills update result as a mandatory fallback trigger. Do not wait for separate proof that a specific skill is stale.
Prefer the bundled reinstall script over manual command discovery. It already knows how to read skills-lock.json, filter to installed project skills, batch by repository, and pass non-interactive flags.
Detect the Installation Scope
-
Check whether the target skills are project-scoped or global.
- Project-scoped installs usually have a local
skills-lock.jsonand one or more agent skill directories such as.agents/skills/,.claude/skills/, or.augment/skills/. - Global installs are typically tracked outside the project, for example in
~/.agents/.skill-lock.jsonor$XDG_STATE_HOME/skills/.skill-lock.json.
- Project-scoped installs usually have a local
-
Check which skills are actually managed by the
skillsCLI.- Use
skills-lock.jsonor the relevant global lock file as the source of truth. - Do not assume custom or manually copied skills are tracked.
- For project-scoped installs, consider the installed skill directories under
.agents/skills/,.claude/skills/, or.augment/skills/.
- Use
Standard Update Flow
- Run:
npx skills update
-
Branch on the installation scope and the command result:
- If the install is global and
npx skills updatesucceeds, stop there unless the user explicitly asked for a forced reinstall. - If the install is project-scoped and the command clearly reports that one or more tracked skills were updated, stop there.
- If the install is project-scoped and the command reports
All skills are up to date, or otherwise makes no tracked-skill changes, go directly to the fallback flow below.
- If the install is global and
-
Do not use a presence check in the installed project skill directories to decide whether the fallback is needed. Presence only tells you which tracked skills exist locally and therefore must be reinstalled.
-
Do not pause to inspect
npx skills add --help, read the CLI source, or rediscover flags unless the bundled script fails. That investigation slows the task down and is unnecessary for the normal fallback path.
Fallback Flow for Project-Scoped Skills
- Open
skills-lock.json. - Treat
skills-lock.jsonas the source of truth for tracked skills. - Cross-check it against the installed project skill directories and only keep skills that are both:
- listed in
skills-lock.json - present in at least one supported directory such as
.agents/skills/,.claude/skills/, or.augment/skills/
- listed in
- The bundled script lives inside the installed
update-agent-skillsskill directory, not in the user's projectscripts/folder. - Prefer the bundled script for the reinstall loop and run it immediately after a no-op project-scoped update. Resolve it from the installed skill path first:
for dir in .agents/skills .claude/skills .augment/skills; do
candidate="$dir/update-agent-skills/scripts/reinstall_project_skills_from_lock.sh"
if [ -x "$candidate" ]; then
"$candidate" --project-root .
break
fi
done
- If the script is installed under
.agents/skills/update-agent-skills/, prefer calling that path directly instead of searching the whole workspace. - If the script is not present in those standard installed skill paths, fall back to the manual grouped reinstall flow immediately. Do not use broad
findorrgsearches across the workspace just to rediscover the same script. - The script is the fast path because it batches skills that share a repository and uses
-yto avoid interactive prompts. - If you do not use the script, and
npx skills updatewas a no-op for a project-scoped install, reinstall every matching skill manually. Do not stop after inspecting just one skill, and do not conclude success merely because the directories are present. - For each matching skill or skill group that shares a repository, read its
sourceand reinstall it explicitly.
npx skills add [repository] --skill [skill]
- Prefer the non-interactive form when reinstalling manually:
npx skills add [repository] --skill [skill1] [skill2] ... -y
- Repeat that command for every matching repository or skill. Do not stop after the first one, and do not guess missing repositories manually.
Example loop:
group tracked installed skills by repository:
npx skills add [repository] --skill [skill1] [skill2] ... -y
Example:
npx skills add https://github.com/code-sherpas/agent-skills --skill atomic-design update-agent-skills write-persistence-representations -y
- If the
sourceTypeisgithuband thesourceis recorded asowner/reposuch asgithub/awesome-copilot, convert it to the repository form expected by the CLI, for examplehttps://github.com/owner/repo.
Interactive Choices
If the CLI prompts for installation details:
- Agent selection: choose the default option unless the task says otherwise.
- Scope: choose
Projectfor project-scoped updates. - Installation method: choose
Symlink.
Validation
Before finishing:
- Confirm the target skill directory now contains the updated skill content.
- Confirm the refreshed skill still matches the source and the expected skill name.
- If the install was project-scoped and
npx skills updatereturnedAll skills are up to date, call out that this no-op result triggered the explicit reinstall loop. - Do not report success based only on the fact that the skill directories already existed before the reinstall.
- If the bundled script was unavailable or failed and you had to fall back to manual commands, call that out explicitly.
Report the Outcome
When finishing the task:
- State whether
npx skills updateworked or the fallback reinstall flow was needed. - State which skills were refreshed and from which repository.
- State whether the update was project-scoped or global.
More from code-sherpas/agent-skills
neverthrow-return-types
Require `neverthrow`-based return types in TypeScript and JavaScript code whenever the surrounding technology allows it. Use when creating, refactoring, reviewing, or extending standalone functions, exported module functions, class methods, object methods, service methods, repository methods, and similar APIs that should expose explicit success and failure result types in their signatures. Prefer `Result<T, E>` for synchronous code and `ResultAsync<T, E>` for asynchronous code. Only skip a `neverthrow` return type when a framework, library, runtime interface, or externally imposed contract is incompatible and requires a different return shape.
16neverthrow-wrap-exceptions
Capture exceptions and promise failures with `neverthrow` instead of hand-written `try/catch` in TypeScript and JavaScript code. Use when wrapping synchronous functions that may throw, promise-returning functions that may throw before returning, existing `PromiseLike` values that may reject, or third-party APIs such as parsers, database clients, HTTP clients, file-system helpers, serializers, and SDK calls. Prefer `Result.fromThrowable` for synchronous throwers, `ResultAsync.fromThrowable` for promise-returning functions that may throw or reject, and `ResultAsync.fromPromise` when you already have a `PromiseLike` value in hand. Only keep `try/catch` when the language construct, cleanup requirement, or framework boundary truly requires it.
11atomic-design
Create or update web UI components with a strict reuse-first workflow. Use when building, refactoring, restyling, or extending frontend or template components while minimizing raw DOM or HTML by reusing or generalizing existing components first.
10write-persistence-representations
Create or update persistence-layer data representations in any stack, including ORM entities, schema definitions, table mappings, document models, collection definitions, and similar database-facing code. Use when agents needs to add or change persisted fields, identifiers, relationships, indexes, timestamps, auditing fields, or storage mappings in frameworks, libraries, or ORMs such as Prisma, TypeORM, Sequelize, Drizzle, Mongoose, Hibernate/JPA, Doctrine, Ecto, Active Record, or equivalent persistence technologies.
7business-logic
Identify, interpret, review, or write business logic in code. Use when an agent needs to decide whether code expresses business rules, business algorithms, or business workflows, or when it must implement, preserve, or refactor code that creates, stores, or transforms data according to real business policies.
7immutable-domain-entities
Require the immutable design pattern for domain entities. Use when an agent needs to create, modify, review, or interpret domain entities and should preserve identity while expressing state changes through new immutable instances. Domain entities must be modeled as immutable classes, not as plain type aliases or interfaces paired with standalone functions.
7