
sk
by lambdamechanic
SKILL.md
name: sk description: "How to use the repo-scoped sk CLI to manage Claude Skills in this codebase."
Using the sk CLI
sk is the repo-scoped Skills manager that installs, audits, and syncs Claude Skills listed in skills.lock.json. Treat it like Cargo for skills: installs live under ./skills, while the cache stays in ~/.cache/sk/repos.
When to reach for this skill
- You need to install or upgrade a skill from the canonical skills repo (
https://github.com/lambdamechanic/skills). - You want to verify the working tree is clean (
sk doctor --status,sk doctor --summary). - You are preparing to sync edits back to the upstream skills repository (
sk sync-back <install>).
Core workflow
-
Refresh the cache (optional but fast):
target/debug/sk update -
Install or upgrade a skill (alias keeps folder names stable):
target/debug/sk install https://github.com/lambdamechanic/skills testing-patterns --alias testing target/debug/sk upgrade testing -
Audit local installs before landing work:
target/debug/sk doctor --status --json # detect dirty trees vs lockfile target/debug/sk doctor --summary --json # shows pending upgrades or cache drift -
Sync edits upstream after modifying a skill under
./skills/<name>:target/debug/sk sync-back <name> --message "Describe the change"Once
sk config set default_repo <repo>is configured,sk sync-back <name>automatically targets that repo, uses<name>for the skill-path, and generatessk/sync/<name>/<timestamp>branches so the quickstart-mflag is the only required argument. Supply--repo/--skill-pathonly when you need to override the defaults.This creates a temp branch in the cached repo, copies your edited skill directory, commits, and pushes. On success
skrunsghfor you: it auto-opens a PR, enables auto-merge when GitHub reports the branch is clean, and prints the PR URL (or a conflict warning) so you can follow up if automation gets blocked. If the GitHub CLI is missing or the repo isn’t reachable via GitHub, you’ll see a warning plus manual PR instructions and can rungh pr createyourself once available.PR automation tips
- Run
gh auth statusonce per machine to ensure the GitHub CLI is logged in;skwill reuse your credentials. - Missing
rsyncprints a warning and falls back to a recursive copy before committing; installrsyncto keep large skills fast. - After the push, watch the terminal output:
Opened PR …(orReusing PR …) links to the branch that was just published.Auto-merge armed…means GitHub will land it once checks pass; otherwise you’ll seeAuto-merge blocked…with a link to fix conflicts manually.Auto-merge skipped…appears when checks can’t be armed (e.g., required approvals disabled); click through and finish by hand.
- When
ghis missing or unauthenticated you’ll see “Skipping PR automation …”; install/auth and rerunsk sync-backto finish the upload. - Automation currently uses GitHub’s standard
--mergestrategy; if your repo enforces--squash/--rebase, turn off auto-merge in the UI and land it manually after review. - If your PR output says
enablePullRequestAutoMerge, rungh repo edit <owner>/<repo> --enable-auto-merge(or visit the repo’s Settings → General page) once to flip the toggle.
- Run
-
Publish a brand-new skill that doesn’t exist upstream yet:
target/debug/sk sync-back <name> \ --repo https://github.com/lambdamechanic/skills \ --skill-path <subdir> \ --message "Add <name> skill"Provide
--repo/--skill-pathonly if you need something other than the configured defaults.skclones that repo, branches from the default tip (or your custom--branch), copies your local folder, pushes, and rewritesskills.lock.jsonwith the exact commit SHA/digest so status checks stay clean. You will always see the temporary branch name in the CLI output, e.g.Pushed branch 'sk/sync/<name>/<timestamp>' …, even though that branch is meant to be merged and deleted once the upstream PR lands.
Example: publishing sk
cd /path/to/sk-decisions
target/debug/sk sync-back sk \
--repo https://github.com/lambdamechanic/skills \
--skill-path sk \
--branch sk/add-sk-skill-doc \
--message "Add sk skill doc"
What happens:
skprints both the temporary branch name and the upstream repo it pushed to, so you can follow up on GitHub immediately.- The branch only needs to live long enough for you (or automation) to open a PR; the lockfile entry pins the pushed commit hash, so it’s safe to delete the branch once merged.
skills.lock.jsongains a new entry forskwith the push timestamp, digest, and commit ID; subsequentsk doctor --statusruns stay green because the on-disk tree matches that digest.
Guardrails
- Always run
bd update/bd closeso.beads/issues.jsonlmatches any skill changes. - Never edit
skills.lock.jsonby hand. Letsk install,sk upgrade, orsk removeupdate it; commit the lockfile alongside the skill changes. - If
sk doctor --statusreportsdirty, fix the local tree before runningsk upgradeorsk sync-backto avoid partial syncs. sk upgrade --allskips skills with local edits and prints reminders tosk sync-back <name>; treat that as a temporary state and clean them up promptly so future upgrades stay automatic.- When creating a new skill, always specify the upstream repo/path so
skcan register it and refresh the lockfile automatically. - Use
sk precommit(once implemented) to block local-only sources such asfile://entries.
Debug tips
target/debug/sk doctor --applyrebuilds missing installs or cache entries.target/debug/sk where <name>prints the absolute path of an installed skill and its cached repo clone.- Set
SK_TRACE=1to surface extra logging when diagnosing cache fetches or rsync failures.
Score
Total Score
Based on repository quality metrics
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
3ヶ月以内に更新がある
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
Reviews
Reviews coming soon