All functions are exposed via the company skills flake's lib output (which
is generated by mkSkillsFlake).
Returns a shellHook string for use in mkShell.
skills.mkSkillsHook {
skills = [ "docx" "pdf" ]; # optional, defaults to all available
targetDir = ".agents/skills/"; # optional, where to write skill directories
gitExclude = true; # optional, write a .gitignore for flake-managed skills
}| Parameter | Default | Description |
|---|---|---|
skills |
all available | List of skill names to sync |
targetDir |
".agents/skills/" |
Where to write skill directories |
gitExclude |
true |
Write a .gitignore inside targetDir that ignores only flake-managed skills. Hand-written project-specific skills in the same directory remain tracked by git. Set to false to version-control flake-managed skills. |
On each shell entry it copies the selected skills into the target directory,
removes any previously-synced skills that are no longer in the list, and
optionally writes a .gitignore inside the target directory that ignores
only the flake-managed skill subdirectories (plus itself).
Builds a Nix derivation containing the selected skills as a store path. Useful for CI, Docker images, or anywhere you need an immutable reference rather than a mutable local copy.
skills.mkSkillsPackage {
inherit pkgs;
skills = [ "docx" "pdf" ];
}List of all available skill names (strings).
Attribute set mapping each skill name to its Nix store path. Exposed for
downstream composition via extraSkillsFlakes.
Called by company skill flakes to produce a complete flake output set.
flake-skills.lib.mkSkillsFlake {
nixpkgs = nixpkgs; # required — your nixpkgs input
skillsSrc = ./skills; # required — path to skills directory
extraSkillsFlakes = []; # optional — upstream skill flakes to merge
supportedSystems = [ ... ]; # optional — defaults to linux + darwin, x86_64 + aarch64
}Returns { lib, skillNames, skillsSrc, allSkillSources, packages, devShells } —
a complete flake output set.
| Parameter | Default | Description |
|---|---|---|
nixpkgs |
— | The consumer's nixpkgs input |
skillsSrc |
— | Path to directory of skill subdirs |
extraSkillsFlakes |
[] |
Upstream skill flakes to compose |
supportedSystems |
[ "x86_64-linux" ... ] (4 archs) |
Systems to generate outputs for |