[Flake] Update. [Claude] Adds claude to dev tools
This commit is contained in:
24
flake.lock
generated
24
flake.lock
generated
@@ -83,11 +83,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1779726825,
|
||||
"narHash": "sha256-RUkMrREjKDQrA+dA9+xZviGAxM5W1aVdyOr/bSYpHrE=",
|
||||
"lastModified": 1784350909,
|
||||
"narHash": "sha256-ZWyzLbS1yKUTeFJLmdVuWNnHttL333/ldJbEE+KzCrM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "b179bde238977f7d4454fc770b1a727eaf55111c",
|
||||
"rev": "4ce190229c73d44536caa7072f6308fb2d8feeb3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -311,11 +311,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1779414137,
|
||||
"narHash": "sha256-XpwuFhwnfwPbzImZeUWWns///UEpoKNkpl1hN90C3Ag=",
|
||||
"lastModified": 1781205112,
|
||||
"narHash": "sha256-PaoUtmk+qIP/ESdxkxnY7mUMpMHjix88qu22R5GLQqE=",
|
||||
"owner": "shezdy",
|
||||
"repo": "hyprsplit",
|
||||
"rev": "0fc01e7930625ecb3e069f5dc8e1d61eab929f3b",
|
||||
"rev": "6b00b677d8905fb38779c91e12d6294e0e586a44",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -487,11 +487,11 @@
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1779971959,
|
||||
"narHash": "sha256-R5nauXyqyfRUFiZycFFZdkF7wl6eaUpPLst35+2nJQY=",
|
||||
"lastModified": 1784707089,
|
||||
"narHash": "sha256-2V/6imsUgB7mPZlHY54oeVBRDoZbPKnvzwkAHUSSufk=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ec942ba042dad5ef097e2ef3a3effc034241f011",
|
||||
"rev": "b3fe9581c9061c749abef42b6d4ee7b7c05c33fa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -540,11 +540,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1777944972,
|
||||
"narHash": "sha256-VfGRo1qTBKOe3s2gOv8LSoA6Fk19PvBlwQ1ECN0Evn8=",
|
||||
"lastModified": 1783174389,
|
||||
"narHash": "sha256-aCWC8ngycU7OdJrU2+Je3qf+1a2ykuBvpPhZT/9tXMc=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "c591bf665727040c6cc5cb409079acb22dcce33c",
|
||||
"rev": "f1406619a3884cd5c47992a70b8b35c9c0fcb4c9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
14
home-manager/features/development/claude.nix
Normal file
14
home-manager/features/development/claude.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
_: {
|
||||
|
||||
programs.claude-code = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
effortLevel = "medium";
|
||||
skipAutoPermissionsPrompt = true;
|
||||
includeCoAuthoredBy = false;
|
||||
|
||||
skills = ./claude/skills;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
---
|
||||
name: elegance
|
||||
description: Iteratively study and apply elegant coding patterns. Each iteration - understand the code, research what simple and elegant code looks like, apply learnings, verify with CI. Use as a standalone refactoring pass or when the user asks to make code more elegant, simple, or idiomatic.
|
||||
source: https://github.com/srid/emanote/tree/master/.claude/skills/elegance
|
||||
---
|
||||
|
||||
# Elegance
|
||||
|
||||
Iteratively study and apply elegant coding patterns. Each iteration: understand the code, research what simple & elegant code looks like, apply learnings, verify with CI.
|
||||
|
||||
Run for **3 iterations** (or as specified by the user — can be a number or a duration like `2h`).
|
||||
|
||||
## 0. Determine Scope
|
||||
|
||||
- Before starting, use the `AskUserQuestion` tool to ask: should this operate on the **whole codebase** or only on **changes in the current branch/PR**?
|
||||
- If scoped to current branch/PR, use `git diff main...HEAD` (or the appropriate base branch) to identify changed files and limit all subsequent steps to those files only.
|
||||
|
||||
## For each iteration (1 to N)
|
||||
|
||||
### 1. Understand
|
||||
|
||||
- Read through the relevant source files.
|
||||
- Note patterns, repetition, unnecessary complexity, non-idiomatic code.
|
||||
|
||||
### 2. Research
|
||||
|
||||
- Use WebSearch/WebFetch to research what simple, elegant (yet readable!) code looks like for the relevant technology.
|
||||
- Look for idiomatic patterns, standard simplifications, and community best practices.
|
||||
- Focus on: simplicity, readability, removing unnecessary abstraction, leveraging language features.
|
||||
|
||||
### 3. Apply
|
||||
|
||||
- Refactor based on what you learned.
|
||||
- This can include: edits, code reorganization, or even rewrites where simplicity demands it.
|
||||
- Prefer fewer lines, clearer intent, and idiomatic style.
|
||||
- Don't add abstractions — remove them.
|
||||
|
||||
### 4. Verify
|
||||
|
||||
- Run tests/CI to check edits.
|
||||
- If CI fails, fix the issues before proceeding to the next iteration.
|
||||
|
||||
### 5. Log Progress
|
||||
|
||||
- Briefly note what changed in this iteration and why.
|
||||
|
||||
## After all iterations
|
||||
|
||||
- Do **not** git commit. Leave all changes in the working directory for the user to review.
|
||||
- Present a summary of what changed across all iterations.
|
||||
|
||||
## Principles
|
||||
|
||||
- **Simple over clever**: Elegant code is simple code.
|
||||
- **Readable over terse**: Brevity is good, but not at the cost of clarity.
|
||||
- **Idiomatic over generic**: Use the language's strengths. Write TypeScript like TypeScript, not like Java.
|
||||
- **Each iteration builds on the last**: Don't undo previous improvements. Deepen them.
|
||||
@@ -11,6 +11,9 @@
|
||||
./nix.nix
|
||||
./lua.nix
|
||||
./sh.nix
|
||||
|
||||
# Claude Code
|
||||
./claude.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Useful for getting the import information from github info for flakes.
|
||||
nix-prefetch-github
|
||||
|
||||
nixfmt-rfc-style # Formatter
|
||||
nixfmt # Formatter
|
||||
nil # Language Server
|
||||
statix # Lints and suggestions for Nix
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user