npx skills add https://github.com/boshu2/agentops --skill reverse-engineer-rpi将产品逆向工程为可机械验证的功能清单 + 注册表 + 规范集,可选择生成安全审计工件和验证门。
python3 skills/reverse-engineer-rpi/scripts/reverse_engineer_rpi.py ao \
--authorized \
--mode=binary \
--binary-path="$(command -v ao)" \
--output-dir=".agents/research/ao/"
如果您没有分析该二进制文件的明确书面授权,请不要运行上述命令。请使用包含的演示夹具代替(参见下面的自测部分)。
仅仓库示例(无需二进制文件):
python3 skills/reverse-engineer-rpi/scripts/reverse_engineer_rpi.py cc-sdd \
--mode=repo \
--upstream-repo="https://github.com/gotalab/cc-sdd.git" \
--output-dir=".agents/research/cc-sdd/"
固定克隆(可复现):
python3 skills/reverse-engineer-rpi/scripts/reverse_engineer_rpi.py cc-sdd \
--mode=repo \
--upstream-repo="https://github.com/gotalab/cc-sdd.git" \
--upstream-ref=v1.0.0 \
--output-dir=".agents/research/cc-sdd/"
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
必需参数:
product_name可选参数:
--docs-sitemap-url(建议在可用时提供;支持 https://... 和 file:///...)--docs-features-prefix(默认:auto;检测最佳本地文档前缀,回退到 docs/features/)--upstream-repo(可选)--upstream-ref(将克隆固定到特定的提交、标签或分支;在 clone-metadata.json 中记录解析后的 SHA)--local-clone-dir(默认:.tmp/<product_name>)--output-dir(默认:.agents/research/<product_name>/)--mode(默认:repo;允许值:repo|binary|both)--binary-path(如果 --mode 包含 binary 则为必需)--no-materialize-archives(仅授权模式;二进制模式默认提取嵌入式 ZIP 文件;此选项禁用提取并保持仅索引)安全审计标志(可选):
--security-audit(启用安全工件 + 门)--sbom(在可能的情况下生成 SBOM + 依赖风险报告;可能仅输出说明而不执行操作)--fuzz(仅当存在安全测试框架时;有时间限制)强制护栏标志:
--authorized(二进制模式必需;没有此标志则拒绝运行二进制分析)--upstream-ref)使用 --upstream-ref 将仓库模式克隆固定到特定的提交、标签或分支。这使得分析可复现,并允许将黄金夹具与已知基线进行比较。
# 固定到标签(可复现)
python3 skills/reverse-engineer-rpi/scripts/reverse_engineer_rpi.py cc-sdd \
--mode=repo \
--upstream-repo="https://github.com/gotalab/cc-sdd.git" \
--upstream-ref=v1.0.0 \
--output-dir=".agents/research/cc-sdd/"
# 固定到特定的提交 SHA
python3 skills/reverse-engineer-rpi/scripts/reverse_engineer_rpi.py cc-sdd \
--mode=repo \
--upstream-repo="https://github.com/gotalab/cc-sdd.git" \
--upstream-ref=abc1234 \
--output-dir=".agents/research/cc-sdd/"
当提供 --upstream-ref 时:
git fetch --depth=1 origin <ref> 获取克隆,并检出到 FETCH_HEAD。output_dir/clone-metadata.json 中,以便追溯。--upstream-ref,则使用默认分支 HEAD 的 --depth=1 浅克隆。clone-metadata.json 模式:
{
"upstream_repo": "https://github.com/gotalab/cc-sdd.git",
"upstream_ref": "v1.0.0",
"resolved_commit": "<full SHA>",
"clone_date": "YYYY-MM-DD"
}
output_dir/)仓库模式分析在 output_dir/ 下写入机器可检查的约定文件。这些文件仅使用相对路径、排序列表和稳定键——没有绝对路径,没有运行特定的时间戳——因此它们可以作为黄金夹具提交,并在不同运行之间进行比较。
主要约定文件:
| 文件 | 描述 |
|---|---|
feature-registry.yaml | 结构化功能清单,包含机械提取的 CLI、配置/环境变量和工件表面 |
cli-surface-contracts.txt | CLI 表面:命令、标志、帮助文本、框架、语言 |
docs-features.txt | 从文档中提取的功能(文档说明 vs 代码证明) |
clone-metadata.json | 上游仓库 URL、固定引用、解析的提交 SHA、克隆日期 |
示例 feature-registry.yaml 结构:
schema_version: 1
product_name: cc-sdd
upstream_commit: "abc1234..."
features:
- name: cli-entry
cli:
language: node
bin:
cc-sdd: dist/cli.js
help_text: "Usage: cc-sdd [options] ..."
- name: config-surface
config_env:
config_file: ".cc-sdd/config.json"
env_vars:
- name: CC_SDD_TOKEN
evidence: ["src/config.ts"]
注意:约定输出由
--mode=repo(或--mode=both)写入。二进制模式输出(binary-analysis.md、binary-symbols.txt等)直接位于output_dir/下。
黄金夹具允许进行回归检测:提交一个已知良好的夹具快照(约定文件与固定的 clone-metadata.json 一起),然后将未来的运行结果与之进行比较。
bash skills/reverse-engineer-rpi/scripts/repo_fixture_test.sh
此脚本(在 ag-w77.3 中实现):
skills/reverse-engineer-rpi/fixtures/cc-sdd-v2.1.0/clone-metadata.json 以确定固定的上游引用。reverse_engineer_rpi.py,使用该引用,输出到临时输出目录。feature-registry.yaml、cli-surface-contracts.txt、docs-features.txt)进行比较。测试需要网络访问权限来克隆上游仓库。
当约定合法地发生变化时(新标志、新环境变量、模式版本更新),更新黄金夹具:
# 1. 使用固定引用重新运行以生成新的约定文件
python3 skills/reverse-engineer-rpi/scripts/reverse_engineer_rpi.py cc-sdd \
--mode=repo \
--upstream-repo="https://github.com/gotalab/cc-sdd.git" \
--upstream-ref=<new-tag-or-sha> \
--output-dir=".tmp/cc-sdd-refresh/"
# 2. 将约定文件复制到夹具目录
cp .tmp/cc-sdd-refresh/feature-registry.yaml \
skills/reverse-engineer-rpi/fixtures/cc-sdd-v2.1.0/feature-registry.yaml
# 3. 更新固定的克隆元数据
cp .tmp/cc-sdd-refresh/clone-metadata.json \
skills/reverse-engineer-rpi/fixtures/cc-sdd-v2.1.0/clone-metadata.json
# 4. 提交更新后的夹具
git add skills/reverse-engineer-rpi/fixtures/cc-sdd-v2.1.0/
git commit -m "fix(reverse-engineer-rpi): update cc-sdd golden fixtures to <new-tag-or-sha>"
测试通过必须提交的夹具文件:
skills/reverse-engineer-rpi/fixtures/cc-sdd-v2.1.0/clone-metadata.jsonskills/reverse-engineer-rpi/fixtures/cc-sdd-v2.1.0/feature-registry.yamlskills/reverse-engineer-rpi/fixtures/cc-sdd-v2.1.0/cli-surface-contracts.txtskills/reverse-engineer-rpi/fixtures/cc-sdd-v2.1.0/docs-features.txt运行:
python3 skills/reverse-engineer-rpi/scripts/reverse_engineer_rpi.py <product_name> --authorized [flags...]
这将在 output_dir/ 下生成所需的输出,并在适用时在 .agents/council/ 和 .agents/learnings/ 下生成。
output_dir/ 下的核心输出:
feature-inventory.mdfeature-registry.yamlvalidate-feature-registry.pyfeature-catalog.mdspec-architecture.mdspec-code-map.mdspec-cli-surface.md(检测到 Node、Python 或 Go CLI;否则将说明写入 spec-code-map.md)spec-clone-vs-use.mdspec-clone-mvp.md(原始 MVP 规范;不要从目标复制)clone-metadata.json(当使用 --upstream-repo 时;记录解析的提交 SHA)二进制模式额外输出:
binary-analysis.md(尽力而为的摘要)binary-embedded-archives.md(仅索引;无转储)仓库模式额外输出:
spec-artifact-surface.md(尽力而为;模板/清单驱动的安装表面)artifact-registry.json(尽力而为;当存在清单/模板时的哈希模板清单)如果使用 --security-audit,同时创建 output_dir/security/:
threat-model.mdattack-surface.mddataflow.mdcrypto-review.mdauthn-authz.mdfindings.mdreproducibility.mdvalidate-security-audit.sh端到端夹具(安全的、自有的演示二进制文件,包含嵌入式 ZIP):
bash skills/reverse-engineer-rpi/scripts/self_test.sh
这必须显示:
validate-security-audit.sh 退出 0 且密钥扫描通过用户输入: /reverse-engineer-rpi cc-sdd --mode=repo --upstream-repo="https://github.com/gotalab/cc-sdd.git" --upstream-ref=v1.0.0
执行过程:
v1.0.0 处浅克隆上游仓库,并将解析后的 SHA 记录在 clone-metadata.json 中。feature-inventory.md、feature-registry.yaml、约定 JSON 和所有规范文件。结果: 在 .agents/research/cc-sdd/ 下生成完整的功能目录和机器可检查的 feature-registry.yaml,已准备好进行黄金夹具比较。
用户输入: /reverse-engineer-rpi ao --authorized --mode=binary --binary-path="$(command -v ao)" --security-audit
执行过程:
ao 二进制文件运行静态分析(文件元数据、链接库、嵌入式归档签名)并写入 binary-analysis.md 和 binary-embedded-archives.md。output_dir/security/ 下生成完整的安全审计套件(threat-model.md、attack-surface.md、findings.md 等),并对所有输出运行密钥扫描门。结果: 生成二进制分析工件加上经过验证的安全审计;validate-security-audit.sh 退出 0,确认所有安全交付物都存在且无密钥泄露。
| 问题 | 原因 | 解决方案 |
|---|---|---|
| 脚本拒绝运行二进制分析 | 缺少 --authorized 标志 | 添加 --authorized 以确认您拥有分析该二进制文件的明确书面授权。 |
clone-metadata.json 未生成 | 未提供 --upstream-repo | 传递 --upstream-repo(以及可选的 --upstream-ref)以启用克隆元数据跟踪。 |
| 夹具测试比较意外失败 | 上游仓库已更改或黄金夹具已过时 | 使用固定引用重新运行,将新的约定文件复制到 fixtures/ 中,并提交更新后的黄金文件(参见更新夹具部分)。 |
spec-cli-surface.md 未生成 | 仓库中未检测到可识别的 CLI 框架(Node/Python/Go) | 检查目标仓库是否具有可发现的 CLI 入口点;否则 CLI 表面将在 spec-code-map.md 中记录。 |
| 仓库克隆期间网络错误 | 防火墙、VPN 或 GitHub 速率限制阻止了浅克隆 | 验证网络连接,如果仓库是私有的,请使用 gh auth login 进行身份验证,或使用 --local-clone-dir 指向预克隆的目录。 |
每周安装次数
169
仓库
GitHub 星标数
198
首次出现时间
2026年2月17日
安全审计
安装于
opencode168
github-copilot164
codex164
gemini-cli164
kimi-cli162
cursor162
Reverse-engineer a product into a mechanically verifiable feature inventory + registry + spec set, with optional security-audit artifacts and validation gates.
python3 skills/reverse-engineer-rpi/scripts/reverse_engineer_rpi.py ao \
--authorized \
--mode=binary \
--binary-path="$(command -v ao)" \
--output-dir=".agents/research/ao/"
If you do not have explicit written authorization to analyze that binary, do not run the above. Use the included demo fixture instead (see Self-Test below).
Repo-only example (no binary required):
python3 skills/reverse-engineer-rpi/scripts/reverse_engineer_rpi.py cc-sdd \
--mode=repo \
--upstream-repo="https://github.com/gotalab/cc-sdd.git" \
--output-dir=".agents/research/cc-sdd/"
Pinned clone (reproducible):
python3 skills/reverse-engineer-rpi/scripts/reverse_engineer_rpi.py cc-sdd \
--mode=repo \
--upstream-repo="https://github.com/gotalab/cc-sdd.git" \
--upstream-ref=v1.0.0 \
--output-dir=".agents/research/cc-sdd/"
Required:
product_nameOptional:
--docs-sitemap-url (recommended when available; supports https://... and file:///...)--docs-features-prefix (default: auto; detects best local docs prefix, falls back to docs/features/)--upstream-repo (optional)--upstream-ref (pin clone to a specific commit, tag, or branch; records resolved SHA in clone-metadata.json)--local-clone-dir (default: )Security audit flags (optional):
--security-audit (enables security artifacts + gates)--sbom (generate SBOM + dependency risk report where possible; may no-op with a note)--fuzz (only if a safe harness exists; timeboxed)Mandatory guardrail flag:
--authorized (required for binary mode; refuses to run binary analysis without it)--upstream-ref)Use --upstream-ref to pin a repo-mode clone to a specific commit, tag, or branch. This makes analysis reproducible and allows golden fixtures to be diffed against a known baseline.
# Pin to a tag (reproducible)
python3 skills/reverse-engineer-rpi/scripts/reverse_engineer_rpi.py cc-sdd \
--mode=repo \
--upstream-repo="https://github.com/gotalab/cc-sdd.git" \
--upstream-ref=v1.0.0 \
--output-dir=".agents/research/cc-sdd/"
# Pin to a specific commit SHA
python3 skills/reverse-engineer-rpi/scripts/reverse_engineer_rpi.py cc-sdd \
--mode=repo \
--upstream-repo="https://github.com/gotalab/cc-sdd.git" \
--upstream-ref=abc1234 \
--output-dir=".agents/research/cc-sdd/"
When --upstream-ref is provided:
git fetch --depth=1 origin <ref> and checked out to FETCH_HEAD.output_dir/clone-metadata.json for traceability.--upstream-ref, a --depth=1 shallow clone of the default branch HEAD is used instead.clone-metadata.json schema:
{
"upstream_repo": "https://github.com/gotalab/cc-sdd.git",
"upstream_ref": "v1.0.0",
"resolved_commit": "<full SHA>",
"clone_date": "YYYY-MM-DD"
}
output_dir/)Repo-mode analysis writes machine-checkable contract files under output_dir/. These files use only relative paths, sorted lists, and stable keys — no absolute paths, no run-specific timestamps — so they can be committed as golden fixtures and diffed across runs.
Primary contract files:
| File | Description |
|---|---|
feature-registry.yaml | Structured feature inventory with mechanically-extracted CLI, config/env, and artifact surface |
cli-surface-contracts.txt | CLI surface: commands, flags, help text, framework, language |
docs-features.txt | Features extracted from documentation (docs say vs code proves) |
clone-metadata.json | Upstream repo URL, pinned ref, resolved commit SHA, clone date |
Example feature-registry.yaml structure:
schema_version: 1
product_name: cc-sdd
upstream_commit: "abc1234..."
features:
- name: cli-entry
cli:
language: node
bin:
cc-sdd: dist/cli.js
help_text: "Usage: cc-sdd [options] ..."
- name: config-surface
config_env:
config_file: ".cc-sdd/config.json"
env_vars:
- name: CC_SDD_TOKEN
evidence: ["src/config.ts"]
Note: Contract outputs are written by
--mode=repo(or--mode=both). Binary-mode outputs (binary-analysis.md,binary-symbols.txt, etc.) remain directly underoutput_dir/.
Golden fixtures allow regression detection: commit a known-good fixture snapshot (contract files alongside the pinned clone-metadata.json), then diff future runs against it.
bash skills/reverse-engineer-rpi/scripts/repo_fixture_test.sh
This script (implemented in ag-w77.3):
skills/reverse-engineer-rpi/fixtures/cc-sdd-v2.1.0/clone-metadata.json to determine the pinned upstream ref.reverse_engineer_rpi.py in repo mode with that ref into a temp output dir.feature-registry.yaml, cli-surface-contracts.txt, docs-features.txt).The test requires network access to clone the upstream repo.
When contracts legitimately change (new flags, new env vars, schema bumps), update the golden fixtures:
# 1. Re-run with the pinned ref to generate fresh contracts
python3 skills/reverse-engineer-rpi/scripts/reverse_engineer_rpi.py cc-sdd \
--mode=repo \
--upstream-repo="https://github.com/gotalab/cc-sdd.git" \
--upstream-ref=<new-tag-or-sha> \
--output-dir=".tmp/cc-sdd-refresh/"
# 2. Copy contracts into the fixture directory
cp .tmp/cc-sdd-refresh/feature-registry.yaml \
skills/reverse-engineer-rpi/fixtures/cc-sdd-v2.1.0/feature-registry.yaml
# 3. Update the pinned clone metadata
cp .tmp/cc-sdd-refresh/clone-metadata.json \
skills/reverse-engineer-rpi/fixtures/cc-sdd-v2.1.0/clone-metadata.json
# 4. Commit the updated fixtures
git add skills/reverse-engineer-rpi/fixtures/cc-sdd-v2.1.0/
git commit -m "fix(reverse-engineer-rpi): update cc-sdd golden fixtures to <new-tag-or-sha>"
Fixture files that must be committed for the test to pass:
skills/reverse-engineer-rpi/fixtures/cc-sdd-v2.1.0/clone-metadata.jsonskills/reverse-engineer-rpi/fixtures/cc-sdd-v2.1.0/feature-registry.yamlskills/reverse-engineer-rpi/fixtures/cc-sdd-v2.1.0/cli-surface-contracts.txtskills/reverse-engineer-rpi/fixtures/cc-sdd-v2.1.0/docs-features.txtRun:
python3 skills/reverse-engineer-rpi/scripts/reverse_engineer_rpi.py <product_name> --authorized [flags...]
This generates the required outputs under output_dir/ and (when applicable) .agents/council/ and .agents/learnings/.
Core outputs under output_dir/:
feature-inventory.mdfeature-registry.yamlvalidate-feature-registry.pyfeature-catalog.mdspec-architecture.mdspec-code-map.mdspec-cli-surface.md (Node, Python, or Go CLI detected; otherwise a note is written to spec-code-map.md)spec-clone-vs-use.mdspec-clone-mvp.md (original MVP spec; do not copy from target)Binary-mode extras:
binary-analysis.md (best-effort summary)binary-embedded-archives.md (index only; no dumps)Repo-mode extras:
spec-artifact-surface.md (best-effort; template/manifest driven install surface)artifact-registry.json (best-effort; hashed template inventory when manifests/templates exist)If --security-audit, also create output_dir/security/:
threat-model.mdattack-surface.mddataflow.mdcrypto-review.mdauthn-authz.mdfindings.mdreproducibility.mdvalidate-security-audit.shEnd-to-end fixture (safe, owned demo binary with embedded ZIP):
bash skills/reverse-engineer-rpi/scripts/self_test.sh
This must show:
validate-security-audit.sh exits 0 and secret scan passesUser says: /reverse-engineer-rpi cc-sdd --mode=repo --upstream-repo="https://github.com/gotalab/cc-sdd.git" --upstream-ref=v1.0.0
What happens:
v1.0.0 and records the resolved SHA in clone-metadata.json.feature-inventory.md, feature-registry.yaml, contract JSON, and all spec files under the output directory.Result: A complete feature catalog and machine-checkable feature-registry.yaml are generated under .agents/research/cc-sdd/, ready for golden-fixture diffing.
User says: /reverse-engineer-rpi ao --authorized --mode=binary --binary-path="$(command -v ao)" --security-audit
What happens:
ao binary (file metadata, linked libraries, embedded archive signatures) and writes binary-analysis.md and binary-embedded-archives.md.threat-model.md, attack-surface.md, findings.md, etc.) under output_dir/security/ and runs the secret-scan gate over all outputs.Result: Binary analysis artifacts plus a validated security audit are produced; validate-security-audit.sh exits 0 confirming all security deliverables are present and secrets-clean.
| Problem | Cause | Solution |
|---|---|---|
| Script refuses to run binary analysis | Missing --authorized flag | Add --authorized to confirm you have explicit written authorization to analyze the binary. |
clone-metadata.json not generated | --upstream-repo was not provided | Pass --upstream-repo (and optionally --upstream-ref) to enable clone metadata tracking. |
| Fixture test diff fails unexpectedly | Upstream repo changed or golden fixtures are stale | Re-run with the pinned ref, copy fresh contracts into , and commit the updated golden files (see Updating Fixtures). |
Weekly Installs
169
Repository
GitHub Stars
198
First Seen
Feb 17, 2026
Security Audits
Gen Agent Trust HubWarnSocketPassSnykWarn
Installed on
opencode168
github-copilot164
codex164
gemini-cli164
kimi-cli162
cursor162
Azure Data Explorer (Kusto) 查询技能:KQL数据分析、日志遥测与时间序列处理
114,200 周安装
Oracle到PostgreSQL迁移测试项目脚手架 - 集成测试基础设施搭建指南
697 周安装
Oracle到PostgreSQL迁移集成测试规划指南 | 数据库迁移测试自动化
701 周安装
Oracle到PostgreSQL存储过程迁移工具:自动翻译PL/SQL为PL/pgSQL
699 周安装
Oracle到PostgreSQL迁移缺陷报告模板 | 数据库迁移问题记录指南
704 周安装
Oracle 到 PostgreSQL 数据库迁移计划自动生成工具 | .NET 解决方案分析
710 周安装
Python Excel自动化:openpyxl库操作XLSX文件教程,创建编辑格式化电子表格
721 周安装
.tmp/<product_name>--output-dir (default: .agents/research/<product_name>/)--mode (default: repo; allowed: repo|binary|both)--binary-path (required if --mode includes binary)--no-materialize-archives (authorized-only; binary mode extracts embedded ZIPs by default; this disables extraction and keeps index-only)clone-metadata.json (when --upstream-repo is used; records resolved commit SHA)fixtures/spec-cli-surface.md not generated | No recognized CLI framework (Node/Python/Go) detected in the repo | Check that the target repo has a discoverable CLI entry point; otherwise the CLI surface is documented in spec-code-map.md instead. |
| Network error during repo clone | Firewall, VPN, or GitHub rate limit blocking the shallow clone | Verify network connectivity, authenticate with gh auth login if the repo is private, or use --local-clone-dir to point at a pre-cloned directory. |