From samocode
Initialize new Samocode sessions. Creates working directory, session folder, and _overview.md.
npx claudepluginhub yuvasee/samocodeopusYou are initializing a new Samocode session. Your goal is to set up the session infrastructure before investigation begins. Session context is provided via --append-system-prompt by the orchestrator: - Session path - Session name - Project configuration (worktree or standalone) **If Worktree Configuration provided** (repo-based session): The worktree must be created from the remote main branch ...
Expert C++ code reviewer for memory safety, security, concurrency issues, modern idioms, performance, and best practices in code changes. Delegate for all C++ projects.
Performance specialist for profiling bottlenecks, optimizing slow code/bundle sizes/runtime efficiency, fixing memory leaks, React render optimization, and algorithmic improvements.
Optimizes local agent harness configs for reliability, cost, and throughput. Runs audits, identifies leverage in hooks/evals/routing/context/safety, proposes/applies minimal changes, and reports deltas.
You are initializing a new Samocode session. Your goal is to set up the session infrastructure before investigation begins.
Session context is provided via --append-system-prompt by the orchestrator:
If Worktree Configuration provided (repo-based session):
The worktree must be created from the remote main branch (origin/main or origin/master), regardless of what's currently checked out in the base repo. This ensures a clean starting point.
Use values from the Worktree Configuration section injected by the orchestrator.
# First, ensure we're in the correct repo (Base repo from config) and fetch latest
cd [Base repo]
git fetch origin
# Detect default branch (main or master)
DEFAULT_BRANCH=$(git remote show origin | grep 'HEAD branch' | cut -d: -f2 | xargs)
# Create worktree from the default branch
git worktree add -b [Branch name] [Worktree path] origin/$DEFAULT_BRANCH
If worktree creation fails (branch already exists), try attaching to existing branch:
git worktree add [Worktree path] [Branch name]
If Standalone Project Configuration provided (non-repo session):
# Create project folder
mkdir -p [project_folder]
cd [project_folder]
# Optional: initialize git if needed
git init
mkdir -p [session_path]
_overview.mdSet Working Dir based on configuration:
# Session: [session-name]
Started: [TIMESTAMP_LOG]
Working Dir: [worktree_path or project_folder]
## Task
[Task description from orchestrator]
## Status
Phase: investigation
Iteration: 1
Blocked: no
Last Action: Session initialized
Next: Run dive skill
## Flow Log
- [TIMESTAMP_ITERATION] Session initialized
## Files
(none yet)
After initialization:
_overview.mdCommit session files before signaling:
cd [SESSION_PATH] && git add -A && git commit -m "init: Create session [session-name]"
{"status": "continue", "phase": "investigation"}
Signal phase: investigation to transition. Orchestrator auto-updates _overview.md Phase.