skills/council/craftsman/pattern-analysis/SKILL.md
Use when auditing codebase patterns or evaluating proposed changes for convention consistency. Covers file naming, component patterns, data fetching, state management, and type conventions. Do not use for test plan design or coverage targets (use testing-strategy).
npx skillsauth add dtsong/my-claude-setup pattern-analysisInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Audit the codebase for existing patterns and conventions, then evaluate proposed changes for consistency.
No user-provided values are used in commands or file paths. All inputs are treated as read-only analysis targets.
Document discovered conventions:
| Category | Convention | Example File | Frequency | |----------|-----------|--------------|-----------| | File naming | ... | ... | ... | | Component style | ... | ... | ... | | Data fetching | ... | ... | ... | | State management | ... | ... | ... | | Error handling | ... | ... | ... | | Type definitions | ... | ... | ... | | Import ordering | ... | ... | ... | | Comment style | ... | ... | ... | | Testing patterns | ... | ... | ... |
For each proposed change, check:
src/components/ExampleComponent.tsxsrc/hooks/useExampleHook.tsCompaction resilience: If context is compacted mid-task, re-read this Procedure section and continue from the next incomplete step.
| Category | Pattern | Example File | Frequency | Status |
|----------|---------|--------------|-----------|--------|
| File naming | kebab-case components | src/components/team-card.tsx | High | Standard |
| Data fetching | useQuery hooks | src/hooks/use-teams.ts | High | Standard |
| ... | ... | ... | ... | ... |
| Proposed Change | Existing Pattern | Match? | Recommendation | |----------------|-----------------|--------|----------------| | ... | ... | Yes/No | ... |
development
Use when the council needs to surface organizational knowledge buried across multiple internal sources (wikis, design docs, ADRs, past tickets, postmortems, chat archives, code repos). Plans where to look, what to cross-reference, and how to synthesize findings into evidence the council can act on. Do not use for external market research (use competitive-analysis), library evaluation (use library-evaluation), or technology trend assessment (use technology-radar).
testing
Use to convert a Word .docx file to PDF and/or verify its page count. Triggers on: converting docx to pdf, rendering a document, checking how many pages a docx produces, or asserting a page-count constraint (e.g. a resume must stay 2 pages). Wraps LibreOffice headless conversion.
development
Security audit checklist for web applications. Use when reviewing, auditing, or hardening a web app's security posture. Covers rate limiting, auth headers, IP blocking, CORS, security middleware, input validation, file upload limits, ORM usage, and password hashing. Triggers on requests like "review security", "harden this app", "security audit", "check for vulnerabilities", or when building/reviewing API endpoints.
development
Interactive wizard to craft effective prompts using Claude Code best practices