claude_code_public_skills / where-am-i
CLAUDE.md9 starsChanged 4 months agoMITView on GitHub
本文件提供 AI 开发助手在处理此项目时的指引。 Where Am I 是一个查询当前位置和本机公网 IP 地址的命令行工具。核心特点是*无需运行时依赖*,使用 Node.js 18+ 内置的 fetch API。 run.js - 实现以下功能: 1. 解析命令行参数 2. 调用 cip.cc API 获取 IP 信息 3. 解析响应数据 4. 格式化输出 cip.cc 返回的原始格式: 解析使用正则表达式:/^([^:]+?)\s*:\s*(.+)$/ 打包文件版本号格式:YYMMDD.HHmmSS 由 build.js 自动生成并注入到打包文件,同时更新 SKILL.md 中的 skill_version 字段。 A: 在 run.js 中添加新的获取函数,类似于 getIpInfo(),然后合并结果。 A: 可以使用环境变量 HTTP_PROXY 和 HTTPS_PROXY,Node.js fetch 会自动使用。 A: 可以在文件系统中创建 .cache.json,记录上次查询时间和结果,避免频繁请求。
- Installs packages
In this repository64 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- cmo-weather-query/CLAUDE.mdCLAUDE.md
- db_client/CLAUDE.mdCLAUDE.md
- deepseek-search/CLAUDE.mdCLAUDE.md
- documents_ripgrep/CLAUDE.mdCLAUDE.md
- excel-alasql/CLAUDE.mdCLAUDE.md
- game_mahjong_agent/CLAUDE.mdCLAUDE.md
- gaode_map/CLAUDE.mdCLAUDE.md
- magpie-image-gen/CLAUDE.mdCLAUDE.md
- ms_office_x_editer/CLAUDE.mdCLAUDE.md
- ssh2-node/CLAUDE.mdCLAUDE.md
- use_http_mcp/CLAUDE.mdCLAUDE.md
- 88chaSkill
- agent-browserSkill
- baidu-search-nodejsSkill
- brz-repair-manual-querySkill
- cmo-weather-querySkill
- db-clientSkill
- deepseek-searchSkill
- dianping-searchSkill
- doc-readerSkill
- documents-ripgrepSkill
- drawio-nodejsSkill
- excel-alasqlSkill
- figma-code-connectSkill
- figma-create-design-system-rulesSkill
- figma-create-new-fileSkill
- figma-generate-designSkill
- figma-generate-librarySkill
- figma-implement-designSkill
- figma-useSkill
- file-code-boxSkill
- financialSkill
- game-mahjong-agentSkill
- gaode-mapSkill
- gitea-apiSkill
- happy-agent-easySkill
- hindsightSkill
- jina-readerSkill
- kavita-liteSkill
- magpie-image-genSkill
- magpie-toolsSkill
- makepad-evolutionSkill
- markitdown-pdfSkill
- memos-nodeSkill
- mind-map-skillSkill
- ms-office-x-editerSkill
- nexus3-skillSkill
- obsidian-basesSkill
- obsidian-cliSkill
- json-canvasSkill
- ocr-toolSkill
- opencode-go-usageSkill
- sendmailSkill
- siyuan-apiSkill
- smb-clientSkill
- ssh2-nodeSkill
- use-http-mcpSkill
- website-security-scanSkill
- where-am-iSkill
- The first 60 shown.
The file
Files
CLAUDE.md
本文件提供 AI 开发助手在处理此项目时的指引。
项目概述
Where Am I 是一个查询当前位置和本机公网 IP 地址的命令行工具。核心特点是无需运行时依赖,使用 Node.js 18+ 内置的 fetch API。
核心功能
- 查询公网 IP 地址
- 获取地理位置(省/市)
- 显示 ISP 运营商信息
- 多种输出格式(表格、JSON、简洁)
常用命令
安装与构建
# 安装依赖
pnpm install
# 运行开发版本
node run.js
# 构建独立脚本
npm run build
# 运行构建版本
node skill.js测试
# 测试基本输出
node skill.js
# 测试 JSON 输出
node skill.js --json
# 测试简洁输出
node skill.js --simple核心架构
主入口文件
run.js - 实现以下功能:
- 解析命令行参数
- 调用 cip.cc API 获取 IP 信息
- 解析响应数据
- 格式化输出
数据解析逻辑
cip.cc 返回的原始格式:
IP : 203.0.113.1
地址 : 中国 上海 上海
运营商 : 电信
数据二 : 中国上海上海 | 电信
数据三 : 中国上海上海市 | 电信
URL : http://www.cip.cc/203.0.113.1解析使用正则表达式:/^([^:]+?)\s*:\s*(.+)$/
输出格式
- 默认格式 - 带颜色的表格输出
- JSON 格式 - 便于程序解析
- 简洁格式 - 仅输出 IP 地址
- 原始格式 - 保留原始结构
开发规范
版本号规则
打包文件版本号格式:YYMMDD.HHmmSS
由 build.js 自动生成并注入到打包文件,同时更新 SKILL.md 中的 skill_version 字段。
代码风格
- 使用 async/await 处理 fetch Promise
- 所有选项使用双横线命名(--json, --simple)
- 错误处理要友好且具体
- 支持 ANSI 颜色提升可读性
与其他 skill 的关系
| 本项目 | 相关项目 |
| IP 信息查询 | use-http-mcp (HTTP 请求工具) |
| 网络信息 | agent-browser (浏览器自动化) |
目录结构
get_my_ip/
├── SKILL.md # 技能定义(LLM 使用)
├── CLAUDE.md # 本文件
├── README.md # 用户文档
├── package.json # 依赖配置
├── build.js # 打包脚本
├── run.js # 主入口文件
└── skill.js # 打包后的独立文件API 说明
cip.cc API
- 端点:
http://cip.cc - 方法: GET
- 返回: 纯文本格式
- 认证: 不需要
- 限制: 免费使用,建议勿频繁请求
响应字段
| 字段 | 说明 | 示例 |
| IP | 公网 IP 地址 | 203.0.113.1 |
| 地址 | 地理位置 | 中国 上海 上海 |
| 运营商 | ISP 信息 | 电信 |
| 数据二 | 备用数据源 | 中国上海上海 | 电信 |
| 数据三 | 备用数据源 | 中国上海上海市 | 电信 |
| URL | 查询 URL | http://www.cip.cc/203.0.113.1 |
常见问题处理
Q: 如何添加更多 IP 信息源?
A: 在 run.js 中添加新的获取函数,类似于 getIpInfo(),然后合并结果。
Q: 如何支持代理查询?
A: 可以使用环境变量 HTTP_PROXY 和 HTTPS_PROXY,Node.js fetch 会自动使用。
Q: 如何添加缓存?
A: 可以在文件系统中创建 .cache.json,记录上次查询时间和结果,避免频繁请求。
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

