install-putior
关于
This skill installs and configures the putior R package for workflow visualization, handling both CRAN and GitHub installations along with optional dependencies. It verifies the complete annotation-to-diagram pipeline to ensure proper setup. Use it for initial setup, environment preparation, or when downstream skills require 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/install-putior在 Claude Code 中复制并粘贴此命令以安装该技能
技能文档
Putiorのインストール
Install the putior R package and its optional dependencies so the annotation-to-diagram pipeline is ready to use.
使用タイミング
- Setting up putior for the first time in a project or environment
- Preparing a machine for workflow visualization tasks
- A downstream skill (analyze-codebase-workflow, generate-workflow-diagram) requires putior to be installed
- Restoring an environment after an R version upgrade or renv wipe
入力
- 必須: Access to an R installation (>= 4.1.0)
- 任意: Whether to install from CRAN (default) or GitHub dev version
- 任意: Which optional dependency groups to install: MCP (
mcptools,ellmer), interactive (shiny,shinyAce), logging (logger), ACP (plumber2)
手順
ステップ1: Verify R Installation
Confirm R is available and meets the minimum version requirement.
R.Version()$version.string
# Must be >= 4.1.0
# From WSL with Windows R
"/mnt/c/Program Files/R/R-4.5.2/bin/Rscript.exe" -e "cat(R.version.string)"
期待結果: R version string printed, >= 4.1.0.
失敗時: Install or upgrade R. On Windows, download from https://cran.r-project.org/bin/windows/base/. On Linux, use sudo apt install r-base.
ステップ2: Install putior
Install from CRAN (stable) or GitHub (dev).
# CRAN (recommended)
install.packages("putior")
# GitHub dev version (if latest features needed)
remotes::install_github("pjt222/putior")
期待結果: Package installs without errors. library(putior) loads silently.
失敗時: If CRAN installation fails with "not available for this version of R", use the GitHub version. If GitHub fails, check that remotes is installed: install.packages("remotes").
ステップ3: Install Optional Dependencies
Install optional packages based on required functionality.
# MCP server integration (for AI assistant access)
remotes::install_github("posit-dev/mcptools")
install.packages("ellmer")
# Interactive sandbox
install.packages("shiny")
install.packages("shinyAce")
# Structured logging
install.packages("logger")
# ACP server (agent-to-agent communication)
install.packages("plumber2")
期待結果: Each package installs without errors.
失敗時: For mcptools, ensure remotes is installed first. For system dependency errors on Linux, install the required libraries (e.g., sudo apt install libcurl4-openssl-dev for httr2 dependency).
ステップ4: Verify Installation
Run the basic pipeline to confirm everything works.
library(putior)
# Check package version
packageVersion("putior")
# Verify core functions are available
stopifnot(
is.function(put),
is.function(put_auto),
is.function(put_diagram),
is.function(put_generate),
is.function(put_merge),
is.function(put_theme)
)
# Test basic pipeline with a temp file
tmp <- tempfile(fileext = ".R")
writeLines("# put id:'test', label:'Hello putior'", tmp)
cat(put_diagram(put(tmp)))
期待結果: Mermaid flowchart code printed to console containing test and Hello putior.
失敗時: If put is not found, the package did not install correctly. Reinstall with install.packages("putior", dependencies = TRUE). If the diagram is empty, verify the temp file was created and the annotation syntax uses single quotes inside double quotes.
重要:カスタムパレットは MCP 経由では使用できません。
put_diagramのpaletteパラメータは、put_theme()で作成されたputior_themeR オブジェクトを受け付けます。MCP は JSON 経由で通信するため、putior_themeのような R オブジェクトを MCP 境界を超えてシリアライズすることはできません。MCP 経由でput_diagramを呼び出す場合は、代わりに文字列ベースのthemeパラメータを使用してください(例:theme = "viridis")。カスタムパレットの場合は、R セッション内で直接put_theme()とput_diagram(palette = ...)を呼び出してください。
主要なデフォルト値:すべてのスキャン関数(
put()、put_auto()、put_generate()、put_merge())はデフォルトでrecursive = TRUEとなっており、サブディレクトリを自動的にスキャンします。これは 0.2.0 以前のバージョン(デフォルトがFALSEだった)からの破壊的変更です。すべてのスキャン関数はまた、正規表現ベースのファイルフィルタリング用のexcludeパラメータも受け付けます(例:put("./src/", exclude = "test_"))。
オプションの shiny パッケージがインストールされている場合は、インタラクティブサンドボックスを試してください:
putior::run_sandbox()
これにより、PUT アノテーション構文を実験してリアルタイムでレンダリングされた図を確認できるブラウザベースのエディタが起動します。
バリデーション
-
library(putior)loads without errors -
packageVersion("putior")returns a valid version -
put()with a file containing a valid PUT annotation returns a data frame with one row -
put_diagram()produces Mermaid code starting withflowchart - All requested optional dependencies load without errors
よくある落とし穴
- Wrong quote nesting: PUT annotations use single quotes inside the annotation:
id:'name', notid:"name"(which conflicts with the comment string delimiter in some contexts). - Missing Pandoc for vignettes: If you plan to build putior's vignettes locally, ensure
RSTUDIO_PANDOCis set in.Renviron. - renv isolation: If the project uses renv, you must install putior inside the renv library. Run
renv::install("putior")instead ofinstall.packages("putior"). - GitHub rate limits: Installing
mcptoolsfrom GitHub may fail without aGITHUB_PAT. Set one viausethis::create_github_token().
関連スキル
analyze-codebase-workflow— next step after installation to survey a codebaseconfigure-putior-mcp— set up the MCP server after installing optional depsmanage-renv-dependencies— manage putior within an renv environmentconfigure-mcp-server— general MCP server configuration
GitHub 仓库
相关推荐技能
content-collections
元Content Collections 是一个 TypeScript 优先的构建工具,可将本地 Markdown/MDX 文件转换为类型安全的数据集合。它专为构建博客、文档站和内容密集型 Vite+React 应用而设计,提供基于 Zod 的自动模式验证。该工具涵盖从 Vite 插件配置、MDX 编译到生产环境部署的完整工作流。
polymarket
元这个Claude Skill为开发者提供完整的Polymarket预测市场开发支持,涵盖API调用、交易执行和市场数据分析。关键特性包括实时WebSocket数据流,可监控实时交易、订单和市场动态。开发者可用它构建预测市场应用、实施交易策略并集成实时市场预测功能。
creating-opencode-plugins
元该Skill帮助开发者创建OpenCode插件,用于接入命令、文件、LSP等25+种事件。它提供了插件结构、事件API规范和JavaScript/TypeScript实现模式,适合需要拦截操作、扩展功能或自定义事件处理的场景。开发者可通过它快速构建响应式模块来增强OpenCode AI助手的能力。
sglang
元SGLang是一个专为LLM设计的高性能推理框架,特别适用于需要结构化输出的场景。它通过RadixAttention前缀缓存技术,在处理JSON、正则表达式、工具调用等具有重复前缀的复杂工作流时,能实现极速生成。如果你正在构建智能体或多轮对话系统,并追求远超vLLM的推理性能,SGLang是理想选择。
