### Build and Start Project Source: https://docs.aicockpit.ai/pt-BR/features/tools/execute-command Use this snippet to execute a sequence of commands, such as building and then starting a project. ```xml npm run build && npm start ``` -------------------------------- ### Install Project Dependencies Source: https://docs.aicockpit.ai/pt-BR/features/tools/execute-command Use this snippet to install multiple project dependencies. ```xml npm install express mongodb mongoose dotenv ``` -------------------------------- ### Fetching System Configuration Source: https://docs.aicockpit.ai/pt-BR/features/tools/access-mcp-resource This example demonstrates how to retrieve system configuration settings. The uri should point to the specific configuration file or setting needed. ```xml infra-monitor config://production/database ``` -------------------------------- ### Example Search Results Format Source: https://docs.aicockpit.ai/pt-BR/features/tools/search-files This example shows the typical output format for the search_files tool, including file paths, line numbers, and context lines. It also demonstrates how results are limited and how nearby matches are merged. ```text # rel/path/to/app.ts 11 | // Alguma lógica de processamento aqui 12 | // TODO: Implementar tratamento de erros 13 | return processedData; ---- # Mostrando os primeiros 300 de mais de 300 resultados. Use uma pesquisa mais específica, se necessário. ``` ```text # rel/path/to/auth.ts 13 | // Algum código aqui 14 | // TODO: Adicionar validação adequada 15 | function validateUser(credentials) { 16 | // TODO: Implementar limitação de taxa 17 | return checkDatabase(credentials); ---- ``` -------------------------------- ### Install Git on macOS using Homebrew Source: https://docs.aicockpit.ai/pt-BR/features/checkpoints Use this command to install Git on macOS if you have Homebrew installed. This is the recommended method. ```bash brew install git ``` -------------------------------- ### Find Test Utilities and Mocking Configurations Source: https://docs.aicockpit.ai/pt-BR/advanced-usage/available-tools/codebase-search Use this to search for test setup and mock data creation within the tests directory. ```xml configuração de teste e criação de dados simulados tests ``` -------------------------------- ### Ask Follow-up Question: Database Choice Source: https://docs.aicockpit.ai/pt-BR/features/tools/ask-followup-question This example demonstrates asking for technical clarification, specifically regarding database choices for an application. It provides several database options as suggestions. ```xml Qual banco de dados esta aplicação deve usar para armazenar os dados do usuário? MongoDB para esquema flexível e armazenamento baseado em documentos PostgreSQL para dados relacionais com fortes garantias de consistência Firebase para atualizações em tempo real e gerenciamento simplificado de backend SQLite para armazenamento local leve sem dependências externas ``` -------------------------------- ### Install Git on macOS using Xcode Command Line Tools Source: https://docs.aicockpit.ai/pt-BR/features/checkpoints An alternative method to install Git on macOS using the Xcode Command Line Tools. This command will prompt for installation if Git is not already present. ```bash xcode-select --install ``` -------------------------------- ### Example Output of list_code_definition_names Source: https://docs.aicockpit.ai/pt-BR/features/tools/list-code-definition-names This example demonstrates the output format of the list_code_definition_names tool, showing file paths, line numbers, and code snippets for definitions. It processes only top-level files in the specified directory and is limited to 50 files. ```text src/utils.js: 0--0 | export class HttpClient { 5--5 | formatDate() { 10--10 | function parseConfig(data) { src/models/User.js: 0--0 | interface UserProfile { 10--10 | export class User { 20--20 | function createUser(data) { ``` -------------------------------- ### Retrieving API Documentation Source: https://docs.aicockpit.ai/pt-BR/features/tools/access-mcp-resource This example shows how to fetch API documentation for a service. The uri should point to the documentation endpoint of the target service. ```xml api-docs docs://payment-service/endpoints ``` -------------------------------- ### Install Git on Arch Linux Source: https://docs.aicockpit.ai/pt-BR/features/checkpoints Installs Git on Arch Linux distributions using the pacman package manager. ```bash sudo pacman -S git ``` -------------------------------- ### Initialize Todo List Source: https://docs.aicockpit.ai/pt-BR/features/tools/update-todo-list Use this snippet to create an initial todo list for a multi-step task. It sets up the basic structure with tasks marked as not started. ```xml [-] Analisar requisitos e criar especificação técnica [ ] Projetar esquema de banco de dados e endpoints de API [ ] Implementar serviço de autenticação de backend [ ] Criar componentes de login de frontend [ ] Escrever testes abrangentes [ ] Atualizar documentação ``` -------------------------------- ### SKILL.md with Optional Fields Source: https://docs.aicockpit.ai/pt-BR/advanced-usage/skills An example of a `SKILL.md` file demonstrating the use of optional frontmatter fields like `license` and `metadata`. This allows for richer skill definitions. ```yaml --- name: pdf-processing description: Extrair texto e tabelas de arquivos PDF, preencher formulários, mesclar documentos. license: Apache-2.0 metadata: author: example-org version: 1.0.0 --- ## Como extrair texto 1. Use pdfplumber para extração de texto... ## Como preencher formulários ... ``` -------------------------------- ### Windows MCP Server Configuration Source: https://docs.aicockpit.ai/pt-BR/features/mcp/using-mcp-in-aicockpit-code Example configuration for setting up an MCP Puppeteer server on Windows using cmd. This uses npx to run the package and automatically confirms prompts. ```json { "mcpServers": { "puppeteer": { "command": "cmd", "args": [ "/c", "npx", "-y", "@modelcontextprotocol/server-puppeteer" ] } } } ``` -------------------------------- ### Analyze Source Code for Complexity Metrics Source: https://docs.aicockpit.ai/pt-BR/features/tools/use-mcp-tool This example demonstrates requesting code complexity metrics from a specialized server-side tool. It specifies the language, file path, and desired metrics for analysis. ```xml code-analysis complexity_metrics { "language": "typescript", "file_path": "src/app.ts", "include_functions": true, "metrics": ["cyclomatic", "cognitive"] } ``` -------------------------------- ### Run Qdrant Locally with Docker Source: https://docs.aicockpit.ai/pt-BR/features/codebase-indexing Quickly set up a local Qdrant instance for testing purposes using a single Docker command. ```bash docker run -p 6333:6333 qdrant/qdrant ``` -------------------------------- ### Create Directory and File Source: https://docs.aicockpit.ai/pt-BR/features/tools/execute-command Use this snippet to execute multiple commands in sequence, such as creating a directory and a file. ```xml mkdir -p src/components && touch src/components/App.js ``` -------------------------------- ### Install Git on Fedora Linux Source: https://docs.aicockpit.ai/pt-BR/features/checkpoints Installs Git on Fedora Linux distributions using the dnf package manager. ```bash sudo dnf install git ``` -------------------------------- ### Install Git on Debian/Ubuntu Linux Source: https://docs.aicockpit.ai/pt-BR/features/checkpoints Installs Git on Debian-based or Ubuntu Linux distributions using the apt package manager. Ensure your package list is updated first. ```bash sudo apt update sudo apt install git ``` -------------------------------- ### Example Skill: API Design Source: https://docs.aicockpit.ai/pt-BR/advanced-usage/skills A complete `SKILL.md` example for an 'api-design' skill, including frontmatter and detailed instructions on URL structure, HTTP methods, and response codes. ```yaml --- name: api-design description: Melhores práticas e convenções de design de API REST --- # Diretrizes de Design de API Ao projetar APIs REST, siga estas convenções: ## Estrutura de URL - Use substantivos no plural para recursos: `/users`, `/orders` - Use kebab-case para recursos com múltiplas palavras: `/order-items` - Aninhe recursos relacionados: `/users/{id}/orders` ## Métodos HTTP - GET: Recuperar recursos - POST: Criar novos recursos - PUT: Substituir recurso inteiro - PATCH: Atualização parcial - DELETE: Remover recurso ## Códigos de Resposta - 200: Sucesso - 201: Criado - 400: Requisição Inválida - 404: Não Encontrado - 500: Erro do Servidor ``` -------------------------------- ### Query and Store Database Records Source: https://docs.aicockpit.ai/pt-BR/features/tools/use-mcp-tool This example shows how to query a database and store the results using a server-side connector tool. It specifies the database, query type, fields, filtering conditions, and how to store the output. ```xml database-connector query_and_store { "database": "users", "type": "select", "fields": ["name", "email", "last_login"], "where": { "status": "active" }, "store_as": "active_users" } ``` -------------------------------- ### Launch Browser and Navigate Source: https://docs.aicockpit.ai/pt-BR/features/tools/browser-action Initializes a browser session and navigates to a specified URL. This is the first step in any browser interaction workflow. ```xml launch https://example.com ``` -------------------------------- ### MultiSearchReplaceDiffStrategy Example Source: https://docs.aicockpit.ai/pt-BR/features/tools/apply-diff This example demonstrates the format for a diff block using the MultiSearchReplaceDiffStrategy. Line numbers are mandatory for each search block, and markers within the content must be escaped. ```javascript // Lógica de cálculo atualizada сom registro console.log(`Calculando para o valor: ${value}`); const result = value * 0.95; // Fator ajustado return result; const defaultTimeout = 10000; // Tempo limite aumentado ``` -------------------------------- ### Example Response Format Source: https://docs.aicockpit.ai/pt-BR/features/tools/ask-followup-question Responses from the user are enclosed in `` tags for clarity. This format preserves original formatting and images. ```xml Use o Tailwind CSS para estilização utilitária com máxima flexibilidade ``` -------------------------------- ### Example Rule: Table Formatting Source: https://docs.aicockpit.ai/pt-BR/advanced-usage/custom-rules This rule instructs the AI to add an exclamation mark to each column header when generating tables. ```markdown # Tabelas Ao imprimir tabelas, sempre adicione um ponto de exclamação a cada cabeçalho de coluna ``` -------------------------------- ### Complete Multiple Tasks and Shift Focus Source: https://docs.aicockpit.ai/pt-BR/features/tools/update-todo-list Use this example to mark several tasks as completed and adjust the focus of the remaining tasks. It shows how to finalize parts of a project while keeping track of outstanding items. ```xml [x] Analisar requisitos e criar especificação técnica [x] Projetar esquema de banco de dados e endpoints de API [x] Implementar serviço de autenticação de backend [x] Criar componentes de login de frontend [-] Escrever testes abrangentes [ ] Atualizar documentação [ ] Adicionar funcionalidade de redefinição de senha [ ] Implementar limitação de taxa para tentativas de login ``` -------------------------------- ### Implement SSE Server Transport with Express Source: https://docs.aicockpit.ai/pt-BR/features/mcp/server-transports This example demonstrates setting up an MCP server with the SSE transport using the Express framework. It involves importing Server and SSEServerTransport, initializing the server, and integrating the transport's request handler into an Express app. ```javascript import { Server } from '@modelcontextprotocol/sdk/server/index.js'; import { SSEServerTransport } from '@modelcontextprotocol/sdk/server/sse.js'; import express from 'express'; const app = express(); const server = new Server({name: 'remote-server', version: '1.0.0'}); // Registrar ferramentas... // Usar transporte SSE const transport = new SSEServerTransport(server); app.use('/mcp', transport.requestHandler()); app.listen(3000, () => { console.log('Servidor MCP escutando na porta 3000'); }); ``` -------------------------------- ### Example of Standard Backlog Analysis Score Calculation Source: https://docs.aicockpit.ai/pt-BR/metrics/teams Demonstrates the score calculation when Sprints/Periods equals 2. In this case, the score is 10. ```mathematics If Sprints/Periods = 2: Score = 10 - (2 – 2) = 10 ``` -------------------------------- ### Example Rule: Restricted File Access Source: https://docs.aicockpit.ai/pt-BR/advanced-usage/custom-rules This rule prevents the AI from reading or accessing sensitive files, even if explicitly asked. ```markdown # Arquivos restritos Os arquivos na lista contêm dados sensíveis, eles NÃO DEVEM ser lidos - supersecrets.txt - credentials.json - .env ``` -------------------------------- ### Ask Follow-up Question: Styling Preference Source: https://docs.aicockpit.ai/pt-BR/features/tools/ask-followup-question Use this format to ask about implementation preferences, such as styling frameworks. It includes a question and multiple suggested answers. ```xml Qual abordagem de estilização você prefere para esta aplicação web? Usar Bootstrap para desenvolvimento rápido com componentes consistentes Usar Tailwind CSS para estilização utilitária com máxima flexibilidade Usar CSS puro com estilização personalizada para controle total e dependências mínimas ``` -------------------------------- ### Iniciar uma sessão do navegador Source: https://docs.aicockpit.ai/pt-BR/features/browser-use Use a ação `launch` para iniciar uma nova sessão do navegador em uma URL específica. Cada sessão deve começar com `launch`. ```browser_action { "action": "launch", "url": "https://example.com" } ```