伊斯兰伴侣:礼拜时间、古兰经与天课 - Openclaw Skills

作者:互联网

2026-04-16

AI教程

什么是 伊斯兰伴侣 (Islamic Companion)?

伊斯兰伴侣是一款高性能、统一的工具集,旨在将精神生活整合到开发人员的环境或 AI 代理的工作流中。通过利用 Openclaw Skills,该工具将多个基本的伊斯兰实用程序(包括精确的礼拜时间计算、斋戒时间表(封斋/开斋)和古兰经经文检索)整合到一个简化的 CLI 界面中。

该工具在设计时充分考虑了效率,具有强大的缓存机制,以最大限度地减少 API 调用并确保快速响应。它支持各种计算方法和教法学派,对于希望在终端环境中工作时保持崇拜进度的全球用户来说,是一个通用的伴侣。

下载入口:https://github.com/openclaw/skills/tree/main/skills/ilmimris/islamic-skills

安装与下载

1. ClawHub CLI

从源直接安装技能的最快方式。

npx clawhub@latest install islamic-skills

2. 手动安装

将技能文件夹复制到以下位置之一

全局模式 ~/.openclaw/skills/ 工作区 /skills/

优先级:工作区 > 本地 > 内置

3. 提示词安装

将此提示词复制到 OpenClaw 即可自动安装。

请帮我使用 Clawhub 安装 islamic-skills。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。

伊斯兰伴侣 (Islamic Companion) 应用场景

  • 通过系统定时任务 (cron jobs) 自动执行每日礼拜通知和提醒。
  • 根据当前金银市场价格动态计算天课起征点 (Nisab)。
  • 在古兰经中进行基于关键词的搜索,用于研究或学习。
  • 为全球任何城市生成本地化的每月礼拜日历。
  • 获取随机的伊斯兰名言,用于每日灵感或终端启动信息。
伊斯兰伴侣 (Islamic Companion) 工作原理
  1. 该工具从集中的 JSON 配置文件中读取用户的地理位置和首选计算设置。
  2. 执行时,CLI 封装器加载必要的环境变量并验证 curl 和 jq 等依赖项。
  3. 从可靠的 API 获取实时信息(如礼拜时间或市场价格)的数据,并缓存在本地以提高性能。
  4. 对于自动化,该工具生成可以集成到系统 crontab 或 Openclaw Skills 工作流中的特定命令。
  5. AI 代理利用提供的意图映射将自然语言请求转换为特定的 CLI 命令以立即执行。

伊斯兰伴侣 (Islamic Companion) 配置指南

要将此实用程序集成到您的 Openclaw Skills 环境中,请遵循以下安装步骤:

  1. 克隆工具库并进入该目录。
  2. 安装所需的 Python 依赖项:
pip install -r requirements.txt
  1. 确保您的系统上安装了 curl。强烈建议安装 jq 以实现更快的 JSON 处理。
  2. skills/islamic-companion/config.json 中自定义您的位置和偏好,以确保准确的本地计算。

伊斯兰伴侣 (Islamic Companion) 数据架构与分类体系

该工具利用结构化的配置和缓存系统来组织其运行。元数据和配置分类如下:

组件 描述 格式
位置元数据 经度、纬度和城市名称,用于精确计时 JSON 对象
计算方法 方法索引(如 Kemenag RI)和学派(如 Hanafi) 整数/枚举
天课设置 货币、金克数阈值和 API 密钥 对象
古兰经配置 首选翻译语言和搜索参数 字符串

每日结果存储在本地缓存中,以确保高可用性和离线访问当天的日程表。

name: islamic-companion
description: Unified Islamic utilities for prayer times, fasting schedules, and Zakat calculations using a shared configuration.

Islamic Companion Skill

Unified tool for prayer times, fasting schedules, and Zakat calculations.

This skill consolidates Islamic utilities into a single CLI with shared configuration and efficient caching.

