Resources for Claude Code and Codex, targeting Go development using Mike's ClearPath style and house rules.
- Skills — Reusable instructions that teach AI agents your coding conventions
- Hooks — Executables triggered by Claude Code events (e.g., logging, validation)
| Skill | Description |
|---|---|
go-house-rules |
Apply ClearPath, doterr-only errors, go-dt path/file types, and testing conventions |
go-clearpath-auditor |
Audit Go code for ClearPath compliance (read-only, produces report) |
go-bubbletea-tui-author |
Author Bubble Tea TUI models and components |
go-cli-tui-author |
Author CLI commands using go-cliutil |
go-config-file-author |
Author config loading/saving using go-cfgstore |
go-dt-filepath-refactorer |
Refactor string paths to go-dt domain types |
go-error-handling-author |
Create/extend doterr error sentinels |
go-rfc9457-problem-details-author |
Author RFC 9457 Problem Details responses |
go-sqlparams-query-author |
Author parameterized SQL using go-sqlparams |
go-testing-assertion-author |
Write tests using house testing libraries |
Canonical Go guidance shared across skills (in references/):
go-error-handling.md— doterr error handling patternsgo-filepath-dirpath-types.md— go-dt path/file domain typesgo-non-negotiables.md— absolute rules that must not be violatedgo-package-design.md— package structure guidelinesgo-required-coding-style.md— ClearPath coding stylego-testing.md— testing conventions and libraries
rsync(usually pre-installed on macOS/Linux)make
git clone https://github.com/mikeschinkel/ai-agent-depot.git
cd ai-agent-depot
make syncThis will:
- Create symlinks from each skill's
references/to the canonical./references/directory - Sync all skills to
~/.claude/skills/(for Claude Code) - Sync all skills to
~/.codex/skills/(for Codex)
| Target | Description |
|---|---|
make sync |
Sync skills to both Claude Code and Codex |
make sync-claude |
Sync skills to ~/.claude/skills/ only |
make sync-codex |
Sync skills to ~/.codex/skills/ only |
make dryrun |
Preview what sync would change (no writes) |
make relink |
Recreate reference symlinks (called automatically by sync) |
make doctor |
Show resolved paths and list available skills/refs |
make pull |
Git pull latest changes |
make build-hook |
Build claude-log-hook binary |
make install-hook |
Install claude-log-hook to hooks/bin/ |
Skills auto-apply when Claude detects a relevant Go task (based on skill descriptions). You can also explicitly invoke:
/go-house-rules
Or mention in your prompt: "Use the go-house-rules skill."
Explicitly invoke by name where supported in the UI/CLI:
$go-house-rules
A simple hook that logs all Claude Code events to a file. Useful for debugging, auditing, or understanding what Claude is doing.
What it does:
- Reads JSON event data from stdin (provided by Claude Code)
- Pretty-prints the JSON for readability
- Appends to a log file (creates parent directories if needed)
Build and install:
make build-hook # Build to hooks/claude-log-hook/claude-log-hook
make install-hook # Install to hooks/bin/claude-log-hookConfigure Claude Code:
Add to your ~/.claude/settings.json:
{
"hooks": {
"PreToolUse": [
{
"matcher": "",
"hooks": ["$HOME/path/to/hooks/bin/claude-log-hook"]
}
],
"PostToolUse": [
{
"matcher": "",
"hooks": ["$HOME/path/to/hooks/bin/claude-log-hook"]
}
]
}
}Required environment variable:
export CLAUDE_LOG_FILEPATH="$HOME/.claude/logs/claude.log"If CLAUDE_LOG_FILEPATH is not set, the hook exits silently (no logging occurs).
ai-agent-depot/
├── references/ # Canonical shared reference files
│ ├── go-error-handling.md
│ ├── go-filepath-dirpath-types.md
│ └── ...
├── skills/
│ ├── go-house-rules/
│ │ ├── SKILL.md # Skill instructions
│ │ └── references/ # Symlink → ../../references/
│ ├── go-clearpath-auditor/
│ │ └── ...
│ └── ...
├── hooks/
│ ├── bin/ # Compiled hook binaries (git-ignored)
│ └── claude-log-hook/ # Hook source code
│ ├── main.go
│ ├── go.mod
│ └── go.sum
├── scripts/
│ └── relink.sh # Creates reference symlinks
└── Makefile
Edit canonical files in ./references/, then run make sync to propagate changes to Claude Code and Codex.
The references/ directories inside each skill are symlinks to the canonical ./references/ directory, so changes are automatically picked up.
Some skills reference external files (e.g., doterr.go, go-dt error sentinels). By default, they fetch from GitHub. Set these environment variables to use local paths instead:
| Variable | Purpose | Default (if unset) |
|---|---|---|
GO_DOTERR_FILEPATH |
Local path to doterr.go for embedding in packages |
Fetches from go-doterr |
GO_DT_ERRORS_FILEPATH |
Local path to go-dt/errors.go for checking existing sentinels |
Fetches from go-dt |
GO_DT_DIRPATH |
Local path to go-dt package directory |
References GitHub repo |
CLAUDE_LOG_FILEPATH |
Log file path for the claude-log-hook | Hook exits silently if unset |
Example (add to your shell profile):
export GO_DOTERR_FILEPATH="$HOME/go/src/github.com/mikeschinkel/go-doterr/doterr.go"
export GO_DT_ERRORS_FILEPATH="$HOME/go/src/github.com/mikeschinkel/go-dt/errors.go"
export GO_DT_DIRPATH="$HOME/go/src/github.com/mikeschinkel/go-dt"
export CLAUDE_LOG_FILEPATH="$HOME/.claude/logs/claude.log"Or hardcode paths directly in the reference files if you prefer.
AGPL-3.0-or-later — If you modify and distribute these skills, or run modified versions as a network service, you must share your source under the same license.