Help us improve
Share bugs, ideas, or general feedback.
From peterpme-skills
Learn, record, audit, and apply codebase patterns consistently using a repo-local pattern registry. Acts as a structured approach to preserving continuity, checking drift, and fixing inconsistencies across a repository.
npx claudepluginhub peterpme/skillsHow this skill is triggered — by the user, by Claude, or both
Slash command
/peterpme-skills:continuity [learn|check|fix|ci] [pattern-name-or-paths][learn|check|fix|ci] [pattern-name-or-paths]The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use this skill to preserve codebase continuity: identify canonical local patterns, record their source of truth, audit similar code for drift, and apply the pattern consistently elsewhere.
Scans codebase to discover coding patterns and update draft/guardrails.md with learned conventions and anti-patterns. Supports migration from workflow.md and pattern promotion.
Analyzes codebase to create or update .conventions/ directory with gold standards, anti-patterns, and checks for naming, imports, and patterns. Use for setting up coding standards or bootstrapping new projects.
Extracts existing project coding conventions (naming, file structure, error handling, testing, imports, API design, async patterns) and enforces them on new code. Produces a code style map in memory/patterns.md.
Share bugs, ideas, or general feedback.
Use this skill to preserve codebase continuity: identify canonical local patterns, record their source of truth, audit similar code for drift, and apply the pattern consistently elsewhere.
Patterns include structural conventions such as:
Use a repo-local registry for durable decisions. Prefer:
.agents/continuity/patterns.md
If that file is absent and a legacy registry exists at .devin/continuity/patterns.md, read the legacy file before auditing. When updating or migrating decisions, write the canonical registry to .agents/continuity/patterns.md unless the user or repo rules require another path.
Always read the registry before auditing or changing code. If it does not exist, create it from this shape:
# Continuity Patterns
This file records source-of-truth examples and continuity rules for this repo.
## Active Patterns
### Pattern: <kebab-case-name>
- **Status:** active | draft | deprecated
- **Scope:** <paths/globs where this applies>
- **Enforcement:** changed-files | full-repo | advisory
- **Default check:** changed-files | provided-paths | full-repo
- **Source of truth:**
- `<path>` - <why this file is canonical>
- **Applies to:**
- `<path/glob>`
- **Do not apply to:**
- `<path/glob>` - <reason>
- **Rule summary:** <one-paragraph description>
- **Required shape:**
- <observable rule>
- **Allowed variations:**
- <intentional exception>
- **Severity:**
- high: <rule that should block changed files or CI>
- medium: <rule that should be fixed when touching the area>
- low: <advisory cleanup>
- **Baseline exceptions:**
- `<path/glob>` - <known legacy drift or reason it is excluded from CI>
- **Violation signals:**
- <searchable symptom or AST-ish shape>
- **CI behavior:** <what should fail in automation>
- **Fix strategy:** <safe mechanical fix or refactor sequence>
- **Open questions:**
- <question to ask before enforcing>
When you learn a pattern or resolve uncertainty, update the registry immediately so future runs inherit the decision.
Infer the mode from the request:
learn <pattern-name> <paths...>: inspect examples, infer the pattern, ask focused questions when needed, then record it.check [pattern-name] [paths...]: report violations only. Do not edit files.fix [pattern-name] [paths...]: audit and apply safe fixes. Ask before broad, risky, or ambiguous refactors.ci [pattern-name] [paths...]: deterministic report-only audit suitable for automation. Do not edit files. Follow each pattern's CI behavior; default to changed-file enforcement when a full-repo baseline has known legacy drift.check unless the user asks to apply, fix, migrate, enforce, or record a pattern.changed-files or has baseline exceptions, do not present legacy drift as a CI blocker unless it overlaps changed/provided files.AGENTS.md, package-level AGENTS.md, and any relevant local skills or rules discovered near the files.When applying a React or React Native navigation pattern, do not interpret "thin screen" as "extract the entire screen body into a new *Content component." Prefer the smallest change that makes the screen match the local pattern:
*Screen.tsx file should usually keep the screen implementation and export exactly one default screen component.DustContent, <ScreenName>Content, or similar one-off wrappers only to reduce line count or move all JSX elsewhere.screenLayout or route-level layout for shared screen wrappers such as ExchangeScreenContainer; avoid repeating wrapper components inside every screen when React Navigation can own the layout.When invoked as learn or when asked to identify a new pattern:
AGENTS.md files.Pattern: section in the registry.Good questions are concrete:
I found two bottom sheet shapes:
1. packages/app-mobile/src/app/exchange/components/.../ExampleA.tsx
2. packages/app-mobile/src/app/wallet/components/.../ExampleB.tsx
Which one should continuity treat as canonical, and should it apply to both exchange and wallet?
When invoked as check or ci:
Default check: changed-files, audit files from git diff --name-only origin/master...HEAD or the user's stated base branch.Default check: full-repo, audit the full pattern scope.Enforcement is not full-repo.rg, fd, or glob searches based on:
ci, end with a stable summary:CONTINUITY_RESULT: pass|fail
PATTERNS_CHECKED: <n>
VIOLATIONS: <n>
BLOCKING_VIOLATIONS: <n>
Do not edit files in check or ci mode.
When invoked as fix or when the user asks to apply a pattern:
Use targeted commands, adapting paths and terms to the repo:
rg -n '<canonical-name>|<import>|<violation-signal>' <scope> --glob '*.{ts,tsx,js,jsx}'
fd '<file-or-folder-pattern>' <scope>
Prefer narrower searches based on the requested pattern and scope.
Be direct and actionable. Do not dump raw search results. Always distinguish:
If no violations are found, say:
Continuity check passed for <pattern/scope>.