Features

  • Prayer Times: Retrieve daily prayer times (Fajr, Dhuhr, Asr, Maghrib, Isha).
  • Fasting: Check Imsak and Maghrib times for fasting.
  • Zakat: Calculate Nisab thresholds for Gold and Silver based on current market prices.
  • Quran: Search for verses by keyword or fetch specific Surah/Ayah with translation.
  • Calendar: Generate a monthly prayer schedule for any city.
  • Quotes: Fetch and display random Islamic quotes or setup daily automation.
  • Scheduler: Generate OpenClaw cron commands to schedule daily prayer reminders.
  • Caching: Minimizes API calls by caching daily results locally.

Usage

Run the CLI using the bash script:

# Get today's prayer times
./bin/islamic-companion prayer --today

# Setup daily quote automation
./bin/islamic-companion quotes --setup

# Get a random quote
./bin/islamic-companion quotes --random

# Get monthly calendar (Example: Serang, Banten)
./bin/islamic-companion calendar --city "Serang" --month 2 --year 2026

# Sync prayer schedule to cron (generates commands)
./bin/islamic-companion prayer --sync

# Check fasting times (Imsak/Maghrib)
./bin/islamic-companion fasting --today

# Check Zakat Nisab values
./bin/islamic-companion zakat --nisab

# Search Quran for keyword
./bin/islamic-companion quran --search "sabar"

# Get specific Surah (e.g., Al-Fatihah)
./bin/islamic-companion quran --surah 1

# Get specific Ayah (e.g., Al-Baqarah:255)
./bin/islamic-companion quran --surah 2 --ayah 255

Configuration

Edit skills/islamic-companion/config.json to set your location and calculation method. Note: config.bash is auto-generated from config.json for performance.

{
  "location": {
    "latitude": -6.2088,
    "longitude": 106.8456,
    "name": "Jakarta"
  },
  "calculation": {
    "method": 20,
    "school": 0
  },
  "zakat": {
    "currency": "IDR",
    "gold_gram_threshold": 85,
    "api_key": ""
  },
  "quran_language": "id"
}

Calculation Methods

  • Method 20: Kemenag RI (Indonesia)
  • School 0: Standard (Shafi, Maliki, Hanbali)
  • School 1: Hanafi

Intent Mappings (for Agent)

User Intent Command Executed
"Get prayer times" ./bin/islamic-companion prayer --today
"Show me the calendar for [City]" ./bin/islamic-companion calendar --city [City]
"Setup daily Islamic quotes" ./bin/islamic-companion quotes --setup
"Give me a random Islamic quote" ./bin/islamic-companion quotes --random
"Sync prayer schedule" ./bin/islamic-companion prayer --sync
"When is Imsak?" ./bin/islamic-companion fasting --today
"Check Zakat Nisab" ./bin/islamic-companion zakat --nisab
"Search Quran for [keyword]" ./bin/islamic-companion quran --search "[keyword]"
"Read Surah [Name/Number]" ./bin/islamic-companion quran --surah [Number]
"Read Surah [Number] Ayah [Number]" ./bin/islamic-companion quran --surah [Number] --ayah [Number]

Dependencies

  • System: bash, curl, jq (highly recommended)
  • Python (Optional for some features): python3, requests (Install via pip install -r requirements.txt)

Security & Privacy

[!WARNING] API Keys: The Zakat feature uses an API key. You can store it in config.json (less secure) or export it as an environment variable ZAKAT_API_KEY (recommended).

[!IMPORTANT] Automation: The --sync and --setup commands generate cron schedules. Always review the output before adding it to your system crontab.

Installation

  1. Clone the repository or download the skill.
  2. Install Python dependencies:
    pip install -r requirements.txt
    
  3. Ensure curl is installed. jq is recommended for JSON parsing speed and reliability.

Usage

Run the CLI using the bash script wrapper, which handles configuration loading and environment setup:

# Get today's prayer times (uses HTTPS)
./bin/islamic-companion prayer --today

相关推荐