shokunin-update

shokunin-update:检测漂移,规划更新,并将变更应用到 Shokunin AI 生态系统。当用户要求更新、修复、同步或验证生态系统时使用此功能。

仓库最近推送
GitHub Stars
112
Forks
17
Issues / PRs
2

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "shokunin-update":https://skillpi.com/zh/skills/deepskill-22651af5fda33f1d06031878ffdea139923f9d97f3f9b89d2ae230c8d0d5694d。安装前核对上游来源和版本:https://github.com/EliasOulkadi/shokunin。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

shokunin-update:检测漂移,规划更新,并将变更应用到 Shokunin AI 生态系统。当用户要求更新、修复、同步或验证生态系统时使用此功能。

0 下载

介绍来源: third_party · EliasOulkadi · 1.0.0 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
适合谁
翻译待完成,请参阅来源文档。
输入和输出
来源文档未说明。
软件、账号及付费要求
来源文档未说明。
限制与区别
来源文档未说明。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: shokunin-update
description: Detect drift, plan updates, and apply changes to the Shokunin AI Ecosystem. Use this when user asks to update, fix, sync, or verify the ecosystem.
triggers:
  - "update ecosystem"
  - "sync ecosystem"
  - "fix ecosystem"
  - "verify ecosystem"
  - "shokunin update"
  - "ecosystem status"
  - "check drift"
  - "update skills"
  - "repair ecosystem"
  - "ecosystem health"
negatives:
  - "update skill content"
  - "create skill"
  - "memory operations"
  - "session management"
license: MIT
compatibility: opencode
metadata:
  version: "1.0.0"

  workflow: system
  audience: developers

Note: The shokunin-update.ps1 script lives in .pack/scripts/ and is deployed to ~/.shokunin/scripts/ by the installer.

Shokunin Update System

Maintains the Shokunin ecosystem by detecting drift between the declarative manifest and the actual filesystem state.

Workflow

1. Load the manifest

Read ~/.shokunin/shokunin.json. This is the single source of truth. Every component, path, hash, and template is defined here.

2. Check status

Run shokunin-update.ps1 status to detect drift:

  • OK: hash matches manifest
  • MISSING: file doesn't exist but manifest expects it
  • PROTECTED: data files (chroma_db, sessions) that must never be modified

Report results to the user with counts.

3. Plan changes

Run shokunin-update.ps1 plan to see what would change without applying anything.

Show the user a clear summary of what will be created, modified, or left alone.

4. Apply with confirmation

& "$env:USERPROFILE\.shokunin\scripts\shokunin-update.ps1" apply -Confirm

This automatically:

  1. Backs up each file to ~/.shokunin/backups/<timestamp>/
  2. Applies changes
  3. Saves update event to ChromaDB
  4. Runs memory-healthcheck.ps1 to verify

5. Rollback if needed

& "$env:USERPROFILE\.shokunin\scripts\shokunin-update.ps1" rollback -Timestamp 20260514-120000

When to use this skill

  • User notices something broken in the ecosystem
  • User wants to add/remove/modify a component
  • User asks "is everything up to date?"
  • Pre-commit or pre-PR verification

Do NOT

  • Modify files in protected groups (chroma_db, sessions, logs, backups)
  • Apply changes without user confirmation
  • Edit the manifest without understanding every field

Error Handling

Cause Fix
shokunin.json manifest is missing or malformed Validate JSON syntax with Test-Json. If missing, run installer ~/.shokunin/install.ps1 to regenerate from template. Report exact parse error line if malformed.
File hash mismatch but content is identical Encoding difference (CRLF vs LF) or trailing whitespace. Normalize line endings with .pack/scripts/normalize-eol.ps1 before re-checking.
Backup directory exceeds disk quota Old backups accumulate over time. Retention policy: keep last 5 backups. Purge older directories with Remove-Item -Recurse.
Protected file group modified by apply A bug or misconfiguration in the manifest marked a protected path as writable. Abort immediately. Rollback from backup. Fix manifest before retry.
Rollback target timestamp not found Backup was purged by retention policy or never created. Cannot recover that point in time. Run status to assess current state and manually fix drift.
Powershell execution policy blocks the script System execution policy set to Restricted
ChromaDB save during apply step fails MCP server is down or ChromaDB collection is locked

