Agent skill

Brownfield Repo Scanner

by Q00 in Q00/ouroboros

Scans a directory for existing git repositories and worktrees, then registers and manages which ones serve as default context during interviews.

MITAuto-check passedDevelopment

Install Brownfield Repo Scanner

skills CLI
$ npx skills add Q00/ouroboros --skill brownfield -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Q00/ouroboros brownfield --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Q00/ouroboros.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/brownfield .claude/skills/brownfield && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
brownfield
GitHub stars
6.2k
Token cost
~2.2k tokens
SKILL.md length
981 words
Files
1
Skills in repo
23
Repo updated
First seen
Licence
MIT

At a glance

Scans a directory for existing git repositories and worktrees, then registers and manages which ones serve as default context during interviews.

  • Works in 2 steps: Load the brownfield MCP tool: tool… → Call scan+register
  • Setting default repositories to use as context in an interview
  • SKILL.md covers Usage, How It Works and RFC #1392 State Breadcrumb…
  • Calls uvx

What it does

Walks a configured root up to two directory levels deep for valid repositories and linked worktrees, registering each one it finds directly so it can later be offered as default context. Worktree families outside that depth-bounded walk, such as ones nested under a dedicated worktrees folder, are not pulled in automatically, and existing defaults already set are preserved across a rescan.

Three subcommands cover the common cases: a scan-only pass that registers repos without touching defaults, a command that shows the currently selected defaults, and the bare command that scans and lets the user pick defaults in one step. Because the underlying tool call can run across several turns, the skill reloads its own deferred tool schema immediately before every call rather than assuming an earlier load is still valid, and stops with a clear message if the tool turns out to be unavailable rather than retrying blindly.

Results are shown as a plain-text, aligned two-column grid rather than a markdown table, and the skill is told not to make any extra calls to list or re-query repos once the scan response already contains the formatted list.

When your agent uses it

  • Setting default repositories to use as context in an interview
  • Discovering which git repos and worktrees exist under a root directory
  • Checking which repos are currently registered as defaults
  • Re-scanning a workspace after adding or removing projects

Example prompts

  • “Scan for repos under my projects folder and show me the current defaults.”
  • “ooo brownfield scan — just register what's there, don't touch my defaults yet.”
  • “What repositories are currently set as my interview defaults?”

Requirements

  • The ouroboros MCP tool for brownfield scanning

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. Load the brownfield MCP tool: tool discovery query: "+ouroboros brownfield"
  2. Call scan+register

What it can do on your machine

Read from SKILL.md and the folder at commit f587795. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • uvx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use uvx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Brownfield Repo Scanner loads about 2.2k tokens when it runs. Until then it costs about 20 tokens; SKILL.md has 981 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~20
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Q00/ouroboros at commit f587795, republished under its MIT licence (© Q00). 981 words, ~2,245 tokens.

