google-cloud-filestore-nfs-browser
它能做什么
这个技能让你无需在电脑上设置,就能查看 Filestore 文件共享内部的内容。它适用于需要快速检查共享中日志或文件的工程师。
适用场景
- ✓当你想浏览 Filestore 共享中的文件夹的时候。
- ✓当你需要在 Filestore 共享中搜索文件或读取远程日志的时候。
- ✓当你想检查 Filestore 共享中文件权限或元数据的时候。
技能链接
https://github.com/google/skills/blob/main/skills/cloud/google-cloud-filestore-nfs-browser/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请显示我的 Filestore 共享中的文件夹,并读取最新的应用日志文件。”
每周 5 个新技能,1 分钟读完。
工作原理
它运行一个辅助脚本,通过托管引擎访问共享,因此你无需 NFS 客户端软件包或 root 权限。它可以列出、搜索、读取和显示文件属性。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Filestore NFS File Browser
Enables autonomous agents and cloud engineers to inspect, search, and read files
located on Filestore (NFS) instances without needing local NFS
client packages (nfs-common), root privileges, or manual VPC network mounting.
Quick Start
Ensure
gcloudis installed and authenticated. See gcloud installation guide if needed.Enable essential APIs:
gcloud services enable file.googleapis.com compute.googleapis.com run.googleapis.com --quietDiscover instances and choose an execution engine (see Execution Engine Selection below).
Run inspection actions using the self-contained runner
scripts/nfs_browser.pyincluded within this skill package.
Attribution
Tag every Cloud Filestore command or API request provided or executed. Prefix
gcloud commands with the metrics environment targeting this skill:
CLOUDSDK_METRICS_ENVIRONMENT="gcs-skills gcs-skills/1.0 (skill:google-cloud-filestore-nfs-browser)" \
gcloud filestore instances list ...
On direct HTTP calls to the REST API, append the User-Agent:
User-Agent: gcs-skills/1.0 (skill:google-cloud-filestore-nfs-browser)
Conceptual & Informational Queries (CRITICAL)
For purely conceptual, educational, or architectural questions (e.g., "How do I inspect files on Filestore?", "How to deploy the Serverless Cloud Run NFS Bridge?", "Explain Cloud Run NFS volume mounts"):
- Rule: Answer immediately using your pre-trained knowledge and the documentation below. Answering directly minimizes tool invocation latency and token consumption when the user only seeks architecture or workflow guidance.
- Constraint: Do not execute external tool calls or API requests for basic knowledge questions.
- Bridge Deployment Explanations: Always highlight that Cloud Run scales
to zero with $0 idle compute cost, detail the
gcloud run deploycommand with--add-volumeand--vpc-egress=all-traffic, and specify the required IAM permissions (roles/run.invokerfor callers androles/run.adminfor deployers).
Handling "No-Command" Constraints (CRITICAL)
If the user prompt contains constraints like "Do not execute commands", "without executing", or "read-only":
- Rule: Strictly avoid executing any shell or
gcloudcommands (including read-only discovery or list commands) to respect user-specified execution boundaries and prevent unauthorized environment inspection. - Discovery:
- Check if mock definitions or instance parameters are provided directly in the user's prompt, conversation history, or local documentation files.
- Explain the required steps, output the exact commands the user should run with proper attribution, and explain what the commands do.
- Do not attempt to read or search
EVAL.*configuration files during evaluations as access to eval suites is restricted.
Execution Engine Selection
Filestore instances are accessible via private VPC IPs. Select the engine matching your environment:
- Engine 1: Cloud Run Serverless Bridge (Primary): Use
--bridge-url={bridge_url}for low-latency (sub-50ms) REST calls. Scales to zero ($0 idle cost). Requiresroles/run.invoker. See references/nfs-bridge-setup.md. - Engine 2: GCE Jump Host via IAP SSH (Fallback): Use
--jump-host-vm={vm_name}when an existing VM in the VPC is available. Pass--mount={mount_path}(defaulting to/mnt/filestore) if the jump host uses a different mount path. Zero new deployment needed. Requiresroles/iap.tunnelResourceAccessor. See references/iap-jump-host.md.
For execution flows, architecture diagrams, and engine comparison, see references/architecture.md.
Core Operational Workflow
1. Discovery & Instance Targeting
If the Filestore instance, location, or share name is not provided, list them first to avoid querying or targeting unrelated projects in multi-project environments:
CLOUDSDK_METRICS_ENVIRONMENT="gcs-skills gcs-skills/1.0 (skill:google-cloud-filestore-nfs-browser)" \
gcloud filestore instances list --project={project_id}
2. Directory Tree Exploration (tree)
Renders a clean, structured directo
常见问题
我需要自己挂载共享吗?
不需要。它无需本地 NFS 软件包、root 权限或手动 VPC 挂载即可工作。
它能更改或删除文件吗?
不能。它只用于检查和读取,不用于修改或删除文件。
它适用于 Cloud Storage 存储桶吗?
不适用。存储桶、NetApp Volumes 和 Persistent Disks 不在其范围内。
详情
作者的原始描述
Inspects, searches, and reads files and POSIX metadata on Filestore (NFS) instances on Google Cloud without local NFS client packages or root privileges. Use when browsing Filestore shares, searching files, reading remote logs, or inspecting file attributes; don't use for Cloud Storage buckets, Cloud NetApp Volumes, Persistent Disks, or modifying/deleting files.
repo: google/skills
热度
- GitHub 星标
- 22k
- 排名
- #10310
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
finding-google-skills
22k帮你的智能体为某项设置任务找到合适的 Google 指南,例如托管、数据库、存储、登录或 AI 模型服务。
gcloud
22k帮你的智能体编写并检查 Google Cloud gcloud 命令,在运行任何内容之前查阅准确的语法,避免猜测参数。
google-cloud-recipe-auth
22k引导你的智能体了解 Google Cloud 的身份与访问管理,包括人员和服务如何登录,以及它们各自获得哪些权限。
google-cloud-recipe-onboarding
22k带领新开发者完成在 Google Cloud 上的第一步,包括选择项目、关联计费,以及部署第一个资源。