infisical-sync-skill
Skill này làm gì
Skill này cung cấp tham chiếu API và hướng dẫn an toàn để làm việc với secret trong kho Infisical tự lưu trữ, gồm đăng nhập bằng danh tính máy và liệt kê secret. Nó dành cho nhà phát triển giữ thông tin xác thực trong kho bảo mật.
Khi nào nên dùng
- ✓Khi bạn cần liệt kê, đọc hoặc cập nhật secret được lưu trong kho Infisical.
- ✓Khi agent của bạn phải đăng nhập Infisical bằng danh tính máy.
- ✓Khi một lời gọi API Infisical thất bại và bạn cần hiểu lỗi.
Liên kết skill
https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-hands/bundled/infisical-sync/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Liệt kê tên secret trong môi trường staging Infisical của chúng tôi để tôi so sánh với file cấu hình.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill hướng dẫn đăng nhập bằng client ID và client secret để lấy một token ngắn hạn, rồi gọi các endpoint secret cho đúng dự án và môi trường.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Infisical Sync Expert Knowledge
1. Infisical API Reference
Base URL
All requests go to $INFISICAL_URL. This is the self-hosted instance base URL, e.g. https://infisical.example.com.
Authentication — Universal Auth
Infisical uses Machine Identities with Universal Auth for agent-to-agent communication.
Endpoint: POST /api/v1/auth/universal-auth/login
Request:
{
"clientId": "<INFISICAL_CLIENT_ID>",
"clientSecret": "<INFISICAL_CLIENT_SECRET>"
}
Response (success):
{
"accessToken": "eyJ...",
"expiresIn": 7200,
"accessTokenMaxTTL": 43200,
"tokenType": "Bearer"
}
curl example:
RESPONSE=$(curl -s -X POST "$INFISICAL_URL/api/v1/auth/universal-auth/login" \
-H "Content-Type: application/json" \
-d "{\"clientId\":\"$INFISICAL_CLIENT_ID\",\"clientSecret\":\"$INFISICAL_CLIENT_SECRET\"}")
ACCESS_TOKEN=$(echo "$RESPONSE" | python3 -c "import sys,json; print(json.load(sys.stdin)['accessToken'])")
Token lifetime: expiresIn seconds (usually 7200 = 2 hours). Re-authenticate when expired.
List Secrets
Endpoint: GET /api/v4/secrets
Query parameters:
| Param | Required | Description |
|---|---|---|
projectId |
Yes | Infisical project ID |
environment |
Yes | Environment slug (e.g. prod, staging, dev) |
secretPath |
No | Path prefix, default / |
includeImports |
No | Include imported secrets, default false |
recursive |
No | Include secrets in sub-paths, default false |
curl example:
curl -s -X GET \
"$INFISICAL_URL/api/v4/secrets?projectId=$PROJECT_ID&environment=$ENVIRONMENT&secretPath=/" \
-H "Authorization: Bearer $ACCESS_TOKEN"
Response shape:
{
"secrets": [
{
"id": "uuid",
"version": 1,
"secretKey": "DATABASE_URL",
"secretValue": "postgres://...",
"secretComment": "",
"environment": "prod",
"workspace": "uuid"
}
],
"imports": []
}
Parse with:
echo "$RESPONSE" | python3 -c "
import sys, json
data = json.load(sys.stdin)
for s in data.get('secrets', []):
print(s['secretKey'])
"
Create or Update a Secret
The API does not provide a single upsert endpoint. POST creates only (returns 409 if the secret already exists); PATCH updates only (returns 404 if missing). Use the create-then-update pattern:
Step 1 — Try to create (POST)
Endpoint: POST /api/v4/secrets/{secretName}
Request body:
{
"projectId": "<PROJECT_ID>",
"environment": "<ENV>",
"secretValue": "<VALUE>",
"secretPath": "/"
}
HTTP_STATUS=$(curl -s -o /tmp/infisical_response.json -w "%{http_code}" \
-X POST "$INFISICAL_URL/api/v4/secrets/$SECRET_NAME" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"projectId\":\"$PROJECT_ID\",\"environment\":\"$ENVIRONMENT\",\"secretValue\":\"$SECRET_VALUE\",\"secretPath\":\"/\"}")
Returns 201 on success.
Step 2 — If 409, update via PATCH
Endpoint: PATCH /api/v4/secrets/{secretName}
if [ "$HTTP_STATUS" = "409" ]; then
HTTP_STATUS=$(curl -s -o /tmp/infisical_response.json -w "%{http_code}" \
-X PATCH "$INFISICAL_URL/api/v4/secrets/$SECRET_NAME" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"projectId\":\"$PROJECT_ID\",\"environment\":\"$ENVIRONMENT\",\"secretValue\":\"$SECRET_VALUE\",\"secretPath\":\"/\"}")
fi
Returns 200 on success. Any other status code is an error.
Important: URL-encode the secret name if it contains special characters.
Delete a Secret
Endpoint: DELETE /api/v4/secrets/{secretName}
Query parameters: projectId, environment, secretPath (default /)
curl example:
curl -s -X DELETE \
"$INFISICAL_URL/api/v4/secrets/$SECRET_NAME?projectId=$PROJECT_ID&environment=$ENVIRONMENT&secretPath=/" \
-H "Authorization: Bearer $ACCESS_TOKEN"
List Accessible Projects (Workspaces)
Endpoint: GET /api/v1/workspace
curl -s -X GET "$INFISICAL_URL/api/v1/workspace" \
-H "Authorization: Bearer $ACCESS_TOKEN"
Response: { "workspaces": [{ "id": "uuid", "name": "...", "environments": [...] }] }
2. HTTP Error Codes
| Code | Meaning | Action |
|---|---|---|
| 200/201 | Success | Continue |
| 400 | Bad Request | Log the response body — likely malformed JSON or missing |
Câu hỏi thường gặp
Tôi có cần danh tính máy không?
Có. Skill dùng Universal Auth với client ID và client secret để đăng nhập.
Token đăng nhập tồn tại bao lâu?
Skill ghi chú token thường tồn tại khoảng hai giờ, sau đó agent phải đăng nhập lại.
Địa chỉ kho lấy từ đâu?
Đó là địa chỉ Infisical tự lưu trữ của bạn, mà skill đọc từ biến môi trường.
Chi tiết
Mô tả gốc của tác giả
Expert knowledge for the Infisical Sync Hand — Infisical API reference, vault operations, error patterns, security guidance
repo: RightNow-AI/openfang
Độ phổ biến
- Sao GitHub
- 18k
- Vị trí xếp hạng
- #10656
- Giấy phép
- Apache-2.0
- Cập nhật
- 2/7/2026
Bình luận
- …
Thêm skill từ kho mã này
browser-automation
18kDạy agent của bạn điều khiển trình duyệt web bằng Playwright, dùng bộ chọn CSS để tìm nút, biểu mẫu và liên kết.
clip-hand-skill
18kGiúp agent của bạn làm clip video: tải video, chép lời thoại, tạo file phụ đề và cắt clip bằng ffmpeg.
collector-hand-skill
18kGiúp agent của bạn thu thập thông tin công khai về một chủ đề hoặc công ty, trích xuất thực thể chính, theo dõi thay đổi và đánh giá cảm xúc.
lead-hand-skill
18kGiúp agent của bạn tìm và chấm điểm khách hàng tiềm năng bằng cách tìm kiếm trên web, làm giàu thông tin công ty và loại bỏ trùng lặp.
Skill tương tự
reverse-engineer-anything
422kGiúp agent của bạn xem bên trong các app và package đã phát hành để giải thích tính năng, so sánh phiên bản hoặc hướng dẫn dựng lại bằng công cụ REA.
1password
394kGiúp agent của bạn cài đặt CLI của 1Password, đăng nhập, và đọc hoặc đưa thông tin bí mật vào mà không in giá trị ra cuộc trò chuyện.
healthcheck
394kGiúp agent của bạn rà soát bảo mật máy tính hoặc máy chủ đang chạy OpenClaw, như SSH, tường lửa, cập nhật và sao lưu, rồi đề xuất cách sửa an toàn.