Compare commits

..

1 Commits

Author SHA1 Message Date
Kenneth Lien
8140fbad22 Lock telegram/discord .env files to owner (chmod 600)
The bot token is a credential. Tighten perms on load so hand-written
or pre-existing .env files get locked down, and update the configure
skill to chmod after writing. No-op on Windows.
2026-03-20 10:37:13 -07:00
7 changed files with 20 additions and 315 deletions

View File

@@ -29,38 +29,6 @@
"category": "development",
"homepage": "https://github.com/anthropics/claude-plugins-public/tree/main/plugins/agent-sdk-dev"
},
{
"name": "ai-firstify",
"description": "AI-first project auditor and re-engineer based on the 9 design principles and 7 design patterns from the TechWolf AI-First Bootcamp",
"source": {
"source": "git-subdir",
"url": "techwolf-ai/ai-first-toolkit",
"path": "plugins/ai-firstify",
"ref": "main",
"sha": "7f18e11d694b9ae62ea3009fbbc175f08ae913df"
},
"homepage": "https://ai-first.techwolf.ai"
},
{
"name": "ai-plugins",
"description": "Set up endorctl and use Endor Labs to scan, prioritize, and fix security risks across your software supply chain",
"source": {
"source": "url",
"url": "https://github.com/endorlabs/ai-plugins.git",
"sha": "a0f1d5632b6f9e6c26eaa9806f5d8d454ca5b06f"
},
"homepage": "https://www.endorlabs.com"
},
{
"name": "aikido",
"description": "Aikido Security scanning for Claude Code — SAST, secrets, and IaC vulnerability detection powered by the Aikido MCP server.",
"source": {
"source": "url",
"url": "https://github.com/AikidoSec/aikido-claude-plugin.git",
"sha": "d7fa8b8e192680d9a26c1a5dcaead7cf5cdb7139"
},
"homepage": "https://github.com/AikidoSec/aikido-claude-plugin"
},
{
"name": "amazon-location-service",
"description": "Guide developers through adding maps, places search, geocoding, routing, and other geospatial features with Amazon Location Service, including authentication setup, SDK integration, and best practices.",
@@ -80,27 +48,6 @@
"source": "./external_plugins/asana",
"homepage": "https://github.com/anthropics/claude-plugins-public/tree/main/external_plugins/asana"
},
{
"name": "astronomer-data-agents",
"description": "Data engineering for Apache Airflow and Astronomer. Author DAGs with best practices, debug pipeline failures, trace data lineage, profile tables, migrate Airflow 2 to 3, and manage local and cloud deployments.",
"category": "development",
"source": {
"source": "url",
"url": "https://github.com/astronomer/agents.git",
"sha": "7ef022b02f5296b5ecc52ba0db3ba9345ec03c9e"
},
"homepage": "https://github.com/astronomer/agents"
},
{
"name": "atlan",
"description": "Atlan data catalog plugin for Claude Code. Search, explore, govern, and manage your data assets through natural language. Powered by the Atlan MCP server with semantic search, lineage traversal, glossary management, data quality rules, and more.",
"source": {
"source": "url",
"url": "https://github.com/atlanhq/agent-toolkit.git",
"sha": "acdf284da6aa98b14f8dad90a9827006d8df425c"
},
"homepage": "https://docs.atlan.com/"
},
{
"name": "atlassian",
"description": "Connect to Atlassian products including Jira and Confluence. Search and create issues, access documentation, manage sprints, and integrate your development workflow with Atlassian's collaboration tools.",
@@ -147,16 +94,6 @@
},
"homepage": "https://github.com/awslabs/agent-plugins"
},
{
"name": "brightdata-plugin",
"description": "Web scraping, Google search, structured data extraction, and MCP server integration powered by Bright Data. Includes 7 skills: scrape any webpage as markdown (with bot detection/CAPTCHA bypass), search Google with structured JSON results, extract data from 40+ websites (Amazon, LinkedIn, Instagram, TikTok, YouTube, and more), orchestrate Bright Data's 60+ MCP tools, built-in best practices for Web Unlocker, SERP API, Web Scraper API, and Browser API, Python SDK best practices for the brightda...",
"source": {
"source": "url",
"url": "https://github.com/brightdata/skills.git",
"sha": "e671da495f7ec0ed6be5e9fa71e260f886a1dc36"
},
"homepage": "https://docs.brightdata.com"
},
{
"name": "chrome-devtools-mcp",
"description": "Control and inspect a live Chrome browser from your coding agent. Record performance traces, analyze network requests, check console messages with source-mapped stack traces, and automate browser actions with Puppeteer.",
@@ -231,26 +168,6 @@
"category": "productivity",
"homepage": "https://github.com/anthropics/claude-plugins-official/tree/main/plugins/claude-md-management"
},
{
"name": "cloudinary",
"description": "Use Cloudinary directly in Claude. Manage assets, apply transformations, optimize media, and more through natural conversation.",
"source": {
"source": "url",
"url": "https://github.com/cloudinary-devs/cloudinary-plugin.git",
"sha": "137c5d7acd9c3f10e80cd2a400486971e1664f31"
},
"homepage": "https://cloudinary.com/documentation"
},
{
"name": "cockroachdb",
"description": "CockroachDB plugin for Claude Code — explore schemas, write optimized SQL, debug queries, and manage distributed database clusters directly from your AI coding agent.",
"source": {
"source": "url",
"url": "https://github.com/cockroachdb/claude-plugin.git",
"sha": "a54566e03c852567589ef85bb449d1e4de229667"
},
"homepage": "https://github.com/cockroachdb/claude-plugin"
},
{
"name": "code-review",
"description": "Automated code review for pull requests using multiple specialized agents with confidence-based scoring to filter false positives",
@@ -335,16 +252,6 @@
},
"homepage": "https://github.com/astronomer/agents"
},
{
"name": "data-engineering",
"description": "Data engineering plugin - warehouse exploration, pipeline authoring, Airflow integration",
"source": {
"source": "url",
"url": "https://github.com/astronomer/agents.git",
"sha": "85d6053b1e21724f9cefb1e3f5219bd54fc77224"
},
"homepage": "https://github.com/astronomer/agents"
},
{
"name": "deploy-on-aws",
"description": "Deploy applications to AWS with architecture recommendations, cost estimates, and IaC deployment.",
@@ -363,16 +270,6 @@
"category": "productivity",
"source": "./external_plugins/discord"
},
{
"name": "elixir-ls-lsp",
"description": "Elixir language server (ElixirLS) for Claude Code — provides code intelligence and diagnostics for .ex, .exs, and .heex files.",
"source": {
"source": "url",
"url": "https://github.com/MikaelFangel/claude-elixir-ls-lsp.git",
"sha": "806a6eeeb88b9a306a59b3212a1d5d88aa5c70af"
},
"homepage": "https://elixir-lsp.github.io/elixir-ls/"
},
{
"name": "explanatory-output-style",
"description": "Adds educational insights about implementation choices and codebase patterns (mimics the deprecated Explanatory output style)",
@@ -390,16 +287,6 @@
"category": "development",
"source": "./external_plugins/fakechat"
},
{
"name": "fastly-agent-toolkit",
"description": "Fastly development tools and platform skills",
"source": {
"source": "url",
"url": "https://github.com/fastly/fastly-agent-toolkit.git",
"sha": "d9ba949011e725be55cae11acc741aa1f1f393d3"
},
"homepage": "https://github.com/fastly/fastly-agent-toolkit/blob/main/README.md"
},
{
"name": "feature-dev",
"description": "Comprehensive feature development workflow with specialized agents for codebase exploration, architecture design, and quality review",
@@ -411,16 +298,6 @@
"category": "development",
"homepage": "https://github.com/anthropics/claude-plugins-public/tree/main/plugins/feature-dev"
},
{
"name": "fiftyone",
"description": "Build high-quality datasets and computer vision models. Visualize datasets, analyze models, find duplicates, run inference, evaluate predictions, and develop custom plugins.",
"source": {
"source": "url",
"url": "https://github.com/voxel51/fiftyone-skills.git",
"sha": "593e0553fc9fd94db52386ada2c9e2074a6ecf89"
},
"homepage": "https://docs.voxel51.com/"
},
{
"name": "figma",
"description": "Figma design platform integration. Access design files, extract component information, read design tokens, and translate designs into code. Bridge the gap between design and development workflows.",
@@ -448,26 +325,6 @@
},
"homepage": "https://github.com/firecrawl/firecrawl-claude-plugin.git"
},
{
"name": "firetiger",
"description": "Claude Code plugin for Firetiger observability workflows and MCP-powered investigations.",
"source": {
"source": "url",
"url": "https://github.com/firetiger-oss/claude-plugin.git",
"sha": "51421ce20adc7c30eb014e6847c7087ed34cb879"
},
"homepage": "https://www.firetiger.com/"
},
{
"name": "followrabbit",
"description": "Cloud cost optimization for GCP infrastructure. Review changes for cost impact and auto-apply savings recommendations using the followrabbit CLI.",
"source": {
"source": "url",
"url": "https://github.com/followrabbit-ai/awesome-rabbit.git",
"sha": "f59ec3d1f6337a6ed825ef06836a221ed3d2ffb0"
},
"homepage": "https://subscriptions.agentic.followrabbit.ai/"
},
{
"name": "frontend-design",
"description": "Create distinctive, production-grade frontend interfaces with high design quality. Generates creative, polished code that avoids generic AI aesthetics.",
@@ -493,16 +350,6 @@
"source": "./external_plugins/gitlab",
"homepage": "https://github.com/anthropics/claude-plugins-public/tree/main/external_plugins/gitlab"
},
{
"name": "goodmem",
"description": "GoodMem memory infrastructure for AI agents. Use Python SDK skills to write code that manages embedders, spaces, and memories, or use MCP tools to perform GoodMem operations directly via natural language.",
"source": {
"source": "url",
"url": "https://github.com/PAIR-Systems-Inc/goodmem-claude-code-plugin.git",
"sha": "215568baf203887b5d7f8245e0503dd4a81336c2"
},
"homepage": "https://github.com/PAIR-Systems-Inc/goodmem-claude-code-plugin"
},
{
"name": "gopls-lsp",
"description": "Go language server for code intelligence and refactoring",
@@ -530,18 +377,6 @@
"source": "./external_plugins/greptile",
"homepage": "https://github.com/anthropics/claude-plugins-public/tree/main/external_plugins/greptile"
},
{
"name": "helius",
"description": "Build on Solana with Helius — live blockchain tools, expert coding patterns, and autonomous account signup",
"source": {
"source": "git-subdir",
"url": "helius-labs/core-ai",
"path": "helius-plugin",
"ref": "main",
"sha": "05ea4d1128d46618266bbcc23a5e7019c57be0d6"
},
"homepage": "https://www.helius.dev/docs"
},
{
"name": "hookify",
"description": "Easily create custom hooks to prevent unwanted behaviors by analyzing conversation patterns or from explicit instructions. Define rules via simple markdown files.",
@@ -724,36 +559,6 @@
},
"homepage": "https://github.com/neondatabase/agent-skills/tree/main/plugins/neon-postgres"
},
{
"name": "netlify-skills",
"description": "Netlify platform skills for Claude Code — functions, edge functions, blobs, database, image CDN, forms, config, CLI, frameworks, caching, AI gateway, and deployment.",
"category": "development",
"source": {
"source": "url",
"url": "https://github.com/netlify/context-and-tools.git"
},
"homepage": "https://github.com/netlify/context-and-tools"
},
{
"name": "nightvision",
"description": "Skills for working with NightVision, a DAST and API Discovery platform that finds exploitable vulnerabilities in web applications and REST APIs",
"source": {
"source": "url",
"url": "https://github.com/nvsecurity/nightvision-skills.git",
"sha": "7d7a3f342bbf4d02b6e012279800cf91ff0c1c97"
},
"homepage": "https://github.com/nvsecurity/nightvision-skills"
},
{
"name": "nimble",
"description": "Nimble web data toolkit — search, extract, map, crawl the web and work with structured data agents",
"source": {
"source": "url",
"url": "https://github.com/Nimbleway/agent-skills.git",
"sha": "cf391e95bd8ac009e3641f172434a1d130dde7fe"
},
"homepage": "https://docs.nimbleway.com/integrations/agent-skills/plugin-installation"
},
{
"name": "notion",
"description": "Notion workspace integration. Search pages, create and update documents, manage databases, and access your team's knowledge base directly from Claude Code for seamless documentation workflows.",
@@ -764,26 +569,6 @@
},
"homepage": "https://github.com/makenotion/claude-code-notion-plugin"
},
{
"name": "opsera-devsecops",
"description": "Opsera DevSecOps Agent — AI-powered architecture analysis, security scanning, compliance auditing, and SQL security for your codebase. Free trial included.",
"source": {
"source": "url",
"url": "https://github.com/opsera-agents/opsera-devsecops.git",
"sha": "e797228134ee7d3199594eb0ee5a659df40c91da"
},
"homepage": "https://opsera.ai/agents"
},
{
"name": "optibot",
"description": "AI code review that catches production-breaking bugs, business logic issues, and security vulnerabilities — directly in Claude Code.",
"source": {
"source": "url",
"url": "https://github.com/Optimal-AI/optibot-skill.git",
"sha": "981db1f630c3116d7df0a71e5967af55b08e813c"
},
"homepage": "https://getoptimal.ai"
},
{
"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.",
@@ -879,16 +664,6 @@
},
"homepage": "https://posthog.com/docs/model-context-protocol"
},
{
"name": "postiz",
"description": "Social media automation CLI for scheduling posts, managing integrations, uploading media, and tracking analytics across 28+ platforms including X, LinkedIn, Reddit, YouTube, TikTok, Instagram, and more",
"source": {
"source": "url",
"url": "https://github.com/gitroomhq/postiz-agent.git",
"sha": "c5d1bf5f7e95a71e230fc19ae2150ddd9c549854"
},
"homepage": "https://postiz.com/agent"
},
{
"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.",
@@ -911,26 +686,6 @@
"category": "productivity",
"homepage": "https://github.com/anthropics/claude-plugins-public/tree/main/plugins/pr-review-toolkit"
},
{
"name": "prisma",
"description": "Prisma MCP integration for Postgres database management, schema migrations, SQL queries, and connection string management. Provision Prisma Postgres databases, run migrations, and interact with your data directly.",
"source": {
"source": "url",
"url": "https://github.com/prisma/claude-plugin.git",
"sha": "815dbc4a045a29e3b81510ba0e3ab806f1baaf0e"
},
"homepage": "https://prisma.io"
},
{
"name": "product-tracking-skills",
"description": "AI agent skills that make SaaS products data-ready for product analytics — from codebase scan to tracking plan to working instrumentation code.",
"source": {
"source": "url",
"url": "https://github.com/Accoil/product-tracking-skills.git",
"sha": "341f8cf47d8b5dda550222152377c50aee34c723"
},
"homepage": "https://www.accoil.com/product-tracking"
},
{
"name": "pyright-lsp",
"description": "Python language server (Pyright) for type checking and code intelligence",
@@ -1000,27 +755,6 @@
},
"homepage": "https://www.revenuecat.com"
},
{
"name": "remember",
"description": "Continuous memory for Claude Code. Extracts, summarizes, and compresses conversations into tiered daily logs. Claude remembers what you did yesterday.",
"source": {
"source": "url",
"url": "https://github.com/Digital-Process-Tools/claude-remember.git",
"sha": "779ab61d8d412230eeec1840b8ca104bebea4358"
},
"homepage": "https://github.com/Digital-Process-Tools/claude-remember"
},
{
"name": "revenuecat",
"description": "Configure RevenueCat projects, apps, products, entitlements, and offerings directly from Claude Code. Manage your in-app purchase backend without leaving your development workflow.",
"category": "development",
"source": {
"source": "url",
"url": "https://github.com/RevenueCat/rc-claude-code-plugin.git",
"sha": "af7cb77996aee4e7e3c109c5afec81f716139032"
},
"homepage": "https://www.revenuecat.com"
},
{
"name": "ruby-lsp",
"description": "Ruby language server for code intelligence and analysis",
@@ -1079,16 +813,6 @@
},
"homepage": "https://www.sanity.io"
},
{
"name": "searchfit-seo",
"description": "Free AI-powered SEO toolkit — audit websites, plan content strategy, optimize pages, generate schema markup, cluster keywords, and track AI visibility. Works with any website or codebase.",
"source": {
"source": "url",
"url": "https://github.com/searchfit/searchfit-seo.git",
"sha": "ced1a99a9fadfc10aa573a05829fc1bd357d4e4c"
},
"homepage": "https://searchfit.ai"
},
{
"name": "security-guidance",
"description": "Security reminder hook that warns about potential security issues when editing files, including command injection, XSS, and unsafe code patterns",
@@ -1309,16 +1033,6 @@
},
"homepage": "https://github.com/vercel/vercel-plugin"
},
{
"name": "voila-api",
"description": "Definitive guide for the Voila API. Covers shipment creation (Manual/Smart Shipping), real-time tracking, detailed history, manifesting, collections, webhooks, and third-party integrations (Sorted, Peoplevox, Mintsoft, Veeqo, JD).",
"source": {
"source": "url",
"url": "https://github.com/TSedmanDC/Voila-API-Skill.git",
"sha": "b9cfcb860cb5ae4ece57d67422a6cdd92ef96739"
},
"homepage": "https://github.com/TSedmanDC/Voila-API-Skill"
},
{
"name": "wix",
"description": "Build, manage, and deploy Wix sites and apps. CLI development skills for dashboard extensions, backend APIs, site widgets, and service plugins with the Wix Design System, plus MCP server for site management.",
@@ -1330,16 +1044,6 @@
},
"homepage": "https://dev.wix.com/docs/wix-cli/guides/development/about-wix-skills"
},
{
"name": "wordpress.com",
"description": "Uses Claude Code to create and edit WordPress sites with WordPress Studio before deploying changes to your WordPress.com site.",
"source": {
"source": "url",
"url": "https://github.com/Automattic/claude-code-wordpress.com.git",
"sha": "e4d23c3bffdcdb7f70134ab6a1a110258ff75cfd"
},
"homepage": "https://developer.wordpress.com/wordpress-com-claude-code-plugin/"
},
{
"name": "zapier",
"description": "Connect 8,000+ apps to your AI workflow. Discover, enable, and execute Zapier actions directly from your client.",
@@ -1352,17 +1056,6 @@
"sha": "b93007e9a726c6ee93c57a949e732744ef5acbfd"
},
"homepage": "https://github.com/zapier/zapier-mcp/tree/main/plugins/zapier"
},
{
"name": "zoominfo",
"description": "Search companies and contacts, enrich leads, find lookalikes, and get AI-ranked contact recommendations. Pre-built skills chain multiple ZoomInfo tools into complete B2B sales workflows.",
"category": "productivity",
"source": {
"source": "url",
"url": "https://github.com/Zoominfo/zoominfo-mcp-plugin.git",
"sha": "0705316ef8a2d0c64f81e50d4612ccc6a74edf03"
},
"homepage": "https://zoominfo.com"
}
]
}

