技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
project-analyze【数据与研究】This skill should be used when the user asks to "analyze project structure", "explain this codebase", "show dependencies", "find high-risk files", "assess refactor impact", "understand architecture", or run ProjectMind for local codebase analysis.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Codex CLI: Invoke when the description matches, or manually with
$project-analyze. No hooks or background auto-run.
Automatically invoke this Skill when:
ProjectMind Intelligence provides:
ProjectMind is a local static-analysis workflow. Do not call external model
CLIs, legacy long-context wrappers, hybrid_intelligent_system.py,
hybrid_intelligent_system_v2.py, hybrid_intelligent_system_v3.py, or any
external AI advisor as part of this skill. Use the local knowledge graph output
plus direct repository inspection by Codex.
When this Skill is invoked:
Identify:
$(pwd) or user-specified pathIMPORTANT: Execute the local ProjectMind knowledge graph scanner before
answering architecture, dependency, risk, or impact questions. Prefer python3,
fall back to python, and allow PROJECTMIND_HOME to override the default
install path.
PROJECT_PATH="[project_path]"
PROJECTMIND_HOME="${PROJECTMIND_HOME:-/Users/WangQiao/claude-enhanced-quality}"
PYTHON_BIN="${PYTHON_BIN:-$(command -v python3 || command -v python || true)}"
if [ -z "$PYTHON_BIN" ]; then
echo "ProjectMind error: no python3 or python interpreter found" >&2
exit 1
fi
"$PYTHON_BIN" "$PROJECTMIND_HOME/project_mind.py" "$PROJECT_PATH"
If project path is not specified, use current directory:
PROJECT_PATH="$(pwd)"
PROJECTMIND_HOME="${PROJECTMIND_HOME:-/Users/WangQiao/claude-enhanced-quality}"
PYTHON_BIN="${PYTHON_BIN:-$(command -v python3 || command -v python || true)}"
if [ -z "$PYTHON_BIN" ]; then
echo "ProjectMind error: no python3 or python interpreter found" >&2
exit 1
fi
"$PYTHON_BIN" "$PROJECTMIND_HOME/project_mind.py" "$PROJECT_PATH"
Use the scanner output as structured evidence. For query-specific details that
the summary does not contain, inspect the repository directly with rg,
rg --files, find, sed, and targeted file reads.
Do not use the legacy hybrid intelligent system entrypoints. They delegate to external model tooling and are outside this skill's current execution model.
Format the output as:
## 🧠 Project Intelligence Analysis
**Query**: [User's Question]
**Project**: [Project Path]
**Analysis Time**: [Cached/40s] ⚡
### 📊 Project Overview
- **Total Files**: XXX
- **Lines of Code**: XXX,XXX
- **Main Technologies**: [React, TypeScript, Node.js, etc.]
- **Architecture Pattern**: [MVC, Microservices, Monolith, etc.]
### 🎯 Answer to Your Question
[Direct answer to the user's specific question based on ProjectMind output and targeted local code inspection]
### 🏗️ Architecture Insights
**Module Structure**:
Core Modules: ├── [Module 1] (XX files, core business logic) ├── [Module 2] (XX files, data layer) └── [Module 3] (XX files, API layer)
Supporting Modules: ├── [Utils] (XX files) └── [Components] (XX files)
**Key Relationships**:
- [Module A] depends heavily on [Module B]
- [File X] is central hub (XX dependencies)
- [Component Y] is isolated (low coupling)
### ⚠️ High-Risk Areas
| File/Module | Risk Level | Reason | Dependencies |
|-------------|------------|--------|--------------|
| [Path 1] | 🔴 Critical | Core auth logic, 45 dependencies | 45 files |
| [Path 2] | 🟠 High | Payment processing | 32 files |
| [Path 3] | 🟡 Medium | Complex business rules | 18 files |
### 💡 Recommendations
**If Planning Changes**:
1. **[Specific Module]**
- Files Affected: XX files
- Risk Level: [Low/Medium/High]
- Test Requirements: [Unit/Integration/E2E]
- Estimated Effort: X hours
2. **[Another Module]**
- Impact: [Detailed impact analysis]
- Mitigation: [How to reduce risk]
**Architecture Improvements**:
- [Specific decoupling opportunity]
- [Specific pattern improvement]
- [Specific technical debt reduction]
### 🔍 Dependency Visualization
```mermaid
graph TD
A[Core Module] --> B[Feature 1]
A --> C[Feature 2]
B --> D[Util 1]
C --> D
B --> E[DB Layer]
C --> E
(Note: Mermaid diagram representing key dependencies)
Before modifying [specific file/module]:
### Step 4: Provide Actionable Guidance
Offer specific next steps:
- Code locations to examine
- Tests to run before changes
- Files to backup before refactoring
- Team members to consult (if AI annotations present)
## Examples
### Example 1: Understanding Architecture
**User**: "Explain how the authentication system works"
**Execute**:
```bash
PROJECT_PATH="$(pwd)"
PROJECTMIND_HOME="${PROJECTMIND_HOME:-/Users/WangQiao/claude-enhanced-quality}"
PYTHON_BIN="${PYTHON_BIN:-$(command -v python3 || command -v python || true)}"
"$PYTHON_BIN" "$PROJECTMIND_HOME/project_mind.py" "$PROJECT_PATH"
Present: Architecture explanation with module relationships, file paths, and authentication flow diagram, using ProjectMind output plus targeted rg searches for authentication entry points.
User: "I want to refactor the database layer, what's the impact?"
Execute:
PROJECT_PATH="$(pwd)"
PROJECTMIND_HOME="${PROJECTMIND_HOME:-/Users/WangQiao/claude-enhanced-quality}"
PYTHON_BIN="${PYTHON_BIN:-$(command -v python3 || command -v python || true)}"
"$PYTHON_BIN" "$PROJECTMIND_HOME/project_mind.py" "$PROJECT_PATH"
Present: Impact analysis showing affected files, risk assessment, and refactoring strategy, verified with local dependency/file searches.
User: "What are the most critical files in this project?"
Execute:
PROJECT_PATH="$(pwd)"
PROJECTMIND_HOME="${PROJECTMIND_HOME:-/Users/WangQiao/claude-enhanced-quality}"
PYTHON_BIN="${PYTHON_BIN:-$(command -v python3 || command -v python || true)}"
"$PYTHON_BIN" "$PROJECTMIND_HOME/project_mind.py" "$PROJECT_PATH"
Present: List of high-risk files with dependency counts, complexity scores, and business criticality.
The system automatically caches:
Cache updates when:
Recognizes and utilizes:
/*@ai:risk=1-5|deps=file1,file2|core=true|chain=auth*/
Annotation fields:
risk: 1 (safe) to 5 (critical)deps: Key dependenciescore: Core functionality flagchain: Business logic chain identifierapi: API type (internal/external)auth: Authentication requirements/Users/WangQiao/claude-enhanced-quality
or another path supplied through PROJECTMIND_HOMEDO NOT use legacy hybrid scripts (hybrid_intelligent_system.py,
hybrid_intelligent_system_v2.py, or hybrid_intelligent_system_v3.py) - they
delegate to external model tooling and are deprecated for this skill.
If the local ProjectMind scan fails:
python3 or python is available with command -v python3 || command -v python$PROJECTMIND_HOME/project_mind.py exists, defaulting to /Users/WangQiao/claude-enhanced-quality/project_mind.pyrg, rg --files, and targeted file reads