Restructure repo for Claude Code user-level deployment

Move agent files into agents/<name>/AGENT.md convention, add install.sh
symlink script with --uninstall support, and add placeholder directories
for skills and output-styles.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
shahondin1624
2026-03-16 18:30:35 +01:00
parent 506457ad87
commit a06e21e315
10 changed files with 166 additions and 0 deletions

53
README.md Normal file
View File

@@ -0,0 +1,53 @@
# Claude Code Agents
A collection of custom Claude Code agents for software development workflows.
## Included Agents
| Agent | Description |
|-------|-------------|
| `acceptance-criteria-verifier` | Verifies implementation against acceptance criteria |
| `code-reviewer` | Performs code reviews |
| `issue-planner` | Creates implementation plans from issues |
| `issue-selector` | Helps select the next issue to work on |
| `plan-implementer` | Implements a plan step by step |
| `user-story-drafter` | Drafts user stories with Gitea integration |
## Directory Structure
```
agents/<name>/AGENT.md — Agent definitions
skills/<name>/SKILL.md — Skill definitions (future)
output-styles/<name>.md — Output style definitions (future)
install.sh — Symlink installer
```
## Installation
```bash
git clone <this-repo>
cd agents
./install.sh
```
This symlinks all agents, skills, and output styles into `~/.claude/`.
Restart Claude Code to pick up the changes.
To use a non-standard Claude home directory:
```bash
CLAUDE_HOME=/path/to/claude ./install.sh
```
## Uninstall
```bash
./install.sh --uninstall
```
Only removes symlinks that point back into this repo.
## Adding New Agents
1. Create `agents/<agent-name>/AGENT.md`
2. Run `./install.sh` to symlink it into `~/.claude/agents/`

113
install.sh Executable file
View File

@@ -0,0 +1,113 @@
#!/usr/bin/env bash
set -euo pipefail
REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
CLAUDE_HOME="${CLAUDE_HOME:-$HOME/.claude}"
UNINSTALL=false
if [[ "${1:-}" == "--uninstall" ]]; then
UNINSTALL=true
fi
# link_directory SOURCE_BASE TARGET_BASE KIND
# Symlinks each subdirectory (or file for output-styles) from source into target.
link_directory() {
local source_base="$1"
local target_base="$2"
local kind="$3"
if [[ ! -d "$source_base" ]]; then
return
fi
mkdir -p "$target_base"
for entry in "$source_base"/*/; do
# Skip if glob didn't match
[[ -d "$entry" ]] || continue
local name
name="$(basename "$entry")"
local target="$target_base/$name"
local source
source="$(cd "$entry" && pwd)"
if $UNINSTALL; then
if [[ -L "$target" ]]; then
local link_target
link_target="$(readlink -f "$target")"
if [[ "$link_target" == "$REPO_DIR"* ]]; then
rm "$target"
echo "Removed $kind symlink: $name"
else
echo "Skipped $name — symlink points outside this repo"
fi
fi
continue
fi
if [[ -L "$target" ]]; then
rm "$target"
ln -s "$source" "$target"
echo "Updated $kind symlink: $name"
elif [[ -e "$target" ]]; then
echo "Warning: $target already exists and is not a symlink — skipping"
else
ln -s "$source" "$target"
echo "Linked $kind: $name"
fi
done
# Handle plain files (for output-styles/*.md)
for entry in "$source_base"/*; do
[[ -f "$entry" ]] || continue
local name
name="$(basename "$entry")"
[[ "$name" == ".gitkeep" ]] && continue
local target="$target_base/$name"
local source
source="$(cd "$(dirname "$entry")" && pwd)/$name"
if $UNINSTALL; then
if [[ -L "$target" ]]; then
local link_target
link_target="$(readlink -f "$target")"
if [[ "$link_target" == "$REPO_DIR"* ]]; then
rm "$target"
echo "Removed $kind file symlink: $name"
else
echo "Skipped $name — symlink points outside this repo"
fi
fi
continue
fi
if [[ -L "$target" ]]; then
rm "$target"
ln -s "$source" "$target"
echo "Updated $kind file symlink: $name"
elif [[ -e "$target" ]]; then
echo "Warning: $target already exists and is not a symlink — skipping"
else
ln -s "$source" "$target"
echo "Linked $kind file: $name"
fi
done
}
if $UNINSTALL; then
echo "Uninstalling agents, skills, and output-styles from $CLAUDE_HOME ..."
else
echo "Installing agents, skills, and output-styles into $CLAUDE_HOME ..."
fi
link_directory "$REPO_DIR/agents" "$CLAUDE_HOME/agents" "agent"
link_directory "$REPO_DIR/skills" "$CLAUDE_HOME/skills" "skill"
link_directory "$REPO_DIR/output-styles" "$CLAUDE_HOME/output-styles" "output-style"
if $UNINSTALL; then
echo "Done. Symlinks pointing to this repo have been removed."
else
echo "Done. Restart Claude Code to pick up changes."
fi

0
output-styles/.gitkeep Normal file
View File

0
skills/.gitkeep Normal file
View File