Skip to content

[common-skills migration] Add optional best-effort warp-skills install step - #13247

Draft
vkodithala wants to merge 6 commits into
masterfrom
oz/warp-skills-adoption
Draft

[common-skills migration] Add optional best-effort warp-skills install step#13247
vkodithala wants to merge 6 commits into
masterfrom
oz/warp-skills-adoption

Conversation

@vkodithala

@vkodithala vkodithala commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

What

Wire up the optional, best-effort warp-skills install step in bootstrap/run by calling the shared install_warp_skills wrapper resolved from warpdotdev/common-skills, instead of vendoring a copy of the installer in this repo.

Depends on warpdotdev/common-skills#37 (which adds install_warp_skills to the shared scripts).

Changes

  • After the common-skills step, script/bootstrap and script/run install the internal warp-skills (pinned in warp-skills-lock.json) by invoking the shared install_warp_skills wrapper through ./script/resolve_common_skills. They land in the same target as the common skills (project unless WARP_COMMON_SKILLS_INSTALL_TARGET=global).
  • The step is internal-only and best-effort: it no-ops for anyone without access to warpdotdev/warp-skills (external contributors) or when the lock is absent, and it can be skipped with --skip-warp-skills / WARP_SKIP_WARP_SKILLS_INSTALL=1. An unexpected failure logs a warning but never blocks bootstrap/run.
  • AGENTS.md and CONTRIBUTING.md document the step.

Testing

