Skip to content
cccskills
FreePublished on GitHub

routine-create-clean-connectors

クラウドルーチン(CCR / スケジュールエージェント)を作成し、作成直後に claude.ai が 自動付与する不要な MCP connector を判定して除去する一連の処理。「ルーチンを作って」「スケジュールエージェントを作成」「routine 作成して connector を整理」等で使う。

明らかに不要な connector は確認なしで外す。作成は /schedule のスキーマに従う。

The English summary is being prepared. Showing the original description.

Works withGmail
See how to install

Files included (1)

  • SKILL.md5.9 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

/routine-create-clean-connectors スキル

ルーチンの「作成」だけなら /schedule で足りる。本スキルは 作成 → 自動付与された不要 connector の除去 までを一気通貫で行い、ルーチンに過剰な MCP 権限を残さないことを目的とする。

Goal

クラウドルーチンを作成し、claude.ai が作成時にデフォルトで紐づける MCP connector のうち、そのルーチンのタスクに明らかに不要なものを確認なしで除去する。必要・曖昧なものだけ残す(曖昧時のみユーザーに確認)。

背景(なぜ必要か)

  • claude.ai でルーチンを作成すると、アカウントに接続済みの connector(Gmail / Google Calendar / Google Drive 等)が全件デフォルトで紐づく。
  • スキャン系や PR 作成系のように gh / WebSearch / WebFetch / Bash だけで完結するルーチンには、これらは不要な権限。作成しっぱなしだと過剰権限が残る。
  • そこで「作成直後に connector を棚卸しして外す」までをスキル化する。

Workflow

Step 0: ツール読み込み

ToolSearch で select:RemoteTrigger を読み込む(auth はツール内で処理されるため curl は使わない)。

