Token导航 LogoToken导航TokenDH.com
研究检索可写文件github未标认证来源可访问许可证需确认审计通过

analyze-codebase-workflow分析代码库工作流程

Agent Skill

analyze-codebase-workflow 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

408

周安装

17

GitHub Stars

12

下载量

136
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:analyze-codebase-workflow(分析代码库工作流程)
来源仓库:https://github.com/pjt222/development-guides
仓库路径:skills/analyze-codebase-workflow
安装命令:
npx skills add https://github.com/pjt222/development-guides --skill analyze-codebase-workflow
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/pjt222/development-guides --skill analyze-codebase-workflow

简介

用于自动检测仓库中的数据流、文件 I/O 和脚本依赖关系。

  • 生成结构化标注计划,支持 PUT 注解的批量添加。
  • 适用于不熟悉代码库的数据管道梳理阶段。
  • 安装命令:npx skills add https://github.com/pjt222/development-guides --skill analyze-codebase-workflow。
  • 需提供仓库路径和可选的子目录聚焦范围参数。

SKILL.md

Analyze Codebase Workflow

Survey an arbitrary repository to auto-detect data flows, file I/O, and script dependencies, then produce a structured annotation plan for manual refinement.

When to Use

  • Onboarding onto an unfamiliar codebase and need to understand data flow
  • Starting putior integration in a project that has no PUT annotations yet
  • Auditing an existing project's data pipeline before documentation
  • Preparing an annotation plan before running annotate-source-files

Inputs

  • Required: Path to the repository or source directory to analyze
  • Optional: Specific subdirectories to focus on (default: entire repo)
  • Optional: Languages to include or exclude (default: all detected)
  • Optional: Detection scope: inputs only, outputs only, or both (default: both + dependencies)

Procedure

Step 1: Survey Repository Structure

Identify source files and their languages to understand 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()

Use file listing to understand 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

Expected: A list of file extensions present in the repo, with counts. Map these against get_supported_extensions() to know coverage.

On failure: If the repo has no files matching supported extensions, putior cannot auto-detect workflows. Consider whether the language is supported but files use non-standard extensions.

Step 2: Check Language Detection Coverage

For each detected language, verify auto-detection pattern availability.

# 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)
  ))
}

Expected: Pattern counts printed for each language. R has 124 patterns, Python 159, JavaScript 71, etc.

On failure: If a language returns no patterns, it supports manual annotations but not auto-detection. Plan to annotate those files manually.

Step 3: Run Auto-Detection

Execute put_auto() on the target directory to 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)))

For large repos, analyze subdirectories incrementally:

# Analyze specific subdirectories
etl_workflow <- put_auto("./src/etl/")
api_workflow <- put_auto("./src/api/")

Expected: A data frame with columns including id, label, input, output, source_file. Each row represents a detected workflow step.

On failure: If the result is empty, the source files may not contain recognizable I/O patterns. Try enabling debug logging: workflow <- put_auto("./src/", log_level = "DEBUG") to see which files are scanned and which patterns match.

Step 4: Generate Initial Diagram

Visualize the auto-detected workflow to assess coverage and identify 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")

Expected: A Mermaid flowchart showing detected nodes connected by data flow edges. Nodes should be labeled with meaningful function/file names.

On failure: If the diagram shows disconnected nodes, the auto-detection found I/O patterns but couldn't infer connections. This is normal — connections are derived from matching output filenames to input filenames. The annotation plan (next step) will address gaps.

Step 5: Produce Annotation Plan

Generate a structured plan documenting what was found and what needs manual annotation.

# 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")

Document the plan with 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)

Expected: A clear plan separating auto-detected files from those needing manual annotation, with specific recommendations for each file.

On failure: If put_generate() produces no output, ensure the directory path is correct and contains source files in supported languages.

Validation

  • put_auto() executes without errors on the target directory
  • Detected workflow has at least one node (unless repo has no recognizable I/O)
  • put_diagram() produces valid Mermaid code from the auto-detected workflow
  • put_generate() produces annotation suggestions for files with detected patterns
  • Annotation plan document created with coverage assessment

Common Pitfalls

  • Scanning too broadly: Running put_auto(".") on a repo root may include node_modules/, .git/, venv/, etc. Target specific source directories.
  • Expecting full coverage: Auto-detection finds file I/O and library calls, not business logic. A 40-60% coverage rate is typical; the rest needs manual annotation.
  • Ignoring dependencies: The detect_dependencies = TRUE flag catches source(), import, require() calls that link scripts together. Disabling it loses cross-file connections.
  • Language mismatch: Files with non-standard extensions (e.g., .R vs .r, .jsx vs .js) may not be detected. Use get_comment_prefix() to check if an extension is recognized. Note that extensionless files like Dockerfile and Makefile are supported via exact filename matching.
  • Large repos: For repos with 100+ source files, analyze by module/directory to keep diagrams readable.

Related Skills

  • install-putior — prerequisite: putior must be installed first
  • annotate-source-files — next step: add manual annotations based on the plan
  • generate-workflow-diagram — generate final diagram after annotation is complete
  • configure-putior-mcp — use MCP tools for interactive analysis sessions

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.73%
按下载量换算47

Claude

28.35%
按下载量换算39

Cursor

18.51%
按下载量换算25

Gemini CLI

10.13%
按下载量换算14

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

可写文件

该 Skill 可能写入或修改本地文件,使用前需要确认目标目录和修改范围。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills