analyze-codebase-workflow
정보
이 스킬은 putior의 `put_auto()` 엔진을 사용하여 코드베이스를 자동으로 분석하여 워크플로우, 데이터 파이프라인, 파일 의존성을 탐지합니다. 30개 이상의 언어에 걸친 I/O 패턴을 매핑하는 어노테이션 계획을 생성하며, 온보딩이나 putior 통합 시작에 이상적입니다. 익숙하지 않은 프로젝트의 데이터 흐름을 이해하거나 소스 파일 어노테이션 준비를 위해 활용하세요.
빠른 설치
Claude Code
추천npx skills add pjt222/agent-almanac -a claude-code/plugin add https://github.com/pjt222/agent-almanacgit clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/analyze-codebase-workflowClaude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요
문서
Analyze Codebase Workflow
Survey repo → auto-detect data flows, file I/O, script deps → structured annotation plan for manual refinement.
Use When
- Onboard unfamiliar codebase → understand data flow
- Start putior integration, no PUT annotations
- Audit existing data pipeline pre-doc
- Prep annotation plan before
annotate-source-files
In
- Required: Path to repo/src dir
- Optional: Subdirs focus (default: entire repo)
- Optional: Langs include/exclude (default: all detected)
- Optional: Scope: inputs only, outputs only, both (default: both + deps)
Do
Step 1: Survey Repo Structure
Identify src files + langs → what putior can analyze.
library(putior)
# List all supported languages and their extensions
list_supported_languages()
list_supported_languages(detection_only = TRUE) # Only languages with auto-detection
# Get supported extensions
exts <- get_supported_extensions()
File listing → repo composition:
# Count files by extension in the target directory
find /path/to/repo -type f | sed 's/.*\.//' | sort | uniq -c | sort -rn | head -20
→ File extensions in repo + counts. Map against get_supported_extensions() → coverage.
If err: No files match supported → putior can't auto-detect. Check if lang supported but non-standard ext.
Step 2: Check Detection Coverage
Per detected lang → verify auto-detect pattern available.
# Check which languages have auto-detection patterns (18 languages, 902 patterns)
detection_langs <- list_supported_languages(detection_only = TRUE)
cat("Languages with auto-detection:\n")
print(detection_langs)
# Get pattern counts for specific languages found in the repo
for (lang in c("r", "python", "javascript", "sql", "dockerfile", "makefile")) {
patterns <- get_detection_patterns(lang)
cat(sprintf("%s: %d input, %d output, %d dependency patterns\n",
lang,
length(patterns$input),
length(patterns$output),
length(patterns$dependency)
))
}
→ Pattern counts printed. R 124, Python 159, JS 71, etc.
If err: No patterns → supports manual only, not auto. Plan manual annotations.
Step 3: Run Auto-Detection
Execute put_auto() → discover workflow elements.
# Full auto-detection
workflow <- put_auto("./src/",
detect_inputs = TRUE,
detect_outputs = TRUE,
detect_dependencies = TRUE
)
# Exclude build scripts and test helpers from scanning
workflow <- put_auto("./src/",
detect_inputs = TRUE,
detect_outputs = TRUE,
detect_dependencies = TRUE,
exclude = c("build-", "test_helper")
)
# View detected workflow nodes
print(workflow)
# Check node count
cat(sprintf("Detected %d workflow nodes\n", nrow(workflow)))
Large repos → analyze subdirs incrementally:
# Analyze specific subdirectories
etl_workflow <- put_auto("./src/etl/")
api_workflow <- put_auto("./src/api/")
→ Df w/ id, label, input, output, source_file cols. Row = detected step.
If err: Empty → src may lack recognizable I/O patterns. Try workflow <- put_auto("./src/", log_level = "DEBUG") → see scanned + matched.
Step 4: Initial Diagram
Visualize auto-detected → assess coverage + gaps.
# Generate diagram from auto-detected workflow
cat(put_diagram(workflow, theme = "github"))
# With source file info for traceability
cat(put_diagram(workflow, show_source_info = TRUE))
# Save to file for review
writeLines(put_diagram(workflow, theme = "github"), "workflow-auto.md")
→ Mermaid flowchart, detected nodes + data flow edges. Meaningful fn/file labels.
If err: Disconnected nodes → auto-detect found I/O but couldn't infer connections. Normal — matching output → input filenames. Annotation plan next step fills.
Step 5: Annotation Plan
Generate plan → what found + what needs manual.
# Generate annotation suggestions
put_generate("./src/", style = "single")
# For multiline style (more readable for complex workflows)
put_generate("./src/", style = "multiline")
# Copy suggestions to clipboard for easy pasting
put_generate("./src/", output = "clipboard")
Doc plan w/ coverage assessment:
## Annotation Plan
### Auto-Detected (no manual work needed)
- `src/etl/extract.R` — 3 inputs, 2 outputs detected
- `src/etl/transform.py` — 1 input, 1 output detected
### Needs Manual Annotation
- `src/api/handler.js` — Language supported but no I/O patterns matched
- `src/config/setup.sh` — Only 12 shell patterns; complex logic missed
### Not Supported
- `src/legacy/process.f90` — Fortran not in detection languages
### Recommended Connections
- extract.R output `data.csv` → transform.py input `data.csv` (auto-linked)
- transform.py output `clean.parquet` → load.R input (needs annotation)
→ Clear plan: auto-detected vs manual, specific recs per file.
If err: put_generate() no out → verify path correct + has supported src files.
Check
-
put_auto()no err on target - Detected workflow has ≥1 node (unless no recognizable I/O)
-
put_diagram()produces valid Mermaid -
put_generate()produces suggestions for detected files - Annotation plan doc created w/ coverage assessment
Traps
- Scan too broad:
put_auto(".")→ includesnode_modules/,.git/,venv/. Target specific src dirs. - Expect full coverage: Auto-detect finds I/O + lib calls, not business logic. 40-60% typical; rest manual.
- Ignore deps:
detect_dependencies = TRUEcatchessource(),import,require()→ links scripts. Disable → lose cross-file connections. - Lang mismatch: Non-standard ext (
.Rvs.r,.jsxvs.js) may not detect. Useget_comment_prefix(). ExtensionlessDockerfile,Makefilesupported via filename match. - Large repos: 100+ src files → analyze by module/dir → diagrams readable.
→
install-putior— prereqannotate-source-files— next: add manualgenerate-workflow-diagram— final after annotationconfigure-putior-mcp— MCP tools for interactive
GitHub 저장소
연관 스킬
executing-plans
디자인executing-plans 스킬은 검토 체크포인트가 포함된 통제된 배치로 실행할 완전한 구현 계획이 있을 때 사용합니다. 이 스킬은 계획을 불러와 비판적으로 검토한 후, 소규모 배치(기본값 3개 작업)로 작업을 실행하면서 각 배치 사이에 진행 상황을 아키텍트 검토를 위해 보고합니다. 이를 통해 내재된 품질 관리 체크포인트를 갖춘 체계적인 구현이 보장됩니다.
requesting-code-review
디자인이 스킬은 코드 변경 사항을 요구 사항에 따라 분석하기 위해 코드 리뷰어 하위 에이전트를 호출합니다. 작업 완료 후, 주요 기능 구현 후, 또는 메인 브랜치에 병합하기 전에 사용해야 합니다. 이 리뷰는 현재 구현체와 원래 계획을 비교하여 문제를 조기에 발견하는 데 도움이 됩니다.
connect-mcp-server
디자인이 스킬은 개발자들이 HTTP, stdio 또는 SSE 전송 방식을 통해 MCP 서버를 Claude Code에 연결하는 포괄적인 가이드를 제공합니다. GitHub, Notion 및 사용자 정의 API와 같은 외부 서비스를 통합하기 위한 설치, 구성, 인증 및 보안을 다룹니다. MCP 통합 설정, 외부 도구 구성 또는 Claude의 모델 컨텍스트 프로토콜 작업 시 활용하세요.
web-cli-teleport
디자인이 스킬은 작업 분석을 기반으로 개발자가 Claude Code 웹 인터페이스와 CLI 인터페이스 중 선택할 수 있도록 돕고, 두 환경 간 원활한 세션 텔레포트를 가능하게 합니다. 웹, CLI 또는 모바일 환경 전환 시 세션 상태와 컨텍스트를 관리하여 워크플로를 최적화합니다. 다양한 단계에서 서로 다른 도구가 필요한 복잡한 프로젝트에 사용하세요.
