mirror of
https://github.com/anthropics/claude-plugins-official.git
synced 2026-03-17 10:33:08 +00:00
* fix readme typo * fix(plugin-dev): add missing .claude-plugin/plugin.json The plugin-dev plugin was missing its required plugin.json manifest file, causing the plugin to fail loading. This adds the missing configuration file following the same format as other official plugins. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Add README and setup documentation for Greptile plugin - Add README.md with setup instructions for getting API key - Document the GREPTILE_API_KEY environment variable requirement - Add homepage, author URL, and keywords to plugin.json - Update description to reflect Greptile as AI code review agent 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: add c7 agent * Update Context7 plugin for v2 API - Update skill/agent/command to use new query-docs tool (replaces get-library-docs) - Add query parameter usage for intelligent reranking - Add version pinning support (e.g., /vercel/next.js/v15.1.8) - Add tools and model metadata to agent - Simplify docs to focus on workflow, not parameter details - Add README.md with usage examples * Switch Context7 MCP to remote HTTP server * feat: update tools with better skill/agent format prompt * fmt * fix: installation guide * Change Notion name to lowercase in marketplace.json According to the SKILLS spec (see https://agentskills.io/specification#:~:text=Max%2064%20characters.%20Lowercase%20letters%2C%20numbers%2C%20and%20hyphens%20only.%20Must%20not%20start%20or%20end%20with%20a%20hyphen.) names should not contain uppercase letters. This prevents loading the marketplace in spec-compliant agents. Update the name to be in lowercase. * Fix empty array crash on bash 3.2 in setup-ralph-loop.sh * Update Vercel plugin to point to vercel-labs/vercel-plugin Replace the marketplace pointer for the Vercel plugin from vercel/vercel-deploy-claude-code-plugin to vercel-labs/vercel-plugin. * vercel-labs to vercel * docs(ralph-loop): add Windows compatibility section Retargeted from PR #124 (originally against plugins/ralph-wiggum/, since renamed). Documents the Git Bash workaround for Windows users hitting WSL bash resolution issues in the stop hook. Original author: @stefanzvonar * add(plugin): terraform — HashiCorp infrastructure-as-code Adapted from PR #14 by @gautambaghel (HashiCorp). Original: https://github.com/anthropics/claude-plugins-official/pull/14 * add(plugin): autofix-bot — DeepSource automated code review Adapted from PR #23 by @jai-deepsource (DeepSource). Original: https://github.com/anthropics/claude-plugins-official/pull/23 * add(plugin): stagehand — Browserbase browser automation Adapted from PR #43 by @Kylejeong2 (Browserbase). PR's marketplace.json had a syntax error (missing '},' before adjacent entry); entry reconstructed from the diff. Original: https://github.com/anthropics/claude-plugins-official/pull/43 * add(plugin): atomic-agents — BrainBlend-AI framework Adapted from PR #46 by @KennyVaneetvelde (BrainBlend-AI). Original: https://github.com/anthropics/claude-plugins-official/pull/46 * add(plugin): microsoft-docs — official Microsoft documentation MCP Adapted from PR #55 by @TianqiZhang (Microsoft). Original: https://github.com/anthropics/claude-plugins-official/pull/55 * add(plugin): bonfire — session-context workflow tooling Adapted from PR #108 by @vieko (Vercel). Original: https://github.com/anthropics/claude-plugins-official/pull/108 * Add intercom to marketplace * Add neon to marketplace * Remove qodo SHA * Merge staging into add-plugin/intercom to resolve conflict * Merge latest staging to resolve conflict * Remove external_plugins changes from staging Moved to external-plugins-staging branch for separate review. --------- Co-authored-by: Han T. <han.tan@shopify.com> Co-authored-by: Julien Tavernier <jtavernier@Juliens-MacBook-Pro.local> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Daksh Gupta <daksh510@gmail.com> Co-authored-by: Fahreddin Özcan <ozcanfahrettinn@gmail.com> Co-authored-by: Matt Kotsenas <Matt.Kotsenas@gmail.com> Co-authored-by: LuciferDono <pranavj821@gmail.com>
205 lines
6.9 KiB
Bash
Executable File
205 lines
6.9 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Ralph Loop Setup Script
|
|
# Creates state file for in-session Ralph loop
|
|
|
|
set -euo pipefail
|
|
|
|
# Parse arguments
|
|
PROMPT_PARTS=()
|
|
MAX_ITERATIONS=0
|
|
COMPLETION_PROMISE="null"
|
|
|
|
# Parse options and positional arguments
|
|
while [[ $# -gt 0 ]]; do
|
|
case $1 in
|
|
-h|--help)
|
|
cat << 'HELP_EOF'
|
|
Ralph Loop - Interactive self-referential development loop
|
|
|
|
USAGE:
|
|
/ralph-loop [PROMPT...] [OPTIONS]
|
|
|
|
ARGUMENTS:
|
|
PROMPT... Initial prompt to start the loop (can be multiple words without quotes)
|
|
|
|
OPTIONS:
|
|
--max-iterations <n> Maximum iterations before auto-stop (default: unlimited)
|
|
--completion-promise '<text>' Promise phrase (USE QUOTES for multi-word)
|
|
-h, --help Show this help message
|
|
|
|
DESCRIPTION:
|
|
Starts a Ralph Loop in your CURRENT session. The stop hook prevents
|
|
exit and feeds your output back as input until completion or iteration limit.
|
|
|
|
To signal completion, you must output: <promise>YOUR_PHRASE</promise>
|
|
|
|
Use this for:
|
|
- Interactive iteration where you want to see progress
|
|
- Tasks requiring self-correction and refinement
|
|
- Learning how Ralph works
|
|
|
|
EXAMPLES:
|
|
/ralph-loop Build a todo API --completion-promise 'DONE' --max-iterations 20
|
|
/ralph-loop --max-iterations 10 Fix the auth bug
|
|
/ralph-loop Refactor cache layer (runs forever)
|
|
/ralph-loop --completion-promise 'TASK COMPLETE' Create a REST API
|
|
|
|
STOPPING:
|
|
Only by reaching --max-iterations or detecting --completion-promise
|
|
No manual stop - Ralph runs infinitely by default!
|
|
|
|
MONITORING:
|
|
# View current iteration:
|
|
grep '^iteration:' .claude/ralph-loop.local.md
|
|
|
|
# View full state:
|
|
head -10 .claude/ralph-loop.local.md
|
|
HELP_EOF
|
|
exit 0
|
|
;;
|
|
--max-iterations)
|
|
if [[ -z "${2:-}" ]]; then
|
|
echo "❌ Error: --max-iterations requires a number argument" >&2
|
|
echo "" >&2
|
|
echo " Valid examples:" >&2
|
|
echo " --max-iterations 10" >&2
|
|
echo " --max-iterations 50" >&2
|
|
echo " --max-iterations 0 (unlimited)" >&2
|
|
echo "" >&2
|
|
echo " You provided: --max-iterations (with no number)" >&2
|
|
exit 1
|
|
fi
|
|
if ! [[ "$2" =~ ^[0-9]+$ ]]; then
|
|
echo "❌ Error: --max-iterations must be a positive integer or 0, got: $2" >&2
|
|
echo "" >&2
|
|
echo " Valid examples:" >&2
|
|
echo " --max-iterations 10" >&2
|
|
echo " --max-iterations 50" >&2
|
|
echo " --max-iterations 0 (unlimited)" >&2
|
|
echo "" >&2
|
|
echo " Invalid: decimals (10.5), negative numbers (-5), text" >&2
|
|
exit 1
|
|
fi
|
|
MAX_ITERATIONS="$2"
|
|
shift 2
|
|
;;
|
|
--completion-promise)
|
|
if [[ -z "${2:-}" ]]; then
|
|
echo "❌ Error: --completion-promise requires a text argument" >&2
|
|
echo "" >&2
|
|
echo " Valid examples:" >&2
|
|
echo " --completion-promise 'DONE'" >&2
|
|
echo " --completion-promise 'TASK COMPLETE'" >&2
|
|
echo " --completion-promise 'All tests passing'" >&2
|
|
echo "" >&2
|
|
echo " You provided: --completion-promise (with no text)" >&2
|
|
echo "" >&2
|
|
echo " Note: Multi-word promises must be quoted!" >&2
|
|
exit 1
|
|
fi
|
|
COMPLETION_PROMISE="$2"
|
|
shift 2
|
|
;;
|
|
*)
|
|
# Non-option argument - collect all as prompt parts
|
|
PROMPT_PARTS+=("$1")
|
|
shift
|
|
;;
|
|
esac
|
|
done
|
|
|
|
# Join all prompt parts with spaces
|
|
PROMPT="${PROMPT_PARTS[*]:-}"
|
|
|
|
# Validate prompt is non-empty
|
|
if [[ -z "$PROMPT" ]]; then
|
|
echo "❌ Error: No prompt provided" >&2
|
|
echo "" >&2
|
|
echo " Ralph needs a task description to work on." >&2
|
|
echo "" >&2
|
|
echo " Examples:" >&2
|
|
echo " /ralph-loop Build a REST API for todos" >&2
|
|
echo " /ralph-loop Fix the auth bug --max-iterations 20" >&2
|
|
echo " /ralph-loop --completion-promise 'DONE' Refactor code" >&2
|
|
echo "" >&2
|
|
echo " For all options: /ralph-loop --help" >&2
|
|
exit 1
|
|
fi
|
|
|
|
# Create state file for stop hook (markdown with YAML frontmatter)
|
|
mkdir -p .claude
|
|
|
|
# Quote completion promise for YAML if it contains special chars or is not null
|
|
if [[ -n "$COMPLETION_PROMISE" ]] && [[ "$COMPLETION_PROMISE" != "null" ]]; then
|
|
COMPLETION_PROMISE_YAML="\"$COMPLETION_PROMISE\""
|
|
else
|
|
COMPLETION_PROMISE_YAML="null"
|
|
fi
|
|
|
|
cat > .claude/ralph-loop.local.md <<EOF
|
|
---
|
|
active: true
|
|
iteration: 1
|
|
session_id: ${CLAUDE_CODE_SESSION_ID:-}
|
|
max_iterations: $MAX_ITERATIONS
|
|
completion_promise: $COMPLETION_PROMISE_YAML
|
|
started_at: "$(date -u +%Y-%m-%dT%H:%M:%SZ)"
|
|
---
|
|
|
|
$PROMPT
|
|
EOF
|
|
|
|
# Output setup message
|
|
cat <<EOF
|
|
🔄 Ralph loop activated in this session!
|
|
|
|
Iteration: 1
|
|
Max iterations: $(if [[ $MAX_ITERATIONS -gt 0 ]]; then echo $MAX_ITERATIONS; else echo "unlimited"; fi)
|
|
Completion promise: $(if [[ "$COMPLETION_PROMISE" != "null" ]]; then echo "${COMPLETION_PROMISE//\"/} (ONLY output when TRUE - do not lie!)"; else echo "none (runs forever)"; fi)
|
|
|
|
The stop hook is now active. When you try to exit, the SAME PROMPT will be
|
|
fed back to you. You'll see your previous work in files, creating a
|
|
self-referential loop where you iteratively improve on the same task.
|
|
|
|
To monitor: head -10 .claude/ralph-loop.local.md
|
|
|
|
⚠️ WARNING: This loop cannot be stopped manually! It will run infinitely
|
|
unless you set --max-iterations or --completion-promise.
|
|
|
|
🔄
|
|
EOF
|
|
|
|
# Output the initial prompt if provided
|
|
if [[ -n "$PROMPT" ]]; then
|
|
echo ""
|
|
echo "$PROMPT"
|
|
fi
|
|
|
|
# Display completion promise requirements if set
|
|
if [[ "$COMPLETION_PROMISE" != "null" ]]; then
|
|
echo ""
|
|
echo "═══════════════════════════════════════════════════════════"
|
|
echo "CRITICAL - Ralph Loop Completion Promise"
|
|
echo "═══════════════════════════════════════════════════════════"
|
|
echo ""
|
|
echo "To complete this loop, output this EXACT text:"
|
|
echo " <promise>$COMPLETION_PROMISE</promise>"
|
|
echo ""
|
|
echo "STRICT REQUIREMENTS (DO NOT VIOLATE):"
|
|
echo " ✓ Use <promise> XML tags EXACTLY as shown above"
|
|
echo " ✓ The statement MUST be completely and unequivocally TRUE"
|
|
echo " ✓ Do NOT output false statements to exit the loop"
|
|
echo " ✓ Do NOT lie even if you think you should exit"
|
|
echo ""
|
|
echo "IMPORTANT - Do not circumvent the loop:"
|
|
echo " Even if you believe you're stuck, the task is impossible,"
|
|
echo " or you've been running too long - you MUST NOT output a"
|
|
echo " false promise statement. The loop is designed to continue"
|
|
echo " until the promise is GENUINELY TRUE. Trust the process."
|
|
echo ""
|
|
echo " If the loop should stop, the promise statement will become"
|
|
echo " true naturally. Do not force it by lying."
|
|
echo "═══════════════════════════════════════════════════════════"
|
|
fi
|