- Transform tufte-press from reference guide to conversation-aware generator - Add JSON generation from conversation context following strict schema - Create build automation scripts with Nix environment handling - Integrate CUPS printing with duplex support - Add comprehensive workflow documentation Scripts added: - skills/tufte-press/scripts/generate-and-build.sh (242 lines) - skills/tufte-press/scripts/build-card.sh (23 lines) Documentation: - Updated SKILL.md with complete workflow instructions (370 lines) - Updated README.md with usage examples (340 lines) - Created SKILL-DEVELOPMENT-STRATEGY-tufte-press.md (450 lines) - Added worklog: 2025-11-10-tufte-press-skill-evolution.org Features: - Agent generates valid JSON from conversation - Schema validation before build (catches errors early) - Automatic Nix shell entry for dependencies - PDF build via tufte-press toolchain - Optional print with duplex support - Self-contained margin notes enforced - Complete end-to-end testing Workflow: Conversation → JSON → Validate → Build → Print Related: niri-window-capture, screenshot-latest, worklog skills
3.2 KiB
3.2 KiB
AI Skills Nix Flake
This repository now provides a Nix flake for declarative deployment of AI agent skills to Claude Code and OpenCode.
Quick Start
# In your flake.nix
{
inputs.ai-skills.url = "path:/home/dan/proj/skills";
# or when published: "github:yourusername/skills";
outputs = { ai-skills, ... }: {
homeConfigurations.youruser = {
imports = [ ai-skills.homeManagerModules.ai-skills ];
services.ai-skills = {
enable = true;
skillsPath = "${ai-skills}/skills";
skills = [ "worklog" "screenshot-latest" "tufte-press" ];
};
};
};
}
What This Provides
Home Manager Module
Declaratively deploy skills to ~/.claude/skills/ and ~/.config/opencode/skills/ with:
- Automatic
opencode-skillsplugin installation - Per-skill configuration
- Support for both agents (Claude Code + OpenCode)
Packages
Individual skill packages for custom deployment:
packages.x86_64-linux.worklogpackages.x86_64-linux.screenshot-latestpackages.x86_64-linux.tufte-presspackages.x86_64-linux.update-spec-kitpackages.x86_64-linux.all-skills(combined)
Development Shell
nix develop
# Provides: bash, shellcheck, jq
# Plus validation helpers
Available Skills
Current skills (only existing ones are packaged):
- ✅
worklog- Create org-mode worklogs - ✅
update-spec-kit- Update spec-kit ecosystem - ⏸️
screenshot-latest- Find latest screenshots (not yet in git) - ⏸️
tufte-press- Generate study card JSON (not yet in git) - ⏸️
niri-window-capture- Window screenshots (not yet in git)
Skills marked ⏸️ are developed but not committed to git yet.
Files
- flake.nix - Main flake definition
- modules/ai-skills.nix - Home Manager module
- NIX-FLAKE-USAGE.md - Complete usage documentation
- skills/ - Individual skill directories
Usage
See NIX-FLAKE-USAGE.md for:
- Detailed configuration options
- Integration examples
- Troubleshooting guide
- Advanced usage patterns
Testing
# Check flake
nix flake check
# Show outputs
nix flake show
# Enter dev shell
nix develop
# Build a skill
nix build .#worklog
Example: Using in dotfiles
# ~/proj/dotfiles/flake.nix
{
inputs.ai-skills.url = "path:/home/dan/proj/skills";
outputs = { ai-skills, ... }: {
homeConfigurations.dan = {
imports = [ ai-skills.homeManagerModules.ai-skills ];
services.ai-skills = {
enable = true;
skillsPath = "${ai-skills}/skills";
skills = [ "worklog" ];
enableClaudeCode = true;
enableOpenCode = true;
installOpencodePlugin = true;
};
};
};
}
Then:
cd ~/proj/dotfiles
home-manager switch --flake .#dan
Status
- ✅ Flake structure created
- ✅ Home Manager module implemented
- ✅ Package outputs working
- ✅ Documentation complete
- ⏸️ Not yet tested in consuming repository
- ⏸️ opencode-skills plugin installation needs testing
Next Steps
- Test module in dotfiles repo
- Verify opencode-skills plugin installs correctly
- Add remaining skills to git
- Publish to GitHub for remote access