一键导入
find-patterns
Find existing code patterns, conventions, and copy-ready examples in the codebase for a given feature or concept
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Find existing code patterns, conventions, and copy-ready examples in the codebase for a given feature or concept
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | find-patterns |
| description | Find existing code patterns, conventions, and copy-ready examples in the codebase for a given feature or concept |
| metadata | {"phase":"orient","input":"feature, pattern, or concept to find examples of","output":"code snippets, naming conventions, file organization patterns, and recommended approach based on what exists","dependencies":"graphify, codebase-memory-mcp"} |
Find existing implementations, conventions, and code examples to model after when building something new.
Use this skill when the user:
topic: $ARGUMENTS — feature, pattern, or concept to find examples of
# WORKSPACE → Context Loading, matching Tier 1 on Keywords against topiccore_docs_dir files — they may already document the convention you're looking forThis skill only reads indexes — it never builds them. Building is the codebase-indexing
skill's job. If an index is missing, fall back immediately; don't block on a build.
Try graphify first (semantic pattern clustering):
.docs/indexing/graphify/ exists and try a graph queryStep 1b: Try codebase-memory-mcp:
index_status, then search_graph()codebase-indexing)topic (e.g., "all components handling payments")get_code_snippet(qualified_name, range) if available to pull exact codesearch_graph(label_pattern, qn_pattern) to find similar classes, functions, and patternsquery_graph(query) for structural pattern queries (e.g., "all classes matching X pattern")search_code(pattern) to find text patterns across codebaseget_code_snippet(qualified_name, range) to extract complete examples with precise line ranges## Pattern Analysis: [topic]
### Similar Implementations Found
#### Example 1: [Name]
**Location**: `path/to/file.rb`
**Pattern**: [brief structural description]
**Code Example**:
[relevant snippet]
#### Example 2: [Name]
...
### Conventions Observed
#### Naming Patterns
- Models: ...
- Jobs: ...
- Lib classes: ...
- Specs: ...
#### File Organization
[directory tree showing pattern]
#### Testing Patterns
[example spec structure]
### Recommended Approach for [topic]
Based on existing patterns:
1. Create X in `path/`
2. Add Y following Z convention
3. ...
### Reusable Components
- `path/to/file.rb` — what can be reused and how
Create GitHub pull requests — picks the most token-efficient available method (gh CLI, GitHub MCP, or git push), and sources the PR body from an existing spec/plan instead of re-analyzing the diff
Prime — load project context by reading docs, the docs_context layer, core docs, and TODO before starting any task
Feature planning — research codebase, design options, write a structured spec/implementation plan to the project specs directory
Generate feature documentation by analyzing code changes and specifications — creates markdown docs in docs/core/ with conditional context
Bootstrap any project's AI workspace — detect the current tool, extract hardcoded paths from skill/command/agent files, write a central workspace.md, update all files to use config keys
Build or refresh the codebase graph indexes (codebase-memory-mcp structural index + graphify semantic graph) that other skills read from. The single writer — idempotent, incremental, safe to call repeatedly.