一键导入
codebase-pattern-mining
Research an external codebase to extract design patterns, then produce a tiered analysis of what's adaptable to the current project.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Research an external codebase to extract design patterns, then produce a tiered analysis of what's adaptable to the current project.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Architecture map and patterns for the Lumi-Ops VS Code extension. Read this FIRST before touching any extension source file.
Capture this session's repeatable process into a reusable skill. Call at end of the process you want to capture with an optional description.
Use this skill when you need documentation for a third-party library, SDK, or API before writing code that uses it — for example, "use the OpenAI API", "call the Stripe API", "use the Anthropic SDK", "query Pinecone", or any time the user asks you to write code against an external service and you need current API reference. Fetch the docs with chub before answering, rather than relying on training knowledge.
| name | codebase-pattern-mining |
| description | Research an external codebase to extract design patterns, then produce a tiered analysis of what's adaptable to the current project. |
| when_to_use | Use when the user wants to study an external codebase or project to find transferable patterns, architecture ideas, or best practices. Examples: 'research X for patterns', 'analyze X codebase', 'see what we can learn from X', 'mine patterns from X', 'what can we borrow from X', '研究一下X有什麼可以借鑑的'. |
| argument-hint | [source_path] [optional focus area] |
| arguments | ["source_path","focus"] |
Analyze an external codebase to extract transferable design patterns, then produce a tiered report mapping each pattern to the current project.
$source_path: Path to the external codebase to analyze$focus: (Optional) Area of focus — e.g. "agent coordination", "plugin system", "testing patterns"Produce a structured analysis artifact that:
The skill ends at the report — it does NOT execute any changes.
Survey the target codebase to understand its architecture:
list_dir the root and key directoriesview_file on entry points, config files, and READMEgrep_search for patterns related to $focus (if provided)If the user has provided prior analysis (e.g. a resolved artifact), read that first to avoid redundant work.
Rules:
Success criteria: You can describe the source project's architecture, key modules, and design philosophy.
Identify transferable patterns and categorize into three tiers:
| Tier | Criteria | Examples |
|---|---|---|
| Tier 1 | High ROI, low-to-medium effort, directly applicable | Prompt improvements, config patterns |
| Tier 2 | Medium ROI, requires some adaptation | Workflow changes, new abstractions |
| Tier 3 | Interesting but significant effort or unclear value | Architecture overhauls, new systems |
For each pattern, document:
Rules:
$focus is provided, prioritize patterns in that areaSuccess criteria: A curated list of 5-12 patterns across tiers, each with source evidence.
For each extracted pattern, identify:
Rules:
Success criteria: Each pattern has a concrete mapping to our project with file paths and open questions.
Create an artifact with the complete analysis, structured as:
# Pattern Mining: [Source Project Name]
## Executive Summary
What the source project is, what we focused on, key takeaways (3-5 sentences).
## Tier 1 — High Priority
### [Pattern Name]
- **Source**: how they do it (with file paths)
- **Our project**: current state
- **Gap**: what's missing
- **Proposed change**: what to do and where
- **Effort**: low / medium / high
- **Open questions**: decisions for the user
## Tier 2 — Medium Priority
(same structure)
## Tier 3 — Future Consideration
(same structure)
## Open Questions Summary
Consolidated list of all decisions needed from the user.
Rules:
Success criteria: A complete, well-structured analysis artifact has been presented to the user.