com um clique
push
push
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Menu
push
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Baseado na classificação ocupacional SOC
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.
| name | push |
| description | push |
name: push description: Push current branch to origin; supports /push . triggers:
Push current branch to origin remote, checking if remote exists first.
SUBMODULE MODE: If a submodule name is provided (e.g., /push 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 push 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.
echo "🔍 Checking for origin remote..."
# Check if any remotes exist
if ! git remote | grep -q .; then
echo "❌ Error: No git remotes configured"
echo ""
echo "To add a remote, run:"
echo " git remote add origin <remote-url>"
echo " git push -u origin <branch-name>"
exit 1
fi
# Check specifically for origin remote
if ! git remote | grep -q "^origin$"; then
echo "❌ Error: 'origin' remote not found"
echo ""
echo "Available remotes:"
git remote -v
echo ""
echo "To add origin remote, run:"
echo " git remote add origin <remote-url>"
echo " git push -u origin <branch-name>"
exit 1
fi
# Display origin URL
ORIGIN_URL=$(git remote get-url origin 2>/dev/null || echo "unknown")
echo "✅ Origin remote found: $ORIGIN_URL"
echo "📍 Checking current branch..."
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
if [ -z "$CURRENT_BRANCH" ]; then
echo "❌ Error: Detached HEAD state - cannot push"
echo "Current commit: $(git rev-parse HEAD)"
echo ""
echo "To push, checkout a branch first:"
echo " git checkout -b <branch-name>"
exit 1
fi
echo "✅ Current branch: $CURRENT_BRANCH"
echo "🔍 Checking for unpushed commits..."
# Fetch latest from origin to compare
git fetch origin --quiet 2>/dev/null || {
echo "⚠️ Warning: Could not fetch from origin (remote may not exist yet)"
echo "Will attempt to push anyway..."
}
# Check if branch has upstream set
UPSTREAM=$(git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null || echo "")
if [ -z "$UPSTREAM" ]; then
echo "ℹ️ No upstream branch set for $CURRENT_BRANCH"
echo "Will push and set upstream on first push"
HAS_UPSTREAM=false
else
echo "✅ Upstream branch: $UPSTREAM"
HAS_UPSTREAM=true
# Check if local is ahead of remote
LOCAL=$(git rev-parse @)
REMOTE=$(git rev-parse @{u} 2>/dev/null || echo "")
BASE=$(git merge-base @ @{u} 2>/dev/null || echo "")
if [ -n "$REMOTE" ] && [ -n "$BASE" ]; then
if [ "$LOCAL" = "$REMOTE" ]; then
echo "✅ Branch is up to date with $UPSTREAM"
echo "No commits to push"
exit 0
elif [ "$LOCAL" = "$BASE" ]; then
echo "⚠️ Local branch is behind $UPSTREAM"
echo "Consider pulling first with: git pull origin $CURRENT_BRANCH"
elif [ "$REMOTE" = "$BASE" ]; then
COMMITS_AHEAD=$(git rev-list --count @{u}..@)
echo "⬆️ Local branch is $COMMITS_AHEAD commit(s) ahead of $UPSTREAM"
else
echo "🔀 Local and remote branches have diverged"
echo "Consider pulling and merging first"
fi
fi
fi
echo "📤 Pushing to origin..."
if [ "$HAS_UPSTREAM" = "false" ]; then
# First push - set upstream
echo "Setting upstream to origin/$CURRENT_BRANCH..."
git push -u origin "$CURRENT_BRANCH" || {
PUSH_EXIT_CODE=$?
echo "❌ Error: Push failed (exit code: $PUSH_EXIT_CODE)"
echo ""
echo "Common issues:"
echo " - Remote repository doesn't exist or is inaccessible"
echo " - Authentication required (check credentials)"
echo " - Branch name conflicts with remote branch"
echo ""
echo "To troubleshoot:"
echo " git remote -v # Check remote URL"
echo " git status # Check repository state"
exit 1
}
else
# Subsequent push
git push origin "$CURRENT_BRANCH" || {
PUSH_EXIT_CODE=$?
echo "❌ Error: Push failed (exit code: $PUSH_EXIT_CODE)"
echo ""
echo "Common issues:"
echo " - Remote has commits you don't have (pull first)"
echo " - Authentication required (check credentials)"
echo " - Permission denied (check repository access)"
echo ""
echo "To troubleshoot:"
echo " git pull origin $CURRENT_BRANCH # Pull latest first"
echo " git status # Check repository state"
exit 1
}
fi
echo "✅ Successfully pushed to origin/$CURRENT_BRANCH"
echo ""
echo "✅ Push workflow completed"
echo ""
echo "Summary:"
echo " - Branch: $CURRENT_BRANCH"
echo " - Remote: origin"
echo " - Upstream: ${UPSTREAM:-origin/$CURRENT_BRANCH (newly set)}"
echo " - Latest commit: $(git rev-parse --short HEAD)"
If submodule name was provided:
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:
push:
check_remote: true # Check if origin exists before pushing
set_upstream: true # Set upstream on first push
force_push: false # Allow force push (use with caution)
push_tags: false # Also push tags
submodule_name (optional string): Submodule name to scope operations to (e.g., "foundation")# Push main repository
/push
# Push foundation submodule
/push foundation