survey-patterns

$npx mdskill add tobihagemann/turbo/survey-patterns

Surveys codebase for patterns and prior art before planning changes.

  • Identifies analogous features and reusable utilities for a proposed change.
  • Spawns a subagent using the 'opus' model to search the codebase.
  • Derives task from user request or conversation context.
  • Returns a structured report of findings without writing code.

SKILL.md

.github/skills/survey-patternsView on GitHub ↗
---
name: survey-patterns
description: "Survey the codebase for analogous features, reusable utilities, and existing patterns relevant to a proposed change. Returns structured findings without writing code. Use when the user asks to \"survey patterns\", \"find existing patterns\", \"look for analogous features\", \"check how similar things are done\", \"find prior art for this change\", or needs pattern context before planning a change."
---

# Survey Patterns

Search the codebase for analogous features and reusable building blocks before planning a change. Returns structured findings. Does not write code or plans.

## Step 1: Identify the Task

Determine what the change is about:

- If a task description was passed in, use it
- Otherwise, derive it from conversation context (the user's latest request)

State the task back in one sentence to confirm scope before searching.

## Step 2: Spawn Pattern Survey Subagent

Spawn a single subagent in the foreground (`model: "opus"`). The subagent's prompt must include:

1. The confirmed task description from Step 1
2. An instruction to read [references/pattern-surveyor.md](references/pattern-surveyor.md) for survey guidelines, categories, and output format before searching

The subagent covers all three categories (Analogous Features, Reusable Utilities, Convention Anchors) in one sweep and returns a single structured report.

## Step 3: Output Findings

Output the subagent's report verbatim. Do not reformat or re-synthesize — `references/pattern-surveyor.md` specifies the exact output format the subagent produces.

Then use the TaskList tool and proceed to any remaining task.

## Rules

- Do not write files.
- Do not propose implementation steps.

More from tobihagemann/turbo

SkillDescription
answer-reviewer-questionsFor each reviewer question on a PR, recall implementation reasoning and compose a raw answer. Use when the user asks to \"answer reviewer questions\", \"draft answers to PR questions\", or \"explain reviewer questions\".
apply-findingsApply findings by making the suggested code changes. Applies accepted verdicts, escalates ambiguous findings to the user, and offers to note genuine improvements for later. Use when the user asks to \"apply findings\", \"apply fixes\", \"apply suggestions\", \"apply accepted findings\", \"fix the findings\", or \"apply the review results\".
assess-technical-debtAssess project-wide structural technical debt: complexity hotspots, deprecated API usage, duplication clusters, and architecture rot. Ranks findings by impact and refactor effort into a report at .turbo/technical-debt.md. Use when the user asks to \"assess technical debt\", \"find technical debt\", \"review technical debt\", \"what should we refactor\", \"find refactoring candidates\", \"where is the code rot\", or \"what's our worst code\". Analysis-only — does not modify code.
changelog-rulesShared changelog conventions and formatting rules referenced by /create-changelog and /update-changelog. Not typically invoked directly.
claude-printRun a non-interactive Claude Code print-mode call from Codex. Use when the user asks to \"claude print\", \"ask claude\", \"run claude\", \"consult claude\", or when a Codex Turbo skill needs Claude as an independent peer reviewer.
code-styleEnforce mirror, reuse, and symmetry principles to keep new code consistent with surrounding code. Use when writing new code in an existing codebase, adding new features, refactoring, or making any code changes.
codex-execRun autonomous task execution using the codex CLI. Use when the user asks to \"codex exec\", \"run codex exec\", \"execute a task with codex\", or \"delegate to codex\".
commit-rulesShared commit message rules and technical constraints referenced by /stage-commit and /commit-staged. Not typically invoked directly.
commit-staged-pushCommit already-staged changes and push in one step. Use when the user asks to \"commit and push staged changes\", \"commit and push what's staged\", or \"commit staged and push\".
consult-claudeConsult Claude Code for second opinions, brainstorming, or difficult debugging from Codex. Use when the user asks to \"consult claude\", \"ask claude\", \"get claude's opinion\", \"brainstorm with claude\", or \"discuss with claude\".