skills: discover agent skills from shared directories #1507
No files matched your search
@@ -1,5 +1,12 @@
|
|||||||
# nixos
|
# 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
|
### 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.
|
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;
|
cfg = config.custom.home.claude;
|
||||||
user = config.custom.user;
|
user = config.custom.user;
|
||||||
|
|
||||||
|
claudeSkills = pkgs.symlinkJoin {
|
||||||
|
name = "claude-code-skills";
|
||||||
|
paths = [ ../../../skills/generic ../../../skills/claude ];
|
||||||
|
};
|
||||||
|
|
||||||
claudeSettings = {
|
claudeSettings = {
|
||||||
remoteControlAtStartup = false;
|
remoteControlAtStartup = false;
|
||||||
permissions.defaultMode = "auto";
|
permissions.defaultMode = "auto";
|
||||||
@@ -55,11 +60,7 @@ in
|
|||||||
# leaves ~/.claude/settings.json for Claude Code to save its choices in.
|
# leaves ~/.claude/settings.json for Claude Code to save its choices in.
|
||||||
environment.etc = {
|
environment.etc = {
|
||||||
"claude-code/managed-settings.json".text = builtins.toJSON claudeSettings;
|
"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".source = claudeSkills;
|
||||||
"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;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.${user} = { lib, ... }: {
|
home-manager.users.${user} = { lib, ... }: {
|
||||||
|
|||||||
@@ -133,6 +133,10 @@ in
|
|||||||
|
|
||||||
home.file = {
|
home.file = {
|
||||||
".pi/agent/AGENTS.md".source = ./AGENTS.md;
|
".pi/agent/AGENTS.md".source = ./AGENTS.md;
|
||||||
|
".pi/agent/skills" = {
|
||||||
|
source = ../../../skills/generic;
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
".pi/agent/models.json" = {
|
".pi/agent/models.json" = {
|
||||||
text = builtins.toJSON piModels;
|
text = builtins.toJSON piModels;
|
||||||
force = true;
|
force = true;
|
||||||
|
|||||||
@@ -5,10 +5,13 @@ let
|
|||||||
fqdnParts = lib.splitString "." config.networking.fqdn;
|
fqdnParts = lib.splitString "." config.networking.fqdn;
|
||||||
shortHost = "${builtins.elemAt fqdnParts 0}.${builtins.elemAt fqdnParts 1}";
|
shortHost = "${builtins.elemAt fqdnParts 0}.${builtins.elemAt fqdnParts 1}";
|
||||||
|
|
||||||
skillsDir = pkgs.linkFarm "async-coder-skills" [
|
allowedSkills = [ "commit" "github-fetch" ];
|
||||||
{ name = "commit.md"; path = ../../home/claude/commit-skill/SKILL.md; }
|
skillsDir = pkgs.linkFarm "async-coder-skills" (map
|
||||||
{ name = "github-fetch.md"; path = ../../home/claude/github-fetch-skill/SKILL.md; }
|
(name: {
|
||||||
];
|
name = "${name}.md";
|
||||||
|
path = ../../../skills/generic + "/${name}/SKILL.md";
|
||||||
|
})
|
||||||
|
allowedSkills);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.custom.services.async_coder = {
|
options.custom.services.async_coder = {
|
||||||
@@ -107,7 +110,7 @@ in
|
|||||||
git_author_email = "jake@hillion.co.uk";
|
git_author_email = "jake@hillion.co.uk";
|
||||||
|
|
||||||
skills_path = skillsDir;
|
skills_path = skillsDir;
|
||||||
allowed_skills = [ "commit" "github-fetch" ];
|
allowed_skills = allowedSkills;
|
||||||
|
|
||||||
permissions.allow = [
|
permissions.allow = [
|
||||||
{ exact = "cargo --version"; }
|
{ 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