← Back to Skills Marketplace
wanwan2qq

Gamified Habits

by wanwan2qq · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ Security Clean
190
Downloads
0
Stars
1
Active Installs
2
Versions
Install in OpenClaw
/install gamified-habits
Description
游戏化习惯养成助手 - 用游戏化的方式培养好习惯,支持打卡、XP 升级、属性面板
README (SKILL.md)

🎮 游戏化习惯养成 Skill

将习惯养成游戏化的 OpenClaw Skill,让坚持变得有趣!

功能特性

核心功能

  • ✅ 习惯管理(创建/删除/列表)
  • ✅ 打卡系统(命令行 + 自然语言)
  • ✅ XP 经验值系统(含连击加成)
  • ✅ 等级系统(升级成长)
  • ✅ 五维属性(体力/智力/财富/心灵/社交)
  • ✅ 成就系统
  • ✅ 数据持久化(本地 JSON 存储)

🎮 游戏化功能(Phase 1+2)

  • ⚔️ 战斗故事:每次打卡生成独特的战斗/冒险描述
  • 🔥 连击称号:新手冒险者 → 不朽传说
  • 👹 Boss 战:完成所有今日习惯后触发 Boss 战
  • 📖 冒险日记:自动生成每日冒险日志
  • 🎁 胜利奖励:击败 Boss 获得额外 XP 奖励
  • 🏆 成就系统:解锁各种成就徽章

🎨 自定义描述

  • 创建习惯时可自定义描述:--desc "击败赖床恶魔"
  • 自定义成功描述:--success "你战胜了睡意"

使用方式

命令行方式

habits create \x3C名称> [类型] [--desc "描述"] [--success "成功描述"]
                        # 创建习惯(支持自定义描述)
habits delete \x3C名称>           # 删除习惯
habits list                    # 查看列表
habits checkin \x3C名称>          # 打卡(生成战斗故事)
habits status                  # 查看属性面板
habits history [天数]          # 查看历史
habits achievements            # 查看成就
habits whoami                  # 查看当前用户
habits boss                    # 检查 Boss 战
habits diary [read]            # 生成/查看今日日记

自然语言方式

  • "创建一个早起习惯"
  • "我起床了" → 自动打卡
  • "我跑步了" → 自动打卡
  • "看看我的属性" → 显示面板
  • "有什么成就" → 查看成就

🎯 多用户支持

系统会自动识别用户,根据 OpenClaw 渠道和账号隔离数据:

  • 万万(钉钉):dingtalk-0124046821484330
  • 万万(企业微信):wecom-xxx
  • 其他用户:自动分配独立数据文件

每个用户的数据完全隔离,互不干扰。

自然语言方式

  • "创建一个早起习惯"
  • "我起床了" → 自动打卡
  • "我跑步了" → 自动打卡
  • "看看我的属性" → 显示面板
  • "有什么成就" → 查看成就

项目位置

  • 技能目录:~/.openclaw/skills/gamified-habits/
  • CLI 入口:~/.openclaw/skills/gamified-habits/bin/habits.js
  • 数据存储:~/.gamified-habits/user-data.json

习惯类型

类型 属性 示例习惯
physical 体力 早起、跑步、健身
intellectual 智力 阅读、学习、写作
wealth 财富 储蓄、记账、理财
spiritual 心灵 冥想、日记、感恩
social 社交 聚会、networking

等级系统

升级所需 XP 公式:Level_N = N² × 100

  • Lv.1: 0-100 XP
  • Lv.2: 100-400 XP
  • Lv.3: 400-900 XP
  • Lv.4: 900-1600 XP
  • Lv.5: 1600-2500 XP

连击加成

  • 1-3 天:1.0x
  • 4-7 天:1.1x
  • 8-14 天:1.2x
  • 15-30 天:1.5x
  • 30+ 天:2.0x

示例对话

用户: 创建一个早起习惯 Skill: ✅ 已创建习惯「早起」 类型:体力 | 频率:每日 | 奖励:50 XP

用户: 我起床了 Skill: ✅ 「早起」打卡成功! +55 XP (连击加成 x1.1) | 连击 5 天 🔥 💪 体力 +1,当前等级 Lv.3 (280/500 XP)

用户: 看看我的属性 Skill: 🎯 Lv.5 自律勇者 (1680/2500 XP)

    💪 体力:72  ████████░░
    🧠 智力:85  █████████░
    💰 财富:60  ██████░░░░
    😌 心灵:55  █████░░░░░
    🤝 社交:48  ████░░░░░░
    
    🔥 当前连击:早起 5 天,跑步 3 天

