Repository navigation
Install skills as regular files for each harness - #35
Merged
Merged
Conversation
Move the shared skills to .agents/skills and keep byte-identical regular-file copies for Claude, Grok, and Cursor. Home Manager installs those trees as regular files under the four user paths, and the skills check fails on drift or a symlink. Co-authored-by: Evan Eugene Pincham <TheVirtualMachinist@protonmail.com>
Copy the executable bit onto harness copies and user installs, and use 755 for directories so a Nix store source does not leave the next install unable to repair drift. Co-authored-by: Evan Eugene Pincham <TheVirtualMachinist@protonmail.com>
Nix store paths drop the owner-write bit, so the drift check treats 755 and 555 as the same executable file. Installs still chmod directories to 755. Co-authored-by: Evan Eugene Pincham <TheVirtualMachinist@protonmail.com>
A live file with different bytes, a symlink, or a non-regular path makes install-user-skills.sh print a drift report and write nothing. --force replaces the bytes and restores the mode the regular file already had, so a lapisq symlink to lapis.nu keeps its path and mode. Co-authored-by: Evan Eugene Pincham <TheVirtualMachinist@protonmail.com>
VirtualMachinist
marked this pull request as ready for review
October 25, 2026 14:23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bezel already shipped shared Nushell skills (
lapis,facet,geode, plusbootstrap,check, andlaws). They now live in the canonical tree.agents/skills/.scripts/sync-skillswrites regular-file copies to.claude/skills/,.grok/skills/, and.cursor/skills/. There is no.omp/skills/and no.codex/skills/.programs.bezel.enableno longer symlinks the tree to~/.config/omp/agent/skills. It runsscripts/install-user-skills.sh, which copies each skill directory as regular files into:~/.agents/skills~/.claude/skills~/.grok/skills~/.cursor/skillsA second run leaves a file alone when its bytes already match, and it keeps that file's mode. When a managed file already exists with different bytes, is a symlink, or is not a regular file, the plain run prints a drift report and writes nothing.
--forcereplaces those bytes and chmod's the file back to the mode it already had.--checkreports drift and writes nothing. Unrelated skill directories already in those folders are left in place. A symlinked skills directory is replaced so the copy is not written through the link.Skill command behavior is unchanged. The envelope is still
{ ok, command, exit, data, error }.This repo had no
AGENTS.md.CLAUDE.mdis the one line@AGENTS.md.TODO
lapisskill. Hedronite/lapis-lattice#48 (draft) ships a project skill also namedlapis, covering create, append, task, analytics, tree-retrieve, and tome. After #48 merges, Bezel vendors that skill. This PR does not vendor it. Inside lapis-lattice that project skill shadows this user-levellapisskill (omp keeps one copy when the name matches; a project skill outranks a user skill), and the two copies will drift until Bezel vendors the lattice skill.Installer drift
On castle,
~/.agents/skills/lapis/lapis.nuis live and~/.local/bin/lapisqsymlinks to it.scripts/install-user-skills.shdoes not overwrite a file that already exists with different bytes.The default run scans all four user trees first. For each managed path that is a symlink, a non-regular file, or a regular file whose bytes differ, it prints one of:
install-user-skills: byte drift: <path>install-user-skills: symlink: <path>install-user-skills: not a regular file: <path>Then it prints
refusing to overwrite drifted files; re-run with --forceand exits 1. It has written nothing: bytes, mode, extra files, and the other three harness trees stay as they were. A missing file is not drift.--forcereplaces the drifted bytes and keeps the mode the regular file already had. A symlink such aslapisqis outside the skill tree, so it still points at the samelapis.nupath, and that path stays executable when its mode was executable. Home Manager's activation does not pass--force, so a drifted live file fails activation and stays in place.--checkstill writes nothing.--checkand--forcetogether are rejected.omp after the old symlink
The Home Manager symlink at
~/.config/omp/agent/skillsis gone. omp still discovers these skills at~/.agents/skills/because that path is a compatible user location on Skills:~/.agent/skills/,~/.agents/skills/,~/.claude/skills/,~/.codex/skills/,~/.config/opencode/skills/~/.config/omp/agent/skillsis not in that table. Native user skills remain~/.omp/agent/skills/<name>/SKILL.md. This installer does not write that directory: the same page says a native.ompskill outranks the compatible locations and skills with the same name do not merge. Pinned omp v18.2.6getUserPathCandidatesinpackages/coding-agent/src/discovery/agents.tsjoins the home directory with.agentsandskills. Unverified: omp was not executed.Inside lapis-lattice, the project skill named
lapis(.claude/skills/lapisand.agents/skills/lapis) is the copy omp keeps for that repo. The user-level Bezel skill of the same name is shadowed there. That is the drift the TODO above is for.Harness discovery
Fetched on 2026-10-25. Nothing here was checked by running omp, Claude Code, Grok, Cursor, or Codex.
~/.agents/skills.agents/skills~/.omp/agent/skills/and native project is.omp/skills/. Those are not installed: the docs say a native.ompskill outranks the others and same names do not merge. Pinned omp v18.2.6getUserPathCandidatesinpackages/coding-agent/src/discovery/agents.tsjoins the home directory with.agentsandskills.getAgentDir()is~/.omp/agent, not~/.config/omp/agent/skills. Unverified: running omp. Unverified: any build that reads only the old~/.config/omp/agent/skillspath.~/.agents/skills(same copy as omp).agents/skills$HOME/.agents/skills. Repo scope is$REPO_ROOT/.agents/skills. No.codex/skills/copy. Unverified: Codex readingCLAUDE.md.~/.claude/skills.claude/skills~/.claude/skills/<name>/SKILL.md. That table does not list~/.agents/skills. Unverified: a live session ignoring~/.agents/skills. The page says a skill-folder entry may be a symlink. This repo still writes regular files.~/.grok/skills.grok/skills./.grok/skills/and~/.grok/skills/. The same page's Agents.md section also lists user-level~/.agents/skills/. Unverified: project discovery of.agents/skills(the skills section does not list it). Unverified: symlink following, and whether Grok lists both the.grokand.claudecopies.~/.cursor/skills.cursor/skillsand.agents/skills~/.agents/skills/and, for compatibility,.claude/skills/and~/.claude/skills/. Unverified: whether Cursor lists one skill twice when more than one of those trees is present.MCP tools
Bezel does not ship an MCP server.
templates/mcp.jsonis an example filesystem server.lapis mcp,facet mcp, andgeode mcpstay as those tools ship them. This repo does not list those servers' tool names, so the table is the skill commands and the operations the skills refuse.nu lapis.nu <command>nu facet.nu <command>--bodies/--id, blob, diff--bodies, request run, replay, env set/delete, pin, gc, session start/endnu geode.nu <command>check,laws,bootstrapTests
This revision:
bash scripts/check-skill-copies.shbash scripts/check-user-skills.sh .agents/skills(plain install refuses byte drift and a symlinked file;--forcerepairs the bytes and keeps the previous mode; alapisqsymlink tolapis.nustays pointed at that path)nix build -L --no-link .#checks.x86_64-linux.skills-cli(check-skill-cli: ok)Earlier on this branch,
cargo test --offline --manifest-path crates/bezel-bridle/Cargo.tomlandnix flake check -Lon x86_64-linux passed. The flake check omitted aarch64-darwin, aarch64-linux, and x86_64-darwin because this host cannot build them. This commit does not change the crate or those other checks.There is no formatter wired in this repo.
rustfmt --checkon the crate wants to reflow unrelated files, so that diff was not applied. The laws path edit is one string.