技能 codebase-mapping
🗺️

codebase-mapping

低风险 📁 文件系统访问

映射程式碼庫結構與相依性

理解不熟悉的程式碼庫既耗時又容易出錯。此技能可生成完整的儲存庫結構映射、相依關係圖和進入點,以加速您的分析。

支持: Claude Codex Code(CC)
📊 69 充足
1

下载技能 ZIP

2

在 Claude 中上传

前往 设置 → 功能 → 技能 → 上传技能

3

开启并开始使用

测试它

正在使用“codebase-mapping”。 Map the structure of my FastAPI project

预期结果:

  • Repository: my-fastapi-app
  • Structure Summary:
  • - 23 Python modules across 4 packages
  • - Primary entry: app/main.py
  • - Core packages: routers, models, services, utils
  •  
  • Key Files for Analysis:
  • - Types: models/user.py, models/product.py
  • - Execution: services/database.py
  • - Config: app/config.py
  •  
  • External Dependencies: fastapi, sqlalchemy, pydantic, uvicorn

正在使用“codebase-mapping”。 Analyze the frontend directory for React components

预期结果:

  • Frontend Structure:
  • - 45 TypeScript components
  • - Entry: src/index.tsx
  • - Component hierarchy: App → Pages → Features → UI
  •  
  • Key Dependencies:
  • - react, react-dom, react-router
  • - UI library: component-library
  • - State: zustand, react-query

安全审计

低风险
v5 • 1/17/2026

Static scanner generated false positives due to pattern matching without semantic understanding. The skill only reads files within a specified directory to analyze code structure, excludes build/cache directories, and outputs JSON results. No network calls, code execution, or credential access detected. A prior audit (2026-01-10) correctly assessed this as low risk.

3
已扫描文件
660
分析行数
2
发现项
5
审计总数
低风险问题 (1)
Broad filesystem access within target directory
The script recursively reads files in the target repository for analysis. Necessary for codebase mapping. Excludes node_modules, .git, __pycache__, and other build directories.

风险因素

📁 文件系统访问 (1)
审计者: claude 查看审计历史 →

质量评分

45
架构
100
可维护性
85
内容
21
社区
88
安全
91
规范符合性

你能构建什么

分析舊版系統架構

映射舊版程式碼庫以了解模組邊界並建立現代化計畫

快速導覽新程式碼庫

透過識別關鍵檔案和相依性,在不熟悉的儲存庫中快速定位

記錄程式碼架構

生成程式碼庫組織的結構化文件供團隊參考

试试这些提示

基本結構映射
Map the structure of /path/to/repo and show me the main entry points and key dependencies
相依性分析
Analyze the dependency graph for src/ directory and identify circular dependencies
進入點探索
Identify all executable entry points in this codebase and their purposes
架構概覽
Generate a comprehensive map of this codebase focusing on types, execution engines, and tool interfaces

最佳实践

  • 從分析中排除建置目錄和相依性,以專注於原始碼
  • 使用生成的關鍵檔案清單來優先檢查哪些模組
  • 結合其他分析技能以獲得更深入的架構見解

避免

  • 分析 node_modules 或 vendor 目錄會產生雜訊並減慢分析速度
  • 在未先理解輸出格式的情況下對生產程式碼庫執行
  • 假設所有進入點都會自動偵測 - 需要手動驗證

常见问题

此技能分析哪些檔案類型?
目前支援 Python (.py) 和 JavaScript/TypeScript (.js, .ts, .jsx, .tsx) 檔案
它如何處理大型儲存庫?
此技能限制目錄遍歷深度並排除常見的建置/快取目錄以提升效能
我可以將此整合到我的 CI/CD 流程嗎?
是的,此指令碼輸出 JSON,可以被解析並用於自動化工作流程
我的程式碼安全嗎?它會對外傳送資料嗎?
所有分析都在本機進行。不會將程式碼或中繼資料傳輸到系統外部
如果它遺漏了某些相依性怎麼辦?
動態匯入和僅執行時期的相依性可能無法被偵測。請將靜態分析結果作為起點
這與標準的 tree 命令有何不同?
除了檔案結構外,它還分析匯入、識別進入點並建立相依關係圖

开发者详情

文件结构