Related Scripts

  • ~/.shokunin/scripts/validate-skills.ps1 — Validates all installed skills for required sections, size, and referenced script existence
  • ~/.shokunin/scripts/shokunin-update.ps1 — Drift detection, manifest-driven update apply, rollback, and status reporting

Sources

  • PowerShell 5.1 documentation (learn.microsoft.com/en-us/powershell/scripting) — execution policy, file hashing, and error handling
  • ChromaDB Python client documentation (docs.trychroma.com) — collection management and persistence
  • Semantic Versioning 2.0.0 (semver.org) — version comparison logic used in drift detection
  • Git documentation on plumbing commands (git-scm.com/docs/git-hash-object) — content-addressable storage pattern inspiration
  • "Infrastructure as Code" by Kief Morris (O'Reilly, 2nd Edition, 2020) — drift detection and reconciliation patterns
  • NIST SP 800-88 Guidelines for Media Sanitization — secure file overwrite patterns used in backup rotation

Anti-Patterns

Pattern Problem Fix
Running apply without running plan first Changes are applied without user awareness of what will be modified Always run plan → show summary → get confirmation → then apply.
Modifying protected paths directly instead of through manifest Data loss: chroma_db, sessions, logs get overwritten and cannot be recovered Never touch paths under the protected group. If they need changes, update the manifest logic, not the files.
Hand-editing the manifest without understanding every field A typo in a path or hash field cascades into false drift positives or corrupted apply Use the declarative format. Every path must be absolute. Every hash must be SHA-256. Validate with Test-Json after edits.
Ignoring drift warnings for long periods Drift accumulates, making later applies riskier and harder to roll back Run status weekly. Schedule via Task Scheduler: shokunin-update.ps1 status > ~/.shokunin/logs/drift.log.
Restoring from backup without verifying backup integrity A corrupted backup restores corrupted files Before rollback, verify backup checksums against the original manifest hashes. Abort if mismatch.
Running apply while another apply is in progress Race condition on backup/restore directories causing incomplete state Use a lock file: ~/.shokunin/.apply-lock. If lock exists and process is alive, wait or abort. Stale lock (>30 min) can be removed.

Checklist

  • [ ] Verify shokunin.json is valid JSON and all component paths resolve
  • [ ] Run shokunin-update.ps1 status — 0 MISSING, no crashes
  • [ ] Run shokunin-update.ps1 apply — all components sync without errors
  • [ ] Verify MCP server starts: python ~/.shokunin/memory/mcp-server.py responds to tools/list
  • [ ] Verify chroma-helper.py CLI works: python ~/.shokunin/scripts/chroma-helper.py count
  • [ ] Verify all 62 skills present in .config/opencode/skills/
  • [ ] Verify templates match installed files (no drift)
  • [ ] Verify AGENTS.md version matches shokunin.json version
  • [ ] Run memory-healthcheck.ps1 — all tests pass
  • [ ] Run alidate-skills.ps1 — 0 failures

版本历史

  1. v4.2.2 GitHub ↗
    原版更新说明

    Skills: 41 Scripts: 20 Templates: 5 Rules: 4

当前收录版本

1.0.0

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值75/100

亮点

  • 提供完整的生态系统漂移检测与更新闭环流程
  • 面向开发者解决实际运维痛点,功能实用性强
触发精准90/100

亮点

  • 触发词覆盖全面,包含正向与负向边界,精准度高
结构规范85/100

待提升项

  • When to Use 章节格式不规范 原报告严重程度:轻微

    "When to use this skill" 未使用标准 Markdown 二级标题格式(## When to Use),影响文档结构一致性。

    改进建议:将 "When to use this skill" 改为标准标题格式 ## When to Use,以符合文档规范。

亮点

  • Workflow 分阶段清晰,含端到端示例和确认机制
  • frontmatter 完整,包含 triggers/negatives/metadata
执行可靠95/100

亮点

  • 异常处理覆盖全面,提供详细错误原因与修复方案
  • 不可逆操作均有备份与确认机制,安全可靠
证据可验 (前四项均值)86/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

  • 删除文件

    先确认绝对路径及作用范围,保留可恢复备份;不要直接对重要目录运行示例命令。

    主文档提及 · 第 95 行
  • 管理员或提升权限

    确认确有必要再提升权限;不要关闭防护、绕过证书验证或扩大整个系统的访问权限。

    主文档提及 · 第 98 行

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

来源文档未说明。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。