Agent skill

Pattern Detection

by rsmdt in rsmdt/the-startup

Identify existing codebase patterns (naming conventions, architectural patterns, testing patterns) to maintain consistency.

MITAuto-check passedTesting & QA

Install Pattern Detection

skills CLI
$ npx skills add rsmdt/the-startup --skill pattern-detection -a claude-code

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

GitHub CLI
$ gh skill install rsmdt/the-startup pattern-detection --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/rsmdt/the-startup.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/team/skills/cross-cutting/pattern-detection .claude/skills/pattern-detection && 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
pattern-detection
GitHub stars
551
Token cost
~1.4k tokens
SKILL.md length
587 words
Files
3
Skills in repo
27
Repo updated
First seen
Licence
MIT

At a glance

Identify existing codebase patterns (naming conventions, architectural patterns, testing patterns) to maintain consistency.

  • Works in 5 steps: Survey Files → Identify Patterns → Verify Intentionality → …
  • Generating code
  • SKILL.md covers Persona, Interface, Constraints and Reference Materials, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Pattern Detection is an agent skill from rsmdt/the-startup. Identify existing codebase patterns (naming conventions, architectural patterns, testing patterns) to maintain consistency. Use when generating code, reviewing changes, or understanding established practices.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files (for example `examples/common-patterns.md` and `reference/pattern-catalogs.md`).

It sits in Testing & QA, covering Test strategy. The repository describes itself as: The Agentic Startup - A collection of Claude Code commands, skills, and agents. The licence is MIT.

When your agent uses it

  • Generating code
  • Reviewing changes
  • Understanding established practices

Example prompts

  • “/pattern-detection”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Survey Files
  2. Identify Patterns
  3. Verify Intentionality
  4. Detect Conflicts
  5. Document Patterns

What it can do on your machine

Read from SKILL.md and the folder at commit 88d447c. 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

    No scripts in the folder and no shell commands in SKILL.md.

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

  • Network

    No URLs in SKILL.md.

    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

Pattern Detection loads about 1.4k tokens when it runs. Until then it costs about 57 tokens; SKILL.md has 587 words of instructions outside code blocks.

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

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 rsmdt/the-startup at commit 88d447c, republished under its MIT licence (© rsmdt). 587 words, ~1,357 tokens.

Download SKILL.mdSave it as .claude/skills/pattern-detection/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
pattern-detection
description
Identify existing codebase patterns (naming conventions, architectural patterns, testing patterns) to maintain consistency. Use when generating code, reviewing changes, or understanding established practices.

Persona

Act as a codebase pattern analyst that discovers, verifies, and documents recurring conventions across naming, architecture, testing, and code organization to ensure new code maintains consistency with established practices.

Analysis Target: $ARGUMENTS

Interface

PatternCategory: NAMING | ARCHITECTURE | TESTING | ORGANIZATION | ERROR_HANDLING | CONFIGURATION

Confidence: HIGH | MEDIUM | LOW

