### Plugin Installation Example Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/plugin-dev/commands/scaffold.md Commands to add the marketplace and install a plugin. Ensure you have the correct owner/marketplace-repo and plugin-name@owner. ```bash # Add marketplace (if not already added) claude /plugin marketplace add owner/marketplace-repo # Install plugin /plugin install plugin-name@owner ``` -------------------------------- ### Plugin Recommender Setup Complete Summary Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/please-plugins/commands/setup.md Display a summary of the installation process, including the number of plugins installed and already present, and provide a command to list all managed plugins. ```text Plugin Recommender Setup Complete! Installed: {count} plugins - {pluginName1} - {pluginName2} Already installed: {count} plugins - {pluginName3} To manage plugins: /plugin list ``` -------------------------------- ### Install Bun Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/bun/skills/use-bun/SKILL.md Provides commands for installing Bun. The recommended method uses the official installer script. Alternative installation methods via package managers are also mentioned. ```bash # Recommended — official installer curl -fsSL https://bun.sh/install | bash # Or via npm / brew / proto / asdf — see https://bun.com/docs/installation ``` -------------------------------- ### Install Plugin Command Source: https://github.com/pleaseai/claude-code-plugins/blob/main/apps/web/README.md Example command to install a Claude Code plugin using the CLI. This command copies the GitHub repository URL to the clipboard. ```bash claude-code plugins install https://github.com/owner/repo ``` -------------------------------- ### Install Plugin Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/please-plugins/skills/find-plugin/SKILL.md Installs a specified plugin from the pleaseai marketplace. ```bash claude plugin install {plugin-name}@pleaseai ``` -------------------------------- ### Install Dependencies Source: https://github.com/pleaseai/claude-code-plugins/blob/main/ARCHITECTURE.md Installs all project dependencies using Bun. This is the first step before running other development commands. ```bash bun install ``` -------------------------------- ### Install Commitlint CLI and Conventional Config Source: https://github.com/pleaseai/claude-code-plugins/blob/main/docs/commit-convention.md Install the necessary packages for commitlint and set up the configuration file. ```sh npm install --save-dev @commitlint/config-conventional @commitlint/cli echo "export default {extends: ['@commitlint/config-conventional']};" > commitlint.config.js ``` -------------------------------- ### Server Setup with Better Auth Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/better-auth/skills/use-better-auth/SKILL.md Initialize Better Auth on the server by exporting a configured `auth` object. This example shows enabling email/password authentication and placeholders for database adapters and social providers. ```typescript import { betterAuth, } from "better-auth"; export const auth = betterAuth({ database: /* DB adapter or Kysely dialect — see references/databases.md */, emailAndPassword: { enabled: true, }, socialProviders: { // github: { clientId: env.GITHUB_CLIENT_ID, clientSecret: env.GITHUB_CLIENT_SECRET }, }, plugins: [ // see references/plugins.md ], }); ``` -------------------------------- ### Start Web Application Development Server Source: https://github.com/pleaseai/claude-code-plugins/blob/main/CLAUDE.md Navigate to the web application directory and start the development server to see changes in real-time. ```bash cd apps/web bun install bun run dev ``` -------------------------------- ### Install ast-grep Plugin Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/ast-grep/README.md Use these commands to install the ast-grep plugin from the marketplace. ```sh /plugin marketplace add pleaseai/claude-code-plugins /plugin install ast-grep@pleaseai ``` -------------------------------- ### Insert Event Example Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/google-workspace/skills/gws-calendar-insert/SKILL.md Example of creating a new event with a summary, start time, and end time. Supports RFC3339 format for times. Attendees can be added using the --attendee flag. ```bash gws calendar +insert --summary 'Standup' --start '2026-06-17T09:00:00-07:00' --end '2026-06-17T09:30:00-07:00' ``` ```bash gws calendar +insert --summary 'Review' --start ... --end ... --attendee alice@example.com ``` -------------------------------- ### Bun Install Configuration Options Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/bun/skills/use-bun/references/package-manager.md Configure various aspects of the `bun install` process, including dependency types to install, version exactness, lockfile saving, linker type, and frozen lockfile behavior for CI. ```toml [install] optional = true # install optionalDependencies dev = true # install devDependencies peer = true # install peerDependencies (Bun does this by default) production = false # set true in CI / Docker to skip dev deps exact = false # write exact versions (no ^ or ~) on bun add saveTextLockfile = true # default since 1.2.0 linker = "hoisted" # or "isolated" frozenLockfile = false # true in CI [install.cache] dir = "~/.bun/install/cache" disable = false disableManifest = false ``` -------------------------------- ### CLI Usage Examples Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/bun/skills/use-bun/references/bundler.md Examples demonstrating how to use the `bun build` command for various bundling tasks, including output directories, targets, formats, minification, sourcemaps, and watch mode. ```APIDOC ## CLI Usage Examples ### Description Examples demonstrating how to use the `bun build` command for various bundling tasks, including output directories, targets, formats, minification, sourcemaps, and watch mode. ### Examples ```bash bun build ./src/index.tsx --outdir ./dist bun build ./src/index.ts --target=browser --format=esm --minify --sourcemap=linked bun build ./cli.ts --compile --outfile mycli # single-file executable bun build ./src/server.ts --target=bun --outfile=server.js bun build ./entry.html --outdir=./public # HTML import bundles linked assets bun build --watch ./src/index.ts --outdir ./dist # incremental rebuilds ``` ``` -------------------------------- ### Install Plugin Recommender Source: https://github.com/pleaseai/claude-code-plugins/blob/main/README.md Quickly install the plugin recommender to automatically detect and suggest relevant plugins for your project. ```bash # 1. Add the marketplace /plugin marketplace add pleaseai/claude-code-plugins # 2. Install the plugin recommender /plugin install please-plugins@pleaseai # 3. Scan your project and install recommended plugins /please-plugins:setup ``` -------------------------------- ### Skill Focus Example (Directory Structure) Source: https://github.com/pleaseai/claude-code-plugins/blob/main/docs/agent-skills.md Shows an example of focused skill directories versus a broad, unfocused approach. ```text # ❌ Too broad document-processing/ # Tries to handle all document types # ✅ Focused pdf-forms/ excel-analysis/ word-templates/ ``` -------------------------------- ### User Plugin Installation Commands Source: https://context7.com/pleaseai/claude-code-plugins/llms.txt These commands demonstrate the user flow for installing a plugin. Note that 'claude plugin install' is not a valid command; use '/plugin install' within a Claude Code session. ```sh # 1. Start Claude Code claude # 2. Add marketplace (one-time setup) /plugin marketplace add pleaseai/claude-code-plugins # 3. Install specific plugin /plugin install context7@pleaseai ``` ```sh claude /plugin install context7@pleaseai ``` -------------------------------- ### Solid Start Auth Client Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/better-auth/skills/use-better-auth/references/adapters.md Creates a Solid-compatible auth client for Solid Start applications. ```typescript import { createAuthClient } from "better-auth/solid"; export const authClient = createAuthClient(); ``` -------------------------------- ### File Announcement Example Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/google-workspace/skills/gws-workflow-file-announce/SKILL.md This example demonstrates how to announce a Drive file using its ID and a specific Chat space. It also shows how to include a custom message. ```bash gws workflow +file-announce --file-id FILE_ID --space spaces/ABC123 ``` -------------------------------- ### Content Organization Pattern: High-Level Guide (Markdown) Source: https://github.com/pleaseai/claude-code-plugins/blob/main/docs/agent-skills.md An example of a SKILL.md file that provides a high-level overview and links to separate files for advanced features. ```markdown --- name: Excel Analysis description: Analyze Excel files and generate reports --- # Excel Analysis ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/pleaseai/claude-code-plugins/blob/main/apps/web/README.md Command to install project dependencies using bun. Ensure Node.js 22+ is installed. ```bash cd apps/web bun install ``` -------------------------------- ### Install plugin-dev Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/plugin-dev/README.md Commands to install the plugin-dev toolkit. Ensure Claude Code is running and the marketplace is added. ```bash claude /plugin marketplace add pleaseai/claude-code-plugins /plugin install plugin-dev@pleaseai ``` -------------------------------- ### Install Selected Plugin Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/please-plugins/commands/setup.md Execute this command for each plugin selected by the user to install it via the Claude plugin system. ```bash claude plugin install {pluginName}@pleaseai ``` -------------------------------- ### CI: Production Installation Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/bun/skills/use-bun/references/package-manager.md For CI or Docker environments, use the `--production` flag with `bun install` to skip the installation of development dependencies. ```bash # Production install (skip devDeps) bun install --production ``` -------------------------------- ### Cubic CLI Installation Options Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/cubic/skills/cubic-review/SKILL.md Provides two common methods for installing the Cubic CLI. Do not run these automatically; let the user decide. ```bash curl -fsSL https://cubic.dev/install | bash ``` ```bash npm install -g @cubic-dev-ai/cli ``` -------------------------------- ### Install External Plugins Source: https://github.com/pleaseai/claude-code-plugins/blob/main/README.md Manually install various external plugins for different functionalities. ```bash # External plugins /plugin install nanobanana@pleaseai /plugin install gemini-cli-security@pleaseai /plugin install flutter@pleaseai /plugin install code-review@pleaseai /plugin install spec-kit@pleaseai /plugin install firebase@pleaseai /plugin install grafana@pleaseai /plugin install chrome-devtools-mcp@pleaseai /plugin install playwright-cli@pleaseai /plugin install vercel@pleaseai /plugin install gemini@pleaseai ``` -------------------------------- ### Install Cubic CLI Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/cubic/commands/review.md Instructions for installing the Cubic CLI using curl or npm. This is necessary if the command is not found. ```bash cubic CLI is not installed. Install it with: curl -fsSL https://cubic.dev/install | bash # or: npm install -g @cubic-dev-ai/cli ``` -------------------------------- ### Example Command Template Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/plugin-dev/commands/scaffold.md When commands are requested, use this markdown template to structure command documentation. Include usage and concrete examples. ```markdown # Command Name Brief description of what this command does. ## Usage Explain how to use this command and what it accomplishes. ## Examples Provide concrete examples of using this command. Now, [action the command should take]. ``` -------------------------------- ### JS API Usage Example Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/bun/skills/use-bun/references/bundler.md An example of using the `Bun.build` JavaScript API to configure and execute the bundling process, including common options like entry points, output directory, target, format, minification, and sourcemaps. ```APIDOC ## JS API Usage Example ### Description An example of using the `Bun.build` JavaScript API to configure and execute the bundling process, including common options like entry points, output directory, target, format, minification, and sourcemaps. ### Method ```ts await Bun.build({ entrypoints: ["./src/index.tsx"], outdir: "./dist", target: "browser", // "browser" | "bun" | "node" format: "esm", // "esm" | "cjs" (experimental) | "iife" (experimental) minify: true, // or { whitespace, identifiers, syntax } sourcemap: "linked", // "none" | "inline" | "external" | "linked" splitting: true, // code-splitting for ESM publicPath: "/static/", define: { "process.env.NODE_ENV": JSON.stringify("production") }, external: ["react", "react-dom"], loader: { ".svg": "file", ".graphql": "text" }, plugins: [/* ... */], banner: "/* bundled with bun */", footer: "", // Single-file executable (compile mode) compile: { outfile: "./mycli", target: "bun-linux-x64", bytecode: true }, }); ``` ### Response Handling ```ts if (!result.success) { for (const log of result.logs) console.error(log); process.exit(1); } ``` ### Result Structure The result includes `outputs: BuildArtifact[]` — each is a Blob with `.path`, `.type`, `.kind`, `.hash`, `.sourcemap`. ``` -------------------------------- ### SYNC.md Example Source: https://github.com/pleaseai/claude-code-plugins/blob/main/docs/skills-generator.md Example of the SYNC.md file used for tracking metadata of synced skills (Type 2). ```markdown # Sync Info - **Source:** `vendor/{project}/skills/{skill-name}` - **Git SHA:** `abc123def456...` - **Synced:** 2024-01-15 ``` -------------------------------- ### Bun Install and Add Commands Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/bun/skills/use-bun/references/package-manager.md Install all dependencies, add new packages, or add packages to specific dependency types (devDependencies, optionalDependencies, peerDependencies). Supports versioning by tag, exact version, Git repositories, and local paths. ```bash bun install # install all deps; alias: bun i bun add react # add to dependencies bun add -d @types/bun # devDependencies; aliases: --development, --save-dev bun add -o sharp # optionalDependencies bun add -p react # peerDependencies (also installed by default) bun add react@19.1.1 # exact bun add react@latest # tag bun add github:vercel/next.js # git bun add ./local-pkg # tarball or local path ``` -------------------------------- ### Install and Authenticate Graphite CLI Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/graphite/README.md Install the Graphite CLI using Homebrew or npm, then authenticate your account. This is a prerequisite for using the plugin. ```sh # macOS brew install withgraphite/tap/graphite # Other platforms / npm npm install -g @withgraphite/graphite-cli # Authenticate (one time) gt auth ``` -------------------------------- ### Install Dependencies and Set API Key Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/mcp-dev/skills/mcp-builder/reference/evaluation.md Commands to install project dependencies and set the ANTHROPIC_API_KEY environment variable. ```bash pip install -r scripts/requirements.txt export ANTHROPIC_API_KEY=your_api_key ``` -------------------------------- ### SKILL.md Frontmatter Example Source: https://github.com/pleaseai/claude-code-plugins/blob/main/docs/skills-generator.md Example of the frontmatter for a SKILL.md file, including name, description, author, version, and source information. ```markdown --- name: {name} description: {description} metadata: author: Anthony Fu version: "2026.1.1" source: Generated from {source-url}, scripts located at https://github.com/antfu/skills --- > The skill is based on {project} v{version}, generated at {date}. // Some concise summary/context/introduction of the project ## Core References | Topic | Description | Reference | |-------|-------------|-----------| | Markdown Syntax | Slide separators, frontmatter, notes, code blocks | [core-syntax](references/core-syntax.md) | | Animations | v-click, v-clicks, motion, transitions | [core-animations](references/core-animations.md) | | Headmatter | Deck-wide configuration options | [core-headmatter](references/core-headmatter.md) | ## Features ### Feature a | Topic | Description | Reference | |-------|-------------|-----------| | Feature A Editor | Description of feature a | [feature-a](references/feature-a-foo.md) | | Feature A Preview | Description of feature b | [feature-a-bar](references/feature-a-bar.md) | // ... ``` -------------------------------- ### Conditional Skill Loading Example Source: https://github.com/pleaseai/claude-code-plugins/blob/main/docs/agent-skills.md Create a skill that loads context based on project structure, such as running framework-specific tests. This example demonstrates detection logic for identifying project frameworks. ```markdown --- name: Framework-Specific Testing description: Run framework-specific tests based on project type --- # Framework-Specific Testing ## Detection - Check package.json for framework - Look for framework-specific config files ## Framework Guides - React: [REACT-TESTING.md](./REACT-TESTING.md) - Vue: [VUE-TESTING.md](./VUE-TESTING.md) - Angular: [ANGULAR-TESTING.md](./ANGULAR-TESTING.md) Only load the relevant framework guide. ``` -------------------------------- ### Example User Search Tool Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/mcp-dev/skills/mcp-builder/reference/python_mcp_server.md Searches for users in the Example system using provided query parameters. Returns results in either Markdown or JSON format based on the request. Handles API errors gracefully. ```python @mcp.tool( name="example_search_users", annotations={ "title": "Search Example Users", "readOnlyHint": True, "destructiveHint": False, "idempotentHint": True, "openWorldHint": True } ) async def example_search_users(params: UserSearchInput) -> str: '''Search for users in the Example system by name, email, or team. [Full docstring as shown above] ''' try: # Make API request using validated parameters data = await _make_api_request( "users/search", params={ "q": params.query, "limit": params.limit, "offset": params.offset } ) users = data.get("users", []) total = data.get("total", 0) if not users: return f"No users found matching '{params.query}'" # Format response based on requested format if params.response_format == ResponseFormat.MARKDOWN: lines = [f"# User Search Results: '{params.query}'", ""] lines.append(f"Found {total} users (showing {len(users)})") lines.append("") for user in users: lines.append(f"## {user['name']} ({user['id']})") lines.append(f"- **Email**: {user['email']}") if user.get('team'): lines.append(f"- **Team**: {user['team']}") lines.append("") return "\n".join(lines) else: # Machine-readable JSON format import json response = { "total": total, "count": len(users), "offset": params.offset, "users": users } return json.dumps(response, indent=2) except Exception as e: return _handle_api_error(e) if __name__ == "__main__": mcp.run() ``` -------------------------------- ### Install Bun Plugin for Antigravity (Global Scope) Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/bun/README.md Copy the entire plugin directory into the global scope of your Antigravity installation. ```bash # Global scope (all projects) mkdir -p ~/.gemini/antigravity/plugins cp -R ~/.gemini/antigravity/plugins/bun ``` -------------------------------- ### Install Bun Plugin for Antigravity (Workspace Scope) Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/bun/README.md Copy the entire plugin directory into the workspace scope of your Antigravity installation. ```bash # Workspace scope (project-only) mkdir -p .agents/plugins cp -R .agents/plugins/bun ``` -------------------------------- ### gws drive apps get Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/google-workspace/skills/gws-drive/SKILL.md Gets a specific app. Useful for retrieving information about installed applications. ```APIDOC ## gws drive apps get ### Description Gets a specific app. ### Method GET ### Endpoint /drive/v3/apps/{appId} ``` -------------------------------- ### TanStack Start Route Handler Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/better-auth/skills/use-better-auth/references/adapters.md Defines GET and POST handlers for the auth route in TanStack Start applications using `auth.handler`. ```typescript import { auth } from "@/lib/auth"; import { createFileRoute } from "@tanstack/react-router"; export const Route = createFileRoute("/api/auth/$")({ server: { handlers: { GET: async ({ request }: { request: Request }) => auth.handler(request), POST: async ({ request }: { request: Request }) => auth.handler(request), }, }, }); ``` -------------------------------- ### Update Plugin README with Installation Instructions Source: https://github.com/pleaseai/claude-code-plugins/blob/main/CLAUDE.md Add instructions to the plugin's README file for installing it as a Claude Code plugin via the marketplace and setting environment variables if necessary. ```markdown #### Claude Code Plugin Install as a Claude Code plugin: \`\`\`sh claude /plugin marketplace add pleaseai/claude-code-plugins /plugin install plugin-name@pleaseai \`\`\` This automatically loads usage instructions on session start. Optionally set API key (if required): \`\`\`sh export PLUGIN_API_KEY="your-api-key" \`\`\` ``` -------------------------------- ### Browse Drive Resources and Methods Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/google-workspace/skills/gws-drive/SKILL.md Use the `--help` flag to discover available resources and methods within the Google Drive skill. This is the first step before inspecting specific methods. ```bash gws drive --help ``` -------------------------------- ### gws drive changes getStartPageToken Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/google-workspace/skills/gws-drive/SKILL.md Gets the starting pageToken for listing future changes. This is essential for tracking changes efficiently. ```APIDOC ## gws drive changes getStartPageToken ### Description Gets the starting pageToken for listing future changes. ### Method GET ### Endpoint /drive/v3/changes/startPageToken ``` -------------------------------- ### README.md Template Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/plugin-dev/commands/scaffold.md A comprehensive README file template for your plugin. Include features, installation, usage, configuration, examples, and license information. ```markdown # Plugin Name Brief description of the plugin. ## Features - Feature 1 - Feature 2 - Feature 3 ## Installation ```bash # Add marketplace (if not already added) claude /plugin marketplace add owner/marketplace-repo # Install plugin /plugin install plugin-name@owner ``` ## Usage ### Commands - `/plugin-name:command1` - Description - `/plugin-name:command2` - Description ### Agents - **agent-name** - When to use ## Configuration Optional configuration instructions. ## Examples Concrete usage examples. ## License [License name] ``` -------------------------------- ### Bun Build CLI Basic Usage Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/bun/skills/use-bun/references/bundler.md Use `bun build` with entrypoints and output directories for bundling assets. ```bash bun build ./src/index.tsx --outdir ./dist ``` ```bash bun build ./src/index.ts --target=browser --format=esm --minify --sourcemap=linked ``` ```bash bun build ./src/server.ts --target=bun --outfile=server.js ``` ```bash bun build ./entry.html --outdir=./public ``` ```bash bun build --watch ./src/index.ts --outdir ./dist ``` -------------------------------- ### Setup SEO with useHead Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/nuxt-i18n/skills/nuxt-i18n/references/features-seo.md Integrate `useLocaleHead()` with `useHead()` for more control over SEO metadata. This example shows how to pass canonical query parameters. ```vue ``` -------------------------------- ### Get Best Practices Guidance Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/plugin-dev/README.md Use the /plugin-dev:best-practices command to receive expert advice on plugin development standards, architecture, and component best practices. ```bash /plugin-dev:best-practices How should I structure my plugin's hooks for optimal performance? ``` -------------------------------- ### Canonical Mastra Documentation Lookup Flow Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/mastra/skills/use-mastra/SKILL.md A step-by-step process to find Mastra API documentation within the installed `node_modules` directory, starting from the package overview and drilling down to specific symbol references. ```bash # 1. Start from the overview shipped with the installed version cat node_modules/@mastra/core/dist/docs/SKILL.md # 2. Grep references/ for the topic or symbol grep -rli "Agent" node_modules/@mastra/core/dist/docs/references/ grep -rli "createWorkflow" node_modules/@mastra/core/dist/docs/references/ # 3. Resolve an exported symbol back to its type definition cat node_modules/@mastra/core/dist/docs/assets/SOURCE_MAP.json | jq '."Agent"' cat node_modules/@mastra/core/dist/ ``` -------------------------------- ### Complete MCP Server Example (Node.js) Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/mcp-dev/skills/mcp-builder/reference/node_mcp_server.md This comprehensive example demonstrates setting up an MCP server in Node.js. It includes API client utilities, Zod schema definitions for input validation, tool registration, and logic for handling both stdio and HTTP server transports. Ensure the EXAMPLE_API_KEY environment variable is set. ```typescript #!/usr/bin/env node /** * MCP Server for Example Service. * * This server provides tools to interact with Example API, including user search, * project management, and data export capabilities. */ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; import { z } from "zod"; import axios, { AxiosError } from "axios"; // Constants const API_BASE_URL = "https://api.example.com/v1"; const CHARACTER_LIMIT = 25000; // Enums enum ResponseFormat { MARKDOWN = "markdown", JSON = "json" } // Zod schemas const UserSearchInputSchema = z.object({ query: z.string() .min(2, "Query must be at least 2 characters") .max(200, "Query must not exceed 200 characters") .describe("Search string to match against names/emails"), limit: z.number() .int() .min(1) .max(100) .default(20) .describe("Maximum results to return"), offset: z.number() .int() .min(0) .default(0) .describe("Number of results to skip for pagination"), response_format: z.nativeEnum(ResponseFormat) .default(ResponseFormat.MARKDOWN) .describe("Output format: 'markdown' for human-readable or 'json' for machine-readable") }).strict(); type UserSearchInput = z.infer; // Shared utility functions async function makeApiRequest( endpoint: string, method: "GET" | "POST" | "PUT" | "DELETE" = "GET", data?: any, params?: any ): Promise { try { const response = await axios({ method, url: `${API_BASE_URL}/${endpoint}`, data, params, timeout: 30000, headers: { "Content-Type": "application/json", "Accept": "application/json" } }); return response.data; } catch (error) { throw error; } } function handleApiError(error: unknown): string { if (error instanceof AxiosError) { if (error.response) { switch (error.response.status) { case 404: return "Error: Resource not found. Please check the ID is correct."; case 403: return "Error: Permission denied. You don't have access to this resource."; case 429: return "Error: Rate limit exceeded. Please wait before making more requests."; default: return `Error: API request failed with status ${error.response.status}`; } } else if (error.code === "ECONNABORTED") { return "Error: Request timed out. Please try again."; } } return `Error: Unexpected error occurred: ${error instanceof Error ? error.message : String(error)}`; } // Create MCP server instance const server = new McpServer({ name: "example-mcp", version: "1.0.0" }); // Register tools server.registerTool( "example_search_users", { title: "Search Example Users", description: `[Full description as shown above]`, inputSchema: UserSearchInputSchema, annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true } }, async (params: UserSearchInput) => { // Implementation as shown above } ); // Main function // For stdio (local): async function runStdio() { if (!process.env.EXAMPLE_API_KEY) { console.error("ERROR: EXAMPLE_API_KEY environment variable is required"); process.exit(1); } const transport = new StdioServerTransport(); await server.connect(transport); console.error("MCP server running via stdio"); } // For streamable HTTP (remote): async function runHTTP() { if (!process.env.EXAMPLE_API_KEY) { console.error("ERROR: EXAMPLE_API_KEY environment variable is required"); process.exit(1); } const app = express(); app.use(express.json()); app.post('/mcp', async (req, res) => { const transport = new StreamableHTTPServerTransport({ sessionIdGenerator: undefined, enableJsonResponse: true }); res.on('close', () => transport.close()); await server.connect(transport); await transport.handleRequest(req, res, req.body); }); const port = parseInt(process.env.PORT || '3000'); app.listen(port, () => { console.error(`MCP server running on http://localhost:${port}/mcp`); }); } // Choose transport based on environment const transport = process.env.TRANSPORT || 'stdio'; if (transport === 'http') { runHTTP().catch(error => { console.error("Server error:", error); process.exit(1); }); } else { runStdio().catch(error => { console.error("Server error:", error); process.exit(1); }); } ``` -------------------------------- ### Check Installed Plugin Status Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/please-plugins/skills/find-plugin/SKILL.md Checks the installed plugins registry to determine if a specific plugin is already installed. ```bash jq -r '.plugins | keys[]' ~/.claude/installed_plugins.json ``` -------------------------------- ### Preview Production Build of Web Application Source: https://github.com/pleaseai/claude-code-plugins/blob/main/CLAUDE.md Serve the production build of the web application locally to test its performance and appearance. ```bash cd apps/web bun run preview ``` -------------------------------- ### Setup Space Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/google-workspace/skills/gws-chat/SKILL.md Creates a space and adds specified users as members. ```APIDOC ## setup ### Description Creates a space and adds specified users to it. The calling user is automatically added to the space, and shouldn't be specified as a membership in the request. To specify the human members to add, add memberships with the appropriate `membership.member.name`. To add a human user, use `users/{user}`, where `{user}` can be the email address for the user. ### Method Not specified (assumed to be a CLI command) ### Endpoint Not applicable (CLI command) ### Parameters None explicitly defined in source, but likely requires details about members to add. ### Request Example ```bash gws chat spaces setup --members "users/user1@example.com,users/user2@example.com" ``` ### Response Success response details not specified. ``` -------------------------------- ### Install Dependencies Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/mcp-dev/skills/mcp-builder/reference/evaluation.md Commands to install the necessary Python dependencies for running evaluations, either by installing from a requirements file or manually. ```bash pip install -r scripts/requirements.txt ``` ```bash pip install anthropic mcp ``` -------------------------------- ### Install Gatekeeper Plugin Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/gatekeeper/README.md Install the Gatekeeper plugin using the claude CLI. This command adds the plugin from the marketplace and then installs it. ```sh claude /plugin marketplace add pleaseai/claude-code-plugins /plugin install gatekeeper@pleaseai ``` -------------------------------- ### Install Mastra Packages Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/mastra/skills/use-mastra/SKILL.md Install the required Mastra package using the project's package manager. Install only what is needed for the task. ```bash # root CLI / platform (only when invoking `mastra dev`, `mastra build`, etc.) pnpm add mastra # or: bun add mastra / npm i mastra / yarn add mastra # scoped packages — add what you actually use pnpm add @mastra/core @mastra/memory @mastra/rag ``` -------------------------------- ### Propose New Rules File Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/claude-md-management/commands/revise-claude-md.md This example demonstrates how to propose the creation of a new rules file, including its path, a justification for its creation, and the file's content in YAML format with a `paths:` directive and rule definitions. ```yaml ### Create: ./.claude/rules/api-patterns.md **Why:** API development patterns apply only to specific paths ```yaml --- paths: src/api/**/*.ts --- # API Development Rules - Use dependency injection pattern - All endpoints must have OpenAPI docs ``` ``` -------------------------------- ### Create a Google Classroom Course Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/google-workspace/skills/recipe-create-classroom-course/SKILL.md Use this command to create a new course in Google Classroom. Ensure you have the necessary prerequisites loaded. ```bash gws classroom courses create --json '{"name": "Introduction to CS", "section": "Period 1", "room": "Room 101", "ownerId": "me"}' ``` -------------------------------- ### gws drive approvals get Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/google-workspace/skills/gws-drive/SKILL.md Gets an Approval by its ID. ```APIDOC ## gws drive approvals get ### Description Gets an Approval by ID. ### Method GET ### Endpoint /drive/v3/approvals/{approvalId} ``` -------------------------------- ### Browse Resources and Methods with gws Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/google-workspace/skills/gws-reseller/SKILL.md Use the `gws` CLI to explore available resources and methods within the reseller API. This command helps in understanding the structure of the API. ```bash gws reseller --help ``` -------------------------------- ### apps-script projects get Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/google-workspace/skills/gws-apps-script/SKILL.md Gets a script project's metadata. ```APIDOC ## projects get ### Description Gets a script project's metadata. ### Method GET ### Endpoint /projects/{scriptId} ### Parameters #### Path Parameters - **scriptId** (string) - Required - The ID of the script project. ### Response #### Success Response (200) - **title** (string) - The title of the script project. - **scriptId** (string) - The ID of the script project. - **createTime** (string) - The creation time of the script project. - **updateTime** (string) - The last update time of the script project. ``` -------------------------------- ### Claude Code Plugin Installation Commands Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/plugin-dev/commands/migrate-gemini.md Provides bash commands for installing a Claude Code plugin from the marketplace or a specific repository, and for installing a legacy Gemini CLI extension. ```bash claude /plugin marketplace add owner/marketplace-repo /plugin install plugin-name@owner ``` ```bash gemini ext add owner/repo ``` -------------------------------- ### Create Skill Directory (Bash) Source: https://github.com/pleaseai/claude-code-plugins/blob/main/docs/agent-skills.md Demonstrates how to create directories for personal, project, or plugin skills using bash commands. ```bash # Personal skill mkdir -p ~/.claude/skills/excel-analysis # Project skill mkdir -p .claude/skills/security-review # Plugin skill mkdir -p .claude-plugin/skills/deployment-tools ``` -------------------------------- ### Simplifying Complex Test Setup Source: https://github.com/pleaseai/claude-code-plugins/blob/main/docs/TESTING.md Keep test setup concise and focused. Overly complex setup can obscure the test's intent. Use helper functions to create necessary data or mocks. ```typescript // ❌ Avoid - complex setup obscures test intent test('complex scenario', () => { const spec = createComplexSpecWithMultipleFilesAndDependencies() // ... 20 lines of setup expect(result).toBe(expected) }) // ✅ Better - simple, focused setup test('should handle basic spec', () => { const spec = createMockSpec('simple-feature') expect(adapter.push(spec)).resolves.toBeDefined() }) ``` -------------------------------- ### Bun Build CLI Compile with Bytecode Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/bun/skills/use-bun/references/bundler.md Create single-file executables with bytecode preprocessing for faster startup times, at the cost of a larger binary size. ```bash bun build ./cli.ts --compile --bytecode --outfile mycli ``` -------------------------------- ### Install Graphite Claude Plugin Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/graphite/README.md Install the Graphite plugin for Claude via the plugin marketplace. ```sh claude /plugin marketplace add pleaseai/claude-code-plugins /plugin install graphite@pleaseai ``` -------------------------------- ### Install Built-in Plugins Source: https://github.com/pleaseai/claude-code-plugins/blob/main/README.md Manually install built-in plugins provided by the Claude Code ecosystem. ```bash # Built-in plugins /plugin install please-plugins@pleaseai /plugin install plugin-dev@pleaseai /plugin install gatekeeper@pleaseai /plugin install cubic@pleaseai /plugin install mcp-dev@pleaseai /plugin install nuxt-ui@pleaseai /plugin install vue@pleaseai /plugin install nuxt@pleaseai /plugin install pinia@pleaseai /plugin install vueuse@pleaseai /plugin install vite@pleaseai /plugin install vitest@pleaseai /plugin install vitepress@pleaseai /plugin install unocss@pleaseai /plugin install web-design@pleaseai /plugin install turborepo@pleaseai /plugin install tsdown@pleaseai /plugin install slidev@pleaseai /plugin install pnpm@pleaseai /plugin install antfu@pleaseai /plugin install mastra@pleaseai /plugin install supabase@pleaseai /plugin install prisma@pleaseai /plugin install better-auth@pleaseai /plugin install agent-browser@pleaseai /plugin install ai-sdk@pleaseai /plugin install slack-agent@pleaseai /plugin install mcp-neo4j@pleaseai /plugin install worktree@pleaseai /plugin install markitdown@pleaseai /plugin install chat-sdk@pleaseai /plugin install docus@pleaseai /plugin install wordpress@pleaseai /plugin install vinext@pleaseai /plugin install next@pleaseai /plugin install react@pleaseai /plugin install react-native@pleaseai /plugin install emulate@pleaseai /plugin install ask@pleaseai /plugin install workflow@pleaseai ``` -------------------------------- ### Serve HTTP Requests with Bun.serve Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/bun/skills/use-bun/references/runtime-apis.md Configure and start an HTTP server using `Bun.serve`. Supports static and dynamic routes, WebSockets, hot reloading, and graceful shutdown. Use `fetch` for fallback routes. ```typescript const server = Bun.serve({ // Static + dynamic routes — requires Bun 1.2.3+ routes: { "/api/status": new Response("OK"), "/users/:id": req => new Response(`Hello ${req.params.id}`), "/api/posts": { GET: () => new Response("List"), POST: async req => Response.json(await req.json()), }, "/api/*": Response.json({ message: "Not found" }, { status: 404 }), "/favicon.ico": Bun.file("./favicon.ico"), }, // Fallback for unmatched routes (required pre-1.2.3, optional after) fetch(req) { return new Response("Not Found", { status: 404 }); }, port: 3000, hostname: "0.0.0.0", // TLS via tls: { cert, key } — see docs/runtime/http/tls.mdx }); console.log(`Listening on ${server.url}`); ``` -------------------------------- ### Solid Start Handler Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/better-auth/skills/use-better-auth/references/adapters.md Mounts the auth.handler for Solid Start applications using the `toSolidStartHandler` adapter. ```typescript import { auth } from "~/lib/auth"; import { toSolidStartHandler } from "better-auth/solid-start"; export const { GET, POST } = toSolidStartHandler(auth); ``` -------------------------------- ### Bun Configuration (bunfig.toml) Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/bun/skills/use-bun/references/runtime-apis.md Configure Bun's runtime behavior, installation options, and script execution using a TOML file. Place this file at the project root. ```toml # Run-time behaviour preload = ["./preload.ts"] # always loaded first jsx = "react-jsx" # override tsconfig for ad-hoc files smol = false # low-memory mode [run] silent = false bun = true # auto-rewrite `node` to `bun` for scripts [install] optional = true peer = true production = false # skip devDependencies in CI exact = false linker = "hoisted" # or "isolated" (1.2+) ``` -------------------------------- ### GENERATION.md Example Source: https://github.com/pleaseai/claude-code-plugins/blob/main/docs/skills-generator.md Example of the GENERATION.md file used for tracking metadata of generated skills (Type 1). ```markdown # Generation Info - **Source:** `sources/{project}` - **Git SHA:** `abc123def456...` - **Generated:** 2024-01-15 ``` -------------------------------- ### Start Paid Service Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/google-workspace/skills/gws-reseller/SKILL.md Immediately transitions a 30-day free trial subscription to a paid service subscription. This is only applicable if a payment plan has already been configured for the trial subscription. ```APIDOC ## startPaidService ### Description Immediately move a 30-day free trial subscription to a paid service subscription. This method is only applicable if a payment plan has already been set up for the 30-day trial subscription. ### Method POST ### Endpoint /subscriptions/{subscriptionId}/startPaidService ### Parameters #### Path Parameters - **subscriptionId** (string) - Required - The unique identifier of the subscription to convert to a paid service. ``` -------------------------------- ### Start Development Server Source: https://github.com/pleaseai/claude-code-plugins/blob/main/apps/web/README.md Command to run the Nuxt development server. The application will be accessible at http://localhost:3000. ```bash bun run dev ``` -------------------------------- ### Check Mastra Package Installation Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/mastra/skills/use-mastra/SKILL.md Verify if the Mastra CLI, platform API, or scoped packages are installed in the project. ```bash ls node_modules/mastra 2>/dev/null # CLI + project scaffolding + platform API ls node_modules/@mastra/ 2>/dev/null # scoped packages (core, memory, rag, ...) ``` -------------------------------- ### HTML Imports with Fullstack Server Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/bun/skills/use-bun/references/bundler.md Demonstrates how importing an HTML file as an entrypoint bundles linked scripts and stylesheets. This setup, combined with `Bun.serve`, provides a full-stack development server with hot reloading capabilities. ```typescript const server = Bun.serve({ routes: { "/": (await import("./index.html") as any).default, }, }); ``` -------------------------------- ### Plugin Manifest Example Source: https://github.com/pleaseai/claude-code-plugins/blob/main/docs/agent-skills.md A JSON manifest file for packaging skills into a distributable plugin. ```json { "name": "security-tools", "version": "1.0.0", "description": "Security analysis skills and tools", "skills": "./skills/" } ``` -------------------------------- ### Schema Generation and Migration Cheatsheet Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/better-auth/skills/use-better-auth/references/databases.md Quick reference for schema generation and migration commands for Better Auth adapters. ```bash npx auth generate # diff / write schema for configured adapter npx auth migrate # apply (built-in Kysely only) ``` -------------------------------- ### Search Installed Plugin Skills Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/please-plugins/skills/find-plugin/SKILL.md Searches installed plugin skills for matching descriptions based on user query terms. ```bash # List all available skill directories find ~/.claude/plugins/marketplaces/pleaseai/plugins/*/skills -maxdepth 1 -type d 2>/dev/null # Search skill descriptions for the user's query terms (covers both skills/ and .agents/skills/ layouts) grep -rilFi "" ~/.claude/plugins/marketplaces/pleaseai/plugins/*/{skills,.agents/skills}/*/SKILL.md 2>/dev/null ``` -------------------------------- ### Add and Install Claude Code Plugins Source: https://github.com/pleaseai/claude-code-plugins/blob/main/CLAUDE.md Commands to add the Claude Code plugin marketplace and install specific plugins. ```bash # Add marketplace /plugin marketplace add pleaseai/claude-code-plugins # Install a plugin /plugin install nanobanana@pleaseai /plugin install gemini-cli-security@pleaseai ``` -------------------------------- ### Client Setup with Better Auth Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/better-auth/skills/use-better-auth/SKILL.md Configure the Better Auth client for various frontend frameworks. Import `createAuthClient` from the framework-specific path and set the `baseURL` for API requests. Export essential methods like `signIn` and `useSession` from your client module. ```typescript import { createAuthClient } from "better-auth/react"; // React import { createAuthClient } from "better-auth/vue"; // Vue / Nuxt import { createAuthClient } from "better-auth/svelte"; // Svelte / SvelteKit import { createAuthClient } from "better-auth/solid"; // Solid / Solid Start import { createAuthClient } from "better-auth/client"; // vanilla (framework-agnostic) export const authClient = createAuthClient({ baseURL: process.env.NEXT_PUBLIC_BETTER_AUTH_URL, // or equivalent per framework plugins: [ // mirror any server-side plugins that expose a client plugin ], }); ``` -------------------------------- ### Browse Cloud Identity Resources and Methods Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/google-workspace/skills/gws-cloudidentity/SKILL.md Use the --help flag with the gws cloudidentity command to discover available resources and their associated methods. This is the first step before executing any API calls. ```bash gws cloudidentity --help ``` -------------------------------- ### Basic Subscription Command Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/google-workspace/skills/gws-events-subscribe/SKILL.md Use this command to initiate a subscription to Google Workspace events. Ensure prerequisites are met. ```bash gws events +subscribe ``` -------------------------------- ### gws drive comments get Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/google-workspace/skills/gws-drive/SKILL.md Gets a comment by its ID. Requires the `fields` parameter to be set to specify the exact fields needed. ```APIDOC ## gws drive comments get ### Description Gets a comment by ID. ### Method GET ### Endpoint /drive/v3/comments/{commentId} ### Parameters #### Query Parameters - **fields** (string) - Required - Specifies the exact fields to return. ``` -------------------------------- ### Fetch PortOne V2 Frontend Code Reference Source: https://github.com/pleaseai/claude-code-plugins/blob/main/plugins/portone/agents/integration-validator.md Retrieve the official frontend example code for PortOne V2 integrations. This is useful for comparing custom implementations against the standard. ```bash mcp__portone__readPortoneV2FrontendCode - Get official frontend example ```