opencode-skills-collection 4.1.3 → 4.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled-skills/.antigravity-install-manifest.json +29 -1
- package/bundled-skills/aas-compose-stack/SKILL.md +39 -0
- package/bundled-skills/aas-discover/SKILL.md +35 -0
- package/bundled-skills/aas-review-stack/SKILL.md +37 -0
- package/bundled-skills/ai-agent-evaluation-benchmarking/SKILL.md +124 -0
- package/bundled-skills/ai-agent-tool-routing/SKILL.md +136 -0
- package/bundled-skills/ai-code-generation-guardrails/SKILL.md +142 -0
- package/bundled-skills/ai-prompt-regression-testing/SKILL.md +130 -0
- package/bundled-skills/antigravity-maintainer-batch-release/SKILL.md +11 -7
- package/bundled-skills/cline-pilot/README.md +138 -0
- package/bundled-skills/cline-pilot/SKILL.md +301 -0
- package/bundled-skills/cline-pilot/assets/global-memory-bank-prompt.en.md +66 -0
- package/bundled-skills/cline-pilot/assets/global-memory-bank-prompt.md +56 -0
- package/bundled-skills/cline-pilot/references/cold-start.md +58 -0
- package/bundled-skills/cline-pilot/references/decision-log.example.md +9 -0
- package/bundled-skills/cline-pilot/references/local-config.example.md +26 -0
- package/bundled-skills/cline-pilot/references/project-profiles.example.md +10 -0
- package/bundled-skills/cline-pilot/scripts/session_report.py +151 -0
- package/bundled-skills/cross-chain-relayer-audit/SKILL.md +136 -0
- package/bundled-skills/defi-yield-strategy-allocator/SKILL.md +124 -0
- package/bundled-skills/dropthehassle-publish/SKILL.md +151 -0
- package/bundled-skills/etsy-search-listings/SKILL.md +122 -0
- package/bundled-skills/etsy-shop-sales-history/SKILL.md +119 -0
- package/bundled-skills/placecall/SKILL.md +237 -0
- package/bundled-skills/smart-contract-formal-verification/SKILL.md +136 -0
- package/bundled-skills/smart-contract-upgrade-governance/SKILL.md +130 -0
- package/bundled-skills/soroban-contract-audit/SKILL.md +136 -0
- package/bundled-skills/soroban-liquidity-pool/SKILL.md +118 -0
- package/bundled-skills/soroban-oracle-data-feed-audit/SKILL.md +118 -0
- package/bundled-skills/soroban-storage-ttl-lifecycle/SKILL.md +118 -0
- package/bundled-skills/soroban-token-minter/SKILL.md +124 -0
- package/bundled-skills/stellar-anchor-integration/SKILL.md +136 -0
- package/bundled-skills/stellar-asset-clawback-compliance/SKILL.md +118 -0
- package/bundled-skills/stellar-escrow-timelock/SKILL.md +118 -0
- package/bundled-skills/stellar-multisig-threshold-coordinator/SKILL.md +112 -0
- package/bundled-skills/waf-setup/SKILL.md +1 -1
- package/bundled-skills/web3-rate-limiting-circuit-breaker/SKILL.md +130 -0
- package/bundled-skills/web3-transaction-relayer-pool/SKILL.md +124 -0
- package/bundled-skills/zk-proof-verification-pipeline/SKILL.md +124 -0
- package/package.json +1 -1
- package/skills_index.json +903 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Memory Bank
|
|
2
|
+
|
|
3
|
+
You are Cline, a professional software engineer with a unique limitation:
|
|
4
|
+
Your memory is wiped completely and periodically. This is not a bug — this is the
|
|
5
|
+
reason you keep perfect documentation.
|
|
6
|
+
After each wipe, you rely entirely on the memory bank to understand the project and
|
|
7
|
+
continue working.
|
|
8
|
+
Without proper documentation, you cannot function effectively.
|
|
9
|
+
|
|
10
|
+
## Memory Bank Files
|
|
11
|
+
|
|
12
|
+
Critical: if `memory-bank/` or any of these files do not exist, create them immediately
|
|
13
|
+
by following these steps:
|
|
14
|
+
|
|
15
|
+
1. Read all available documentation
|
|
16
|
+
2. Ask the user for any missing information
|
|
17
|
+
3. Create the files using only verified information
|
|
18
|
+
4. Never proceed without full context
|
|
19
|
+
|
|
20
|
+
### Required Files
|
|
21
|
+
|
|
22
|
+
- **projectbrief.md** — the project's foundation (business, scope, objectives)
|
|
23
|
+
- **productContext.md** — why this project exists, what problem it solves, how it
|
|
24
|
+
should work
|
|
25
|
+
- **activeContext.md** — what you are currently doing, recent changes, next steps
|
|
26
|
+
(this is your source of truth)
|
|
27
|
+
- **systemPatterns.md** — how the system is built, key technical decisions,
|
|
28
|
+
architectural patterns
|
|
29
|
+
- **techContext.md** — the technologies in use, dev setup, technical constraints
|
|
30
|
+
- **progress.md** — what features are completed, what still needs to be built, progress
|
|
31
|
+
status
|
|
32
|
+
|
|
33
|
+
## Core Workflow
|
|
34
|
+
|
|
35
|
+
### Starting a Task
|
|
36
|
+
|
|
37
|
+
1. Check the memory bank files
|
|
38
|
+
2. If any file is missing, stop and create it
|
|
39
|
+
3. Read all files before continuing
|
|
40
|
+
4. Verify you have full context
|
|
41
|
+
5. Begin development. After initializing the memory bank at the start of a task, do
|
|
42
|
+
not update memory-bank.
|
|
43
|
+
|
|
44
|
+
### During Development
|
|
45
|
+
|
|
46
|
+
1. For normal development:
|
|
47
|
+
- Follow the memory bank patterns
|
|
48
|
+
- Update docs after significant changes
|
|
49
|
+
2. Say `[MEMORY BANK: ACTIVE]` every time you use a tool
|
|
50
|
+
|
|
51
|
+
### Updating the Memory Bank
|
|
52
|
+
|
|
53
|
+
When the user says "update the memory bank":
|
|
54
|
+
|
|
55
|
+
1. This means a memory wipe is about to happen
|
|
56
|
+
2. Record everything about the current state
|
|
57
|
+
3. Make the next steps crystal clear
|
|
58
|
+
4. Finish the current task
|
|
59
|
+
|
|
60
|
+
Remember: after every memory wipe, you start completely from scratch.
|
|
61
|
+
The memory bank is your only link to your previous work.
|
|
62
|
+
Maintain it as if your function depends on it — because it does.
|
|
63
|
+
|
|
64
|
+
<!-- EN translation of the user's global prompt; source: https://gongdear.com/articles/2026/09/04/1788492620184.html ("Cline 的记忆库", verbatim in assets/global-memory-bank-prompt.md) -->
|
|
65
|
+
<!-- NOTE: the six-file set / directory name may follow the project's existing convention
|
|
66
|
+
(e.g. an existing `memory-bank/` directory); keep this prompt text unchanged otherwise. -->
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Cline 的记忆库
|
|
2
|
+
|
|
3
|
+
你是 Cline,一位专业的软件工程师,有一个独特的限制:
|
|
4
|
+
你的记忆会定期完全重置。这不是 bug - 这是使你保持完美文档的原因。
|
|
5
|
+
每次重置后,你完全依赖记忆库来理解项目并继续工作。
|
|
6
|
+
没有适当的文档,你无法有效运作。
|
|
7
|
+
|
|
8
|
+
## 记忆库文件
|
|
9
|
+
|
|
10
|
+
关键:如果 `memory-bank/` 或任何这些文件不存在,立即通过以下步骤创建:
|
|
11
|
+
|
|
12
|
+
1. 阅读所有提供的文档
|
|
13
|
+
2. 向用户询问任何缺失的信息
|
|
14
|
+
3. 仅使用经验证的信息创建文件
|
|
15
|
+
4. 没有完整上下文绝不继续
|
|
16
|
+
|
|
17
|
+
### 必需文件
|
|
18
|
+
|
|
19
|
+
- **projectbrief.md** - 新项目基础(业务、范围、目标)
|
|
20
|
+
- **productContext.md** - 为什么需要这个项目、解决什么问题、应该如何工作
|
|
21
|
+
- **activeContext.md** - 你现在在做什么、最近的变更、下一步计划(这是你的真实来源)
|
|
22
|
+
- **systemPatterns.md** - 系统如何构建、关键技术决策、架构模式
|
|
23
|
+
- **techContext.md** - 使用的技术、开发设置、技术约束
|
|
24
|
+
- **progress.md** - 什么功能已完成、还需要构建什么、进度状态
|
|
25
|
+
|
|
26
|
+
## 核心工作流程
|
|
27
|
+
|
|
28
|
+
### 开始任务
|
|
29
|
+
|
|
30
|
+
1. 检查记忆库文件
|
|
31
|
+
2. 如果有任何文件缺失,停止并创建它们
|
|
32
|
+
3. 继续之前阅读所有文件
|
|
33
|
+
4. 验证你有完整的上下文
|
|
34
|
+
5. 开始开发。在任务开始时初始化记忆库后,不要更新 memory-bank。
|
|
35
|
+
|
|
36
|
+
### 开发期间
|
|
37
|
+
|
|
38
|
+
1. 对于正常开发:
|
|
39
|
+
- 遵循记忆库模式
|
|
40
|
+
- 在重大变更后更新文档
|
|
41
|
+
2. 在每次使用工具时说 `[MEMORY BANK: ACTIVE]`
|
|
42
|
+
|
|
43
|
+
### 记忆库更新
|
|
44
|
+
|
|
45
|
+
当用户说"更新记忆库"时:
|
|
46
|
+
|
|
47
|
+
1. 这意味着即将进行记忆重置
|
|
48
|
+
2. 记录当前状态的所有内容
|
|
49
|
+
3. 使下一步计划清晰明确
|
|
50
|
+
4. 完成当前任务
|
|
51
|
+
|
|
52
|
+
记住:每次记忆重置后,你都会完全重新开始。
|
|
53
|
+
你与之前工作的唯一联系是记忆库。
|
|
54
|
+
维护它就像你的功能依赖于它 - 因为确实如此。
|
|
55
|
+
|
|
56
|
+
<!-- 来源:gongdear 博客 https://gongdear.com/articles/2026/09/04/1788492620184.html “自定义指令(完整版)”逐字保留 -->
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# 冷启动初始化手册(新工程)
|
|
2
|
+
|
|
3
|
+
## 前置核:全局默认 Memory Bank 提示词(必须先于任何 memory bank 开启确认到位)
|
|
4
|
+
检查 → 引导 → 降级,三步:
|
|
5
|
+
|
|
6
|
+
**第一步检查(跨 OS 通用,首选)**:CLI 与 VSCode 插件共用 `~/.cline/data`(Windows 为 `%USERPROFILE%\.cline\data`),一处配置两端生效。一行判定:
|
|
7
|
+
```bash
|
|
8
|
+
# macOS / Linux
|
|
9
|
+
python3 -c "import json;d=json.load(open('$HOME/.cline/data/globalState.json'));print(d.get('globalClineRulesToggles'))"
|
|
10
|
+
# Windows (PowerShell)
|
|
11
|
+
python -c "import os,json;d=json.load(open(os.path.expanduser('~/.cline/data/globalState.json')));print(d.get('globalClineRulesToggles'))"
|
|
12
|
+
```
|
|
13
|
+
值为 `{".../memory-bank.md": true}` 即已配置(key 是各 OS 的实际绝对路径);再 `head`/`Get-Content` 该文件确认是 memory-bank 提示词。命中且内容完整 → 直达分支二/三。
|
|
14
|
+
|
|
15
|
+
**全局规则目录的默认落点(按 OS 对照)**:
|
|
16
|
+
| OS | 插件默认全局 Rules 目录 | 旧式全局文件(legacy,仍兼容) | HOME 变量 |
|
|
17
|
+
|----|--------------------------|--------------------------------|-----------|
|
|
18
|
+
| macOS / Linux | `~/Documents/Cline/Rules/` | `~/.clinerules` | `$HOME` |
|
|
19
|
+
| Windows | `%USERPROFILE%\Documents\Cline\Rules\` | `%USERPROFILE%\.clinerules` | `%USERPROFILE%` |
|
|
20
|
+
|
|
21
|
+
检测顺序:先查注册表(上);未命中再 `ls` 上述两个落点有无 memory-bank 提示词文件(有文件但 toggle 未开 = 配了没勾,引导用户打开);都没有 = 未配置 → 第二步引导。
|
|
22
|
+
|
|
23
|
+
2. **引导**(未配置时):推荐用户配到**全局**(跨工程生效)——Cline 设置→自定义指令/Rules,粘贴 `assets/global-memory-bank-prompt.md` 全文(面向英文用户/工程给 `global-memory-bank-prompt.en.md`);文件落点对应上表 OS 行;给用户明确操作说明后再继续
|
|
24
|
+
3. **降级**(用户暂不配):**注入模式**——把所选语言版提示词全文直接写进本次任务 prompt 的上下文,**然后再发 `active memory bank`**(顺序固定:先提示词、后激活)
|
|
25
|
+
|
|
26
|
+
- 提示词全文 = `assets/global-memory-bank-prompt.md`(中文)/ `global-memory-bank-prompt.en.md`(英文),逐字模板勿改语义
|
|
27
|
+
- 来源:用户博客 https://gongdear.com/articles/2026/09/04/1788492620184.html 最后部分“自定义指令(完整版)”
|
|
28
|
+
|
|
29
|
+
## 分支 A:全新工程(连代码都没有)
|
|
30
|
+
代码事实为零 → **规则内容只能来自用户**,按 Cline 最佳实践逐维度问齐后让 Cline 落盘。**不要替用户编任何一条**。
|
|
31
|
+
|
|
32
|
+
### 逐维度询问清单(一次一块,别一次性全抛)
|
|
33
|
+
1. **projectbrief**:这个项目是什么、给谁用、范围多大、目标是什么(一句话 + 3-5 个要点就够,别问八股)
|
|
34
|
+
2. **productContext**:解决什么问题、现在怎么解决的、期望怎么工作
|
|
35
|
+
3. **techContext**:技术栈选型、运行环境、部署边界、已知技术约束
|
|
36
|
+
4. **systemPatterns**:计划采用的架构模式、分层约定、关键中间件(用户没想好就标“待定”)
|
|
37
|
+
5. **开发偏好**:语言规范、命名、错误处理、测试要求、分支策略、提交信息格式
|
|
38
|
+
6. **activeContext / progress**:当前起点是什么、第一步打算做什么(通常 = 脚手架初始化)
|
|
39
|
+
|
|
40
|
+
### 交给 Cline 的任务书要点
|
|
41
|
+
- 先写全局提示词核(前置硬前提)
|
|
42
|
+
- 再建工程级 `.clinerules` + `memory-bank/`(六文件),**内容逐条来自上面的用户回答**,用户没答的标“待确认”,禁止填充想象中的规范
|
|
43
|
+
- 只建规则/记忆文件,不产业务代码;一次性汇报后止步
|
|
44
|
+
|
|
45
|
+
## 分支 B:存量代码工程
|
|
46
|
+
代码事实存在 → **规则以扫描代码为基准**,用户背景信息只做补全。
|
|
47
|
+
|
|
48
|
+
### 交给 Cline 的任务书要点
|
|
49
|
+
- 先写全局提示词核(前置硬前提)
|
|
50
|
+
- 全量扫描现有代码:架构/模块划分/技术栈/既有命名与错误处理/测试现状/构建与分支约定
|
|
51
|
+
- 依据代码事实落 `.clinerules` + `memory-bank/` 六文件;用户提供的偏好(背景、习惯、约束)覆盖同冲突项时以用户为准
|
|
52
|
+
- 代码里看不出来且用户没说的 → 标“待确认”
|
|
53
|
+
- 只改规则/记忆文件,**禁止顺手重构业务代码**;一次性汇报后止步
|
|
54
|
+
|
|
55
|
+
## 两分支共同收尾
|
|
56
|
+
1. 我按验收清单核对:六文件存在且非空、内容可溯(用户话或代码行)、无业务代码改动
|
|
57
|
+
2. 向用户汇报:建了什么/每条依据是什么/哪些“待确认”
|
|
58
|
+
3. **停下等用户审阅**(他会逐轮纠偏,要求 Cline 同步改 rules/memory)→ 确认后才进正常转达工作流
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Decision Log — habits & preferences learned per TAG CLASS 决策流水(按标签类记)
|
|
2
|
+
|
|
3
|
+
> Log each user correction/decision with its TAG CLASS.
|
|
4
|
+
> ≥2 consistent samples in one tag class → distill into the 标签偏好区 section of SKILL.md.
|
|
5
|
+
> 同标签类 ≥2 个一致样本 → 蒸馏进 SKILL.md 的标签偏好区。
|
|
6
|
+
|
|
7
|
+
| Date 日期 | Tag class 标签类 | Scenario 场景 | My choice 我的选择 | User correction 用户纠正 | Reason 理由 |
|
|
8
|
+
|------|--------|------|---------------|------------|---------|
|
|
9
|
+
| — | — | — | — | — | — |
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Local Config — YOUR MACHINE (private, not tracked)
|
|
2
|
+
|
|
3
|
+
Copy this file to `local-config.md` and fill in YOUR values before first use.
|
|
4
|
+
本文件为模板;复制为 `local-config.md` 后填入你自己的值。
|
|
5
|
+
|
|
6
|
+
## Dev Environment 开发环境
|
|
7
|
+
| Item 项目 | Value 值 |
|
|
8
|
+
|----|-----|
|
|
9
|
+
| conda env | e.g. `dev-env` |
|
|
10
|
+
| Pre-launch | `source <your rc/env file> && conda activate <env>` |
|
|
11
|
+
| Dirty-stack fix | `unset CONDA_PREFIX CONDA_PREFIX_1 CONDA_PROMPT_MODIFIER CONDA_SHLVL CONDA_DEFAULT_ENV` (if your agent session inherits broken CONDA state) |
|
|
12
|
+
| Toolchain | e.g. `java` 21 / `mvn` 3.9+ / `node` |
|
|
13
|
+
| Branch rules | e.g. main is push-protected; feature branches only |
|
|
14
|
+
|
|
15
|
+
## Launch Template 启动模板
|
|
16
|
+
```bash
|
|
17
|
+
zsh -c '<unset CONDA_* if dirty>; source <env> && conda activate <env> && cd <project> && cline ...'
|
|
18
|
+
```
|
|
19
|
+
Self-check before launch: python points to target env / toolchain versions / `git branch --show-current` = task branch.
|
|
20
|
+
|
|
21
|
+
## LLM Endpoint
|
|
22
|
+
- base: `http://<your openai-compatible endpoint>/v1`, model: `<model-id>`
|
|
23
|
+
- Probe before launch: `curl -s -H 'Authorization: Bearer <key>' <base>/models | head -c 200`
|
|
24
|
+
|
|
25
|
+
## Scratch Workspace 临时工作区
|
|
26
|
+
`<path>/worktree/` — worktrees / subagent dirs / temp builds MUST stay here; never scatter into `~`.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Project Profiles — intro + tags only, NO architecture 项目画像(仅简介+标签,不记架构)
|
|
2
|
+
|
|
3
|
+
> Register a one-line intro + tags per project so learned preferences can be
|
|
4
|
+
> applied by TAG CLASS. Architecture details live in the project's own memory
|
|
5
|
+
> bank + clinerules, never here.
|
|
6
|
+
> 按工程登记简介+标签,以便按“标签类”套用已学偏好。架构细节归工程自己的 memory bank,不放这里。
|
|
7
|
+
|
|
8
|
+
| Project 工程 | Path 路径 | One-line intro 简介 | Side 端 | Lifecycle 生命周期 | Risk 风险面 |
|
|
9
|
+
|------|------|----------|----|---------|--------|
|
|
10
|
+
| — | — | — | backend/frontend 前后端 | long-term/short 长护/短期 | prod-data?/public API? 是否生产数据/对外接口 |
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""session_report.py — Cline 会话活动摘要 + 工程进度硬证据。
|
|
3
|
+
|
|
4
|
+
用法:
|
|
5
|
+
python3 session_report.py # 最新会话 10 条 + 当前目录证据
|
|
6
|
+
python3 session_report.py 15 # 最近 15 条
|
|
7
|
+
python3 session_report.py /path/to/repo # 指定工程目录(自动识别 sid 或路径)
|
|
8
|
+
|
|
9
|
+
输出:
|
|
10
|
+
- 会话最近 N 条消息(role / text / tool / 结果摘要)
|
|
11
|
+
- 工程硬证据:分支、git status、最近 commit、最新测试报告首行(多栈:Maven surefire / JUnit-xml / pytest 等)
|
|
12
|
+
输出 / output: branch, git status, last commit, newest test-report lines (stack-agnostic)
|
|
13
|
+
只读操作,不改任何文件。stdlib only。
|
|
14
|
+
"""
|
|
15
|
+
import glob
|
|
16
|
+
import json
|
|
17
|
+
import os
|
|
18
|
+
import subprocess
|
|
19
|
+
import sys
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
SESSIONS_ROOT = os.path.join(os.path.expanduser("~"), ".cline", "data", "sessions")
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def latest_session_id():
|
|
26
|
+
if not os.path.isdir(SESSIONS_ROOT):
|
|
27
|
+
return None
|
|
28
|
+
entries = []
|
|
29
|
+
for e in os.listdir(SESSIONS_ROOT):
|
|
30
|
+
p = os.path.join(SESSIONS_ROOT, e)
|
|
31
|
+
if os.path.isdir(p):
|
|
32
|
+
entries.append((os.path.getmtime(p), e))
|
|
33
|
+
return max(entries)[1] if entries else None
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def load_session(sid):
|
|
37
|
+
p = os.path.join(SESSIONS_ROOT, sid, sid + ".messages.json")
|
|
38
|
+
if not os.path.exists(p):
|
|
39
|
+
return None, None
|
|
40
|
+
with open(p, encoding="utf-8") as f:
|
|
41
|
+
d = json.load(f)
|
|
42
|
+
return d.get("messages", []), d.get("updated_at")
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def summarize(msgs, n):
|
|
46
|
+
lines = []
|
|
47
|
+
for m in (msgs or [])[-n:]:
|
|
48
|
+
role = m.get("role", "?")
|
|
49
|
+
content = m.get("content")
|
|
50
|
+
if isinstance(content, str):
|
|
51
|
+
lines.append("[%s] %s" % (role, content[:160].strip()))
|
|
52
|
+
continue
|
|
53
|
+
for c in content or []:
|
|
54
|
+
t = c.get("type")
|
|
55
|
+
if t == "text":
|
|
56
|
+
lines.append("[%s|text] %s" % (role, (c.get("text") or "")[:160].strip()))
|
|
57
|
+
elif t in ("tool_use", "toolCall", "tool"):
|
|
58
|
+
name = c.get("name") or c.get("toolName") or ""
|
|
59
|
+
inp = c.get("input") or c.get("arguments") or {}
|
|
60
|
+
lines.append("[%s|tool:%s] %s" % (role, name, json.dumps(inp, ensure_ascii=False)[:150]))
|
|
61
|
+
elif t == "tool_result":
|
|
62
|
+
r = c.get("content") or c.get("output") or ""
|
|
63
|
+
r = r if isinstance(r, str) else json.dumps(r, ensure_ascii=False)
|
|
64
|
+
lines.append("[%s|result] %s" % (role, str(r)[:150]))
|
|
65
|
+
else:
|
|
66
|
+
lines.append("[%s|%s] %s" % (role, t, json.dumps(c, ensure_ascii=False)[:120]))
|
|
67
|
+
return lines
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def sh(cmd, cwd):
|
|
71
|
+
try:
|
|
72
|
+
r = subprocess.run(cmd, shell=True, cwd=cwd, capture_output=True, text=True, timeout=60)
|
|
73
|
+
out = r.stdout.strip()
|
|
74
|
+
return out if out else "(exit %d %s)" % (r.returncode, r.stderr.strip()[:60])
|
|
75
|
+
except Exception as e:
|
|
76
|
+
return "(error %s)" % e
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
# 多栈测试报告候选(按优先级)/ multi-stack test-report candidate patterns
|
|
80
|
+
REPORT_GLOBS = [
|
|
81
|
+
"**/target/surefire-reports/*.txt", # Maven/JUnit
|
|
82
|
+
"**/junit-xml/TEST-*.xml", # Node (vitest/jest jasmine2)
|
|
83
|
+
"**/build/test-results/test/*.xml", # Kotlin/Gradle
|
|
84
|
+
"**/.pytest_cache/v/cache/lastfailed", # pytest
|
|
85
|
+
"**/coverage/*.html", # 覆盖率产物兜底
|
|
86
|
+
]
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def repo_evidence(root):
|
|
90
|
+
if not os.path.exists(os.path.join(root, ".git")) and not os.path.isdir(os.path.join(root, ".git")):
|
|
91
|
+
try:
|
|
92
|
+
r = subprocess.run(["git", "rev-parse", "--show-toplevel"], cwd=root, capture_output=True, text=True, timeout=20)
|
|
93
|
+
if r.returncode != 0:
|
|
94
|
+
return ["(not a git repo: %s)" % root]
|
|
95
|
+
root = r.stdout.strip()
|
|
96
|
+
except Exception:
|
|
97
|
+
return ["(not a git repo: %s)" % root]
|
|
98
|
+
lines = [
|
|
99
|
+
"branch : %s" % sh("git branch --show-current", root),
|
|
100
|
+
"status : %s" % (sh("git status --short | head -15", root) or "(clean)"),
|
|
101
|
+
"commit : %s" % sh("git log -1 --pretty='%h %s'", root),
|
|
102
|
+
]
|
|
103
|
+
recent = []
|
|
104
|
+
for pat in REPORT_GLOBS:
|
|
105
|
+
hits = glob.glob(os.path.join(root, pat), recursive=True)
|
|
106
|
+
if hits:
|
|
107
|
+
recent.extend(hits)
|
|
108
|
+
break
|
|
109
|
+
recent = sorted(recent, key=lambda p: os.path.getmtime(p), reverse=True)[:6]
|
|
110
|
+
for f in recent:
|
|
111
|
+
try:
|
|
112
|
+
with open(f, encoding="utf-8", errors="replace") as fh:
|
|
113
|
+
first = fh.readline().strip()
|
|
114
|
+
lines.append("tests : %s | %s" % (os.path.relpath(f, root), first[:140]))
|
|
115
|
+
except OSError:
|
|
116
|
+
pass
|
|
117
|
+
if not recent:
|
|
118
|
+
lines.append("tests : (no test reports found / 未找到测试报告)")
|
|
119
|
+
return lines
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
def main(argv):
|
|
123
|
+
n, repo, sid = 10, os.getcwd(), None
|
|
124
|
+
for a in argv:
|
|
125
|
+
if a.isdigit() and int(a) < 500:
|
|
126
|
+
n = max(1, int(a))
|
|
127
|
+
elif os.path.isdir(os.path.expanduser(a)):
|
|
128
|
+
repo = os.path.expanduser(a)
|
|
129
|
+
else:
|
|
130
|
+
sid = a
|
|
131
|
+
sid = sid or latest_session_id()
|
|
132
|
+
if not sid:
|
|
133
|
+
print("no cline sessions found under", SESSIONS_ROOT)
|
|
134
|
+
return 1
|
|
135
|
+
print("== session: %s ==" % sid)
|
|
136
|
+
msgs, updated = load_session(sid)
|
|
137
|
+
if msgs is None:
|
|
138
|
+
print("(messages.json not found)")
|
|
139
|
+
return 1
|
|
140
|
+
print("updated_at: %s | total messages: %d" % (updated, len(msgs)))
|
|
141
|
+
print("-- recent activity --")
|
|
142
|
+
for line in summarize(msgs, n):
|
|
143
|
+
print(line)
|
|
144
|
+
print("-- repo evidence: %s --" % repo)
|
|
145
|
+
for line in repo_evidence(repo):
|
|
146
|
+
print(line)
|
|
147
|
+
return 0
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
if __name__ == "__main__":
|
|
151
|
+
sys.exit(main(sys.argv[1:]))
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cross-chain-relayer-audit
|
|
3
|
+
description: 'Cross-chain relayer bridge audit register: message hash verifications, replay protection nonces, validator quorum, and withdrawal proofs.'
|
|
4
|
+
category: engineering
|
|
5
|
+
risk: safe
|
|
6
|
+
source: self
|
|
7
|
+
source_type: self
|
|
8
|
+
date_added: "2026-10-01"
|
|
9
|
+
author: Ranjeet2063
|
|
10
|
+
tags: [cross-chain, bridge, relayer, security, cryptography, web3, stellar]
|
|
11
|
+
tools: []
|
|
12
|
+
source_repo: Ranjeet2063/agentic-awesome-skills
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Cross-Chain Relayer Security Audit
|
|
16
|
+
|
|
17
|
+
**What it is:** Audits cross-chain message passing protocols, cryptographic commitment trees, and validator quorum consensus for cross-chain relayers.
|
|
18
|
+
|
|
19
|
+
## Overview
|
|
20
|
+
|
|
21
|
+
Provides a standardized, auditable framework and data model for **Cross-Chain Relayer Security Audit** operations across distributed engineering and decentralized application systems.
|
|
22
|
+
|
|
23
|
+
## When to Use This Skill
|
|
24
|
+
|
|
25
|
+
- When formalizing architectural contracts, security invariants, or operational limits for Cross-Chain Relayer Security Audit.
|
|
26
|
+
- When cross-functional review is required between protocol developers, smart contract auditors, and AI engineering agents.
|
|
27
|
+
- When generating reproducible CSV, SQL DDL, JSON Schema, and Notion property registers for tracking compliance.
|
|
28
|
+
|
|
29
|
+
## How It Works
|
|
30
|
+
|
|
31
|
+
1. Define the parameters, thresholds, and identity bindings required for the target operational register.
|
|
32
|
+
2. Select appropriate boundary enforcement values from validated enum select sets.
|
|
33
|
+
3. Export standardized artifacts (CSV table, SQL DDL, JSON Schema) to integrate into validation CI pipelines.
|
|
34
|
+
|
|
35
|
+
## Field Reference
|
|
36
|
+
|
|
37
|
+
| # | Field Name | Type | SQL Type | JSON Schema Type | Notion Property Type | Example Value |
|
|
38
|
+
|---|------------|------|----------|------------------|----------------------|---------------|
|
|
39
|
+
| 1 | Relayer Audit ID | `id` | `SERIAL PRIMARY KEY` | `integer` | Text | `REL-001` |
|
|
40
|
+
| 2 | Source Chain Domain | `text` | `VARCHAR(32)` | `string` | Text | `Ethereum Sepolia` |
|
|
41
|
+
| 3 | Destination Chain Domain | `text` | `VARCHAR(32)` | `string` | Text | `Stellar Testnet` |
|
|
42
|
+
| 4 | Message Hash Verification | `select` | `VARCHAR(32)` | `string` | Select | `Keccak256 Verified` |
|
|
43
|
+
| 5 | Replay Protection Nonce Check | `select` | `VARCHAR(32)` | `string` | Select | `Enforced Strict Sequence` |
|
|
44
|
+
| 6 | Validator Quorum Threshold | `text` | `VARCHAR(16)` | `string` | Text | `5-of-7 Quorum` |
|
|
45
|
+
| 7 | Slashing Condition Active | `select` | `VARCHAR(16)` | `string` | Select | `Yes` |
|
|
46
|
+
| 8 | Withdrawal Proof Standard | `select` | `VARCHAR(64)` | `string` | Select | `Merkle Patricia Trie Proof` |
|
|
47
|
+
| 9 | Finality Confirmation Blocks | `number` | `INTEGER` | `number` | Number | `32` |
|
|
48
|
+
| 10 | Bridge Security Posture | `select` | `VARCHAR(32)` | `string` | Select | `Verified Secure` |
|
|
49
|
+
| 11 | Audit Stamp Date | `date` | `DATE` | `string, format: date` | Date | `2026-10-01` |
|
|
50
|
+
|
|
51
|
+
## Select Options
|
|
52
|
+
|
|
53
|
+
**Message Hash Verification**
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
Keccak256 Verified | SHA256 Verified | Invalid Hash
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Replay Protection Nonce Check**
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
Enforced Strict Sequence | Bitmask Window | Unchecked
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**Slashing Condition Active**
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
Yes | No
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**Withdrawal Proof Standard**
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
Merkle Patricia Trie Proof | ZK-SNARK Validity Proof | Light Client Header
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**Bridge Security Posture**
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
Verified Secure | Under Audit | Vulnerable Finding
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Relations
|
|
84
|
+
|
|
85
|
+
- `Audit Reference` -> links to the formal review documentation or test repository.
|
|
86
|
+
- `Target Architecture` -> links to the deployed contract or autonomous agent runtime component.
|
|
87
|
+
|
|
88
|
+
## Examples
|
|
89
|
+
|
|
90
|
+
**Prompt**
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
How do I configure and track Cross-Chain Relayer Security Audit for our production environment?
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Recommended Next Step**
|
|
97
|
+
|
|
98
|
+
> Generate the unified field schema, SQL DDL migration, and JSON validation schema to register into your system catalog.
|
|
99
|
+
>
|
|
100
|
+
> Workflow: Define criteria -> Run automated verification -> Record baseline -> Monitor invariants.
|
|
101
|
+
|
|
102
|
+
## Best Practices
|
|
103
|
+
|
|
104
|
+
- Enforce strict typing on numerical bounds and currency amounts; avoid unstructured free-text fields for critical states.
|
|
105
|
+
- Re-run validation test suites on every state-altering commit or parameter change.
|
|
106
|
+
- Keep example data synthetic and isolated from production cryptographic keys or private endpoints.
|
|
107
|
+
|
|
108
|
+
## Limitations
|
|
109
|
+
|
|
110
|
+
- Provides architectural specifications, data models, and verification schemas; does not execute direct transaction signing without authorized external tooling.
|
|
111
|
+
- Requires network connectivity and valid RPC credentials when querying on-chain states.
|
|
112
|
+
|
|
113
|
+
## Security & Safety Notes
|
|
114
|
+
|
|
115
|
+
- All parameters declare `risk: safe`. No unauthorized state modification or privileged credential access is performed.
|
|
116
|
+
- Use synthetic dummy keys and mock addresses in test suites and local verification scripts.
|
|
117
|
+
|
|
118
|
+
## Common Pitfalls
|
|
119
|
+
|
|
120
|
+
- **Problem:** Mismatched decimal precision between contract runtime and database register.
|
|
121
|
+
**Solution:** Always verify decimals using the explicit field mapping in this reference.
|
|
122
|
+
- **Problem:** Missing authorization checks prior to state update.
|
|
123
|
+
**Solution:** Cross-validate against the Security Audit register before deployment.
|
|
124
|
+
|
|
125
|
+
## Related Skills
|
|
126
|
+
|
|
127
|
+
- @smart-contract-formal-verification - verifies state invariants mathematically.
|
|
128
|
+
- @web3-rate-limiting-circuit-breaker - provides operational guardrails and threshold breakers.
|
|
129
|
+
- @stellar-anchor-integration - covers SEP-10 and SEP-24 anchor compliance flows.
|
|
130
|
+
|
|
131
|
+
## Reusable Prompt
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
I want to establish a verified Cross-Chain Relayer Security Audit register for our production protocol.
|
|
135
|
+
Guide me through the required field parameters and output the corresponding SQL DDL and JSON Schema.
|
|
136
|
+
```
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: defi-yield-strategy-allocator
|
|
3
|
+
description: 'Multi-vault automated yield strategy allocation register: APY benchmarks, impermanent loss risk tiers, and rebalancing triggers.'
|
|
4
|
+
category: engineering
|
|
5
|
+
risk: safe
|
|
6
|
+
source: self
|
|
7
|
+
source_type: self
|
|
8
|
+
date_added: "2026-10-01"
|
|
9
|
+
author: Ranjeet2063
|
|
10
|
+
tags: [defi, yield, soroban, vault, liquidity, finance, stellar]
|
|
11
|
+
tools: []
|
|
12
|
+
source_repo: Ranjeet2063/agentic-awesome-skills
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# DeFi Yield Strategy Allocation Register
|
|
16
|
+
|
|
17
|
+
**What it is:** Monitors capital efficiency, yield compounding schedules, and downside protection bounds across decentralized finance yield protocols.
|
|
18
|
+
|
|
19
|
+
## Overview
|
|
20
|
+
|
|
21
|
+
Provides a standardized, auditable framework and data model for **DeFi Yield Strategy Allocation Register** operations across distributed engineering and decentralized application systems.
|
|
22
|
+
|
|
23
|
+
## When to Use This Skill
|
|
24
|
+
|
|
25
|
+
- When formalizing architectural contracts, security invariants, or operational limits for DeFi Yield Strategy Allocation Register.
|
|
26
|
+
- When cross-functional review is required between protocol developers, smart contract auditors, and AI engineering agents.
|
|
27
|
+
- When generating reproducible CSV, SQL DDL, JSON Schema, and Notion property registers for tracking compliance.
|
|
28
|
+
|
|
29
|
+
## How It Works
|
|
30
|
+
|
|
31
|
+
1. Define the parameters, thresholds, and identity bindings required for the target operational register.
|
|
32
|
+
2. Select appropriate boundary enforcement values from validated enum select sets.
|
|
33
|
+
3. Export standardized artifacts (CSV table, SQL DDL, JSON Schema) to integrate into validation CI pipelines.
|
|
34
|
+
|
|
35
|
+
## Field Reference
|
|
36
|
+
|
|
37
|
+
| # | Field Name | Type | SQL Type | JSON Schema Type | Notion Property Type | Example Value |
|
|
38
|
+
|---|------------|------|----------|------------------|----------------------|---------------|
|
|
39
|
+
| 1 | Strategy Allocation ID | `id` | `SERIAL PRIMARY KEY` | `integer` | Text | `YLD-001` |
|
|
40
|
+
| 2 | Target Protocol Strategy | `text` | `VARCHAR(64)` | `string` | Text | `Soroban AMM Liquidity Staking` |
|
|
41
|
+
| 3 | Allocated Capital Principal | `currency` | `NUMERIC(24,7)` | `number` | Number | `100000.0000000` |
|
|
42
|
+
| 4 | Base APY Yield % | `number` | `NUMERIC(6,2)` | `number` | Number | `14.25` |
|
|
43
|
+
| 5 | Impermanent Loss Risk Score | `select` | `VARCHAR(32)` | `string` | Select | `Low (Stablecoin Pair)` |
|
|
44
|
+
| 6 | Max Protocol Drawdown Cap % | `number` | `NUMERIC(5,2)` | `number` | Number | `5.00` |
|
|
45
|
+
| 7 | Automated Harvest Frequency Hours | `number` | `INTEGER` | `number` | Number | `12` |
|
|
46
|
+
| 8 | Emergency Unwind Trigger | `select` | `VARCHAR(64)` | `string` | Select | `Price Divergence > 3%` |
|
|
47
|
+
| 9 | Capital Allocation Health | `select` | `VARCHAR(32)` | `string` | Select | `Optimum Yield` |
|
|
48
|
+
| 10 | Portfolio Manager | `text` | `VARCHAR(64)` | `string` | Text | `Ranjeet2063` |
|
|
49
|
+
| 11 | Last Rebalance Date | `date` | `DATE` | `string, format: date` | Date | `2026-10-01` |
|
|
50
|
+
|
|
51
|
+
## Select Options
|
|
52
|
+
|
|
53
|
+
**Impermanent Loss Risk Score**
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
Low (Stablecoin Pair) | Moderate (Correlated) | High (Volatile)
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Emergency Unwind Trigger**
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
Price Divergence > 3% | TVL Drain > 20% | Oracle Failure
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**Capital Allocation Health**
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
Optimum Yield | Underperforming | Unwinding | Liquidated
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Relations
|
|
72
|
+
|
|
73
|
+
- `Audit Reference` -> links to the formal review documentation or test repository.
|
|
74
|
+
- `Target Architecture` -> links to the deployed contract or autonomous agent runtime component.
|
|
75
|
+
|
|
76
|
+
## Examples
|
|
77
|
+
|
|
78
|
+
**Prompt**
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
How do I configure and track DeFi Yield Strategy Allocation Register for our production environment?
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Recommended Next Step**
|
|
85
|
+
|
|
86
|
+
> Generate the unified field schema, SQL DDL migration, and JSON validation schema to register into your system catalog.
|
|
87
|
+
>
|
|
88
|
+
> Workflow: Define criteria -> Run automated verification -> Record baseline -> Monitor invariants.
|
|
89
|
+
|
|
90
|
+
## Best Practices
|
|
91
|
+
|
|
92
|
+
- Enforce strict typing on numerical bounds and currency amounts; avoid unstructured free-text fields for critical states.
|
|
93
|
+
- Re-run validation test suites on every state-altering commit or parameter change.
|
|
94
|
+
- Keep example data synthetic and isolated from production cryptographic keys or private endpoints.
|
|
95
|
+
|
|
96
|
+
## Limitations
|
|
97
|
+
|
|
98
|
+
- Provides architectural specifications, data models, and verification schemas; does not execute direct transaction signing without authorized external tooling.
|
|
99
|
+
- Requires network connectivity and valid RPC credentials when querying on-chain states.
|
|
100
|
+
|
|
101
|
+
## Security & Safety Notes
|
|
102
|
+
|
|
103
|
+
- All parameters declare `risk: safe`. No unauthorized state modification or privileged credential access is performed.
|
|
104
|
+
- Use synthetic dummy keys and mock addresses in test suites and local verification scripts.
|
|
105
|
+
|
|
106
|
+
## Common Pitfalls
|
|
107
|
+
|
|
108
|
+
- **Problem:** Mismatched decimal precision between contract runtime and database register.
|
|
109
|
+
**Solution:** Always verify decimals using the explicit field mapping in this reference.
|
|
110
|
+
- **Problem:** Missing authorization checks prior to state update.
|
|
111
|
+
**Solution:** Cross-validate against the Security Audit register before deployment.
|
|
112
|
+
|
|
113
|
+
## Related Skills
|
|
114
|
+
|
|
115
|
+
- @soroban-liquidity-pool - covers AMM invariant and LP-share modelling.
|
|
116
|
+
- @web3-rate-limiting-circuit-breaker - provides operational guardrails and threshold breakers.
|
|
117
|
+
- @soroban-oracle-data-feed-audit - covers oracle heartbeat and stale-price handling.
|
|
118
|
+
|
|
119
|
+
## Reusable Prompt
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
I want to establish a verified DeFi Yield Strategy Allocation Register register for our production protocol.
|
|
123
|
+
Guide me through the required field parameters and output the corresponding SQL DDL and JSON Schema.
|
|
124
|
+
```
|