关于
Loki Seal is a quality gate for developers completing coding tasks in repos with tests. It automatically runs the local test suite and blocks completion if tests newly fail, if test coverage is reduced, or if CI configurations are weakened. This tool runs entirely locally without requiring model calls.
快速安装
Claude Code
推荐npx skills add asklokesh/claudeskill-loki-mode -a claude-code/plugin add https://github.com/asklokesh/claudeskill-loki-modegit clone https://github.com/asklokesh/claudeskill-loki-mode.git ~/.claude/skills/loki-seal在 Claude Code 中复制并粘贴此命令以安装该技能
技能文档
Loki Seal
The enforcing piece is the plugin's Stop hook (bin/loki-seal.js). This skill is advisory: it tells you what the hook checks so you do not trip it. It registers no hooks itself.
When you try to finish, the hook:
- Detects the runner (npm test with node --test/jest/vitest, pytest, go test, cargo test) and runs the real suite on the working tree.
- Blocks the stop when tests newly fail since session start (already-red tests are reported, not blamed, except that a request item whose tests fail now always blocks), when the run crashed or ran nothing, when the total test count dropped, or when, compared with the session baseline, a test file was removed, test declarations or assertions dropped, a skip/xfail/only marker was added, or a CI workflow test step was removed or softened.
- Reads the delivery contract from your first request (see README) and blocks while a request item (a must or bullet line of 2+ keywords) has no matching test that contains an assertion token and that the runner reported as passed (comments, docstrings, string, template and regex literals, skipped tests and tests in files the runner never ran never count), and always blocks while any test matched to a request item fails now: failing tests never count as covered. Only sentences opening with I, we, let me or let's (and tool-version or status notes) are dropped as chat and listed in the contract line; You, Our, My and Please sentences with a modal are requirement items. A spec file counts only when you mark it ("spec: docs/x.md"); when no contract can be derived the receipt says "NOT VERIFIED: no contract".
- Reports a 6-line receipt (outcome, runner and counts, tests-integrity, contract, tree hash, Verified by Loki link).
What to do when it blocks
Fix the production code. Do not delete, skip, xfail or weaken tests to get green; that is exactly what the hook detects. If a test is genuinely wrong, tell the user and let them decide.
Install
Install the plugin: claude plugin marketplace add <owner/repo or path>, then install loki-seal from the /plugin UI. Installing only this skill gives you the guidance but no enforcement.
GitHub 仓库
常见问题
什么是 loki-seal Skill?
loki-seal 是一个 Claude Skill,作者为 asklokesh。Skill 将 Claude 按需加载的说明和资源打包,让 Claude 无需额外提示即可执行与 loki-seal 相关的任务。
如何安装 loki-seal?
使用本页的安装命令:将 loki-seal 作为插件添加到 Claude Code,或将其仓库克隆到 skills 目录,然后重启 Claude 以加载该 Skill。
loki-seal 属于哪个分类?
loki-seal 属于测试分类。
loki-seal 可以免费使用吗?
可以。loki-seal 已收录在 AIMCP,可免费安装。
相关推荐技能
该Skill通过60+个学术基准测试(如MMLU、GSM8K等)评估大语言模型质量,适用于模型对比、学术研究及训练进度追踪。它支持HuggingFace、vLLM和API接口,被EleutherAI等行业领先机构广泛采用。开发者可通过简单命令行快速对模型进行多任务批量评估。
这个Claude Skill提供了关于Cloudflare Cron Triggers的完整知识库,用于通过cron表达式定时执行Workers。它支持配置周期性任务、维护作业和自动化工作流,并能处理常见的cron触发错误。开发者可以用它来设置定时任务、测试cron处理器,并集成Workflows和Green Compute功能。
该Skill为开发者提供了基于Playwright的本地Web应用测试工具集,支持自动化测试前端功能、调试UI行为、捕获屏幕截图和查看浏览器日志。它包含管理服务器生命周期的辅助脚本,可直接作为黑盒工具运行而无需阅读源码。适用于需要快速验证本地Web应用界面和交互功能的开发场景。
这个Skill用于开发分支完成后的集成决策,当代码实现完成且测试通过时,它会引导开发者选择合适的工作流。它首先验证测试状态,然后提供合并、创建PR或清理等结构化选项。核心价值在于确保代码质量的同时,标准化分支收尾流程。