Step 1: ルーチン作成

  • 引数が 既存 trigger_id の場合は作成をスキップし Step 2 へ(cleanup のみモード)。
  • それ以外は /schedule の Create フローに従ってルーチンを作る。
    • リポジトリ内の routines/*.json を雛形にする場合、その定義(cron / model / allowed_tools / prompt 配列)を Create body へ変換する。prompt 配列は改行で結合して 1 つの文字列にする。
    • Create body の正確なスキーマ(job_config.ccr.session_context / events[].data / UUID 生成等)は /schedule スキルを参照する。重複定義しない。
  • RemoteTrigger {action: "create", body: {...}} を実行し、レスポンスの id(= 採番された trigger_id)と mcp_connections を控える。

Step 2: connector の棚卸し

作成(または get)レスポンスの mcp_connections を確認する。

  • [](空)なら除去対象なし。Step 4 へ。
  • cleanup のみモードのときは RemoteTrigger {action: "get", trigger_id} で現在の mcp_connections を取得する。

各 connector が必要かを、ルーチンの prompt と allowed_tools から推定する:

  • 不要の典型: prompt にも allowed_tools にもその外部サービスへの言及が無い。 例: タスクが gh(GitHub) / WebSearch / WebFetch / Bash / Read / Grep / Glob だけで完結する → Gmail / Calendar / Drive 等は不要。
  • 必要の典型: prompt がそのサービスの操作を明示している(「カレンダーを確認」「メールを下書き」「Drive のファイルを読む」等)、または対応する MCP ツールを使う前提になっている。

Step 3: 除去(判定して実行)

  • 全 connector が明らかに不要 → 確認なしで全除去: RemoteTrigger {action: "update", trigger_id, body: {"clear_mcp_connections": true}}
  • 一部だけ残す → 残したいものだけを渡して置換(mcp_connections は置換セマンティクス。消したいものを省く形で全量を渡す): RemoteTrigger {action: "update", trigger_id, body: {"mcp_connections": [<残す connector のみ>]}}
    • 各要素は {"connector_uuid": "...", "name": "...", "url": "..."}。name は [a-zA-Z0-9_-] のみ(ドット・空白不可)。
  • 必要 / 不要が曖昧な connector がある → その connector については外さず、ユーザーに残すか確認する。明らかに不要なものは確認を待たずに先に外してよい。

Step 4: 確認と報告

  • update レスポンスの mcp_connections が期待どおり(残すもののみ/空)かを確認する。
  • 残した connector・外した connector を一覧で報告する。
  • 管理 URL を提示する: https://claude.ai/code/routines/{trigger_id}。
  • リポジトリの routines/*.json 由来で作成した場合は、採番された trigger_id を該当 JSON の PENDING_CREATE 等のプレースホルダと差し替える(routines/README.md の運用に従う)。

Notes

  • 判定の安全側: 「明らかに不要」= prompt にも tools にも痕跡が無いもの、に限る。少しでも使う可能性があれば残す or 確認する。誤って必要な connector を外すとルーチンが失敗するため。
  • connector が未接続のとき: ユーザーが connector を追加したい場合は https://claude.ai/customize/connectors へ誘導する(このスキルは付与ではなく除去が主目的)。
  • 有効な connector の確認方法: RemoteTrigger {action: "get", trigger_id} または {action: "list"} のレスポンス mcp_connections を見る。Web UI でも確認できる。
  • 削除(ルーチン自体)は非対応: API では消せない。https://claude.ai/code/routines から行う。
  • Create の詳細スキーマ・cron 変換・環境選択は /schedule を正とする。本スキルはそこに connector cleanup を上乗せするもの。

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Convert Claude markdown subagent files to Codex CLI TOML format. Parses YAML frontmatter and body, applies model/permission/tool mappings, and outputs to agents/codex/<name>.toml.

The English summary is being prepared. Showing the original description.

hodanov/my-pde3Updated Oct 22, 2026

Create or update a Markdown blog draft from recent work and export it with `YYYY-MM-DD_slug.md` naming. Output directory can be set via environment variable or CLI option; if missing, ask the user and pass it explicitly.

The English summary is being prepared. Showing the original description.

hodanov/my-pde3Updated Oct 22, 2026

変更をコミットしてドラフトPRを作成する一連のGit/ghワークフロー。ユーザーが「コミットして」「PR作って」「draft PR」等を求めたときに使用し、status/diff確認・命令形コミット・push・gh pr create --draft(--assignee hodanov)まで実行する。ユーザーの明示リクエストが無くても、実装完了後にcommitやPRが必要になった場面(dev-workflowのcommitフェーズ等)では必ずこれを使う。`git commit` や `gh pr create` を単体でBash直接実行しない。

The English summary is being prepared. Showing the original description.

hodanov/my-pde3Updated Oct 22, 2026

1 つの作業ツリーに混ざった差分を、変更理由ごとの意味単位のコミットへ分割する。ユーザーが「コミットを分割して」「意味単位で分けて」「commit-split」等を求めたとき、または機能追加・付随リファクタ・設定/ドキュメント修正が 1 コミットに混在していると気づいたときに使用する。分割案を提示して承認を得てからステージし、コミットごとに単独で成立することを確認する。メッセージ規約・push・PR の作成は commit-and-draft-pr へ委譲する。

The English summary is being prepared. Showing the original description.

hodanov/my-pde3Updated Oct 22, 2026

gitleaks + pre-commit を使ってローカルコミット時のクレデンシャル混入を機械的にブロックする。「クレデンシャル漏洩防止」「シークレット混入対策」「gitleaks」「pre-commit シークレット」「credential leak prevention」に言及した場合に使用する。

The English summary is being prepared. Showing the original description.

hodanov/my-pde3Updated Oct 22, 2026

依存パッケージ(Go modules / npm / Terraform provider / GitHub Actions / pre-commit 等)の アップグレードを、outdated 検出 → CHANGELOG・破壊的変更の確認 → 更新 → lint/test 検証 → コミットまで一連の手順で安全に適用する。「依存更新」「パッケージを上げて」「dependency update」 「go get -u」「npm update」「provider を上げる」等に言及されたときに使用する。

The English summary is being prepared. Showing the original description.

hodanov/my-pde3Updated Oct 22, 2026

See all skills by hodanov

Report a problem with this skill