Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Docker 6 min read How-to mediumAdept

How an AI Assistant Can Help Configure Your Project’s Git Hooks

An LLM assistant's advice on configuring Git hooks goes from generic to project-specific when the prompt is enriched with context from containerized analysis tools (a linguist image detecting repository languages, bound in via mustache templates) and with expert knowledge such as an organization's preferred pre-commit base config and per-language hooks like golangci-lint. With these additions the model produces ready-to-use pre-commit-config.yaml files and hook scripts, and even extends the established syntax to tools it wasn't told about. Registering a file-writer tool turns the response into OpenAI function calls that an agent executes to write the config directly. Delivering every tool as a lazily pulled Docker container smooths over the environment problems that otherwise block local assistants.

Related posts

  • How to Create and Use an AI Git Agent

    Docker mediumAdept

    An LLM-driven Git agent runs Git commands inside an alpine/git container while authenticating with the user's own SSH keys, so non-Git users such as UI tech writers can fetch, check out PR branches and get a three-dot diff of changed files. A setup prompt mounts ~/.ssh read-only and ~/.gitconfig into a container, then copies them to a writable location. It fixes container-breaking settings such as UseKeychain and carriage-return rules, and persists the result to a /thread volume that the Git tool copies in before each command. Tagging the thread in the VSCode extension keeps credentials across runs, and read-only credentials could let people without a local Git install review PRs.

  • How AI Assistants Can Decode GitHub Repos for UI Writers

    Docker mediumAdept

    An LLM agent can reliably flag user-facing copy changes in a branch when it is given narrow tools and expert hints about what "user-facing" means. GitHub Copilot's repo chat could not even count open PRs. A first prompt that gave the model bash and raw git diff also failed: diffs were huge, important files were buried and extra tools invited hallucination. The working two-step flow first lists only likely UI files (using --files-only and --no-pager with an alpine/git container) and saves the list. It then diffs just those files against main with --no-color --minimal, guided by frontend-engineer hints about JSX text nodes, notifications, toasts and Error constructors. This produced an accurate list of copy changes on a real Docker PR.

  • Getting Started with the Labs AI Tools for Devs Docker Desktop Extension

    Docker mediumAdept

    The Labs AI Tools for Devs Docker Desktop extension runs LLM prompts against local projects. Prompts are referenced by git ref or URL, or loaded as local files. A prompt is a markdown file with system and user sections, and project context such as languages and files is injected through mustache templates. Tools the LLM can call are defined as Docker images that get bind-mounted into the project and receive a JSON payload as their first argument. Sample prompts cover Dockerfile generation, runbooks, ESLint and Pylint fixes.

  • Adding the ESLint Tool to an AI Assistant: Improving Recommendations for JS/TS Projects

    Docker mediumAdept

    An AI assistant gets better at linting JavaScript and TypeScript projects when it is given ESLint tooling instead of relying on the LLM's built-in knowledge. Out of the box, GPT-4 suggests boilerplate ESLint configs that often don't work. A prompt plus a containerized StandardJS function definition lets the assistant pick ts-standard when tsconfig files exist, run it from the right directory, and install Docker-based Git hooks. The LLM can then generate JSON edit ranges for violations that aren't auto-fixable. Showing these fixes in VSCode's problems window, driven by linter output, avoids the hallucinations that context-free Copilot "fix this" requests produce.

  • Beyond the Chatbot: Event-Driven Agents in Action

    Docker mediumAdept

    A GitHub webhook-triggered agent workflow automatically detects "I finished the tutorial" pull requests on Docker's sample repos, generates an encouraging comment, and closes them without any chat interface. It is built with the TypeScript Mastra framework, local Qwen3 (analysis and execution) and Gemma3 (comment generation) models via Docker Model Runner, and the GitHub MCP server exposed through Docker MCP Gateway with tools filtered down to reduce context size, all wired together in Docker Compose. Key lessons: prompt iteration is still hard, small local models are easy to swap and compare via Compose, and deterministic steps like posting a comment and closing a PR are more reliable done programmatically than by an agent.

The quest for software engineering knowledge.

Look:
Layout: