- 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
8.1 KiB
Skills Deployment Strategy
Current State
This repository (~/proj/skills) is a development and testing repository for AI agent skills. It is NOT the deployment location.
Actual deployment happens from ~/proj/dotfiles:
- Source:
~/proj/dotfiles/claude/skills/ - Runtime:
~/.claude/skills/and~/.config/opencode/skills/ - Managed by: Home Manager (Nix)
Deployment Model
Global Skills (System-Wide)
Path: ~/proj/dotfiles/claude/skills/<skill-name>/
Deployed to:
~/.claude/skills/<skill-name>/(Claude Code)~/.config/opencode/skills/<skill-name>/(OpenCode)
Who uses: All AI agents, all projects
Examples:
worklog- Document work sessionsupdate-spec-kit- Update spec-kit ecosystem
Project-Local Skills
Path: <project>/.opencode/command/<skill-name>.md
Deployed to: Loaded directly from project directory
Who uses: Only when working in that specific project
Examples:
/testin dotfiles (runsnix flake check)/rebuildin dotfiles (runsnixos-rebuild)/speckit.*in skills repo (spec-kit commands)
Deployment Categories for Our New Skills
1. screenshot-latest (Global)
Category: Global skill
Why: Useful in any project where user takes screenshots
Security: Low risk (just finds existing files)
Deployment path: ~/proj/dotfiles/claude/skills/screenshot-latest/
Usage scenarios:
- Writing documentation with screenshots
- Analyzing UI/UX in any project
- Debugging visual issues
- General screenshot reference
2. niri-window-capture (Global, Security-Sensitive)
Category: Global skill
Why: Window capture capability useful system-wide
Security: HIGH RISK (invisible cross-workspace capture)
Deployment path: ~/proj/dotfiles/claude/skills/niri-window-capture/
Requirements before deployment:
- User must review SECURITY.md
- User must configure niri block-out rules
- User must understand audit logging
- User must trust the AI agent
Usage scenarios:
- Capture window from inactive workspace for analysis
- "Find the window with error message" across all workspaces
- Compare windows side-by-side without switching
- Analyze UI state invisibly
3. Project Commands (This Repo Only)
Category: Project-local
Why: Specific to skills development workflow
Path: ~/proj/skills/.opencode/command/
Potential commands:
/test-skill <name>- Test a skill before deployment/deploy-skill <name>- Copy skill to dotfiles for deployment/security-check <skill>- Run security analysis on skill
Deployment Workflow
For Global Skills
-
Develop in skills repo:
cd ~/proj/skills # Build skill: skills/<skill-name>/ -
Test locally (manual symlink):
ln -s ~/proj/skills/skills/<skill-name> ~/.claude/skills/<skill-name>-test # Test with AI agent rm ~/.claude/skills/<skill-name>-test -
Copy to dotfiles:
cp -r ~/proj/skills/skills/<skill-name> ~/proj/dotfiles/claude/skills/ cd ~/proj/dotfiles -
Add to Home Manager (edit
home/claude.nix):home.file.".claude/skills/<skill-name>" = { source = ../claude/skills/<skill-name>; recursive = true; }; -
Add to OpenCode (edit
home/opencode.nix):home.file.".config/opencode/skills/<skill-name>" = { source = ../claude/skills/<skill-name>; recursive = true; }; -
Rebuild system:
cd ~/proj/dotfiles sudo nixos-rebuild switch --flake .#delpad -
Restart agents:
- OpenCode: Exit and restart
- Claude Code: Restart application
For Project-Local Commands
-
Create in project:
cd ~/proj/skills mkdir -p .opencode/command vim .opencode/command/test-skill.md -
OpenCode loads automatically on next startup in this directory
Version Control Strategy
skills repo (development)
- Purpose: Development, experimentation, version history
- Branch: Feature branches for each skill
- Commits: Detailed development history
- Status: Working code, specs, analysis
dotfiles repo (deployment)
- Purpose: System configuration, stable deployments
- Branch: main (stable only)
- Commits: "Add skill" (deployment markers)
- Status: Production-ready only
Workflow:
skills repo (dev) --[copy]--> dotfiles repo (deploy) --[nix]--> runtime
↓ ↓ ↓
git commit git commit ~/.claude/skills/
version history deployment marker (symlink to nix store)
Security Considerations
Global Skills Deployment
Before deploying globally, ensure:
- ✅ Security analysis documented
- ✅ Risks clearly communicated
- ✅ Audit logging implemented
- ✅ Protection mechanisms documented
- ✅ User can review before using
Do NOT deploy if:
- ❌ Security implications unclear
- ❌ No audit trail
- ❌ High risk without mitigations
- ❌ Requires per-project configuration
niri-window-capture Specific
Additional requirements:
- SECURITY.md must be in deployed skill
- README must have security warning
- SKILL.md must reference security docs
- User must configure niri block-out rules BEFORE deployment
Deployment checklist:
- Review SECURITY.md
- Configure niri window rules:
window-rule { match app-id=r#"^org\.keepassxc\.KeePassXC$"# block-out-from "screen-capture" } - Test audit logging works:
journalctl --user -t niri-capture - Verify blocked windows can't be captured
- Deploy to dotfiles
- Document deployment in dotfiles commit message
OpenCode Agent Functionality
From opencode.ai docs (need to research more):
- OpenCode has "agents" concept separate from skills
- Agents appear to be different AI personalities/modes
- Skills work with all agents
- Commands can specify which agent via frontmatter
TODO: Research OpenCode agents to understand:
- What are the available agents?
- How do skills interact with agents?
- Should skills be agent-specific?
- Do we need agent-specific deployment?
For now: Deploy skills globally, they work with all agents.
Current Skills Status
| Skill | Status | Security | Deploy Location | Deployed? |
|---|---|---|---|---|
| screenshot-latest | ✅ Complete | Low risk | Global | ⏸️ No |
| niri-window-capture | ✅ Complete | HIGH RISK | Global | ⏸️ No (awaiting security review) |
| worklog | ✅ Deployed | Low risk | Global | ✅ Yes (in dotfiles) |
| update-spec-kit | ✅ Deployed | Low risk | Global | ✅ Yes (in dotfiles) |
Deployment Commands (Reference)
Test locally:
# Temporary symlink
ln -s ~/proj/skills/skills/<skill-name> ~/.claude/skills/<skill-name>-test
# Test with AI
# ...
# Remove test
rm ~/.claude/skills/<skill-name>-test
Deploy to dotfiles:
# Copy skill
cp -r ~/proj/skills/skills/<skill-name> ~/proj/dotfiles/claude/skills/
# Edit Nix configs
vim ~/proj/dotfiles/home/claude.nix
vim ~/proj/dotfiles/home/opencode.nix
# Rebuild
cd ~/proj/dotfiles
sudo nixos-rebuild switch --flake .#delpad
Verify deployment:
# Check symlinks exist
ls -la ~/.claude/skills/<skill-name>
ls -la ~/.config/opencode/skills/<skill-name>
# Check they point to Nix store
readlink ~/.claude/skills/<skill-name>/SKILL.md
# Should show: /nix/store/.../SKILL.md
Next Steps
- Decide on deployment for screenshot-latest and niri-window-capture
- Review security for niri-window-capture before deploying
- Research OpenCode agents to understand deployment implications
- Create deployment helper (optional): script to copy + update Nix configs
- Document in dotfiles after deployment (update skills README)
References
- Dotfiles deployment:
~/proj/dotfiles/docs/skills-and-commands-workflow.md - Existing skills:
~/proj/dotfiles/claude/skills/ - Home Manager config:
~/proj/dotfiles/home/claude.nix,~/proj/dotfiles/home/opencode.nix - Skills development:
~/proj/skills/README.md