Agent skill

pi-nix-syntax

Use when converting Pi config/extension/skill setup (Pi settings.json packages, ~/.pi/agent/extensions, git:... sources) into this dotfiles repo's Nix representation (skills-catalog/agent-skills-nix, modules/shell/pi/default.nix home.file links), or converting the other direction.

Stars 53
Forks 5

Install this agent skill to your Project

npx add-skill https://github.com/edmundmiller/dotfiles/tree/main/.agents/skills/pi-nix-syntax

SKILL.md

Pi ↔ Nix syntax conversions (this repo)

This repo intentionally splits responsibilities:

  • Pi packages + extensions live in: config/pi/settings.jsonc (rendered to ~/.pi/agent/settings.json).
  • Local Pi extensions live in: config/pi/extensions/*.ts and are linked into ~/.pi/agent/extensions/ by Nix.
  • Skills are not loaded via Pi packages[].skills anymore; skills are installed via agent-skills-nix (child flake skills/).

If you see skills collisions, it usually means skills were enabled both ways.

Canonical mapping

1) Pi settings.jsonc packages → stays Pi syntax (no Nix rewrite)

If the thing you’re converting is a Pi packages entry like:

jsonc
{
  "source": "git:github.com/tmustier/pi-extensions",
  "extensions": ["tab-status/tab-status.ts"],
  "skills": [],
}

…then in this repo it should generally remain a config/pi/settings.jsonc entry.

Nix only ensures the file gets placed at ~/.pi/agent/settings.json.

2) Local extension file → Nix home.file symlink

Pi-style: “I want this TS file to be a Pi extension.”

Nix-style (this repo):

  1. Put code in:
    • config/pi/extensions/<name>.ts
  2. Link it into Pi extensions dir via:
    • modules/shell/pi/default.nixhome-manager.users.<user>.home.file.".pi/agent/extensions/<name>.ts".source = "${configDir}/pi/extensions/<name>.ts";

Rule: anything under ~/.pi/agent/extensions/*.ts must default-export a factory.

3) Pi skills → agent-skills-nix catalog

We do not use config/pi/settings.jsonc packages[].skills for installing skills.

Instead:

  • Local skills: add config/agents/skills/<skill-name>/SKILL.md.
    • auto-enabled (see skills/flake.nix: skills.enableAll = ["local"]).
  • Remote/pinned skills: add to skills/flake.nix:
    • programs.agent-skills.sources.<src> = { path = inputs.<src>.outPath; ... }
    • programs.agent-skills.skills.explicit.<skillId> = { from = "<src>"; path = "..."; }

Rule: avoid nested-symlink collisions by flattening nested IDs (example: skill-creator instead of extending-pi/skill-creator).

Conversions

Pi → Nix (how to implement in this repo)

Given a Pi-ish request, classify it:

  1. Remote extension package (git:, npm:, https:):
  • Put/keep it in config/pi/settings.jsonc under packages.
  1. Local extension (your own .ts):
  • Create config/pi/extensions/<name>.ts.
  • Add a home.file link in modules/shell/pi/default.nix.
  1. Skill (SKILL.md):
  • If local: create config/agents/skills/<name>/SKILL.md.
  • If remote: pin via skills/flake.nix (child flake) and select via skills.explicit.
  • Ensure config/pi/settings.jsonc package entries have "skills": [] to avoid collisions.

Nix → Pi (how to express the effective Pi result)

  1. If Nix is linking a file into ~/.pi/agent/extensions/<x>.ts, then the Pi-side view is simply:
  • “There exists an extension at ~/.pi/agent/extensions/<x>.ts.”
  • No settings.json change required.
  1. If Nix is generating ~/.pi/agent/settings.json from config/pi/settings.jsonc, then the Pi-side view is:
  • “My Pi packages list includes …” (copy the JSONC stanza).
  1. If Nix installs skills via agent-skills-nix, then the Pi-side view is:
  • “Shared skills exist on disk in ~/.agents/skills/<name>/SKILL.md.”
  • They are not sourced from Pi packages[].skills.

Quick templates

Add a new local skill

  • Path: config/agents/skills/<name>/SKILL.md
  • Frontmatter must match directory name.

Add a new local extension

  • Path: config/pi/extensions/<name>.ts
  • Must: export default function (pi: ExtensionAPI) { ... }
  • Link in modules/shell/pi/default.nix under home.file.

Expand your agent's capabilities with these related and highly-rated skills.

edmundmiller/dotfiles

zbench

Benchmark interactive zsh performance with zsh-bench and track regressions. Use when benchmarking shell startup, comparing zsh latency after config changes, investigating slow shell, or running git bisect on performance. Trigger phrases: "benchmark zsh", "shell is slow", "zbench", "zsh-bench", "shell startup time", "profile zsh", "zsh performance".

53 5
Explore
edmundmiller/dotfiles

nix-rebuild

Rebuild nix-darwin/NixOS system after dotfiles changes. Use when config files managed by Nix (lazygit, ghostty, etc.) need to be regenerated, or after editing any .nix file in the dotfiles repo.

53 5
Explore
edmundmiller/dotfiles

hass-config-flow

Interact with Home Assistant via the REST API on a NixOS host. Use when adding integrations, querying entities, managing config flows, creating API tokens, or automating HA setup programmatically. Also covers identifying device protocols (Matter, Zigbee, Thread, HomeKit) from the device registry. Trigger phrases: "add HA integration", "configure home assistant", "query HA entities", "create HA token", "HA REST API", "pair homekit", "set up matter in HA", "add spotify to HA", "is this device zigbee or thread", "what protocol is this device", "move devices to ZHA", "identify matter devices".

53 5
Explore
edmundmiller/dotfiles

hass-declarative

Manage Home Assistant automations, scenes, and scripts declaratively via NixOS modules. Covers adding/editing/removing entities in the domain-based Nix structure, the ensureEnabled wrapper (initial_state enforcement), the sweep service that cleans orphaned entities, entity identity (IDs, slugs, unique_ids), the eval test assertions, and the build-time manifest. Trigger phrases: "add HA automation", "new scene", "new script", "remove automation", "declarative HA", "sweep unmanaged", "entity drift", "ghost entity", "orphaned automation", "HA domain file", "eval-automations test", "hass assertion", "ensureEnabled", "initial_state".

53 5
Explore
edmundmiller/dotfiles

agenix-secrets

Create, edit, and wire up agenix-encrypted secrets in this dotfiles repo. Use when adding API keys, tokens, credentials, passwords, or any sensitive values to NixOS host configs. Trigger phrases: "add a secret", "encrypt with agenix", "new age secret", "hide this value", "agenix secret".

53 5
Explore
edmundmiller/dotfiles

linear

Read-only Linear issue access via the Linear GraphQL API.

53 5
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results