开发信息

  • Phase 1 MVP: 基础习惯管理 + 打卡 + XP 系统
  • Phase 2: 游戏化增强 + 自然语言优化
  • Phase 3: 社交功能 + 随机事件
Usage Guidance
This skill appears coherent and implements a local, file-backed gamified habit tracker. Before installing, consider: 1) it will create/read files under your home directory (~/.openclaw/skills/gamified-habits/ and data files ~/.openclaw/skills/gamified-habits/data/{channel-user}.json) and may migrate/rename an older ~/.gamified-habits/user-data.json to a .bak — back up that file if it exists; 2) the skill reads environment variables (OPENCLAW_CHANNEL, OPENCLAW_ACCOUNT_ID, GAMIFIED_HABITS_USER, HOME) for user identification — these are expected but confirm you’re comfortable with per-channel data separation; 3) SKILL.md included a 'unicode-control-chars' scanner hit (possible prompt-injection/obfuscation); open SKILL.md in a plain text editor and inspect for invisible characters if you’re concerned; 4) the skill requires exec permission (it provides a CLI) but does not perform network calls or request external tokens. If you want extra assurance, run the skill in a sandboxed account or review/execute the code locally before enabling autonomous invocation.
Capability Assessment
Purpose & Capability
Name/description (gamified habits) align with the code and SKILL.md: modules implement habit creation, check‑in, XP, story/diary generation and local persistence. The skill asks for no cloud API keys and does not perform network calls, which is coherent for a local habit tracker. Minor note: SKILL.md and PRD mention both ~/.gamified-habits/user-data.json and ~/.openclaw/skills/gamified-habits/data/{user}.json; storage.js handles migration between these paths.
Instruction Scope
SKILL.md instructs execution (it includes 'permissions: - exec') and lists natural‑language triggers and CLI usage — consistent with the included bin/habits.js. The runtime instructions and code access environment variables (OPENCLAW_CHANNEL/ACCOUNT_ID, GAMIFIED_HABITS_USER, HOME) to identify users and read/write local files; that is proportionate to the stated multi‑user/local storage behavior. Pre-scan found a 'unicode-control-chars' prompt-injection pattern in SKILL.md — this is unusual and worth reviewing (the rest of the instructions are explicit and scoped).
Install Mechanism
No install spec or external downloads are declared. This is an instruction+code skill with all code bundled in the package. There are no remote URLs, package installs, or archives to fetch, which lowers installation risk.
Credentials
The skill declares no required env vars, but the code reads environment variables for user identification (OPENCLAW_CHANNEL / CHANNEL, OPENCLAW_ACCOUNT_ID / ACCOUNT_ID, GAMIFIED_HABITS_USER) and HOME for file paths. These are reasonable and necessary for per-channel/per-account storage and are proportional to its purpose. It does not request unrelated secrets or tokens.
Persistence & Privilege
The skill persists data to the user's home directory (SKILL_DIR under ~/.openclaw and a DATA_DIR) and will migrate and rename an old ~/.gamified-habits/user-data.json to a .bak when present. Persisting local JSON and creating directories/files is expected for this skill, but you should be aware it will modify user files and may rename an existing legacy file during migration.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install gamified-habits
  3. After installation, invoke the skill by name or use /gamified-habits
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.1
- 新增 data 目录及多项默认配置和示例数据文件,丰富本地数据结构 - 项目数据存储路径由用户隔离文件更新为统一 user-data.json - 文档补充和结构微调,部分描述更加简明清晰 - 修复部分命令帮助和触发词重复 - 包管理相关文件同步更新,保证依赖一致性
v1.0.0
Initial release of gamified-habits. - Introduces a gamified habit-building assistant supporting habit creation, management, and check-in. - Features XP, leveling, streak bonuses, and a five-attribute system (physical, intellectual, wealth, spiritual, social). - Includes game elements: battle stories, boss fights, achievements, and daily adventure logs. - Supports both command-line and natural language interactions. - Data is stored per user for privacy and isolation. - Multiple habit types and XP progression system implemented.
Metadata
Slug gamified-habits
Version 1.0.1
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 2
Frequently Asked Questions

What is Gamified Habits?

游戏化习惯养成助手 - 用游戏化的方式培养好习惯,支持打卡、XP 升级、属性面板. It is an AI Agent Skill for Claude Code / OpenClaw, with 190 downloads so far.

How do I install Gamified Habits?

Run "/install gamified-habits" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Gamified Habits free?

Yes, Gamified Habits is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Gamified Habits support?

Gamified Habits is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Gamified Habits?

It is built and maintained by wanwan2qq (@wanwan2qq); the current version is v1.0.1.

💬 Comments