View File

@@ -47,15 +47,18 @@ These are Claude Code commands — run `claude` to start a session first.
Install the plugin:
```
/plugin install discord@claude-plugins-official
/reload-plugins
```
Check that `/discord:configure` tab-completes. If not, restart your session.
**5. Give the server the token.**
```
/discord:configure MTIz...
```
Writes `DISCORD_BOT_TOKEN=...` to `.claude/channels/discord/.env` in your project. You can also write that file by hand, or set the variable in your shell environment — shell takes precedence.
Writes `DISCORD_BOT_TOKEN=...` to `~/.claude/channels/discord/.env`. You can also write that file by hand, or set the variable in your shell environment — shell takes precedence.
**6. Relaunch with the channel flag.**
@@ -67,7 +70,7 @@ claude --channels plugin:discord@claude-plugins-official
**7. Pair.**
With Claude Code running from the previous step, DM your bot on Discord — it replies with a pairing code. If the bot doesn't respond, make sure your session is running with `--channels`. In your Claude Code session:
DM your bot on Discord — it replies with a pairing code. In your assistant session:
```
/discord:access pair <code>

View File

@@ -25,7 +25,7 @@ import {
type Attachment,
} from 'discord.js'
import { randomBytes } from 'crypto'
import { readFileSync, writeFileSync, mkdirSync, readdirSync, rmSync, statSync, renameSync, realpathSync } from 'fs'
import { readFileSync, writeFileSync, mkdirSync, readdirSync, rmSync, statSync, renameSync, realpathSync, chmodSync } from 'fs'
import { homedir } from 'os'
import { join, sep } from 'path'
@@ -37,6 +37,8 @@ const ENV_FILE = join(STATE_DIR, '.env')
// Load ~/.claude/channels/discord/.env into process.env. Real env wins.
// Plugin-spawned servers don't get an env block — this is where the token lives.
try {
// Token is a credential — lock to owner. No-op on Windows (would need ACLs).
chmodSync(ENV_FILE, 0o600)
for (const line of readFileSync(ENV_FILE, 'utf8').split('\n')) {
const m = line.match(/^(\w+)=(.*)$/)
if (m && process.env[m[1]] === undefined) process.env[m[1]] = m[2]

View File

@@ -80,7 +80,8 @@ as the correct long-term choice. Don't skip the lockdown offer.
2. `mkdir -p ~/.claude/channels/discord`
3. Read existing `.env` if present; update/add the `DISCORD_BOT_TOKEN=` line,
preserve other keys. Write back, no quotes around the value.
4. Confirm, then show the no-args status so the user sees where they stand.
4. `chmod 600 ~/.claude/channels/discord/.env` — the token is a credential.
5. Confirm, then show the no-args status so the user sees where they stand.
### `clear` — remove the token

View File

@@ -27,15 +27,18 @@ These are Claude Code commands — run `claude` to start a session first.
Install the plugin:
```
/plugin install telegram@claude-plugins-official
/reload-plugins
```
Check that `/telegram:configure` tab-completes. If not, restart your session.
**3. Give the server the token.**
```
/telegram:configure 123456789:AAHfiqksKZ8...
```
Writes `TELEGRAM_BOT_TOKEN=...` to `.claude/channels/telegram/.env` in your project. You can also write that file by hand, or set the variable in your shell environment — shell takes precedence.
Writes `TELEGRAM_BOT_TOKEN=...` to `~/.claude/channels/telegram/.env`. You can also write that file by hand, or set the variable in your shell environment — shell takes precedence.
**4. Relaunch with the channel flag.**
@@ -47,7 +50,7 @@ claude --channels plugin:telegram@claude-plugins-official
**5. Pair.**
With Claude Code running from the previous step, DM your bot on Telegram — it replies with a 6-character pairing code. If the bot doesn't respond, make sure your session is running with `--channels`. In your Claude Code session:
DM your bot on Telegram — it replies with a 6-character pairing code. In your assistant session:
```
/telegram:access pair <code>

View File

@@ -18,7 +18,7 @@ import {
import { Bot, InputFile, type Context } from 'grammy'
import type { ReactionTypeEmoji } from 'grammy/types'
import { randomBytes } from 'crypto'
import { readFileSync, writeFileSync, mkdirSync, readdirSync, rmSync, statSync, renameSync, realpathSync } from 'fs'
import { readFileSync, writeFileSync, mkdirSync, readdirSync, rmSync, statSync, renameSync, realpathSync, chmodSync } from 'fs'
import { homedir } from 'os'
import { join, extname, sep } from 'path'
@@ -30,6 +30,8 @@ const ENV_FILE = join(STATE_DIR, '.env')
// Load ~/.claude/channels/telegram/.env into process.env. Real env wins.
// Plugin-spawned servers don't get an env block — this is where the token lives.
try {
// Token is a credential — lock to owner. No-op on Windows (would need ACLs).
chmodSync(ENV_FILE, 0o600)
for (const line of readFileSync(ENV_FILE, 'utf8').split('\n')) {
const m = line.match(/^(\w+)=(.*)$/)
if (m && process.env[m[1]] === undefined) process.env[m[1]] = m[2]

View File

@@ -77,7 +77,8 @@ offer.
2. `mkdir -p ~/.claude/channels/telegram`
3. Read existing `.env` if present; update/add the `TELEGRAM_BOT_TOKEN=` line,
preserve other keys. Write back, no quotes around the value.
4. Confirm, then show the no-args status so the user sees where they stand.
4. `chmod 600 ~/.claude/channels/telegram/.env` — the token is a credential.
5. Confirm, then show the no-args status so the user sees where they stand.
### `clear` — remove the token