
Skill
context-engineering-init
initialize context engineering and database connections
Description
Orchestrates the initialization workflow for context engineering, and provides helper workflow for setting up database connections by creating or updating tools.yaml configurations.
SKILL.md
Load the
context-engineering-workflowskill first. It holds the shared context this phase depends on: workspace layout, state file conventions, phase order, and safety protocol. Do not proceed with this phase without reading it.
Phase: Setup & Connection Configuration
Goal
Scaffold the local autoctx/ workspace and establish verified database connections to prepare the environment for context engineering.
Initialization Workflow
Follow these steps when the user asks to initialize the environment:
- Confirm Working Directory: Explicitly state the current working directory to the user. Explain that the initialization will create an
autoctx/folder in this directory to holdtools.yaml,state.md, andexperiments/. Ask them to confirm if this is the correct location before proceeding. - Check Existing Infrastructure:
- Check if the
autoctx/directory exists. - If it exists, verify if it contains valid
tools.yamlandstate.mdfiles. If it appears to be an unrelated folder or corrupted, STOP and ask the user how to proceed (e.g., use a different name or overwrite). - If it is a valid Autoctx folder and contains all items, inform the user it's already initialized. Otherwise, proceed to create missing items inside
autoctx/.
- Check if the
- Setup Toolbox Configuration: If
tools.yamlis missing insideautoctx/, follow the primary "1. Create a New tools.yaml" workflow documented below in the Toolbox Config Helper section. - Create State Tracker: If
state.mdis missing insideautoctx/, create it with header “context authoring experiment state tracking”. - Initialize Experiments Directory: If
experiments/is missing insideautoctx/, create an emptyexperiments/directory insideautoctx/.
Output
Upon successful completion, the workspace must contain:
autoctx/: The dedicated workspace directory.tools.yaml: A structurally sound configuration file for the Toolbox MCP Server.state.md: The external state tracker for hill-climbing iterations.experiments/: The base directory prepared to store all hill-climbing run artifacts (e.g. baseline contexts, evaluation reports).
Final Summary
Conclude by providing a succinct summary to the user:
- State whether the workspace was initialized newly or if existing files were preserved.
- Instruct the user to reload the MCP toolbox so any new database connections take effect:
- Gemini CLI: run
/mcp reload. - Claude Code: run
/mcp, selecttoolbox, and selectReconnect— or/quitand relaunch Claude Code. - Antigravity CLI: run
/mcp, selecttoolbox, and selectRestart.
- Gemini CLI: run
- Inform them they are now ready to proceed to the next phase (e.g., the Bootstrap workflow).
Toolbox Config Helper
This section contains standalone instructions for managing the tools.yaml file for the GenAI Toolbox. You can execute these if the user explicitly asks to add or list database connections.
Credentials
For Google Cloud databases, the system uses Application Default Credentials (ADC) and IAM Authentication. Providing a user and password is not supported.
When collecting information from the user, inform the user that only Application Default Credentials (ADC) are supported for authentication. They do not need to provide a username or password.
Sample Message:
"I'll help you configure the database connection in
tools.yaml. Note that the system only supports Application Default Credentials (ADC) for authentication, so you don't need to provide a username or password. Please ensure that the IAM account you are using has the required permissions to access the database.Could you please provide the following details:
- Google Cloud Project ID:
- Region: ... (other required fields based on database type)"
Primary Workflows
1. Create a New tools.yaml
- Identify Database Type: Ask the user which database they want to configure:
- Cloud SQL Postgres
- Cloud SQL MySQL
- AlloyDB Postgres
- Spanner
- Collect Information: Request all Required Information based on the templates inside this directory. Do NOT assume missing fields; ask the user for them explicitly.
- Generate Configuration: Replace all placeholders with the user's provided values and generate the complete
tools.yamlcontent. Save it to the target location (e.g.,autoctx/tools.yamlfor Autoctx workflows, ortools.yamlin the current directory for standalone use). - Validate: After saving, validate the new connection using the toolbox script, replacing
<config_path>with the actual path to the file:uvx toolbox-server@1.4.0 --config <config_path> invoke <data_source_name>-list-schemas
2. Add a Database to an Existing tools.yaml
- Identify Database Type: Ask the user for the type of the new database connection they wish to add.
- Collect Information: Request the required information for the new connection, including a new, unique
<data_source_name>. - Read Existing File: Read the content of the existing
tools.yamlfrom the target location. - Generate and Append: Generate the YAML snippets for the new
sourcesandtoolssections. Append these new entries to the respective sections in the existing file content. - Save Configuration: Save the updated content back to the file.
- Validate: Validate only the newly added connection, replacing
<config_path>with the actual path to the file:uvx toolbox-server@1.4.0 --config <config_path> invoke <data_source_name>-list-schemas
3. List Existing Database Connections
- Check and Read
tools.yaml: Check for thetools.yamlfile. If it doesn't exist, inform the user. - Parse and List: Parse the YAML content and list the names of all configured data sources found under the
sources:key limit.
Validation
To verify that a specific database connection is configured correctly at any time, run the validation script with the target data source name:
uvx toolbox-server@1.4.0 --config tools.yaml invoke <data_source_name>-list-schemas
Templates & Reference
For the specific fields required for each database type and the exact YAML structure to use, refer to the templates in this directory (.../references/init/...).
More skills from the db-context-enrichment repository
View all 7 skillscontext-engineering-bootstrap
bootstrap initial ContextSet for database enrichment
Jul 18ContextData ModelingDatabaseGoogle Cloudcontext-engineering-dataset-generation
generate golden SQL evaluation datasets
Jul 18Data AnalysisEvalsGoogle CloudSQLcontext-engineering-evaluate
evaluate ContextSet against golden datasets
Jul 18Data AnalysisEvalsGoogle CloudSQLcontext-engineering-hillclimb
improve ContextSet via hill-climbing iterations
Jul 18Data AnalysisEvalsGoogle CloudOptimizationcontext-engineering-workflow
optimize context sets for Gemini data agents
Jul 18Agent ContextData AnalysisGeminiGoogle Cloudcontext-generation-guide
generate context items for database enrichment
Jul 18Agent ContextDatabaseDocumentationGoogle Cloud
More from Google Cloud
View publisherkb-search
search and extract local knowledge base documents
knowledge-catalog
Jul 12DocumentationKnowledge BaseSearchknowledge_catalog_discovery_agent
search and rank Knowledge Catalog data entries
knowledge-catalog
Jul 12Data AnalysisGoogle CloudKnowledge ManagementSearchcontributing
contribute to Cloud Foundation Fabric
cloud-foundation-fabric
Jul 31AutomationEngineeringGitHubGoogle Cloud +1fabric-builder
generate Terraform code for Google Cloud
cloud-foundation-fabric
Jul 12Google CloudInfrastructure as CodeTerraformfast-0-org-setup-prereqs
prepare prerequisites for FAST 0-org-setup
cloud-foundation-fabric
Jul 12Google CloudOperationsagent-aware-cli
design agent-aware command-line interfaces
vertex-ai-creative-studio
Jul 12CLIEngineeringGoogle Cloud