Token导航 LogoToken导航

Agent Skill · 研究检索

portable-tools(便携式工具)

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

portable-tools 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证为 MIT,暂无第三方扫描结果,按安装量在研究检索类的 73,675 个 Skill 里排第 5,679。

总安装 24,769周安装 642GitHub Stars 公开资料未说明下载 6,528核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:portable-tools(便携式工具)
来源仓库:https://github.com/clawdbot/skills
仓库路径:skills/portable-tools
安装命令:
npx skills add clawdbot/skills --skill "portable-tools"
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

AgentSkills.tonpx skills
npx skills add clawdbot/skills --skill "portable-tools"

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

portable-tools 用于查找、检索和筛选相关信息,支持多宿主环境。可根据任务需求快速定位工具或资源。通过 npx skills add clawdbot/skills --skill "portable-tools" 安装使用。注意检查其是否涉及联网、命令执行或文件系统访问。

适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/portable-tools

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add clawdbot/skills --skill "portable-tools";命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

portable-tools 怎么安装?

在终端执行 npx skills add clawdbot/skills --skill "portable-tools"。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

portable-tools 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

portable-tools 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

portable-tools 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

portable-tools 用的人多吗?

公开数据是累计安装 24,769 次,近一周安装 642 次,下载 6,528 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

portable-tools 安全吗?

没有查到第三方扫描结果,安全性无法从公开资料判断,安装前请自行审查源码、依赖和命令行为。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 没有第三方扫描结果,安全性只能靠自己读源码判断。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 要求有安全扫描结论才肯安装的团队。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
portable-tools

便携式工具 · 本页

24,769—接触敏感数据MIT未收录

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
portable-tools
description
Build cross-device tools without hardcoding paths or account names

Portable Tools - Cross-Device Development Methodology

Methodology for building tools that work across different devices, naming schemes, and configurations. Based on lessons from OAuth refresher debugging session (2026-01-23).

Core Principle

Never assume your device is the only device.

Your local setup is just one of many possible configurations. Build for the general case, not the specific instance.


The Three Questions (Before Writing Code)

1. "What varies between devices?"

Before writing any code that reads configuration, data, or credentials:

Ask:

  • File paths? (macOS vs Linux, different home dirs)
  • Account names? (user123 vs default vs oauth)
  • Service names? (slight variations in spelling/capitalization)
  • Data structure? (different versions, different formats)
  • Environment? (different shells, different tools available)

Example from OAuth refresher:

  • ❌ Assumed: Account is always "claude"
  • ✅ Reality: Could be "claude", "Claude Code", "default", etc.

Action: List variables, make them configurable or auto-discoverable


2. "How do I prove this works?"

Before claiming success:

Require:

  • Concrete BEFORE state (exact values)
  • Concrete AFTER state (exact values)
  • Proof they're different (side-by-side comparison)

Example from OAuth refresher:

BEFORE:
- Access Token: POp5z1fi...eSN9VAAA
- Expires: 1769189639000

AFTER:
- Access Token: 01v0RrFG...eOE9QAA ✅ Different
- Expires: 1769190268000 ✅ Extended

Action: Always show data transformation with real values


3. "What happens when it breaks?"

Before pushing to production:

Test:

  • Wrong configuration (intentionally break config)
  • Missing data (remove expected fields)
  • Multiple entries (ambiguous case)
  • Edge cases (empty values, special characters)

Example from OAuth refresher:

  • Test with keychain_account: "wrong-name" → Fallback should work
  • Test with incomplete keychain data → Should fail gracefully with helpful error

Action: Test failure modes, not just happy path


Mandatory Patterns

Pattern 1: Explicit Over Implicit

❌ Wrong:

# Ambiguous - returns first match
security find-generic-password -s "Service" -w

✅ Correct:

# Explicit - returns specific entry
security find-generic-password -s "Service" -a "account" -w

Rule: If a command can be ambiguous, make it explicit.


Pattern 2: Validate Before Use

❌ Wrong:

DATA=$(read_config)
USE_VALUE="$DATA"  # Hope it's valid

✅ Correct:

DATA=$(read_config)
if ! validate_structure "$DATA"; then
    error "Invalid data structure"
fi
USE_VALUE="$DATA"

Rule: Never assume data has expected structure.


Pattern 3: Fallback Chains

❌ Wrong:

ACCOUNT="claude"  # Hardcoded

✅ Correct:

# Try configured → Try common → Error with help
ACCOUNT="${CONFIG_ACCOUNT}"
if ! has_data "$ACCOUNT"; then
    for fallback in "claude" "default" "oauth"; do
        if has_data "$fallback"; then
            ACCOUNT="$fallback"
            break
        fi
    done
fi
[[ -z "$ACCOUNT" ]] && error "No account found. Tried: ..."

Rule: Provide automatic fallbacks for common variations.


Pattern 4: Helpful Errors

❌ Wrong:

[[ -z "$TOKEN" ]] && error "No token"

✅ Correct:

[[ -z "$TOKEN" ]] && error "No token found

Checked:
- Config: $CONFIG_FILE
- Field: $FIELD_NAME
- Expected: { \"tokens\": { \"refresh\": \"...\" } }

Verify with:
  cat $CONFIG_FILE | jq '.tokens'
"

Rule: Error messages should help user diagnose and fix.


Debugging Methodology (Patrick's Approach)

Step 1: Get Exact Data

Don't ask: "Is it broken?" Ask: "What exact values do you see? How many entries exist? Which one has the data?"

Example:

# Vague
"Check keychain"

# Specific
"Run: security find-generic-password -l 'Service' | grep 'acct'"
"Tell me: 1. How many entries 2. Which has tokens 3. Last modified"

Step 2: Prove With Concrete Examples

Don't say: "It should work now" Show: "Here's the BEFORE token (POp5z...), here's AFTER (01v0R...), they're different"

Template:

BEFORE:
- Field1: <exact_value>
- Field2: <exact_value>

AFTER:
- Field1: <new_value> ✅ Changed
- Field2: <new_value> ✅ Changed

PROOF: Values are different

Step 3: Think Cross-Device Immediately

Don't think: "Works on my machine" Think: "What if their setup differs in [X]?"

Checklist:

  • [ ] Different account names?
  • [ ] Different file paths?
  • [ ] Different tools/versions?
  • [ ] Different permissions?
  • [ ] Different data formats?

Pre-Flight Checklist (Before Publishing)

Discovery Phase

  • [ ] List all external dependencies (files, commands, services)
  • [ ] Document what each dependency provides
  • [ ] Identify which parts could vary between devices

Implementation Phase

  • [ ] Make variations configurable (with sensible defaults)
  • [ ] Add validation for each input
  • [ ] Build fallback chains for common variations
  • [ ] Add --dry-run or --test mode

Testing Phase

  • [ ] Test with correct config → Should work
  • [ ] Test with wrong config → Should fallback or fail gracefully
  • [ ] Test with missing data → Should give helpful error
  • [ ] Test with multiple entries → Should handle ambiguity

Documentation Phase

  • [ ] Document default assumptions
  • [ ] Document how to verify local setup
  • [ ] Document common variations and how to handle them
  • [ ] Include data flow diagram
  • [ ] Add troubleshooting section

Real-World Example: OAuth Refresher

Original (Broken)

# Assumes single entry, no validation, no fallback
KEYCHAIN_DATA=$(security find-generic-password -s "Service" -w)
REFRESH_TOKEN=$(echo "$KEYCHAIN_DATA" | jq -r '.refreshToken')
# Use token (hope it's valid)

Problems:

  • Returns first alphabetical match (wrong entry)
  • No validation (could be empty/malformed)
  • No fallback (fails if account name differs)

Fixed (Portable)

# Explicit account with validation and fallback
validate_data() {
    echo "$1" | jq -e '.claudeAiOauth.refreshToken' > /dev/null 2>&1
}

# Try configured account
DATA=$(security find-generic-password -s "$SERVICE" -a "$ACCOUNT" -w 2>&1)
if validate_data "$DATA"; then
    log "✓ Using account: $ACCOUNT"
else
    log "⚠ Trying fallback accounts..."
    for fallback in "claude" "Claude Code" "default"; do
        DATA=$(security find-generic-password -s "$SERVICE" -a "$fallback" -w 2>&1)
        if validate_data "$DATA"; then
            ACCOUNT="$fallback"
            log "✓ Found data in: $fallback"
            break
        fi
    done
fi

[[ -z "$DATA" ]] || ! validate_data "$DATA" && error "No valid data found
Tried accounts: $ACCOUNT, claude, Claude Code, default
Verify with: security find-generic-password -l '$SERVICE'"

REFRESH_TOKEN=$(echo "$DATA" | jq -r '.claudeAiOauth.refreshToken')

Improvements:

  • ✅ Explicit account parameter
  • ✅ Validates data structure
  • ✅ Automatic fallback to common names
  • ✅ Helpful error with verification command

Common Anti-Patterns

Anti-Pattern 1: "Works On My Machine"

FILE="/Users/patrick/.config/app.json"  # Hardcoded path

Fix: Use $HOME, detect OS, or make configurable


Anti-Pattern 2: "Hope It's There"

TOKEN=$(cat config.json | jq -r '.token')
# What if .token doesn't exist? Script continues with empty value

Fix: Validate before using

TOKEN=$(cat config.json | jq -r '.token // empty')
[[ -z "$TOKEN" ]] && error "No token in config"

Anti-Pattern 3: "First Match Is Right"

# If multiple entries exist, which one?
ENTRY=$(find_entry "service")

Fix: Be explicit or enumerate all

ENTRY=$(find_entry "service" "account")  # Specific
# OR
ALL=$(find_all_entries "service")
for entry in $ALL; do
    validate_and_use "$entry"
done

Anti-Pattern 4: "Silent Failures"

process_data || true  # Ignore errors

Fix: Fail loudly with context

process_data || error "Failed to process
Data: $DATA
Expected: { ... }
Check: command_to_verify"

Integration With Existing Workflows

With sprint-plan.md

Add to testing section:

## Cross-Device Testing
- [ ] Test with different account names
- [ ] Test with wrong config values
- [ ] Test with missing data
- [ ] Document fallback behavior

With PRIVACY-CHECKLIST.md

Add before publishing:

## Portability Check
- [ ] No hardcoded paths (use $HOME, detect OS)
- [ ] No hardcoded names (use config or fallback)
- [ ] Validation on all inputs
- [ ] Helpful errors for common issues

With skill-creator

When building new skills:

  1. List what varies between devices
  2. Make it configurable or auto-discoverable
  3. Test with wrong config
  4. Document troubleshooting

Quick Reference Card

Before writing code:

  1. What varies between devices?
  2. How do I prove this works?
  3. What happens when it breaks?

Mandatory patterns:

  • Explicit over implicit
  • Validate before use
  • Fallback chains
  • Helpful errors

Testing:

  • Correct config → Works
  • Wrong config → Fallback or helpful error
  • Missing data → Clear diagnostic

Documentation:

  • Data flow diagram
  • Common variations
  • Troubleshooting guide

Success Criteria

A tool is portable when:

  1. ✅ Works on different devices without modification
  2. ✅ Auto-discovers common variations in setup
  3. ✅ Fails gracefully with actionable error messages
  4. ✅ Can be debugged by reading the error output
  5. ✅ Documentation covers "what if my setup differs"

Test: Give it to someone with a different setup. If they need to ask you questions, the tool isn't portable yet.


Origin Story

This methodology emerged from debugging the OAuth refresher (2026-01-23):

  • Script read wrong keychain entry (didn't specify account)
  • Assumed single entry existed (multiple did)
  • No validation (used empty data)
  • No fallback (failed on different account names)

Patrick's approach:

  1. Asked for exact data (how many entries, which has tokens)
  2. Demanded proof (show BEFORE/AFTER tokens)
  3. Thought cross-device (what if naming differs?)

Result: Tool went from single-device/broken to universal/production-ready.

Key insight: The bugs weren't in the logic - they were in the assumptions.


When To Use This Skill

Use when:

  • Building tools that read system configuration
  • Working with keychains, credentials, environment variables
  • Creating scripts that run on multiple machines
  • Publishing skills to ClawdHub (others will use them)

Apply:

  1. Before implementing: Answer the three questions
  2. During implementation: Use mandatory patterns
  3. Before testing: Run pre-flight checklist
  4. After testing: Document variations and troubleshooting

Remember: Your device is just one case. Build for the general case.

平台分布

windsurf

28.04%
按下载量换算1,830

Codex

20.56%
按下载量换算1,342

trae

18.57%
按下载量换算1,212

OpenCode

13.12%
按下载量换算856

Cursor

7.2%
按下载量换算470

Claude Code

3.27%
按下载量换算213

安全审计

暂无安全审计结果可展示。

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

继续浏览同类 Skills