Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ inputs.nixpkgs.lib.extend (
githubId = 105790745;
name = "Sergii Maksymov";
};
kusold = {
github = "kusold";
githubId = 509966;
name = "Mike Kusold";
};
uesyn = {
github = "uesyn";
githubId = 17411645;
Expand Down
1 change: 1 addition & 0 deletions packages/skills/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ pkgs, flake }: pkgs.callPackage ./package.nix { inherit flake; }
64 changes: 64 additions & 0 deletions packages/skills/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
lib,
stdenv,
fetchzip,
makeWrapper,
nodejs,
versionCheckHook,
flake,
}:

let
yaml = fetchzip {
url = "https://registry.npmjs.org/yaml/-/yaml-2.8.3.tgz";
hash = "sha256-sslihpXhi8dVxXJ8svHg4lpKGdGL74Oqqs5J/P/jvDg=";
};
in
stdenv.mkDerivation rec {
pname = "skills";
version = "1.5.0";

src = fetchzip {
url = "https://registry.npmjs.org/${pname}/-/${pname}-${version}.tgz";
hash = "sha256-FWmQof42nLo8+w3UQBaalcJ4sAMRoZqeFnvuSe5yroI=";
};

nativeBuildInputs = [ makeWrapper ];
# nodejs in buildInputs (not nativeBuildInputs) so the fixup-phase
# patchShebangs --host rewrite of bin/cli.mjs resolves to the runtime node.
buildInputs = [ nodejs ];

installPhase = ''
runHook preInstall

mkdir -p $out/libexec/skills/node_modules/yaml
cp -r ${yaml}/* $out/libexec/skills/node_modules/yaml/

cp -r bin dist package.json $out/libexec/skills/

mkdir -p $out/bin
makeWrapper $out/libexec/skills/bin/cli.mjs $out/bin/skills \
--prefix PATH : ${lib.makeBinPath [ nodejs ]} \
--set DISABLE_TELEMETRY 1

ln -s $out/bin/skills $out/bin/add-skill

runHook postInstall
'';

doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];

passthru.category = "Claude Code Ecosystem";

meta = with lib; {
description = "The open agent skills tool for installing and managing skills across AI coding agents";
homepage = "https://github.com/vercel-labs/skills";
changelog = "https://github.com/vercel-labs/skills/releases/tag/v${version}";
license = licenses.mit;
sourceProvenance = with lib.sourceTypes; [ fromSource ];
maintainers = with flake.lib.maintainers; [ kusold ];
mainProgram = "skills";
platforms = platforms.all;
};
}
Loading