[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77KKEBSTC6WCRXGYBQ1MFKS":3,"skill-same:01M77KKEBSTC6WCRXGYBQ1MFKS":57},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":34,"commitSha":35,"skillDirectory":36,"forksCount":37,"repositoryHtmlUrl":38,"repositoryHomepageUrl":39,"ownerHtmlUrl":40,"ownerBlogUrl":6,"ownerDescription":41,"updatedAt":42,"install":43,"resources":56},"01M77KKEBSTC6WCRXGYBQ1MFKS","habit-checkin",null,"习惯追踪 - 每天打卡，自动计算连续天数\u002F历史最佳\u002F总打卡数，多习惯管理，本地JSON持久化","Lord1Egypt\u002Fawesome-skill-forge","Lord1Egypt","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99746359?v=4","01M7592YDNT0XK9WJ0T2MQVPDN","Mohamed Mounir Ali AL Keshita","01M75GRFNHC8VZNWEB8DKDE433",3,"MIT","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Fl\u002Flaosi-habit-checkin\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: habit-checkin\nversion: 1.0.0\ndescription: 习惯追踪 - 每天打卡，自动计算连续天数\u002F历史最佳\u002F总打卡数，多习惯管理，本地JSON持久化\ntags: [habit, tracking, daily-life, health, motivation, streak]\nauthor: laosi\nsource: original\n---\n\n# Habit Checkin - 习惯追踪\n\n> 激活词: 打卡 \u002F 签到 \u002F 习惯 \u002F checkin\n\n## 功能\n\n- 每日一键打卡\n- 自动计算连续天数（streak）\n- 历史最佳记录\n- 多习惯独立追踪\n- 本地 JSON 持久化\n\n## Python 实现\n\n```python\nimport os, json\nfrom datetime import datetime, date\n\nHABIT_FILE = os.path.join(os.path.dirname(__file__), \"habit_streaks.json\")\n\nclass HabitTracker:\n    def __init__(self):\n        os.makedirs(os.path.dirname(HABIT_FILE), exist_ok=True)\n        self.habits = self._load()\n    \n    def _load(self):\n        if os.path.exists(HABIT_FILE):\n            with open(HABIT_FILE, encoding=\"utf-8\") as f:\n                return json.load(f)\n        return {}\n    \n    def _save(self):\n        with open(HABIT_FILE, \"w\", encoding=\"utf-8\") as f:\n            json.dump(self.habits, f, ensure_ascii=False, indent=2)\n    \n    def _today(self):\n        return date.today().isoformat()\n    \n    def checkin(self, name: str = \"default\") -> dict:\n        \"\"\"打卡一次\"\"\"\n        today = self._today()\n        if name not in self.habits:\n            self.habits[name] = {\n                \"dates\": [],\n                \"streak\": 0,\n                \"best\": 0,\n                \"total\": 0,\n                \"created\": today\n            }\n        \n        h = self.habits[name]\n        \n        if today in h[\"dates\"]:\n            return {\"status\": \"already_done\", \"habit\": name, \"streak\": h[\"streak\"]}\n        \n        # 检查是否连续\n        h[\"dates\"].append(today)\n        h[\"total\"] += 1\n        \n        if h[\"dates\"]:\n            last_date = h[\"dates\"][-2] if len(h[\"dates\"]) >= 2 else None\n            from datetime import timedelta\n            if last_date and date.fromisoformat(last_date) == date.today() - timedelta(days=1):\n                h[\"streak\"] += 1\n            else:\n                h[\"streak\"] = 1\n        else:\n            h[\"streak\"] = 1\n        \n        if h[\"streak\"] > h[\"best\"]:\n            h[\"best\"] = h[\"streak\"]\n        \n        self._save()\n        return {\n            \"status\": \"checked_in\",\n            \"habit\": name,\n            \"streak\": h[\"streak\"],\n            \"best\": h[\"best\"],\n            \"total\": h[\"total\"]\n        }\n    \n    def stats(self, name: str = \"default\") -> dict:\n        \"\"\"查看习惯统计\"\"\"\n        if name not in self.habits:\n            return {\"exists\": False}\n        h = self.habits[name]\n        return {\n            \"exists\": True,\n            \"habit\": name,\n            \"streak\": h[\"streak\"],\n            \"best\": h[\"best\"],\n            \"total\": h[\"total\"],\n            \"last_checkin\": h[\"dates\"][-1] if h[\"dates\"] else None,\n            \"created\": h[\"created\"]\n        }\n    \n    def list_all(self) -> list:\n        \"\"\"列出所有习惯\"\"\"\n        return [self.stats(n) for n in self.habits]\n\n# 使用示例\ntracker = HabitTracker()\n\n# 每天早上打卡\nresult = tracker.checkin(\"阅读\")\nif result[\"status\"] == \"checked_in\":\n    print(f\"✅ {result['habit']} 打卡成功！连续 {result['streak']} 天\")\nelif result[\"status\"] == \"already_done\":\n    print(f\"✅ 今天已打卡，连续 {result['streak']} 天\")\n\n# 查看统计\ns = tracker.stats(\"阅读\")\nprint(f\"📊 {s['habit']}: 连续{s['streak']}天 🏆最佳{s['best']}天 📅共{s['total']}天\")\n\n# 一周戒糖打卡\ntracker.checkin(\"戒糖\")\n```\n\n## 命令行用法\n\n```bash\n# 阅读打卡\npython -c \"from habit_tracker import HabitTracker; r=HabitTracker().checkin('阅读'); print(f'连续{r[\\\"streak\\\"]}天')\"\n\n# 查看所有习惯\npython -c \"from habit_tracker import HabitTracker; [print(f'{s[\\\"habit\\\"]}: {s[\\\"streak\\\"]}d') for s in HabitTracker().list_all()]\"\n```\n\n## 数据格式\n\n```json\n{\n  \"阅读\": {\n    \"dates\": [\"2026-05-26\", \"2026-05-27\", \"2026-05-28\"],\n    \"streak\": 3,\n    \"best\": 7,\n    \"total\": 15,\n    \"created\": \"2026-05-01\"\n  }\n}\n```\n\n## 使用场景\n\n1. **阅读习惯**: 每天读10分钟书，打卡记录\n2. **健身打卡**: 跑步\u002F健身\u002F拉伸，坚持看得见\n3. **早睡早起**: 23点前睡+7点前起，双重打卡\n4. **戒断习惯**: 戒糖\u002F戒烟\u002F戒刷短视频，天数就是动力\n5. **学习追踪**: 每天学英语\u002F编程，连续天数激励\n\n## 核心心理机制\n\n- **不要断链**(Don't break the chain) — Jerry Seinfeld 的经典方法\n- **连续天数 > 总天数** — streak 比 total 更有激励性\n- **最佳记录** — 激励你超越自己的历史高点\n\n## 依赖\n\n- Python 3.8+\n- 无第三方依赖\n","# Habit Checkin - 习惯追踪\n\n> 激活词: 打卡 \u002F 签到 \u002F 习惯 \u002F checkin\n\n## 功能\n\n- 每日一键打卡\n- 自动计算连续天数（streak）\n- 历史最佳记录\n- 多习惯独立追踪\n- 本地 JSON 持久化\n\n## Python 实现\n\n```python\nimport os, json\nfrom datetime import datetime, date\n\nHABIT_FILE = os.path.join(os.path.dirname(__file__), \"habit_streaks.json\")\n\nclass HabitTracker:\n    def __init__(self):\n        os.makedirs(os.path.dirname(HABIT_FILE), exist_ok=True)\n        self.habits = self._load()\n    \n    def _load(self):\n        if os.path.exists(HABIT_FILE):\n            with open(HABIT_FILE, encoding=\"utf-8\") as f:\n                return json.load(f)\n        return {}\n    \n    def _save(self):\n        with open(HABIT_FILE, \"w\", encoding=\"utf-8\") as f:\n            json.dump(self.habits, f, ensure_ascii=False, indent=2)\n    \n    def _today(self):\n        return date.today().isoformat()\n    \n    def checkin(self, name: str = \"default\") -> dict:\n        \"\"\"打卡一次\"\"\"\n        today = self._today()\n        if name not in self.habits:\n            self.habits[name] = {\n                \"dates\": [],\n                \"streak\": 0,\n                \"best\": 0,\n                \"total\": 0,\n                \"created\": today\n            }\n        \n        h = self.habits[name]\n        \n        if today in h[\"dates\"]:\n            return {\"status\": \"already_done\", \"habit\": name, \"streak\": h[\"streak\"]}\n        \n        # 检查是否连续\n        h[\"dates\"].append(today)\n        h[\"total\"] += 1\n        \n        if h[\"dates\"]:\n            last_date = h[\"dates\"][-2] if len(h[\"dates\"]) >= 2 else None\n            from datetime import timedelta\n            if last_date and date.fromisoformat(last_date) == date.today() - timedelta(days=1):\n                h[\"streak\"] += 1\n            else:\n                h[\"streak\"] = 1\n        else:\n            h[\"streak\"] = 1\n        \n        if h[\"streak\"] > h[\"best\"]:\n            h[\"best\"] = h[\"streak\"]\n        \n        self._save()\n        return {\n            \"status\": \"checked_in\",\n            \"habit\": name,\n            \"streak\": h[\"streak\"],\n            \"best\": h[\"best\"],\n            \"total\": h[\"total\"]\n        }\n    \n    def stats(self, name: str = \"default\") -> dict:\n        \"\"\"查看习惯统计\"\"\"\n        if name not in self.habits:\n            return {\"exists\": False}\n        h = self.habits[name]\n        return {\n            \"exists\": True,\n            \"habit\": name,\n            \"streak\": h[\"streak\"],\n            \"best\": h[\"best\"],\n            \"total\": h[\"total\"],\n            \"last_checkin\": h[\"dates\"][-1] if h[\"dates\"] else None,\n            \"created\": h[\"created\"]\n        }\n    \n    def list_all(self) -> list:\n        \"\"\"列出所有习惯\"\"\"\n        return [self.stats(n) for n in self.habits]\n\n# 使用示例\ntracker = HabitTracker()\n\n# 每天早上打卡\nresult = tracker.checkin(\"阅读\")\nif result[\"status\"] == \"checked_in\":\n    print(f\"✅ {result['habit']} 打卡成功！连续 {result['streak']} 天\")\nelif result[\"status\"] == \"already_done\":\n    print(f\"✅ 今天已打卡，连续 {result['streak']} 天\")\n\n# 查看统计\ns = tracker.stats(\"阅读\")\nprint(f\"📊 {s['habit']}: 连续{s['streak']}天 🏆最佳{s['best']}天 📅共{s['total']}天\")\n\n# 一周戒糖打卡\ntracker.checkin(\"戒糖\")\n```\n\n## 命令行用法\n\n```bash\n# 阅读打卡\npython -c \"from habit_tracker import HabitTracker; r=HabitTracker().checkin('阅读'); print(f'连续{r[\\\"streak\\\"]}天')\"\n\n# 查看所有习惯\npython -c \"from habit_tracker import HabitTracker; [print(f'{s[\\\"habit\\\"]}: {s[\\\"streak\\\"]}d') for s in HabitTracker().list_all()]\"\n```\n\n## 数据格式\n\n```json\n{\n  \"阅读\": {\n    \"dates\": [\"2026-05-26\", \"2026-05-27\", \"2026-05-28\"],\n    \"streak\": 3,\n    \"best\": 7,\n    \"total\": 15,\n    \"created\": \"2026-05-01\"\n  }\n}\n```\n\n## 使用场景\n\n1. **阅读习惯**: 每天读10分钟书，打卡记录\n2. **健身打卡**: 跑步\u002F健身\u002F拉伸，坚持看得见\n3. **早睡早起**: 23点前睡+7点前起，双重打卡\n4. **戒断习惯**: 戒糖\u002F戒烟\u002F戒刷短视频，天数就是动力\n5. **学习追踪**: 每天学英语\u002F编程，连续天数激励\n\n## 核心心理机制\n\n- **不要断链**(Don't break the chain) — Jerry Seinfeld 的经典方法\n- **连续天数 > 总天数** — streak 比 total 更有激励性\n- **最佳记录** — 激励你超越自己的历史高点\n\n## 依赖\n\n- Python 3.8+\n- 无第三方依赖\n",{"name":5,"tags":24,"author":31,"source":32,"version":33,"description":7},[25,26,27,28,29,30],"habit","tracking","daily-life","health","motivation","streak","laosi","original","1.0.0","master","4aa004da461d820f4ea5499e58eb8d196cf99016","community\u002Fclawhub\u002Fl\u002Flaosi-habit-checkin",0,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge","https:\u002F\u002Fskill-explorer-rho.vercel.app","https:\u002F\u002Fgithub.com\u002FLord1Egypt","Unbreakable. Unstoppable. Unmatched⚡.\r\n Speaker of machine tongues 🤖  | World-builder of decentralized dreams 🌐 | Defender of the digital realm🛡️.","2026-06-10 08:21:01",{"source":8,"skillName":5,"commands":44,"prompt":54,"zipAvailable":55},[45,48,51],{"tool":46,"command":47},"npx","npx skills add Lord1Egypt\u002Fawesome-skill-forge --skill habit-checkin",{"tool":49,"command":50},"bunx","bunx skills add Lord1Egypt\u002Fawesome-skill-forge --skill habit-checkin",{"tool":52,"command":53},"pnpm","pnpm dlx skills add Lord1Egypt\u002Fawesome-skill-forge --skill habit-checkin","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Fl\u002Flaosi-habit-checkin\u002FSKILL.md",true,[],[58,65,72,79,86,93],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M785WKJB99G3STR1NF9NRTJW","youtube-content","YouTube transcripts to summaries, threads, blogs.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fyoutube-content\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M785WEFHB0G2S9YA6EPR3H0E","xurl","X\u002FTwitter via xurl CLI: post, search, DM, media, v2 API.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fxurl\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M785W98EDN4EFJXJPMQEHCRC","touchdesigner-mcp","Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftouchdesigner-mcp\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M785W5S9FP3QBH2V191E025P","test-driven-development","TDD: enforce RED-GREEN-REFACTOR, tests before code.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftest-driven-development\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M785W2AS08NSSH9YATCV6FJB","teams-meeting-pipeline","Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fteams-meeting-pipeline\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M785VXKW4T34BTP1SCHW1R7F","systematic-debugging","4-phase root cause debugging: understand bugs before fixing.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fsystematic-debugging\u002FSKILL.md",[],[]]