jetski-disable-codesearch

Configures isolated Git projects to block Google3 code_search and enforce local search tools.

Updated Jul 7, 2026
One-click install
npx skills add https://github.com/ricardolui/gcp-custom-agent-skills --skill jetski-disable-codesearch-ricardolui
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: jetski-disable-codesearch
Source: https://github.com/ricardolui/gcp-custom-agent-skills/tree/main/jetski-disable-codesearch
Command: npx skills add https://github.com/ricardolui/gcp-custom-agent-skills --skill jetski-disable-codesearch-ricardolui

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? When working in local Git projects or isolated Google Cloud workspaces outside Piper/CitC, the Jetski agent defaults to the internal Google3 code_search tool, which fails or wastes turns in environments without Piper access. This Skill disables code_search and forces the agent and its subagents to use local tools (grep_search, find_by_name, list_dir) instead. ## Core Features & Use Cases - Three-Layer Enforcement: Combines prompt-precedence rules (GEMINI.md + _agents/rules/no-codesearch.md), a physical PreToolUse hook that returns deny decisions, and a dedicated agent profile with google_mode: false. - Context-Aware Hook: The generated block_codesearch_hook.py inspects workspacePaths via stdin, blocking internal tools (code_search, moma_search, skill_search), /google/src/ path access, and internal CLIs (cs, g4, blaze, buganizer) in isolated projects while allowing them in CitC clients. - One-Command Installer with Verification: apply_no_codesearch.py --target <DIR> --verify applies all layers and runs simulated PreToolUse tests to confirm deny/allow behavior. - Use Case: You clone a local repository for GCP development and want the Jetski agent to stop attempting Google3 internal searches; run the installer against the repo root and the agent immediately operates in local-only mode. ## Quick Start Ask the agent to disable code_search in your project by running the installer script with your project path as the target and the verify flag enabled.

Frequently Asked Questions about jetski-disable-codesearch

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I disable code_search in a local Jetski project?

Run the included installer with python3 apply_no_codesearch.py --target /path/to/project --verify. It writes a GEMINI.md policy section, an always_on rule, a PreToolUse hook, and a local-gcp-dev agent profile that together block code_search and enforce grep_search and find_by_name.

How does the PreToolUse hook block internal Google3 tools?

The generated block_codesearch_hook.py reads the tool call payload from stdin and returns a deny decision for code_search, moma_search, and skill_search. It also blocks file tools targeting /google/src/ paths and run_command invocations of internal CLIs like cs, g4, blaze, and buganizer.

Does the hook still allow code_search inside a CitC client?

Yes. When workspacePaths point to a CitC client under /google/src/cloud/ and not to a registered isolated project, the hook returns an allow decision, so normal Google3 workflows remain unaffected.

Why can't I use python3 -c inline commands in hooks.json?

Inline python3 -c commands are blocked by the agcis-gatekeeper-hook. The installer writes a standalone block_codesearch_hook.py file and references it by path in hooks.json, which the gatekeeper permits.

Will the installer overwrite my existing global hooks.json?

No. The skill documentation requires reading and preserving existing global hooks such as agcis-gatekeeper-hook before merging. The workspace-level hooks.json is updated by adding the block-codesearch-outside-citc entry alongside existing keys.