ソース情報
- リポジトリ
- Automattic/jetmon
- ソースの最終更新活動
- 2026年2月20日 22:58
- 検出された SKILL.md の言語
- 英語
- スター
- 17
- フォーク
- 4
インストール方法
デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。
ソースファイルを確認
インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。
メニュー
デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。
インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
直接コマンドでは確認用 Prompt が省略されます。実行前にソースを確認してください。
npx skills add https://github.com/Automattic/jetmon --skill rebuild-addonコマンドは1行のまま表示されます。コピー前に横へスクロールして全体を確認してください。
ローカルで確認しますか?SkillsMP が現在取得できるファイルをダウンロードできます。
SOC 職業分類に基づく
SKILL.md を表示中
| name | rebuild-addon |
| description | Rebuild the C++ native addon after making changes to http_checker.cpp |
| allowed-tools | Bash(npm run*), Bash(node-gyp*), Bash(docker*), Bash(cp*), Bash(ls*), Read, Glob, Grep |
Use this skill after making changes to the C++ native addon (src/http_checker.cpp or src/http_checker.h).
/rebuild-addon - Rebuild the addon and restart Jetmon/rebuild-addon docker - Rebuild inside Docker container/rebuild-addon test - Rebuild and run a quick testnpm run rebuild-run
This runs node-gyp rebuild, copies the addon to lib/, and starts Jetmon.
node-gyp rebuild
cp build/Release/jetmon.node lib/
node lib/jetmon.js
docker compose exec jetmon npm run rebuild-run
Or manually inside the container:
docker compose exec jetmon bash
cd /jetmon
node-gyp rebuild
cp build/Release/jetmon.node lib/
node lib/jetmon.js
After building, verify the addon loads correctly:
node -e "require('./lib/jetmon.node'); console.log('Addon loaded successfully');"
Create a test script:
// lib/test-addon.js
var checker = require( './jetmon.node' );
checker.http_check( 'https://wordpress.com', 80, 0, function( index, rtt, http_code, error_code ) {
console.log( 'Index:', index );
console.log( 'RTT (microseconds):', rtt );
console.log( 'HTTP Code:', http_code );
console.log( 'Error Code:', error_code );
process.exit( 0 );
});
Run it:
node lib/test-addon.js
index: The index passed to the check (0 in this case)rtt: Round-trip time in microsecondshttp_code: HTTP response code (200 for success)error_code: 0 for success, non-zero for errors| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Connection failed |
| 2 | Timeout |
| 3 | SSL error |
| 4 | DNS resolution failed |
| 5 | Too many redirects |
| File | Purpose |
|---|---|
src/http_checker.cpp | Main HTTP checking implementation |
src/http_checker.h | Header with class definition |
binding.gyp | Node-gyp build configuration |
Missing OpenSSL headers:
fatal error: openssl/ssl.h: No such file or directory
Solution: Install OpenSSL development package:
# macOS
brew install openssl
# Ubuntu/Debian
apt-get install libssl-dev
Node version mismatch: If you see ABI version errors, clean and rebuild:
node-gyp clean
node-gyp rebuild
Addon not found:
Error: Cannot find module './jetmon.node'
Solution: Copy the built addon:
cp build/Release/jetmon.node lib/
Symbol errors: Usually indicates Node.js version changed. Rebuild the addon.
In src/http_checker.cpp, set:
#define DEBUG_MODE 1
Debug output goes to stderr.
For memory leaks, use Valgrind (Linux):
valgrind --leak-check=full node lib/jetmon.js
The binding.gyp file configures the build:
{
"targets": [{
"target_name": "jetmon",
"sources": ["src/http_checker.cpp"],
"include_dirs": ["<!(node -e \"require('nan')\")"],
"libraries": ["-lssl", "-lcrypto"]
}]
}
Key settings: