docs: document pi and opencode coverage

This commit is contained in:
Miguel Palhas
2026-08-19 15:13:51 +01:00
parent 6f84c63a19
commit 6f05756870
2 changed files with 10 additions and 8 deletions
+9 -7
View File
@@ -1,22 +1,24 @@
# agent-skills
Single source of truth for custom agent skills + commands. Shared across **Claude Code** and **Codex**, every machine.
Single source of truth for custom agent skills + commands. Shared across **Claude Code**, **Codex**, **Pi** and **opencode**, every machine.
## Layout
```
skills/ # SKILL.md dirs — Claude Code AND Codex both read these (open Agent Skills standard)
commands/ # slash commands — Claude Code only (Codex ignores)
skills/ # SKILL.md dirs — all four tools read these (open Agent Skills standard)
commands/ # slash commands — Claude Code and opencode (Codex ignores)
hooks/ # Claude Code hooks — see hooks/README.md, wiring is manual
claude-md/ # shared instruction fragments — imported by both entry files
claude-md/ # shared instruction fragments — imported by entry files, concatenated for Pi/opencode
entry/ # entry files: ~/.claude/CLAUDE.md and ~/.codex/AGENTS.md
systemd/ # user timers: weekly review + hour log — one machine only, see below
bin/link.sh # bootstrap symlinks for non-Nix machines
bin/link.sh # bootstrap symlinks + generated AGENTS.md for non-Nix machines
nix/home.nix # home-manager module for NixOS machines
flake.nix # exposes homeModules.default
```
Skills are portable: only `name`+`description` frontmatter is required by both tools; Claude-only fields (`user-invocable`, `args`) are ignored by Codex. Cross-skill refs use root-relative paths (`linear-common/COMMON.md`), so they resolve under `~/.claude/skills` and `~/.agents/skills` alike.
Skills are portable: only `name`+`description` frontmatter is required by any of the tools; Claude-only fields (`user-invocable`, `args`) are ignored elsewhere. Claude Code reads them from `~/.claude/skills`, Codex and Pi from `~/.agents/skills`, and opencode auto-loads both — so the two links cover all four. Cross-skill refs use root-relative paths (`linear-common/COMMON.md`), so they resolve under either root.
Context files differ: Claude Code and Codex support `@file` imports, so their entry files import the shared fragments by path. Pi and opencode do not, so each gets a single `AGENTS.md` generated by concatenating the same fragments — on NixOS the home-manager module builds it in the store, elsewhere `bin/link.sh` writes it (idempotent; set `MACHINE=name` to pick a `claude-md/machines/` profile, default is `default`).
## Install
@@ -27,7 +29,7 @@ git clone https://git.naps.pt/yolo/agent-skills.git ~/tea/yolo/agent-skills
~/tea/yolo/agent-skills/bin/link.sh
```
Symlinks each skill into `~/.claude/skills/` and `~/.agents/skills/`, commands into `~/.claude/commands/`, hooks into `~/.claude/hooks/`, `claude-md/` fragments into `~/.claude/`. Idempotent; any pre-existing real dir is moved to `~/.agent-skills-backup/` (outside the discovery path, so it isn't picked up as a duplicate skill). Re-run after adding a skill.
Symlinks each skill into `~/.claude/skills/` and `~/.agents/skills/`, commands into `~/.claude/commands/` and `~/.config/opencode/commands/`, hooks into `~/.claude/hooks/`, `claude-md/` fragments into `~/.claude/`, and generates `~/.pi/agent/AGENTS.md` and `~/.config/opencode/AGENTS.md` from the fragments. Idempotent; any pre-existing real dir (or non-generated AGENTS.md) is moved to `~/.agent-skills-backup/` (outside the discovery path, so it isn't picked up as a duplicate skill). Re-run after adding a skill.
Hooks still need one manual step: the `settings.json` snippet in `hooks/README.md`. Entry files are linked automatically — `entry/CLAUDE.md` and `entry/codex-AGENTS.md` hold the machine-local sections and `@import` the shared fragments, so both tools read the same rules with no copy and no drift.
+1 -1
View File
@@ -1,5 +1,5 @@
{
description = "naps62 agent skills shared across Claude Code + Codex, all machines";
description = "naps62 agent skills shared across Claude Code, Codex, Pi and opencode, all machines";
outputs = { self, ... }: {
# import in your home-manager config's `imports = [ ... ]`