Skip to content

Install skills as regular files for each harness - #35

Merged
VirtualMachinist merged 4 commits into
mainfrom
cursor/harness-skill-copies-c5ef
Oct 25, 2026
Merged

VirtualMachinist merged 4 commits into
mainfrom
cursor/harness-skill-copies-c5ef

Conversation

@VirtualMachinist

@VirtualMachinist VirtualMachinist commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

Summary

Bezel already shipped shared Nushell skills (lapis, facet, geode, plus bootstrap, check, and laws). They now live in the canonical tree .agents/skills/. scripts/sync-skills writes regular-file copies to .claude/skills/, .grok/skills/, and .cursor/skills/. There is no .omp/skills/ and no .codex/skills/.

programs.bezel.enable no longer symlinks the tree to ~/.config/omp/agent/skills. It runs scripts/install-user-skills.sh, which copies each skill directory as regular files into:

  • ~/.agents/skills
  • ~/.claude/skills
  • ~/.grok/skills
  • ~/.cursor/skills

A 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. --force replaces those bytes and chmod's the file back to the mode it already had. --check reports 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.md is the one line @AGENTS.md.

TODO

  • lapis-lattice owns the canonical lapis skill. Hedronite/lapis-lattice#48 (draft) ships a project skill also named lapis, 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-level lapis skill (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.nu is live and ~/.local/bin/lapisq symlinks to it. scripts/install-user-skills.sh does 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 --force and 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.

--force replaces the drifted bytes and keeps the mode the regular file already had. A symlink such as lapisq is outside the skill tree, so it still points at the same lapis.nu path, 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. --check still writes nothing. --check and --force together are rejected.

omp after the old symlink

The Home Manager symlink at ~/.config/omp/agent/skills is gone. omp still discovers these skills at ~/.agents/skills/ because that path is a compatible user location on Skills:

Scope Locations
User ~/.agent/skills/, ~/.agents/skills/, ~/.claude/skills/, ~/.codex/skills/, ~/.config/opencode/skills/

~/.config/omp/agent/skills is 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 .omp skill outranks the compatible locations and skills with the same name do not merge. Pinned omp v18.2.6 getUserPathCandidates in packages/coding-agent/src/discovery/agents.ts joins the home directory with .agents and skills. Unverified: omp was not executed.

Inside lapis-lattice, the project skill named lapis (.claude/skills/lapis and .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.

Harness User path installed Project path in this repo Doc Notes
omp ~/.agents/skills .agents/skills Skills Compatible user and project locations, quoted above. Native user is ~/.omp/agent/skills/ and native project is .omp/skills/. Those are not installed: the docs say a native .omp skill outranks the others and same names do not merge. Pinned omp v18.2.6 getUserPathCandidates in packages/coding-agent/src/discovery/agents.ts joins the home directory with .agents and skills. getAgentDir() is ~/.omp/agent, not ~/.config/omp/agent/skills. Unverified: running omp. Unverified: any build that reads only the old ~/.config/omp/agent/skills path.
Codex ~/.agents/skills (same copy as omp) .agents/skills Build skills User scope is $HOME/.agents/skills. Repo scope is $REPO_ROOT/.agents/skills. No .codex/skills/ copy. Unverified: Codex reading CLAUDE.md.
Claude Code ~/.claude/skills .claude/skills Skills The location table's personal row is ~/.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 ~/.grok/skills .grok/skills Skills The skills section lists ./.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 .grok and .claude copies.
Cursor ~/.cursor/skills .cursor/skills and .agents/skills Skills Docs also load ~/.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.json is an example filesystem server. lapis mcp, facet mcp, and geode mcp stay 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.

Operation Skill command
lapis search, read, list, neighbors, resolve, recent, status, doctor nu lapis.nu <command>
lapis create, append, task, trash GAP
facet history, last, sessions, session, pins, env, diff, doctor nu facet.nu <command>
facet history --bodies / --id, blob, diff --bodies, request run, replay, env set/delete, pin, gc, session start/end GAP
geode list, verify, recipients, snapshots, policy, can, audit, custody, keyring nu geode.nu <command>
geode cat, open, mount, run, agent, keygen, seal, sign, vault init, vault add-recipient, vault rotate, policy set, keyring add, custody unlock/lock, gc, git unlock GAP
check, laws, bootstrap not MCP tools

Tests

This revision:

  • bash scripts/check-skill-copies.sh
  • bash scripts/check-user-skills.sh .agents/skills (plain install refuses byte drift and a symlinked file; --force repairs the bytes and keeps the previous mode; a lapisq symlink to lapis.nu stays 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.toml and nix flake check -L on 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 --check on the crate wants to reflow unrelated files, so that diff was not applied. The laws path edit is one string.

Open in Web Open in Cursor 

cursoragent and others added 4 commits October 25, 2026 00:35
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
VirtualMachinist marked this pull request as ready for review October 25, 2026 14:23
@VirtualMachinist
VirtualMachinist merged commit d378611 into main Oct 25, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants