mirror of
https://github.com/anthropics/claude-plugins-official.git
synced 2026-03-16 22:23:07 +00:00
Compare commits
14 Commits
kenshiro/e
...
73856575d6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
73856575d6 | ||
|
|
7d7f29cf27 | ||
|
|
b36fd4b753 | ||
|
|
bd041495bd | ||
|
|
00f13a5f46 | ||
|
|
7e94c732f6 | ||
|
|
4fa27586e5 | ||
|
|
205b6e0b30 | ||
|
|
b7c995dd3c | ||
|
|
028eccf544 | ||
|
|
8644df9ad5 | ||
|
|
adfc379663 | ||
|
|
55b58ec6e5 | ||
|
|
80a2049c5d |
@@ -251,6 +251,30 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ruby-lsp",
|
||||
"description": "Ruby language server for code intelligence and analysis",
|
||||
"version": "1.0.0",
|
||||
"author": {
|
||||
"name": "Anthropic",
|
||||
"email": "support@anthropic.com"
|
||||
},
|
||||
"source": "./plugins/ruby-lsp",
|
||||
"category": "development",
|
||||
"strict": false,
|
||||
"lspServers": {
|
||||
"ruby-lsp": {
|
||||
"command": "ruby-lsp",
|
||||
"extensionToLanguage": {
|
||||
".rb": "ruby",
|
||||
".rake": "ruby",
|
||||
".gemspec": "ruby",
|
||||
".ru": "ruby",
|
||||
".erb": "erb"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "agent-sdk-dev",
|
||||
"description": "Development kit for working with the Claude Agent SDK",
|
||||
@@ -680,10 +704,33 @@
|
||||
"description": "Semgrep catches security vulnerabilities in real-time and guides Claude to write secure code from the start.",
|
||||
"category": "security",
|
||||
"source": {
|
||||
"source": "url",
|
||||
"url": "https://github.com/semgrep/mcp-marketplace.git"
|
||||
"source": "git-subdir",
|
||||
"url": "https://github.com/semgrep/mcp-marketplace.git",
|
||||
"path": "plugin"
|
||||
},
|
||||
"homepage": "https://github.com/semgrep/mcp-marketplace.git"
|
||||
},
|
||||
{
|
||||
"name": "pagerduty",
|
||||
"description": "Enhance code quality and security through PagerDuty risk scoring and incident correlation. Score pre-commit diffs against historical incident data and surface deployment risk before you ship.",
|
||||
"category": "monitoring",
|
||||
"source": {
|
||||
"source": "url",
|
||||
"url": "https://github.com/PagerDuty/claude-code-plugins.git",
|
||||
"sha": "b16c23e0d790deceaa7a6182616d0e36673f2eae"
|
||||
},
|
||||
"homepage": "https://github.com/PagerDuty/claude-code-plugins"
|
||||
},
|
||||
{
|
||||
"name": "postman",
|
||||
"description": "Full API lifecycle management for Claude Code. Sync collections, generate client code, discover APIs, run tests, create mocks, publish docs, and audit security. Powered by the Postman MCP Server.",
|
||||
"category": "development",
|
||||
"source": {
|
||||
"source": "url",
|
||||
"url": "https://github.com/Postman-Devrel/postman-claude-code-plugin.git",
|
||||
"sha": "0714280351c1a137e79aad465a66730511ffbd57"
|
||||
},
|
||||
"homepage": "https://learning.postman.com/docs/developer/postman-mcp-server/"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
77
.github/scripts/validate-marketplace.ts
vendored
Normal file
77
.github/scripts/validate-marketplace.ts
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
#!/usr/bin/env bun
|
||||
/**
|
||||
* Validates marketplace.json: well-formed JSON, plugins array present,
|
||||
* each entry has required fields, and no duplicate plugin names.
|
||||
*
|
||||
* Usage:
|
||||
* bun validate-marketplace.ts <path-to-marketplace.json>
|
||||
*/
|
||||
|
||||
import { readFile } from "fs/promises";
|
||||
|
||||
async function main() {
|
||||
const filePath = process.argv[2];
|
||||
if (!filePath) {
|
||||
console.error("Usage: validate-marketplace.ts <path-to-marketplace.json>");
|
||||
process.exit(2);
|
||||
}
|
||||
|
||||
const content = await readFile(filePath, "utf-8");
|
||||
|
||||
let parsed: unknown;
|
||||
try {
|
||||
parsed = JSON.parse(content);
|
||||
} catch (err) {
|
||||
console.error(
|
||||
`ERROR: ${filePath} is not valid JSON: ${err instanceof Error ? err.message : err}`
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
||||
console.error(`ERROR: ${filePath} must be a JSON object`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const marketplace = parsed as Record<string, unknown>;
|
||||
if (!Array.isArray(marketplace.plugins)) {
|
||||
console.error(`ERROR: ${filePath} missing "plugins" array`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const errors: string[] = [];
|
||||
const seen = new Set<string>();
|
||||
const required = ["name", "description", "source"] as const;
|
||||
|
||||
marketplace.plugins.forEach((p, i) => {
|
||||
if (!p || typeof p !== "object") {
|
||||
errors.push(`plugins[${i}]: must be an object`);
|
||||
return;
|
||||
}
|
||||
const entry = p as Record<string, unknown>;
|
||||
for (const field of required) {
|
||||
if (!entry[field]) {
|
||||
errors.push(`plugins[${i}] (${entry.name ?? "?"}): missing required field "${field}"`);
|
||||
}
|
||||
}
|
||||
if (typeof entry.name === "string") {
|
||||
if (seen.has(entry.name)) {
|
||||
errors.push(`plugins[${i}]: duplicate plugin name "${entry.name}"`);
|
||||
}
|
||||
seen.add(entry.name);
|
||||
}
|
||||
});
|
||||
|
||||
if (errors.length) {
|
||||
console.error(`ERROR: ${filePath} has ${errors.length} validation error(s):`);
|
||||
for (const e of errors) console.error(` - ${e}`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
console.log(`OK: ${marketplace.plugins.length} plugins, no duplicates, all required fields present`);
|
||||
}
|
||||
|
||||
main().catch((err) => {
|
||||
console.error("Fatal error:", err);
|
||||
process.exit(2);
|
||||
});
|
||||
2
.github/workflows/close-external-prs.yml
vendored
2
.github/workflows/close-external-prs.yml
vendored
@@ -36,7 +36,7 @@ jobs:
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: context.payload.pull_request.number,
|
||||
body: `Thanks for your interest! This repo only accepts contributions from Anthropic team members. If you'd like to submit a plugin to the marketplace, please submit your plugin [here](https://docs.google.com/forms/d/e/1FAIpQLSdeFthxvjOXUjxg1i3KrOOkEPDJtn71XC-KjmQlxNP63xYydg/viewform).`
|
||||
body: `Thanks for your interest! This repo only accepts contributions from Anthropic team members. If you'd like to submit a plugin to the marketplace, please submit your plugin [here](https://clau.de/plugin-directory-submission).`
|
||||
});
|
||||
|
||||
await github.rest.pulls.update({
|
||||
|
||||
17
.github/workflows/validate-marketplace.yml
vendored
Normal file
17
.github/workflows/validate-marketplace.yml
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
name: Validate Marketplace JSON
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- '.claude-plugin/marketplace.json'
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
|
||||
- name: Validate marketplace.json
|
||||
run: bun .github/scripts/validate-marketplace.ts .claude-plugin/marketplace.json
|
||||
@@ -24,6 +24,16 @@ MAX_ITERATIONS=$(echo "$FRONTMATTER" | grep '^max_iterations:' | sed 's/max_iter
|
||||
# Extract completion_promise and strip surrounding quotes if present
|
||||
COMPLETION_PROMISE=$(echo "$FRONTMATTER" | grep '^completion_promise:' | sed 's/completion_promise: *//' | sed 's/^"\(.*\)"$/\1/')
|
||||
|
||||
# Session isolation: the state file is project-scoped, but the Stop hook
|
||||
# fires in every Claude Code session in that project. If another session
|
||||
# started the loop, this session must not block (or touch the state file).
|
||||
# Legacy state files without session_id fall through (preserves old behavior).
|
||||
STATE_SESSION=$(echo "$FRONTMATTER" | grep '^session_id:' | sed 's/session_id: *//' || true)
|
||||
HOOK_SESSION=$(echo "$HOOK_INPUT" | jq -r '.session_id // ""')
|
||||
if [[ -n "$STATE_SESSION" ]] && [[ "$STATE_SESSION" != "$HOOK_SESSION" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Validate numeric fields before arithmetic operations
|
||||
if [[ ! "$ITERATION" =~ ^[0-9]+$ ]]; then
|
||||
echo "⚠️ Ralph loop: State file corrupted" >&2
|
||||
@@ -77,35 +87,39 @@ if ! grep -q '"role":"assistant"' "$TRANSCRIPT_PATH"; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Extract last assistant message with explicit error handling
|
||||
LAST_LINE=$(grep '"role":"assistant"' "$TRANSCRIPT_PATH" | tail -1)
|
||||
if [[ -z "$LAST_LINE" ]]; then
|
||||
echo "⚠️ Ralph loop: Failed to extract last assistant message" >&2
|
||||
# Extract the most recent assistant text block.
|
||||
#
|
||||
# Claude Code writes each content block (text/tool_use/thinking) as its own
|
||||
# JSONL line, all with role=assistant. So slurp the last N assistant lines,
|
||||
# flatten to text blocks only, and take the last one.
|
||||
#
|
||||
# Capped at the last 100 assistant lines to keep jq's slurp input bounded
|
||||
# for long-running sessions.
|
||||
LAST_LINES=$(grep '"role":"assistant"' "$TRANSCRIPT_PATH" | tail -n 100)
|
||||
if [[ -z "$LAST_LINES" ]]; then
|
||||
echo "⚠️ Ralph loop: Failed to extract assistant messages" >&2
|
||||
echo " Ralph loop is stopping." >&2
|
||||
rm "$RALPH_STATE_FILE"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Parse JSON with error handling
|
||||
LAST_OUTPUT=$(echo "$LAST_LINE" | jq -r '
|
||||
.message.content |
|
||||
map(select(.type == "text")) |
|
||||
map(.text) |
|
||||
join("\n")
|
||||
# Parse the recent lines and pull out the final text block.
|
||||
# `last // ""` yields empty string when no text blocks exist (e.g. a turn
|
||||
# that is all tool calls). That's fine: empty text means no <promise> tag,
|
||||
# so the loop simply continues.
|
||||
# (Briefly disable errexit so a jq failure can be caught by the $? check.)
|
||||
set +e
|
||||
LAST_OUTPUT=$(echo "$LAST_LINES" | jq -rs '
|
||||
map(.message.content[]? | select(.type == "text") | .text) | last // ""
|
||||
' 2>&1)
|
||||
JQ_EXIT=$?
|
||||
set -e
|
||||
|
||||
# Check if jq succeeded
|
||||
if [[ $? -ne 0 ]]; then
|
||||
if [[ $JQ_EXIT -ne 0 ]]; then
|
||||
echo "⚠️ Ralph loop: Failed to parse assistant message JSON" >&2
|
||||
echo " Error: $LAST_OUTPUT" >&2
|
||||
echo " This may indicate a transcript format issue" >&2
|
||||
echo " Ralph loop is stopping." >&2
|
||||
rm "$RALPH_STATE_FILE"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ -z "$LAST_OUTPUT" ]]; then
|
||||
echo "⚠️ Ralph loop: Assistant message contained no text content" >&2
|
||||
echo " This may indicate a transcript format issue." >&2
|
||||
echo " Ralph loop is stopping." >&2
|
||||
rm "$RALPH_STATE_FILE"
|
||||
exit 0
|
||||
|
||||
@@ -141,6 +141,7 @@ 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)"
|
||||
|
||||
31
plugins/ruby-lsp/README.md
Normal file
31
plugins/ruby-lsp/README.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# ruby-lsp
|
||||
|
||||
Ruby language server for Claude Code, providing code intelligence and analysis.
|
||||
|
||||
## Supported Extensions
|
||||
`.rb`, `.rake`, `.gemspec`, `.ru`, `.erb`
|
||||
|
||||
## Installation
|
||||
|
||||
### Via gem (recommended)
|
||||
```bash
|
||||
gem install ruby-lsp
|
||||
```
|
||||
|
||||
### Via Bundler
|
||||
Add to your Gemfile:
|
||||
```ruby
|
||||
gem 'ruby-lsp', group: :development
|
||||
```
|
||||
|
||||
Then run:
|
||||
```bash
|
||||
bundle install
|
||||
```
|
||||
|
||||
## Requirements
|
||||
- Ruby 3.0 or later
|
||||
|
||||
## More Information
|
||||
- [Ruby LSP Website](https://shopify.github.io/ruby-lsp/)
|
||||
- [GitHub Repository](https://github.com/Shopify/ruby-lsp)
|
||||
Reference in New Issue
Block a user