File tree Expand file tree Collapse file tree
.agents/skills/skill-creator Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ description: Guides repo-local skill creation and updates. Use when adding or ed
88` .agents/skills/ ` is the source of truth for repo-local skills. ` .claude/skills ` is generated by
99` agent-skills-nix ` through the Nix dev-shell hook and is gitignored — never edit or commit it.
1010
11- ` nix/agent-skills.nix ` holds the local-only wiring, and the flake's ` nix-filter ` includes only
12- ` .agents/skills ` in the skill source . There are intentionally no global ` agent-skills-nix ` targets
11+ ` nix/agent-skills.nix ` holds the local-only wiring, and its ` lib.fileset ` source includes only
12+ ` .agents/skills ` . There are intentionally no global ` agent-skills-nix ` targets
1313and no git-hook skill sync here.
1414
1515## Adding or Editing a Skill
Original file line number Diff line number Diff line change 3030 url = "github:anomalyco/models.dev" ;
3131 flake = false ;
3232 } ;
33- nix-filter. url = "github:numtide/nix-filter" ;
3433 rust-overlay = {
3534 url = "github:oxalica/rust-overlay" ;
3635 inputs. nixpkgs. follows = "nixpkgs" ;
Original file line number Diff line number Diff line change 1- { inputs , ... } :
1+ { inputs , lib , ... } :
22let
33 root = ./.. ;
44in
2222 commonArgs
2323 version
2424 ;
25- nixFilter = inputs . nix-filter. lib ;
26- rustSrc = import ./rust-src.nix { inherit nixFilter root ; } ;
27- repoSrc = nixFilter {
28- inherit root ;
29- exclude = [
30- ( nixFilter . matchName "node_modules" )
31- ( nixFilter . matchName "target" )
32- ( nixFilter . matchName "dist" )
33- ( nixFilter . matchName "coverage" )
34- ] ;
25+ rustSrc = import ./rust-src.nix { inherit lib root ; } ;
26+ repoSrc = lib . cleanSourceWith {
27+ name = "source" ;
28+ src = root ;
29+ filter =
30+ path : type :
31+ ! (
32+ type == "directory"
33+ && builtins . elem ( baseNameOf path ) [
34+ "node_modules"
35+ "target"
36+ "dist"
37+ "coverage"
38+ ]
39+ ) ;
3540 } ;
3641 ccusage-clippy = craneLib . cargoClippy (
3742 commonArgs
Original file line number Diff line number Diff line change 44# * ccusage-core/build.rs reads ../../../flake.lock
55# * config_schema.rs tests include_str! ../../../../ccusage.example.json
66# * main.rs tests include_str! ../../../../package.json
7- { nixFilter , root } :
8- nixFilter {
7+ { lib , root } :
8+ lib . fileset . toSource {
99 inherit root ;
10- include = [
11- " rust"
12- " flake.lock"
13- " ccusage.example.json"
14- " package.json"
10+ fileset = lib . fileset . unions [
11+ ( root + / rust)
12+ ( root + / flake.lock)
13+ ( root + / ccusage.example.json)
14+ ( root + / package.json)
1515 ] ;
1616}
Original file line number Diff line number Diff line change 33# recompiling into an uncached `rust/target` on every CI run. Built by the CI
44# test job via `nix build .#ccusage-tests`; the derivation succeeds only when
55# `cargo test --workspace` passes.
6- { inputs , ... } :
6+ { inputs , lib , ... } :
77let
88 root = ./.. ;
99in
2222 rustToolchain = pkgs . rust-bin. fromRustupToolchainFile ( root + /rust-toolchain.toml ) ;
2323 craneLib = ( inputs . crane. mkLib pkgs ) . overrideToolchain rustToolchain ;
2424 inherit ( config . packages. ccusage. passthru ) cargoArtifacts commonArgs ;
25- nixFilter = inputs . nix-filter. lib ;
26- testSrc = import ./rust-src.nix { inherit nixFilter root ; } ;
25+ testSrc = import ./rust-src.nix { inherit lib root ; } ;
2726 in
2827 {
2928 packages. ccusage-tests = craneLib . cargoTest (
You can’t perform that action at this time.
0 commit comments