patterns

Scan repositories to generate canonical codebase patterns documentation.

4|Updated Jan 12, 2026
One-click install
npx skills add https://github.com/SergiuSavva/ai-context-docs-lifecycle --skill patterns-sergiusavva
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: patterns
Source: https://github.com/SergiuSavva/ai-context-docs-lifecycle/tree/main/content/modules/02-dev-workflow/skills/patterns
Command: npx skills add https://github.com/SergiuSavva/ai-context-docs-lifecycle --skill patterns-sergiusavva

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Onboarding to a new codebase is slow and error-prone when team conventions are undocumented; this skill discovers and documents actual codebase patterns to provide a trusted reference for AI agents and developers.

Core Features & Use Cases

  • Discover and document codebase conventions that currently exist.
  • Generate a canonical patterns document to guide contributors and AI tooling.
  • Update patterns when code evolves and new patterns emerge.

Quick Start

Run the discovery to generate the patterns documentation in .agents/skills/patterns/patterns.md from the current codebase.

Frequently Asked Questions about patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I document existing codebase patterns and conventions for onboarding?

To document codebase patterns, scan the repository to identify actual coding conventions and generate a canonical patterns document. This provides a trusted reference for onboarding developers and guiding AI tooling.

What is codebase pattern discovery and how does it work?

Codebase pattern discovery is the process of scanning a repository to identify real coding conventions. It collects multiple examples per domain and outputs a canonical patterns document for evergreen reference.

How do I generate a coding conventions document from my repository?

Generate a coding conventions document by running a discovery scan on your repository. The scan identifies existing patterns and outputs the documentation to .agents/skills/patterns/patterns.md for contributor reference.

Can I use this to update codebase documentation when code evolves and new patterns emerge?

Yes, you can update pattern documentation by re-running the repository discovery scan. This captures code evolution and newly emerged patterns, ensuring the canonical patterns document remains an evergreen reference.

How do I prevent AI agents from generating pattern-violating code?

Prevent AI agents from generating pattern-violating code by providing them with a canonical patterns document. The document is generated by scanning the repository and codifying real existing conventions for the AI to reference.

What's the best way to collect real code examples for a patterns document?

The best way to collect real code examples is to run an automated repository discovery scan. This process identifies actual conventions and requires collecting at least three examples per domain to ensure accuracy.