{"_id":"@austinchen705/chatbot-intg-skill","_rev":"5-7853d37d6cdab1cd34f3d12b42e3bfeb","name":"@austinchen705/chatbot-intg-skill","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.1":{"name":"@austinchen705/chatbot-intg-skill","version":"1.0.1","keywords":["chatbot","integration","claude-code","codex","gemini","ai-skill"],"license":"MIT","_id":"@austinchen705/chatbot-intg-skill@1.0.1","maintainers":[{"name":"austinchen705","email":"awei705@gmail.com"}],"bin":{"chatbot-intg-skill":"bin/cli.js"},"dist":{"shasum":"ae0a49670602f759b84b6ca24567e55de991a3b3","tarball":"https://registry.npmjs.org/@austinchen705/chatbot-intg-skill/-/chatbot-intg-skill-1.0.1.tgz","fileCount":6,"integrity":"sha512-7yIAsNkdKpJLB0MVGN3H3/6PHuFJIhpVrl/INGkeCFp4sbpdwF+wJbfpRxFinTWLC1BiJYbQuI3at585a1Mkcw==","signatures":[{"sig":"MEUCIQDXlzPPlaaxqPnnndl0buBsC+tUFdUiToGLFU5gS46g5QIgGZX+aoyLwqiLfLT1ap/4R4nAC5eGu/jl75dgUg5CpbE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1944110},"_npmUser":{"name":"austinchen705","email":"awei705@gmail.com"},"_npmVersion":"10.9.2","description":"AI Chatbot integration skill for Claude Code / Codex / Gemini — guides vendors through complete API integration","directories":{},"_nodeVersion":"22.16.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/chatbot-intg-skill_1.0.1_1771817127464_0.7569589877310918","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@austinchen705/chatbot-intg-skill","version":"1.0.2","description":"AI Chatbot integration skill for Claude Code / Codex / Gemini — guides vendors through complete API integration","bin":{"chatbot-intg-skill":"bin/cli.js"},"keywords":["chatbot","integration","claude-code","codex","gemini","ai-skill"],"license":"MIT","_id":"@austinchen705/chatbot-intg-skill@1.0.2","_nodeVersion":"22.16.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-jRKfcSk0fyUHexkDpo6NDTe9O0NAGxvBMArdUqlcru0kw+1BiUKbGnwCtIrEVsS5bwxs0ryzGrxi8jt8p5eFBw==","shasum":"3dd6181b62bb6f49ca1c2243152e5589487bc7b2","tarball":"https://registry.npmjs.org/@austinchen705/chatbot-intg-skill/-/chatbot-intg-skill-1.0.2.tgz","fileCount":7,"unpackedSize":130495,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBfuaTchmrTaFMMCKe82k4J17u0lE0ZdN8PA27yq4Jf+AiAjRMnyZvTSiLGnoY02JHhg9sMpWC1Jiy8IgpjvwGwrOA=="}]},"_npmUser":{"name":"austinchen705","email":"awei705@gmail.com"},"directories":{},"maintainers":[{"name":"austinchen705","email":"awei705@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/chatbot-intg-skill_1.0.2_1771842869888_0.3496801730869368"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-23T03:25:27.355Z","modified":"2026-02-23T10:34:30.150Z","1.0.0":"2026-02-23T02:57:25.649Z","1.0.1":"2026-02-23T03:25:27.733Z","1.0.2":"2026-02-23T10:34:30.024Z"},"license":"MIT","keywords":["chatbot","integration","claude-code","codex","gemini","ai-skill"],"description":"AI Chatbot integration skill for Claude Code / Codex / Gemini — guides vendors through complete API integration","maintainers":[{"name":"austinchen705","email":"awei705@gmail.com"}],"readme":"# @austinchen705/chatbot-intg-skill\r\n\r\nAn AI skill installer for **Claude Code**, **Codex**, and **Gemini** that guides vendors through complete AI Chatbot API integration — covering auth, chat lifecycle, escalation handling, error resilience, analysis, MCP Server development, and debugging.\r\n\r\n## Install\r\n\r\nRun directly with `npx` (no install required):\r\n\r\n```bash\r\nnpx @austinchen705/chatbot-intg-skill\r\n```\r\n\r\nOr install globally:\r\n\r\n```bash\r\nnpm install -g @austinchen705/chatbot-intg-skill\r\nchatbot-intg-skill\r\n```\r\n\r\n## Usage\r\n\r\n### Interactive (default)\r\n\r\n```bash\r\nnpx @austinchen705/chatbot-intg-skill\r\n```\r\n\r\nThe installer will prompt you to select the target AI coding tool:\r\n\r\n```\r\n  AI Chatbot Integration Skill Installer\r\n  =======================================\r\n\r\n  Install for which tools? (comma-separated)\r\n  1) claude  2) codex  3) gemini  4) all\r\n  >\r\n```\r\n\r\n### Non-interactive (CI / scripted)\r\n\r\nUse the `--tool` flag to skip the prompt:\r\n\r\n```bash\r\n# Single tool\r\nnpx @austinchen705/chatbot-intg-skill --tool claude\r\n\r\n# Multiple tools\r\nnpx @austinchen705/chatbot-intg-skill --tool claude,codex\r\n\r\n# All tools\r\nnpx @austinchen705/chatbot-intg-skill --tool all\r\n```\r\n\r\n## What Gets Installed\r\n\r\n| Tool | Skill files | Command / Instruction file |\r\n|------|-------------|---------------------------|\r\n| Claude Code | `.claude/skills/chatbot-intg/` | `.claude/commands/chatbot-intg.md` |\r\n| Codex | `.codex/skills/chatbot-intg/` | `.codex/AGENTS.md` (manual step) |\r\n| Gemini | `.gemini/skills/chatbot-intg/` | `.gemini/GEMINI.md` (manual step) |\r\n\r\n### Installed files\r\n\r\n```\r\nSKILL.md                          # Phased integration workflow\r\nresources/\r\n  chatbot_integration_spec.md    # API spec reference (v0.7)\r\n  integration-playbook.md         # Language-specific code templates\r\n  mcp-tool-spec.md                # MCP tool definition rules + multi-language skeletons\r\n```\r\n\r\n## Invoking the Skill\r\n\r\n**Claude Code** — the command is auto-detected after install:\r\n\r\n```\r\n/chatbot-intg\r\n```\r\n\r\n**Codex** — add the following line to `.codex/AGENTS.md`:\r\n\r\n```\r\nRead .codex/skills/chatbot-intg/SKILL.md for vendor integration workflow\r\n```\r\n\r\n**Gemini** — add the following line to `.gemini/GEMINI.md`:\r\n\r\n```\r\nRead .gemini/skills/chatbot-intg/SKILL.md for vendor integration workflow\r\n```\r\n\r\n## Integration Workflow\r\n\r\nThe skill guides vendors through **6 gated phases**, each requiring user confirmation before proceeding:\r\n\r\n```\r\nPhase 0: Infrastructure       Language + framework + logging setup\r\n    ↓ (confirm)\r\nPhase 1: Auth & Connectivity  JWT token lifecycle + auto-refresh\r\n    ↓ (confirm)\r\nPhase 2: Core Chat Flow       Session dispatch → send loop → kickout + escalation\r\n    ↓ (confirm)\r\nPhase 3: Error Handling       Unified error framework + retry + circuit breaker\r\n    ↓ (confirm)\r\nPhase 4: Advanced (optional)  Chat Analysis + MCP Server development\r\n    ↓ (confirm)\r\nPhase 5: Acceptance           Integration test checklist + debug handbook\r\n```\r\n\r\n### Supported Languages\r\n\r\n- Python (FastAPI / Django · httpx / requests · tenacity)\r\n- Java (Spring Boot · OkHttp / RestTemplate · Resilience4j)\r\n- C# (ASP.NET Core · HttpClient · Polly)\r\n- Node.js (Express / NestJS · axios · cockatiel)\r\n\r\n### Covered APIs\r\n\r\n| Method | Route | Description |\r\n|--------|-------|-------------|\r\n| POST | `/api/v1/auth` | Obtain JWT Token |\r\n| POST | `/api/v1/chatbot/dispatch` | Create chat session |\r\n| GET | `/api/v1/chatbot/usage` | Query quota |\r\n| POST | `/api/v1/chatbot/kickout` | Close a session |\r\n| POST | `/api/v1/chatbot/killall` | Close all sessions |\r\n| POST | `/api/v1/chat/send` | Send message + receive AI response |\r\n| GET | `/api/v1/chat/history/{sessionId}` | Retrieve chat history |\r\n| POST | `/api/v1/analysis/create` | Submit conversation for analysis |\r\n| GET | `/api/v1/analysis/{sessionId}` | Poll analysis result |\r\n\r\n## MCP Server Development\r\n\r\nPhase 4 of the skill includes guided MCP Server development. The skill helps vendors build custom tools that the AI can call during conversations — based on their own business logic.\r\n\r\n### How it works\r\n\r\nThe skill follows a three-step process:\r\n\r\n**1. Discovery** — identify business capabilities to expose as tools\r\n\r\n```\r\nTool Inventory\r\n──────────────────────────────────────────────────────────\r\nget_order_status   | customer asks about order      | order_id\r\nsearch_products    | customer looks for a product   | query, category\r\ncreate_ticket      | customer wants to raise issue  | subject, description\r\n```\r\n\r\n**2. Tool Design** — apply spec rules before writing code\r\n\r\n| Rule | Requirement |\r\n|------|-------------|\r\n| Naming | `snake_case`, verb-first (e.g. `get_order_status`) |\r\n| Description | 50–200 chars, includes \"Use when...\" |\r\n| Parameters | Each parameter must have a `Description` annotation |\r\n| Return value | Structured object: `{ success, data, error }` — never plain string |\r\n| Stateless | No server-side session dependency per tool call |\r\n\r\n**3. Implementation** — generate skeleton in the vendor's language\r\n\r\nSupported languages and their MCP SDK:\r\n\r\n| Language | SDK / Library |\r\n|----------|--------------|\r\n| Python | `mcp` (FastMCP) |\r\n| Java | Spring AI MCP |\r\n| C# | `ModelContextProtocol.Server` |\r\n| Node.js | `@modelcontextprotocol/sdk` |\r\n\r\n### Transport & Security\r\n\r\nAll MCP Servers use **Streamable HTTP** transport with **JWT HS256** authentication. The Chatbot system signs and injects the token on every tool request — vendors only need to validate it.\r\n\r\n```\r\nPOST /mcp\r\nAuthorization: Bearer <chatbot-signed-jwt>\r\n```\r\n\r\nJWT parameters (`SecretKey`, `Issuer`, `Audience`, `ExpiryMinutes`) are configured per tenant via the Admin API — not hardcoded in the MCP Server.\r\n\r\n### Example tool skeleton (C#)\r\n\r\n```csharp\r\n[McpServerToolType]\r\npublic class OrderTools(IOrderRepository orderRepo)\r\n{\r\n    [McpServerTool(Name = \"get_order_status\")]\r\n    [Description(\"Retrieves the current status of a customer order by order ID. \"\r\n               + \"Use when the customer asks about their order progress or delivery.\")]\r\n    public async Task<ToolResult> GetOrderStatusAsync(\r\n        [Description(\"The order ID provided by the customer (e.g. ORD-12345)\")] string orderId)\r\n    {\r\n        var order = await orderRepo.FindByIdAsync(orderId);\r\n        if (order is null)\r\n            return ToolResult.Fail(\"ORDER_NOT_FOUND\", $\"Order {orderId} not found\");\r\n        return ToolResult.Ok(order);\r\n    }\r\n}\r\n```\r\n\r\n> Full skeletons for Python, Java, C#, and Node.js are in `resources/mcp-tool-spec.md` after installation.\r\n\r\n---\r\n\r\n## Requirements\r\n\r\n- Node.js >= 14\r\n- Run from the **root of your project** so skill files land in the right directories\r\n\r\n## License\r\n\r\nMIT\r\n","readmeFilename":"README.md"}