skills: discover agent skills from shared directories #1507
No files matched your search
@@ -1,5 +1,12 @@
|
||||
# nixos
|
||||
|
||||
### Agent skills
|
||||
|
||||
Add a directory named after the skill with a `SKILL.md` and any supporting files.
|
||||
Use [`skills/generic/`](skills/generic) for skills shared by Claude Code and Pi,
|
||||
or [`skills/claude/`](skills/claude) for skills that rely on Claude Code features.
|
||||
Both directories are picked up automatically on the next system switch.
|
||||
|
||||
### Secret management
|
||||
|
||||
Two secret mechanisms coexist in this repo. They store, register, and rekey differently, so before working with any `.age` file identify which one it uses.
|
||||
|
||||
@@ -3,6 +3,11 @@ let
|
||||
cfg = config.custom.home.claude;
|
||||
user = config.custom.user;
|
||||
|
||||
claudeSkills = pkgs.symlinkJoin {
|
||||
name = "claude-code-skills";
|
||||
paths = [ ../../../skills/generic ../../../skills/claude ];
|
||||
};
|
||||
|
||||
claudeSettings = {
|
||||
remoteControlAtStartup = false;
|
||||
permissions.defaultMode = "auto";
|
||||
@@ -55,11 +60,7 @@ in
|
||||
# leaves ~/.claude/settings.json for Claude Code to save its choices in.
|
||||
environment.etc = {
|
||||
"claude-code/managed-settings.json".text = builtins.toJSON claudeSettings;
|
||||
"claude-code/.claude/skills/commit/SKILL.md".source = ./commit-skill/SKILL.md;
|
||||
"claude-code/.claude/skills/github-fetch/SKILL.md".source = ./github-fetch-skill/SKILL.md;
|
||||
"claude-code/.claude/skills/megamerge/SKILL.md".source = ./megamerge-skill/SKILL.md;
|
||||
"claude-code/.claude/skills/megamerge-sync/SKILL.md".source = ./megamerge-sync-skill/SKILL.md;
|
||||
"claude-code/.claude/skills/megamerge-place/SKILL.md".source = ./megamerge-place-skill/SKILL.md;
|
||||
"claude-code/.claude/skills".source = claudeSkills;
|
||||
};
|
||||
|
||||
home-manager.users.${user} = { lib, ... }: {
|
||||
|
||||
@@ -133,6 +133,10 @@ in
|
||||
|
||||
home.file = {
|
||||
".pi/agent/AGENTS.md".source = ./AGENTS.md;
|
||||
".pi/agent/skills" = {
|
||||
source = ../../../skills/generic;
|
||||
recursive = true;
|
||||
};
|
||||
".pi/agent/models.json" = {
|
||||
text = builtins.toJSON piModels;
|
||||
force = true;
|
||||
|
||||
@@ -5,10 +5,13 @@ let
|
||||
fqdnParts = lib.splitString "." config.networking.fqdn;
|
||||
shortHost = "${builtins.elemAt fqdnParts 0}.${builtins.elemAt fqdnParts 1}";
|
||||
|
||||
skillsDir = pkgs.linkFarm "async-coder-skills" [
|
||||
{ name = "commit.md"; path = ../../home/claude/commit-skill/SKILL.md; }
|
||||
{ name = "github-fetch.md"; path = ../../home/claude/github-fetch-skill/SKILL.md; }
|
||||
];
|
||||
allowedSkills = [ "commit" "github-fetch" ];
|
||||
skillsDir = pkgs.linkFarm "async-coder-skills" (map
|
||||
(name: {
|
||||
name = "${name}.md";
|
||||
path = ../../../skills/generic + "/${name}/SKILL.md";
|
||||
})
|
||||
allowedSkills);
|
||||
in
|
||||
{
|
||||
options.custom.services.async_coder = {
|
||||
@@ -107,7 +110,7 @@ in
|
||||
git_author_email = "jake@hillion.co.uk";
|
||||
|
||||
skills_path = skillsDir;
|
||||
allowed_skills = [ "commit" "github-fetch" ];
|
||||
allowed_skills = allowedSkills;
|
||||
|
||||
permissions.allow = [
|
||||
{ exact = "cargo --version"; }
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user