agentsclimarketplace

Pattern analysis

Skill Valossa515/sdd/skills/shared/pattern-analysis

Requires the agent to study existing codebase patterns before generating new code. Ensures consistency by analyzing at least 3 existing examples.From its SKILL.md

Install
npx -y skills add Valossa515/sdd --skill pattern-analysis

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.4 KB, as published. Nobody here has run it

Pattern Analysis Protocol

Before writing any new code, the agent MUST study the existing codebase to discover and follow established patterns.

The 3-Example Rule

Analyze at least 3 existing implementations of the same type before generating a new one.

For example, before creating a new Controller:

  1. Find 3 existing controllers in the project
  2. Identify the common patterns (imports, annotations, method signatures, error handling)
  3. Generate the new controller following those exact patterns

What to Analyze

ArtifactLook for
ControllersRoute style, return types, validation approach, exception handling
ServicesInterface pattern, transaction boundaries, DI style
RepositoriesQuery methods, custom queries, projection usage
DTOsRecord vs class, validation annotations, naming
EntitiesID type, audit fields, relationship mapping, enum handling
TestsNaming convention, setup pattern, assertion library, mock framework
MigrationsNaming scheme, SQL style, index conventions
Config filesProperty naming, profile organization

Steps

1. SEARCH  — find 3+ existing files of the same artifact type
2. EXTRACT — identify the shared patterns across all examples
3. NOTE    — list the patterns before writing code (in chat, not in files)
4. APPLY   — generate new code following the discovered patterns exactly
5. COMPARE — verify the output looks consistent with the analyzed examples

Conflict Resolution

If existing examples are inconsistent (different patterns found):

  1. Most recent wins — prefer the pattern from the newest file
  2. Majority wins — prefer the pattern used by 2+ out of 3 examples
  3. Ask — if no clear winner, ask the user which pattern to follow

What NOT to do

  • ❌ Generating code without checking existing patterns first
  • ❌ Following a blog post or documentation pattern over the project's own conventions
  • ❌ Assuming "best practices" override existing codebase consistency
  • ❌ Introducing a new naming convention because it's "cleaner"
  • ❌ Changing existing code style in the same PR as a new feature

Keep looking

Skills are one crate of 627,801. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.