Download SKILL.mdSave it as .claude/skills/brownfield/SKILL.md (or your agent's skills folder).
name
brownfield
description
Scan and manage brownfield repository/worktree defaults for interviews

/ouroboros:brownfield

Scan a root directory for existing git repositories and linked worktrees, then manage default repos used as context in interviews.

Usage

ooo brownfield                # Scan repos and set defaults
ooo brownfield scan           # Scan only (no default selection)
ooo brownfield defaults       # Show current defaults
ooo brownfield set 6,18,19   # Set defaults by repo numbers
ooo brownfield detect [path]  # Author mechanical.toml via one AI call

Trigger keywords: "brownfield", "scan repos", "default repos", "brownfield scan", "mechanical detect"


How It Works

Default flow (ooo brownfield with no args)

Step 1: Scan

Show scanning indicator:

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  Scanning for Existing Projects...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Looking for git repositories and worktrees up to two directories below the scan root.
Local repos and repos with any remote name are eligible.
This may take a moment...

Implementation — use MCP tools only, do NOT use CLI or Python scripts:

CRITICAL — deferred-schema guard (prevents "Invalid tool parameters"): This skill can call ouroboros_brownfield across multiple turns (scan, set_defaults, defaults, and set). A deferred schema loaded for one turn is NOT guaranteed to remain loaded for the next. Immediately before EVERY ouroboros_brownfield call, re-run tool discovery query: "+ouroboros brownfield" (idempotent — a no-op when already loaded). If the load returns no matching tool (and the tool is not already callable — an empty load for an already-exposed tool is an expected no-op, not absence), stop with the MCP-not-available message instead of retrying the failing call.

  1. Load the brownfield MCP tool: tool discovery query: "+ouroboros brownfield"
  2. Call scan+register:
    Tool: ouroboros_brownfield
    Arguments: { "action": "scan" }
    This walks scan_root (up to two directory levels deep) for valid seed repos/worktrees and registers them in DB. Each repo or worktree found directly by the walk is registered self-only — Git worktree families are not expanded, so worktrees outside the depth-bounded walk (e.g. under .ouroboros/worktrees) are not pulled in. Existing defaults are preserved.

The scan response text already contains a pre-formatted numbered list with [default] markers. Do NOT make any additional MCP calls to list or query repos.

Display the repos in a plain-text 2-column grid (NOT a markdown table). Use a code block so columns align. Example:

Scan complete. 8 repositories registered.

 1. repo-alpha                   5. repo-epsilon
 2. repo-bravo *                 6. repo-foxtrot
 3. repo-charlie                 7. repo-golf *
 4. repo-delta                   8. repo-hotel

Include * markers for defaults exactly as they appear in the scan response.

If no repos found, show:

No git repositories or worktrees found.

Then stop.

Scan boundaries
  • The filesystem walk starts at scan_root; when omitted, scan_root defaults to the current user's home directory.
  • Repositories are discovered by walking directories inside scan_root, at most two levels deep (so ~/repo and ~/group/repo are found; deeper nesting is not).
  • Dot-prefixed directories and known noisy directories such as node_modules are not walked as seed locations.
  • Both normal repos (.git directory) and linked worktrees (.git file) are registered when the walk reaches them. Git worktree families are NOT expanded — a worktree is only registered if the walk finds it directly, not because its main repo's Git metadata reports it.
  • Local repos, repos without remotes, and repos whose remotes are not named origin are all eligible.

Step 2: Default Selection

Do NOT use AskUserQuestion for this selection. Two rendering constraints make it unusable here:

  • Assistant text emitted between tool calls (scan result → grid → question dialog) is not guaranteed to render, so the user may face the dialog without ever seeing the repo list.
  • Embedding the list in option preview fields does not work either — the preview box has a fixed height and silently truncates long lists ("N lines hidden"), and repo lists routinely exceed it.

Instead, end the turn with the repo grid as the final message so its display is guaranteed, and collect the selection as a plain chat reply.

Immediately below the grid (same message, same code block or right after it), append the selection prompt:

If defaults exist:

Current defaults: <current default names> (numbers <current default numbers>)

Reply with repo numbers to change defaults (e.g. "6, 18, 19"),
"keep" to keep the current defaults, or "none" to clear them.

If no defaults exist:

No defaults set.

Reply with repo numbers to set defaults (e.g. "6, 18, 19"),
or "none" to run interviews in greenfield mode.

Then end the turn — no tool calls after the grid. The RFC #1392 breadcrumb footer is still the last line of the message.

On the next turn, parse the user's reply:

  • Numbers (any separator) → those indices
  • "keep" (defaults exist) → stop; no MCP call needed, confirm defaults unchanged
  • "none" → empty indices (clear all)
  • Anything else → ask again in plain text; do not guess

Then re-run tool discovery query: "+ouroboros brownfield" and use ONE MCP call to update all defaults at once:

Tool: ouroboros_brownfield
Arguments: { "action": "set_defaults", "indices": "<comma-separated IDs>" }

Example: if the user picks IDs 6, 18, 19 → { "action": "set_defaults", "indices": "6,18,19" }

This clears all existing defaults and sets the selected repos as default in one call.

If "none" → { "action": "set_defaults", "indices": "" } to clear all defaults.

Step 3: Confirmation

Brownfield defaults updated!
Defaults: grape, podo-app, podo-backend

These repos will be used as context in interviews.

Or if "none" selected:

No default repos set. Interviews will run in greenfield mode.
You can set defaults anytime with: ooo brownfield

Or if "keep" selected:

Defaults unchanged: <current default names>

Show full SKILL.md (326 more words)Show less
Subcommand: scan

Scan only, no default selection prompt. Show the numbered list and stop.


Subcommand: defaults

Re-run tool discovery query: "+ouroboros brownfield", then call:

Tool: ouroboros_brownfield
Arguments: { "action": "scan" }

Display only the repos marked with * (defaults). If none, show:

No default repos set. Run 'ooo brownfield' to configure.

Subcommand: set <indices>

Directly set defaults without scanning. Parse the comma-separated indices from the user's input, re-run tool discovery query: "+ouroboros brownfield", and call:

Tool: ouroboros_brownfield
Arguments: { "action": "set_defaults", "indices": "<indices>" }

Show confirmation with updated defaults.


Subcommand: detect [path]

Runs one AI call against the target directory (defaults to the user's cwd) and writes .ouroboros/mechanical.toml with validated lint / build / test / static / coverage commands. Stage 1 of evaluation reads this file verbatim, so the toml is the authoritative Stage 1 contract — no hardcoded language presets exist anymore.

Ouroboros auto-runs this detect the first time ouroboros_evaluate is invoked without a toml present, so most users never need to call it directly. Run it explicitly when:

  • you want to pre-author the toml before the first evaluate,
  • you moved to a new build tool and want to refresh (--force),
  • you want to review/edit the commands before Stage 1 trusts them.

Implementation: invoke the CLI via Bash.

uvx --python '>=3.12' --from ouroboros-ai ouroboros detect [path]
# or, if already installed:
ouroboros detect [path] [--force]

Then print the resulting .ouroboros/mechanical.toml contents so the user can confirm the proposed commands or hand-edit them.

If detect reports "could not propose any verifiable commands", surface the reason (no manifests found, LLM unavailable, every proposal dropped) and suggest the user write a minimal toml by hand — any single entry like test = "pytest -q" is enough to opt back in to Stage 1 for that check.

Your final response MUST end with exactly one breadcrumb footer line:

◆ <current state> → next: <recommended action>

Derive <current state> from live session state via ouroboros_session_status when that MCP projection is available; otherwise derive it from this skill's actual outcome. Never use a linear Step N of M footer because Ouroboros is an evolutionary loop. When the next action is genuinely a choice, list 2-3 honest options in the next: clause. The breadcrumb line must be the last line of the response.

© Q00, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/brownfield of Q00/ouroboros.

Open the folder on GitHubat commit f587795

Compare with similar skills

Brownfield Repo Scanner next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Brownfield Repo Scanner compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Brownfield Repo Scanner this skillQ00/ouroboros6.2k—~2.2kAutomated safety check: PassMIT
Migrate Core Code to Submodulestinyhumansai/openhuman42k—~2.6kAutomated safety check: PassGPL-3.0
Repomix Codebase Exploreryamadashy/repomix29k1 repos~2.7kAutomated safety check: PassMIT
Build Px4 macOSPX4/PX4-Autopilot13k—~1.1kAutomated safety check: PassBSD-3-Clause
WorktreeAgentsMesh/AgentsMesh2.4k—~553Automated safety check: NotesCustom licence
Git Worktree IsolationjnMetaCode/superpowers-zh8.3k1 repos~982Automated safety check: PassMIT

Similar skills

  • Migrate Core Code to Submodules

    tinyhumansai/openhuman

    Plans and carries out moving non-host-specific code and its tests from the OpenHuman core into vendored tiny submodule libraries, then releases the submodule and re-pins the host.

    42k GitHub stars~2.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Repomix Codebase Explorer

    yamadashy/repomix

    Packs a local or remote repository into a single AI-friendly file with the Repomix CLI, then reads and searches that output to explain structure, find patterns or report metrics.

    29k GitHub starsUsed in 1 repo~2.7k tokens
    DevelopmentAuto-check passed
  • Build Px4 macOS

    PX4/PX4-Autopilot

    Build PX4 board firmware on macOS in the px4-dev Docker container, including git worktrees, and stage commit-labeled artifacts without flashing hardware.

    13k GitHub stars~1.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Worktree

    AgentsMesh/AgentsMesh

    Creates or reuses an isolated AgentsMesh Git worktree from a verified base branch, preserves existing changes, and optionally starts the worktree-scoped development environment.

    2.4k GitHub stars~553 tokensUpdated 15 days ago
    DevelopmentAuto-check: notes
  • Git Worktree Isolation

    jnMetaCode/superpowers-zh

    Sets up an isolated workspace before feature work or plan execution, preferring native worktree tools and falling back to git worktree, with instructions in Chinese.

    8.3k GitHub starsUsed in 1 repo~982 tokens
    DevelopmentAuto-check passed
  • Codebase Context

    homarr-labs/homarr

    Navigate Homarr's monorepo architecture and reuse shared packages.

    5k GitHub stars~679 tokensUpdated today
    DevelopmentAuto-check passed

More from Q00/ouroboros

All 23 skills in this repo
  • Runs a guided product-manager interview that classifies each question automatically and produces a Product Requirements Document.

    6.2k GitHub starsUsed in 1 repo~5.7k tokens
    Auto-check passed
  • Triages and works through GitHub issues and pull requests in the Q00/ouroboros repo as a maintainer, within a stated review boundary and clear limits on what it may change.

    6.2k GitHub stars~1.7k tokensUpdated yesterday
    Auto-check passed
  • Scores an agent's finished work with a three-stage pipeline: free mechanical checks, an advisory semantic review, and an optional multi-model consensus vote.

    6.2k GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed
  • Starts, monitors or rewinds an evolutionary development loop that refines an ontology and acceptance criteria generation by generation until it converges, using the Ouroboros MCP tools.

    6.2k GitHub stars~3.2k tokensUpdated yesterday
    Auto-check passed
  • Opens or drives the Ouroboros settings GUI, picking a browser, TUI or chat-based approach depending on whether the user can reach a browser window.

    6.2k GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed
  • Reference guide to the Ouroboros commands and agents, covering interviews, seed specs, evaluation, lateral-thinking personas and the evolutionary loop.

    6.2k GitHub stars~1.8k tokensUpdated yesterday
    Auto-check passed

Questions about Brownfield Repo Scanner

What does Brownfield Repo Scanner do?

Scans a directory for existing git repositories and worktrees, then registers and manages which ones serve as default context during interviews. Walks a configured root up to two directory levels deep for valid repositories and linked worktrees, registering each one it finds directly so it can later be offered as default context. Worktree families outside that depth-bounded walk, such as ones nested under a dedicated worktrees folder, are not pulled in automatically, and existing defaults already set are preserved across a rescan.

When should I use Brownfield Repo Scanner?

Brownfield Repo Scanner fits situations like: setting default repositories to use as context in an interview; discovering which git repos and worktrees exist under a root directory; checking which repos are currently registered as defaults; re-scanning a workspace after adding or removing projects.

How do I install Brownfield Repo Scanner in Claude Code?

Run `npx skills add Q00/ouroboros --skill brownfield -a claude-code`. Or copy the skill folder (skills/brownfield in Q00/ouroboros) into .claude/skills/brownfield in your project. Claude Code loads it when a task matches its description.

How do I install Brownfield Repo Scanner in Codex?

Run `npx skills add Q00/ouroboros --skill brownfield -a codex`. Or copy the skill folder (skills/brownfield in Q00/ouroboros) into .agents/skills/brownfield in your project. Codex loads it when a task matches its description.

Can I use Brownfield Repo Scanner in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Q00/ouroboros --skill brownfield -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/brownfield, .gemini/skills/brownfield, .github/skills/brownfield and .opencode/skills/brownfield in your project.

What does Brownfield Repo Scanner need to run?

Going by SKILL.md and its folder, Brownfield Repo Scanner needs the command-line tools its instructions call (uvx). Our summary lists: The ouroboros MCP tool for brownfield scanning.

Does Brownfield Repo Scanner access the network?

SKILL.md contains no URLs. Its commands use uvx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Brownfield Repo Scanner safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Brownfield Repo Scanner use?

Brownfield Repo Scanner is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Brownfield Repo Scanner use?

About 2.2k tokens (SKILL.md is roughly 9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Brownfield Repo Scanner?

Skills that share tags, products or a category with Brownfield Repo Scanner: Migrate Core Code to Submodules (tinyhumansai/openhuman, 42k stars), Repomix Codebase Explorer (yamadashy/repomix, 29k stars), Build Px4 macOS (PX4/PX4-Autopilot, 13k stars) and Worktree (AgentsMesh/AgentsMesh, 2.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Brownfield Repo Scanner?

Q00 (a GitHub user) maintains it in Q00/ouroboros, which has 6,194 GitHub stars. The repository holds 23 skills in this directory. The repository was last updated on October 7, 2026.

Source: Q00/ouroboros on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.