mit einem Klick
pull
pull
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Menü
pull
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Basierend auf der SOC-Berufsklassifikation
| name | pull |
| description | pull |
name: pull description: Pull from origin; supports /pull . triggers:
Pull latest commits from origin, committing local changes first, merging conflicts, and running setup scripts.
SUBMODULE MODE: If a submodule name is provided (e.g., /pull foundation), scope operations to that submodule only, not the main repository.
Configuration is read from foundation-config.yaml.
If submodule name provided:
git submodule status <submodule-name>cd <submodule-name>If no submodule name provided, proceed with main repository pull workflow below.
If submodule name provided:
Verify submodule exists:
if ! git submodule status <submodule-name> >/dev/null 2>&1; then
echo "❌ Submodule not found: <submodule-name>"
exit 1
fi
Save parent directory and change to submodule directory:
ORIGINAL_DIR=$(pwd) # Save parent directory before cd
cd <submodule-name> || exit 1
Update scope context (all subsequent operations in submodule)
If no submodule name provided, proceed with main repository context.
# Check if there are uncommitted changes
if git status --porcelain | grep -q .; then
echo "📝 Found uncommitted changes, committing first..."
# Use foundation commit command to commit changes
# Agent should invoke the commit command workflow:
# - Run security audit
# - Stage changes
# - Generate commit message
# - Commit changes
# - Push to origin if configured
# For agent: Use the foundation commit command workflow
# Invoke: `/commit <submodule-name>` (if submodule) or `/commit` (if main repo)
echo "✅ Local changes committed"
else
echo "✅ No uncommitted changes"
fi
Agent Instructions for Commit Step:
/commit <submodule-name>/commitecho "🔄 Fetching latest from origin..."
git fetch origin
# Check current branch
CURRENT_BRANCH=$(git branch --show-current)
if [ -z "$CURRENT_BRANCH" ]; then
echo "⚠️ Detached HEAD state - cannot pull"
echo "Current commit: $(git rev-parse HEAD)"
exit 1
fi
echo "📍 Current branch: $CURRENT_BRANCH"
# Check if local branch is behind remote
LOCAL=$(git rev-parse @)
REMOTE=$(git rev-parse @{u} 2>/dev/null || echo "")
if [ -z "$REMOTE" ]; then
echo "⚠️ No upstream branch set for $CURRENT_BRANCH"
echo "Setting upstream to origin/$CURRENT_BRANCH"
git branch --set-upstream-to=origin/$CURRENT_BRANCH $CURRENT_BRANCH
REMOTE=$(git rev-parse @{u})
fi
BASE=$(git merge-base @ @{u})
if [ "$LOCAL" = "$REMOTE" ]; then
echo "✅ Already up to date with origin/$CURRENT_BRANCH"
SKIP_PULL=true
elif [ "$LOCAL" = "$BASE" ]; then
echo "⬇️ Local branch is behind origin/$CURRENT_BRANCH - will pull"
SKIP_PULL=false
elif [ "$REMOTE" = "$BASE" ]; then
echo "⬆️ Local branch is ahead of origin/$CURRENT_BRANCH"
SKIP_PULL=true
else
echo "🔀 Local and remote branches have diverged - will pull and merge"
SKIP_PULL=false
fi
If SKIP_PULL is false:
echo "⬇️ Pulling latest changes from origin/$CURRENT_BRANCH..."
# Pull with merge strategy (default)
# If conflicts occur, git pull will pause
git pull origin "$CURRENT_BRANCH" || {
PULL_EXIT_CODE=$?
if [ $PULL_EXIT_CODE -ne 0 ]; then
echo "⚠️ Pull encountered issues"
# Check if there are merge conflicts
if git status | grep -q "Unmerged paths"; then
echo "🔀 Merge conflicts detected"
echo ""
echo "Conflicted files:"
git status | grep "both modified\|both added\|deleted by them\|deleted by us" || true
echo ""
# Agent should resolve conflicts interactively
# For now, list conflicts and ask user
echo "❌ Merge conflicts must be resolved manually"
echo "Run 'git status' to see conflicted files"
echo "Resolve conflicts, then run 'git add <file>' for each resolved file"
echo "Finally, run 'git commit' to complete the merge"
exit 1
else
echo "❌ Pull failed for unknown reason"
exit 1
fi
fi
}
echo "✅ Successfully pulled latest changes"
Agent Instructions for Conflict Resolution:
git statusgit addgit commitAfter successful pull, detect and run setup scripts as needed:
IMPORTANT: If in submodule mode, return to parent repository directory BEFORE running setup scripts, as parent-level setup scripts (like foundation/scripts/setup_cursor_rules.sh) must be run from the parent repository context.
echo "🔧 Checking for setup scripts..."
# If in submodule mode, return to parent directory for setup scripts
if [ -n "$ORIGINAL_DIR" ]; then
echo "📁 Returning to parent repository for setup scripts..."
cd "$ORIGINAL_DIR" || exit 1
fi
# Common setup script patterns
SETUP_SCRIPTS=()
# Check for foundation setup script (must run from parent repo)
if [ -f "foundation/scripts/setup_cursor_rules.sh" ]; then
SETUP_SCRIPTS+=("foundation/scripts/setup_cursor_rules.sh")
fi
# Check for foundation validation script
if [ -f "foundation/scripts/validate_setup.sh" ]; then
SETUP_SCRIPTS+=("foundation/scripts/validate_setup.sh")
fi
# Check for repository-specific setup scripts
if [ -f "scripts/setup_agent_environment.sh" ]; then
SETUP_SCRIPTS+=("scripts/setup_agent_environment.sh")
fi
# Check for other common setup scripts
for script in scripts/setup*.sh scripts/*setup*.sh; do
if [ -f "$script" ] && [ -x "$script" ]; then
if [[ ! " ${SETUP_SCRIPTS[@]} " =~ " ${script} " ]]; then
SETUP_SCRIPTS+=("$script")
fi
fi
done
# Check package.json for setup/install scripts
if [ -f "package.json" ]; then
echo "📦 Checking package.json for setup requirements..."
# Check if node_modules exists
if [ ! -d "node_modules" ]; then
echo "📦 node_modules not found - running npm install..."
npm install
else
# Check if package.json or package-lock.json changed
if git diff HEAD@{1} HEAD --name-only | grep -q "package.json\|package-lock.json"; then
echo "📦 Dependencies may have changed - running npm install..."
npm install
fi
fi
fi
# Check for other package managers
if [ -f "requirements.txt" ] && [ ! -d "venv" ] && [ ! -d ".venv" ]; then
echo "🐍 Python dependencies detected - consider setting up virtual environment"
fi
# Run setup scripts
for script in "${SETUP_SCRIPTS[@]}"; do
echo ""
echo "▶️ Running setup script: $script"
# Make script executable if not already
chmod +x "$script" 2>/dev/null || true
# Run script
if bash "$script"; then
echo "✅ Setup script completed: $script"
else
echo "⚠️ Setup script failed: $script (exit code: $?)"
echo "Continuing anyway..."
fi
done
echo ""
echo "✅ Pull workflow completed"
echo ""
echo "Summary:"
echo " - Branch: $CURRENT_BRANCH"
echo " - Latest commit: $(git rev-parse HEAD)"
echo " - Setup scripts run: ${#SETUP_SCRIPTS[@]}"
Note: If in submodule mode, we already returned to the parent directory in Step 6 to run setup scripts. This step is now a no-op, but kept for clarity.
If submodule name was provided and we're not already in the parent directory:
if [ -n "$ORIGINAL_DIR" ] && [ "$(pwd)" != "$ORIGINAL_DIR" ]; then
cd "$ORIGINAL_DIR" || exit 1
echo "✅ Returned to main repository directory"
fi
Optional configuration in foundation-config.yaml:
development:
pull:
auto_commit: true # Automatically commit local changes before pull
conflict_strategy: "merge" # "merge" | "rebase" | "abort"
run_setup_scripts: true # Run setup scripts after pull
setup_scripts:
- "scripts/setup_agent_environment.sh" # Custom list of scripts to run
submodule_name (optional string): Submodule name to scope operations to (e.g., "foundation")Canonical turn protocol for agents writing to Neotoma. Bounded retrieval on the user message, store user message PART_OF conversation with REFERS_TO edges to retrieved entities, store assistant reply the same way. Use this skill in any agent loop that should persist conversation state to Neotoma.
Session-end audit. Files remaining work as task entities and lists them as bullets, verifies all data intended for Neotoma storage from this session is actually stored, and persists what's missing. Invoke at the natural close of a working session, before context is lost.
Mid-session status report. Summarizes what's been achieved so far this session and what work remains, in succinct qualitative prose and bullets with only light technical detail. Read-only — stores nothing, files nothing. Invoke any time to take stock without closing the session.
Close a Neotoma working session — store the assistant reply and a session-close summary.
Retrieve the bounded context for the current session — recent interactions and relevant entities.
Begin a Neotoma working session — open a conversation and record the opening interaction.