Pattern { category: PatternCategory name: string // e.g., "PascalCase component files" description: string // what the pattern is evidence: string[] // file:line examples that demonstrate it confidence: Confidence isDocumented: boolean // found in style guide or CONTRIBUTING.md }

PatternReport { patterns: Pattern[] conflicts: PatternConflict[] // where patterns are inconsistent recommendations: string[] // for new code }

PatternConflict { category: PatternCategory description: string exampleA: string // file:line of pattern A exampleB: string // file:line of pattern B recommendation: string // which to follow and why }

State { target = $ARGUMENTS samples = [] patterns = [] conflicts = [] }

Constraints

Always:

  • Survey at least 3-5 representative files of each type before declaring a pattern.
  • Provide concrete file:line evidence for every detected pattern.
  • Distinguish between intentional conventions and accidental consistency.
  • Follow existing patterns even if imperfect — consistency trumps preference.
  • Check tests for patterns too — test code reveals expected conventions.
  • Recommend the pattern used in the specific area being modified when conflicts arise.
  • When tied on conflicts, prefer the pattern with tooling enforcement.

Never:

  • Declare a pattern from a single file occurrence.
  • Assume patterns from other projects apply to this codebase.
  • Introduce new patterns without acknowledging deviation from existing ones.
  • Ignore conflicting patterns — always surface and recommend resolution.

Reference Materials

  • Pattern Catalogs — Naming, architecture, testing, and organization pattern catalogs with detection guidance
  • Common Patterns — Concrete examples of pattern recognition and application in real codebases

Workflow

1. Survey Files

Determine scope:

match (target) { specific file => survey sibling files in same directory directory/module => survey representative files across subdirectories entire codebase => sample from each major directory/module }

For each scope, collect representative samples:

  1. Read 3-5 files of each relevant type (source, test, config).
  2. Prioritize files in the same module/feature as the target.
  3. Include style guides, CONTRIBUTING.md, linter configs if present.
  4. Note file ages — newer files may represent intended direction.

Read reference/pattern-catalogs.md for detection guidance.

Show full SKILL.md (253 more words)Show less
2. Identify Patterns

Scan samples across each PatternCategory:

match (category) { NAMING => { File naming convention (kebab, PascalCase, snake_case) Function/method verb prefixes (get/fetch/retrieve) Variable naming (pluralization, private indicators) Boolean prefixes (is/has/can/should) } ARCHITECTURE => { Directory structure layering (MVC, Clean, Hexagonal, feature-based) Import direction and dependency flow State management approach Module boundary conventions } TESTING => { Test file placement (co-located, mirror tree, feature-based) Test naming style (BDD, descriptive, function-focused) Setup/teardown conventions Assertion and mock patterns } ORGANIZATION => { Import ordering and grouping Export style (default vs named) Comment and documentation patterns Code formatting conventions } }

For each detected pattern, record: name, description, 2+ evidence locations, confidence level.

3. Verify Intentionality

For each detected pattern:

  1. Check if documented in style guide or CONTRIBUTING.md.
  2. Check linter/formatter configs that enforce it.
  3. Count occurrences — high consistency = likely intentional.
  4. Check commit history — was it introduced deliberately?

Assign confidence:

match (evidence) { documented + enforced by tooling => HIGH consistent across 80%+ of files => HIGH consistent across 50-80% of files => MEDIUM found in < 50% of files => LOW — may be accidental }

4. Detect Conflicts

Compare patterns within each category for inconsistencies (e.g., some files use camelCase, others use snake_case).

For each conflict:

  1. Identify both variations with evidence.
  2. Check date/author patterns — newer code may represent intended direction.
  3. Check if one variation is in the target area being modified.
  4. Recommend which pattern to follow with rationale.
5. Document Patterns

Produce PatternReport:

  1. Confirmed patterns (HIGH confidence first).
  2. Probable patterns (MEDIUM confidence).
  3. Conflicts detected with resolution recommendations.
  4. Recommendations for new code in the target area.

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

Files

SKILL.md and 2 other files in plugins/team/skills/cross-cutting/pattern-detection of rsmdt/the-startup.

  • SKILL.md
  • examples/common-patterns.md
  • reference/pattern-catalogs.md

Open the folder on GitHubat commit 88d447c

Compare with similar skills

Pattern Detection 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.

Pattern Detection compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Pattern Detection this skillrsmdt/the-startup551—~1.4kAutomated safety check: PassMIT
Testing OpenLogi UIAprilNEA/OpenLogi23k—~1.1kAutomated safety check: PassApache-2.0
Testing Hashqlhashintel/hash1.7k—~1.9kAutomated safety check: PassAGPL-3.0
Dynamo Unit TestingDynamoDS/Dynamo2k—~622Automated safety check: PassApache-2.0
Designing TestsCloudAI-X/opencode-workflow275—~2.9kAutomated safety check: PassMIT
Openprd Test StrategyDavidLam-oss/obsidian-wechat-converter332—~578Automated safety check: PassMIT

Similar skills

  • Testing OpenLogi UI

    AprilNEA/OpenLogi

    Verifies OpenLogi's native GPUI interface with focused tests, the component gallery and a mock agent, choosing the evidence that fits each change.

    23k GitHub stars~1.1k tokensUpdated 5 days ago
    Testing & QAAuto-check passed
  • Testing Hashql

    hashintel/hash

    HashQL testing strategies including compiletest (UI tests), unit tests, and snapshot tests.

    1.7k GitHub stars~1.9k tokensUpdated today
    Testing & QAAuto-check passed
  • Dynamo Unit Testing

    DynamoDS/Dynamo

    Write comprehensive NUnit tests for the Dynamo codebase following Dynamo testing patterns, conventions, and architectural constraints.

    2k GitHub stars~622 tokensUpdated today
    Testing & QAAuto-check passed
  • Designing Tests

    CloudAI-X/opencode-workflow

    Guides test strategy, TDD/BDD approaches, test coverage planning, and testing best practices.

    275 GitHub stars~2.9k tokensUpdated 9 mo ago
    Testing & QAAuto-check passed
  • Openprd Test Strategy

    DavidLam-oss/obsidian-wechat-converter

    OpenPrd 测试策略分流 skill:按风险把任务分到单元、集成、端到端、人工、视觉、小程序、性能和安全验证,并要求 evidence-plan。

    332 GitHub stars~578 tokensUpdated 5 days ago
    Testing & QAAuto-check passed
  • Go Testing

    Gentleman-Programming/gentle-ai

    Trigger: Go tests, go test coverage, Bubbletea teatest, golden files.

    7.6k GitHub stars~550 tokensUpdated today
    Testing & QAAuto-check passed

More from rsmdt/the-startup

All 27 skills in this repo
  • Analyze

    rsmdt/the-startup

    Deep-dive codebase analysis that explains how things actually work — business rules, architecture patterns, auth flows, data models, integrations, and performance hotspots.

    551 GitHub stars~1.9k tokensUpdated 2 mo ago
    Auto-check passed
  • Implement

    rsmdt/the-startup

    Implementation entry point. An agent skill from rsmdt/the-startup.

    551 GitHub stars~1.3k tokensUpdated 2 mo ago
    Auto-check passed
  • Implement Factory

    rsmdt/the-startup

    Factory loop orchestrator for multi-feature or multi-component implementation manifests.

    551 GitHub stars~3.2k tokensUpdated 2 mo ago
    Auto-check passed
  • Agentic Patterns

    rsmdt/the-startup

    Context enrichment for agentic AI application development using LangChain, Vercel AI SDK, and assistant-ui.

    551 GitHub stars~501 tokensUpdated 2 mo ago
    Auto-check passed
  • API Contract Design

    rsmdt/the-startup

    REST and GraphQL API design patterns, OpenAPI/Swagger specifications, versioning strategies, and authentication patterns.

    551 GitHub stars~1.1k tokensUpdated 2 mo ago
    Auto-check passed
  • Architecture Selection

    rsmdt/the-startup

    System architecture patterns including monolith, microservices, event-driven, and serverless, with C4 modeling, scalability strategies, and technology selection criteria.

    551 GitHub stars~1.2k tokensUpdated 2 mo ago
    Auto-check passed

Categories

Questions about Pattern Detection

What does Pattern Detection do?

Identify existing codebase patterns (naming conventions, architectural patterns, testing patterns) to maintain consistency. Pattern Detection is an agent skill from rsmdt/the-startup. Identify existing codebase patterns (naming conventions, architectural patterns, testing patterns) to maintain consistency.

When should I use Pattern Detection?

Pattern Detection fits situations like: generating code; reviewing changes; understanding established practices.

How do I install Pattern Detection in Claude Code?

Run `npx skills add rsmdt/the-startup --skill pattern-detection -a claude-code`. Or copy the skill folder (plugins/team/skills/cross-cutting/pattern-detection in rsmdt/the-startup) into .claude/skills/pattern-detection in your project. Claude Code loads it when a task matches its description.

How do I install Pattern Detection in Codex?

Run `npx skills add rsmdt/the-startup --skill pattern-detection -a codex`. Or copy the skill folder (plugins/team/skills/cross-cutting/pattern-detection in rsmdt/the-startup) into .agents/skills/pattern-detection in your project. Codex loads it when a task matches its description.

Can I use Pattern Detection 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 rsmdt/the-startup --skill pattern-detection -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pattern-detection, .gemini/skills/pattern-detection, .github/skills/pattern-detection and .opencode/skills/pattern-detection in your project.

What does Pattern Detection need to run?

SKILL.md names no scripts, command-line tools or credentials: Pattern Detection is instructions for the agent only.

Does Pattern Detection access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Pattern Detection 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 Pattern Detection use?

Pattern Detection 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 Pattern Detection use?

About 1.4k tokens (SKILL.md is roughly 5.4k 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 Pattern Detection?

Skills that share tags, products or a category with Pattern Detection: Testing OpenLogi UI (AprilNEA/OpenLogi, 23k stars), Testing Hashql (hashintel/hash, 1.7k stars), Dynamo Unit Testing (DynamoDS/Dynamo, 2k stars) and Designing Tests (CloudAI-X/opencode-workflow, 275 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Pattern Detection?

rsmdt (a GitHub user) maintains it in rsmdt/the-startup, which has 551 GitHub stars. The repository holds 27 skills in this directory. The repository was last updated on August 3, 2026.

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