AI configuration files and utilities
Adam's collection of configuration files and command-line utilities designed
to streamline common development tasks and improve productivity when working
with AI tools and configurations.
Installation
This configuration is designed to be installed using GNU
Stow to create symlinks from within your
home directory:
git clone https://github.com/adamspiers/ai-config.git
stow -d . -t ~ ai-configTo remove:
stow -d . -t ~ -D ai-configAlternatively, you can manually copy individual files to your desired
locations. This project is licensed under the GPL v3, so please preserve the
license information when redistributing or modifying the code.
Contents
AI agent configuration
.claude/
Claude Code configuration containing:
CLAUDE.md- Global instructions and coding rulessettings.json- Permission configuration for allowed bash commandscommands/- Custom slash commands:commit- Intelligent git commit workflowdo- Task execution helperdry- Dry-run mode for testing changesgen-prp- Generate PR descriptionsgen-tasks- Generate task lists from specificationsinit2- Project initializationiter- Iterative development workflowlint- Code lintingobs- Obsidian integrationreflect- Self-reflection promptreview- Code reviewsmall- Small change workflowstage- Git staging helpertest- Test runner
agents/- Specialized sub-agents:code-deduplicator- Remove code duplicationcode-linter- Automated lintingcode-refactorer- Refactor large code unitscode-reviewer- Code review analysisdoc-updater- Update documentation based on learningsgit-committer- Commit message generationgit-stager- Selective git stagingprp-generator- Generate Product Requirements Promptstask-generator- Generate tasks from PRPstask-implementer- Task implementationtask-orchestrator- Complete workflow orchestrationtest-runner- Test execution
skills/- Agent Skills (modular capability packages):safe-rm/- Safe file deletion with git-aware backupgit-staging/- Non-interactive git staging techniques
.config/opencode/
OpenCode configuration (parallel to Claude Code):
opencode.json- Main configuration with permission settingsopencode-lmstudio.json- Local LM Studio provider setupcommand/- Slash commands (mirrors.claude/commands/)agent/- Sub-agents (mirrors.claude/agents/, plustask-orchestrator)plugin/- JavaScript plugins:env-protection.js- Prevents exposure of environment variablesnotification.js- Desktop notifications for agent events
Command and Agent Delegation
Commands (.claude/commands/ and .config/opencode/command/) and agents
(.claude/agents/ and .config/opencode/agents/) are designed as thin wrappers
that delegate to skills. This ensures:
- No duplication of implementation content between platforms
- Single source of truth in skills (
.agents/skills/) - Easy maintenance and consistency
See AGENTS.md for the detailed delegation pattern.
Scripts (bin/)
ai-safe-rm- Git-aware safe file deletion script (used by safe-rm skill):- Tracked+unmodified files: deleted directly (recoverable from git)
- Tracked+modified files: backed up to
.safe-rm/with content hash - Untracked files: backed up to
.safe-rm/with content hash
ccu- Runs the latest version ofccusageto monitor Claude Code usage statisticsccul- Live monitoring of Claude Code usage with automatic refresh
every 5 seconds using blocks display format; although for live monitoring,
I actually prefer Claude Code Usage
Monitor (uv tool install claude-monitor) (not to be confused withnpx ccmonitorfrom
shinagaki/ccmonitor which also looks
OK but far less popular)clandclaude- Wrappers for running the local Claude Code installationcursor- Launches Cursor IDE with systemd resource limits (memory, CPU, I/O)llm-setup- Installs/upgrades llm with common plugins
(gpt4all, anthropic, gemini, openrouter, deepseek)
AppArmor profiles (root-etc-stow-pkg/apparmor.d/)
WIP security profiles for sandboxing AI agents:
abstractions/ai-agent-base- Base permissions (network, temp dirs, sensitive file deny rules)abstractions/ai-agent-git- Git operationsabstractions/ai-agent-github- GitHub CLI accessabstractions/ai-agent-npm- npm/Node.js operationsabstractions/ai-agent-opencode- OpenCode-specific permissionsabstractions/ai-agent-safe-commands- Whitelisted safe commandshome.adam.bin.oc- Main OpenCode profile
Shell configuration (.shared_rc.d/)
Shell configuration fragments loaded by
shell-env:
lmstudio- Adds LM Studio bin directory to PATH
Testing (tests/)
test_ai_safe_rm.py- Unit tests for theai-safe-rmscript
Other files
AGENTS.md- Instructions for AI agents working in this repository.editorconfig- Editor formatting rules.stow-local-ignore- Files to exclude from stow deployment
Requirements
- Bash shell
- Node.js/npm (for ccusage functionality)
- GNU Stow (for deployment)
License
This project is licensed under the GNU General Public License v3.0 - see the
LICENSE file for details.
Author
Adam Spiers