Logo Planetscale Mcp Agent Operating Model

Planetscale Mcp Agent Operating Model

Tổ chức
planetscale
planetscale-mcp-agent-operating-model

Configure safe agent behavior around PlanetScale MCP, Insights, schema recommendations, and repository work without autonomous production mutation.

Add to TypingMind

Tổng quan

Nhà phát hànhplanetscale
Kho mãskills
Tên kỹ năngplanetscale-mcp-agent-operating-model
Sao
136
Bản fork
6
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được planetscale công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Planetscale Mcp Agent Operating Model trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/planetscale/skills/tree/main/planetscale-mcp-agent-operating-model
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/planetscale/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/planetscale-mcp-agent-operating-model .claude/skills/planetscale-mcp-agent-operating-model
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Planetscale Mcp Agent Operating Model trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Planetscale Mcp Agent Operating Model ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Planetscale Mcp Agent Operating Model với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

MCP agent operating model

Purpose

Define how agents should use PlanetScale MCP safely. Agents should use production telemetry to generate useful work while avoiding autonomous production changes.

Default MCP choice

Use the PlanetScale MCP insights-only server when the task only needs Insights and Schema Recommendations.

Use the full PlanetScale MCP server only when the task explicitly requires database/schema access beyond Insights. Prefer read-only scopes.

The full MCP server has query execution tools. Treat write query tools as disabled unless the operator explicitly approves a specific non-production action or a carefully reviewed production action.

AGENTS.md guidance

Two different documents both named AGENTS.md serve different purposes:

  1. CLI agent guide — shipped with pscale (AGENTS.md in the planetscale/cli repo, or pscale agent-guide --format json). Covers auth, --format json, flag placement, and pscale sql. Load skill planetscale-pscale-cli-automation for the same conventions inside this skills pack.

  2. Project agent guide — your application repository's AGENTS.md (or equivalent). Covers database targeting and approval policy for this app.

When working inside a repository, recommend adding a project database targeting section to AGENTS.md or equivalent project instructions:

  • PlanetScale organization.
  • Database.
  • Branch.
  • Engine: Vitess or Postgres.
  • Production branch name.
  • Whether agents may use MCP insights-only or full MCP.
  • Whether write queries are forbidden.
  • Required approval protocol for schema, Traffic Control, webhooks, roles, and network changes.

Do not edit AGENTS.md without approval.

Safe autonomous tasks

Allowed by default:

  • Read Insights.
  • Read schema recommendations.
  • Read schema metadata.
  • Read existing webhooks and Traffic Control configuration.
  • Read branch metadata.
  • Inspect repository code.
  • Correlate query patterns with code.
  • File issues.
  • Open pull requests.
  • Create development branches.
  • Apply DDL and migrations to non-production development branches.
  • Open deploy requests into branches protected by a review workflow.
  • Draft Traffic Control budget proposals.
  • Draft webhook receiver requirements.

Where a PR + deploy-request workflow exists, the default deliverable for a schema recommendation is the complete reviewable unit: development branch with the DDL applied, PR with evidence (fingerprint, metrics, expected effect), and an open deploy request. The human action is the merge/deploy decision, not shepherding the proposal into existence.

Not allowed by default (the review-gate actions and non-reviewable mutations):

  • Execute write SQL against production.
  • Execute DDL directly against production branches.
  • Deploy a deploy request / apply schema to production.
  • Merge pull requests.
  • Create webhooks.
  • Create or enforce Traffic Control budgets.
  • Rotate credentials.
  • Change roles.
  • Change IP restrictions or private connectivity.
  • Restore or promote branches.

Agent loops

Daily recommendation loop

  1. Read open schema recommendations.
  2. Read top Insights regressions.
  3. Correlate with repository code.
  4. Generate ranked issues or PRs.
  5. Human reviews.
  6. Human approves any database-affecting action.

Anomaly loop

  1. Receive or inspect anomaly.
  2. Gather affected query patterns and tags.
  3. Identify source route/job/deploy.
  4. Produce incident note and proposed remediation.
  5. If code fix is obvious, open PR.
  6. If database change is needed, create a proposed change set only.

Traffic Control loop

  1. Identify unsafe traffic slice from Insights/tags.
  2. Draft warn budget proposal.
  3. Human approves creation.
  4. Observe warnings.
  5. Human approves enforce mode only after validation.

Scheduled loops (cron / Automations)

The loops above run interactively. They can also run on a schedule with no human in the loop, in two tiers. Tier 2 requires a standing authorization per ../planetscale-autonomous-execution-mode/SKILL.md; Tier 1 requires none.

Every scheduled loop, both tiers: re-read authorization at run start, stream status to a configured delivery channel, persist a run log, and avoid filing duplicates (do not re-file an issue that is already open for the same fingerprint/recommendation ID).

Tier 1 — propose through the review workflow (no authorization needed)

  • Recommendation-to-PR loop (daily): list open schema recommendations via MCP; for each new one matching the workflow (additive or destructive — the PR review is the gate), create a development branch, apply the DDL, open a PR with fingerprint, metrics, and expected effect, and open the deploy request. The reviewable unit is complete when a human can ship it with one merge/deploy action. Output: branch + PR + deploy request per recommendation.
  • Regression watch (hourly or per-deploy): compare top patterns against a stored baseline (p50/p99, rows read, execution count); on material regression, identify the deploy SHA from query tags and file a report linking pattern to commit range. Output: report.
  • Tag coverage audit (weekly): measure percentage of query time carrying tags; list untagged high-cost patterns with likely code paths; open or update a single tracking issue. Output: issue.
  • Anomaly triage (webhook-triggered, not polled): on branch.anomaly, gather affected patterns, classify probable cause, post triage note to the incident channel. Output: triage note.
  • Posture drift check (daily): diff current safe-migrations flags, webhook config, role list, and backup schedule against the last assessment report; report any drift. Output: report.

Tier 2 — execute the review-gate action (standing authorization required)

  • Recommendation deployer (daily, after the PR loop): deploy open deploy requests that match the allowlist — typically "additive DDL, PR approved or authored from an open recommendation, deploy with revert window, max N per run" — then verify via schema read-back and an Insights follow-up on the target fingerprint. Destructive DDL deploys autonomously only when the authorization states a runtime-verifiable bound (e.g. "drop only indexes with zero reads in 30 days, confirmed via Insights at run time"). Where the org requires PR approval before deploy, an approved PR satisfies the review gate and the authorization covers only the mechanical deploy.
  • Branch hygiene (weekly): delete development branches older than the authorized age bound with no open deploy request; never touch production or protected branches.
  • Warn-budget gardener (weekly): create warn-mode Traffic Control budgets for newly identified expensive slices matching the allowlist; report warn counts on existing budgets. Enforce mode is never entered autonomously unless the authorization names the specific budget.
  • Credential expiry enforcement (daily): delete or flag passwords past the authorized max age, only where the authorization lists the affected roles and a rotation runbook exists.

Loop anti-patterns

  • Polling MCP on a cron for events webhooks already deliver — use the webhook as the trigger; use cron for baselines, sweeps, and audits.
  • A Tier 2 loop whose allowlist is an intent ("keep things healthy") rather than bounded operations.
  • Loops that mutate without a delivery channel for status.
  • Unbounded fan-out: one run applying every open recommendation at once with no per-run cap.

Query execution safeguards

For read queries:

  • Prefer replicas when available.
  • planetscale_execute_read_query routes reads to replicas by default when a branch has replicas configured (use_replica: true). Set use_replica: false only when the task needs primary-read semantics, such as checking immediately-after-write state or primary-only behavior.
  • Add source tags/comments for agent work.
  • Avoid unbounded scans.
  • Avoid EXPLAIN ANALYZE on production unless explicitly approved.
  • Limit result sizes.
  • Avoid querying sensitive columns unless required and approved.
  • For Postgres tables with row-level security, remember that the MCP read role uses pg_read_all_data and does not bypass RLS. If a read query returns zero rows or a zero count and the MCP response warns that RLS may be filtering results, treat the result as policy-filtered/unknown until confirmed through an approved path; do not conclude the table is empty.
  • When debugging high CPU on Postgres, use Insights data sorted by CPU usage (via MCP where available, or sort=cpuTime on the Insights API). CPU time metrics are Postgres-only; do not ask for the same CPU-sorted view on Vitess.

For write queries:

  • Default is forbidden.
  • If approved, prefer non-production branch.
  • Require exact SQL review.
  • Require rollback plan.
  • Require branch and database name confirmation.

Output

Return:

  • Recommended MCP server choice.
  • Required scopes.
  • AGENTS.md instructions to add.
  • Allowed autonomous work.
  • Disallowed work.
  • Proposed agent loops.
  • Approval gates.

End with:

“No MCP write tools or database mutations have been used.”

Câu hỏi thường gặp

Kỹ năng AI Planetscale Mcp Agent Operating Model làm được gì?

Configure safe agent behavior around PlanetScale MCP, Insights, schema recommendations, and repository work without autonomous production mutation.

Vì sao nên dùng Planetscale Mcp Agent Operating Model trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Planetscale Mcp Agent Operating Model là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Planetscale Mcp Agent Operating Model trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/planetscale/skills/tree/main/planetscale-mcp-agent-operating-model. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Planetscale Mcp Agent Operating Model?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Planetscale Mcp Agent Operating Model với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Planetscale Mcp Agent Operating Model với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Planetscale Mcp Agent Operating Model có miễn phí không?

Có. Kỹ năng này được planetscale phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