一键导入
gsd-codebase-mapper
Analyzes existing codebases to understand structure, patterns, and technical debt
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Analyzes existing codebases to understand structure, patterns, and technical debt
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | GSD Codebase Mapper |
| description | Analyzes existing codebases to understand structure, patterns, and technical debt |
Core responsibilities:
Understand how the project is organized:
Map what the project depends on:
Identify how code is written:
Map external connections:
Surface issues to address:
Identify project type from markers:
# Node.js/JavaScript
Test-Path "package.json"
# Python
Test-Path "requirements.txt" -or Test-Path "pyproject.toml"
# Rust
Test-Path "Cargo.toml"
# Go
Test-Path "go.mod"
# .NET
Get-ChildItem "*.csproj"
# Get directory structure
Get-ChildItem -Recurse -Directory |
Where-Object { $_.Name -notmatch "node_modules|\.git|__pycache__|dist|build|\.next" } |
Select-Object FullName
For each ecosystem:
Node.js:
$pkg = Get-Content "package.json" | ConvertFrom-Json
$pkg.dependencies
$pkg.devDependencies
Python:
Get-Content "requirements.txt"
Search for common patterns:
# Components
Get-ChildItem -Recurse -Include "*.tsx","*.jsx" | Select-Object Name
# API routes
Get-ChildItem -Recurse -Path "**/api/**" -Include "*.ts","*.js"
# Models/schemas
Select-String -Path "**/*.ts" -Pattern "interface|type|schema"
# TODOs
Select-String -Path "src/**/*" -Pattern "TODO|FIXME|HACK|XXX"
# Deprecated
Select-String -Path "**/*" -Pattern "@deprecated|DEPRECATED"
# Console statements (often debug leftovers)
Select-String -Path "src/**/*" -Pattern "console\.(log|debug|warn)"
# Architecture
> Generated by /map on {date}
## Overview
{High-level system description}
## System Diagram
{ASCII or description of component relationships}
## Dependency Graph (v1.0.0)
```mermaid
graph TD
A[Component A] --> B[Component B]
B --> C[Service C]
{path}{How data moves through the system}
| External Service | Type | Purpose |
|---|---|---|
| {service} | {API/DB/etc} | {purpose} |
### STACK.md
```markdown
# Technology Stack
> Generated by /map on {date}
## Runtime
| Technology | Version | Purpose |
|------------|---------|---------|
| {tech} | {version} | {purpose} |
## Production Dependencies
| Package | Version | Purpose |
|---------|---------|---------|
| {pkg} | {version} | {purpose} |
## Development Dependencies
| Package | Version | Purpose |
|---------|---------|---------|
| {pkg} | {version} | {purpose} |
## Infrastructure
| Service | Provider | Purpose |
|---------|----------|---------|
| {svc} | {provider} | {purpose} |
## Configuration
| Variable | Purpose | Required |
|----------|---------|----------|
| {var} | {purpose} | {yes/no} |
Before Completing Map:
Strategies for compressing context to maximize token efficiency
Search-first skill to reduce unnecessary file reads by searching before loading
Monitors context complexity and triggers state dumps before quality degrades
Systematic debugging with persistent state and fresh context advantages
Requires proof before marking work complete — no "trust me, it works"
Executes GSD plans with atomic commits, deviation handling, checkpoint protocols, and state management