Ran the exact command bootstrap/run invoke, via the full resolver chain (client shim → common resolver → install_warp_skillsinstall_common_skills), pointing at the common-skills branch:

  • Best-effort / opt-out: --skip-warp-skills, WARP_SKIP_WARP_SKILLS_INSTALL=1, and a missing lock all exit 0 with a clean notice; an inaccessible source fails fast (no credential prompt) and skips — never aborting bootstrap/run.
  • Install against a ref carrying the content installs the locked skills, verifies (… match warp-skills-lock.json), writes .git/warp/warp-skills-lock.hash, and is idempotent under --if-needed; remove_warp_skills cleans up.
  • Common-skills behavior is unchanged (backward-compat verified in [common-skills migration] Add warp-skills install/remove wrappers + downstream lock refresh common-skills#37).
  • bash -n on script/bootstrap and script/run. Shell/docs-only change; no Rust touched, so ./script/format / cargo clippy were not run.

⚠️ Known state

  • warp-skills-lock.json currently pins ref: main, but the warp-skills content is not on main yet (it lives on oz/skills-migration, which currently carries only agent-attribution). Until the content is finalized on main and the lock regenerated, this step best-effort no-ops (exit 0; does not block bootstrap/run). Regenerate once warp-skills main is ready: update_common_skills_lock --source warpdotdev/warp-skills --lock-file warp-skills-lock.json.
  • Windows: the bootstrap.ps1 path installs common skills but does not wire up warp-skills yet, so warp-skills is macOS/Linux only for now.

Plan: https://staging.warp.dev/drive/notebook/R4ucMiSKpclPGJXzpoFu4t

This PR was generated with _Oz._

Add script/install_warp_skills to install the internal warpdotdev/warp-skills
skills pinned in warp-skills-lock.json. It is wired optionally and best-effort
into script/bootstrap and script/run after the common-skills step, skips on
--skip-warp-skills or WARP_SKIP_WARP_SKILLS_INSTALL=1, no-ops without a lock
file, and never fails its caller (e.g. external contributors without access).
The common-skills install flow is left untouched.

Document the optional step and opt-out in AGENTS.md and CONTRIBUTING.md, noting
it is not required for external contributors.

Co-Authored-By: Oz <oz-agent@warp.dev>
@cla-bot cla-bot Bot added the cla-signed label Jun 30, 2026
Run the skills CLI inside a throwaway temp dir and copy only the resulting
skill directories into the target (.agents/skills or ~/.agents/skills),
instead of running --copy from the repo root. Running from the repo root
made the CLI write/merge its own skills-lock.json into the committed
common-skills lock at runtime. The repo's skills-lock.json now stays clean.

Co-Authored-By: Oz <oz-agent@warp.dev>
@vkodithala vkodithala changed the title Add optional best-effort warp-skills install step [common-skills migration] Add optional best-effort warp-skills install step Jun 30, 2026
@vkodithala
vkodithala marked this pull request as ready for review June 30, 2026 22:13
@oz-for-oss

oz-for-oss Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

@vkodithala

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Overview

This PR adds a best-effort script/install_warp_skills step, wires it into script/bootstrap and script/run, and documents the optional internal skill installation flow.

Concerns

  • The installer reads warp-skills-lock.json only to extract the first ref, then runs skills add against that mutable ref. The committed computedHash values are never enforced, so the new lock file does not actually pin the installed skill content.
  • The warp-skills target selection does not use the actual common-skills target when that target is chosen interactively or inferred from existing installs, so the two installers can write to different locations.
  • Copy/setup failures inside the best-effort installer can still produce a successful "installed" message because the script intentionally omits set -e and does not check mkdir, rm, or cp results.

Security

  • The lock file's integrity hashes are bypassed during installation, which weakens the supply-chain guarantee described by the PR.

Verdict

Found: 0 critical, 3 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread script/install_warp_skills Outdated
tmp_dir="$(mktemp -d "${TMPDIR:-/tmp}/warp-skills.XXXXXX")"
trap 'rm -rf "${tmp_dir}"' EXIT

if ( cd "${tmp_dir}" && npx --yes "skills@${SKILLS_CLI_VERSION}" add "${source_spec}" \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ [IMPORTANT] [SECURITY] This installs from the mutable ref with skills add and never verifies the committed warp-skills-lock.json computedHash values, so the lock does not actually pin content; restore from the lock or validate hashes before copying skills.

Comment thread script/install_warp_skills Outdated
fi

# Install into the same target as the common skills (project by default).
if [[ "${WARP_COMMON_SKILLS_INSTALL_TARGET:-}" = "global" ]]; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ [IMPORTANT] This only respects WARP_COMMON_SKILLS_INSTALL_TARGET, but common-skills can choose global via the prompt or existing install state without setting that env var, so warp-skills can default to project-local and diverge from the common-skills target.

Comment thread script/install_warp_skills Outdated
[[ -d "${skill_dir}" ]] || continue
skill_name="$(basename "${skill_dir}")"
rm -rf "${target_dir:?}/${skill_name}"
cp -R "${skill_dir%/}" "${target_dir}/${skill_name}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ [IMPORTANT] Because the script runs without set -e, a failing mkdir, rm, or cp still falls through with installed=1 and reports success; check these operations and print the best-effort skip notice when copying fails.

vkodithala and others added 2 commits June 30, 2026 22:47
Pin the consumer lock to main (canonical) to match warp-server. main is empty
until warp-skills #1 merges, so the optional install step cleanly no-ops until
then; the common-skills downstream lock-automation refreshes it afterward.

Co-Authored-By: Oz <oz-agent@warp.dev>
Delete the vendored script/install_warp_skills and instead call the shared
wrapper via ./script/resolve_common_skills install_warp_skills, resolved from
warpdotdev/common-skills. bootstrap and run keep the best-effort || true guard
and the --skip-warp-skills / WARP_SKIP_WARP_SKILLS_INSTALL gating. Update
AGENTS.md and CONTRIBUTING.md accordingly.

Co-Authored-By: Oz <oz-agent@warp.dev>
- Clarify docs (CONTRIBUTING.md, AGENTS.md): warp-skills is internal-only —
  external contributors lack access to warpdotdev/warp-skills, so it no-ops for
  them.
- bootstrap/run: surface a warning if the warp-skills install unexpectedly
  fails, instead of silently swallowing it with || true (still non-blocking).
- Note that the Windows (bootstrap.ps1) path does not wire up warp-skills yet.

Co-Authored-By: Oz <oz-agent@warp.dev>
@vkodithala
vkodithala requested a review from johnturcoo July 2, 2026 20:21

@johnturcoo johnturcoo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks good!

The warp-skills install guard in bootstrap/run only checked INSTALL_WARP_SKILLS
(the --skip-warp-skills flag). Add a WARP_SKIP_WARP_SKILLS_INSTALL=1 check so the
documented env opt-out short-circuits before invoking the resolver, matching the
common-skills guard.

Co-Authored-By: Oz <oz-agent@warp.dev>
@vkodithala
vkodithala marked this pull request as draft July 31, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants