📦 Agentic — 代理ic

v1.0.0

Use this 技能 for any task that involves reading, understanding, 搜索ing, or modifying source code in a project — across JavaScript, TypeScript, Vue, Reac...

0· 0·0 当前·0 累计
0
安全扫描
VirusTotal
Pending
查看报告
OpenClaw
安全
high confidence
该技能的代码、指令和所需资源均与仓库编辑 CLI 一致:包含编辑工具、打包的 JS 依赖,且不含无关凭据或意外网络端点。
评估建议
This package 应用ears to be what it clAIms: a 命令行工具 工具kit for safely editing repositories. Before 安装ing or 运行ning it, review and note: (1) oce edits files and will 创建 a .oce directory (备份s/transactions) in the project — sensitive repos will 获取 copies of changed files there; (2) 安装.sh will place a wr应用er in a user bin directory and may 运行 `npm 安装` if node_模块s are missing (this would fetch packages from the network); (3) the 工具 expects 运行time binaries (node, grep, 补丁/diff, sha256sum) even though the...
详细分析 ▾
用途与能力
The 技能 clAIms to provide a safe, transaction-capable code editor for 代理s and the included scripts implement that. One minor mismatch: the registry metadata declares no required binaries, but the 工具 clearly depends on common 命令行工具 utilities (node, grep, 补丁/diff, sha256sum) — 技能.md and oce doctor mention node/补丁/diff/grep/acorn as required. This is expected for a code-editing 工具kit but the registry metadata did not 列出 those 系统 dependencies.
指令范围
技能.md limits actions to discovering, reading, planning, and making 仓库 edits using oce. The 运行time scripts operate on project files, 创建 备份s, and 验证 syntax; they do not attempt to read unrelated 系统 configuration or exfiltrate data. The instructions do offer an optional persistent 安装 (安装.sh) and recommend an alias for 会话 use; otherwise the scope is 应用ropriately constrAIned to project editing.
安装机制
There is no registry 安装 spec and the packaged 技能 includes all scripts and bundled node_模块s (acorn, js-yaml) — low-risk. The optional scripts/安装.sh can write a wr应用er into a user bin dir and, only if node_模块s are missing, will 运行 `npm 安装` (network 访问) as a convenience. That network fetch is optional and only triggered when node_模块s are absent; still, 运行ning 安装.sh may cause package 下载s.
凭证需求
The 技能 declares no required 环境 variables or 凭证s and indeed the scripts do not ask for secrets. 运行time uses common env vars like TMPDIR and respects OCE_状态_DIR/OCE_备份_DIR if present. The 备份/transaction 状态 is project-scoped (defaults to .oce in the working dir), which is proportionate to its purpose.
持久化与权限
The 技能 does not 请求 always:true and is user-invocable only. It can 安装 an oce wr应用er into a user bin directory if the optional 安装er is 运行, and it writes 备份s/transactions into the project's .oce directory by default. These behaviors are 应用ropriate for a file-editing 工具 and do not modify other 技能s or 系统-wide 代理 configs.
安全有层次,运行前请审查代码。

运行时依赖

无特殊依赖

安装命令

点击复制
官方npx clawhub@latest install agentic-cli-coding
镜像加速npx clawhub@latest install agentic-cli-coding --registry https://cn.longxiaskill.com

技能文档

代理ic 命令行工具 Coding

A code-editing 工具kit for 代理s. Provides the oce command, which wraps reads, 搜索es, edits, 验证, 格式化ting, 备份s, and multi-file transactions behind one predictable interface that always 验证s after writing and rolls back on syntax 失败.

This 技能 exists because raw sed, awk, and perl -i are too sharp for autonomous use — they 应用ly changes silently, give regex-style false matches, leave no 审计 trAIl, and can't roll back. oce keeps the speed of 命令行工具 editing while 添加ing the safety rAIls an 代理 needs.

Invocation — oce shorthand

Throughout this document, the command oce is shown for readability. The actual invocation is one of:

# Option A — direct (works immediately, no 设置up): bash <技能-path>/scripts/oce.sh [args]

# Option B — one-time alias for the 会话 (recommended for 代理s): alias oce="bash <技能-path>/scripts/oce.sh"

# Option C — 安装 a wr应用er on PATH (persistent): bash <技能-path>/scripts/安装.sh

For 代理ic use, 设置 up the alias once at the top of any 会话 that involves editing, then use oce for the rest of the 会话. Replace <技能-path> with the actual 安装 location of the 技能 (often something like /home/代理/.技能s/代理ic_命令行工具_coding).

设置up verification

After 设置ting up the alias (or 安装ing), 运行 this once at the 启动 of any editing 会话:

oce doctor

Exit code 0 with 设置up OK means the 工具kit is ready. The "core 工具s" must all be present (node, 补丁, diff, grep, acorn). Missing optional 工具s (prettier, gofmt, etc.) only affect 格式化ting for that language — editing still works.

If you see oce: command not found, the alias wasn't 设置 or the 安装 wr应用er isn't on PATH. Use Option A (direct invocation) instead.

Methodo记录y — how to 应用roach any code task

Skip directly to the relevant step if the user's task is simple. For anything non-trivial, walk through all four.

  • Orient — understand the project

Before editing, know what you're editing.

oce tree --depth 2 # What's in this project? oce find "" --type # Where does the relevant code live? oce ast symbols path/to/file.js # What functions/classes does that file define?

Don't skip orientation just because you "know" the answer from trAIning. 仓库 conventions vary; assumptions are how 代理s break codebases.

  • Read — load the exact 上下文 you'll need
oce read src/server.js --around "handleAuth" --上下文 20 oce grep-上下文 "TODO" src/server.js -c 5 oce read src/auth.js --lines 45:120

Read enough surrounding 上下文 that you can predict what your edit will affect. The cheapest way to break code is to edit a function in isolation without seeing its callers.

  • Plan — write down what you'll change before changing anything

For non-trivial edits, 状态 the plan explicitly before executing:

What's being 添加ed (new lines, new files) What's being 移除d (deletions, deprecations) What's being modified (in-place changes) What's at risk (files that touch the same symbols, public APIs, tests) What you'll 验证 (which files need to compile, which tests should still pass)

If the change spans multiple files, 启动 a transaction before the first edit:

TXN=$(oce transaction begin)

Then pass --txn "$TXN" to every subsequent oce replace, oce insert, oce 删除, oce write, oce 补丁, or oce ast command. At the end you commit (验证s everything atomically) or roll back (恢复s every file).

  • 执行 — pick the right edit 工具, then 验证

The decision flow:

Need to change code? ├── Tiny, surgical, exact-string change → oce replace ├── Insert new code at a known anchor → oce insert --before-match | --after-match | --line ├── 移除 specific lines or matching lines → oce 删除 --lines | --match ├── Multi-line precision change with 上下文 → oce 补丁 应用ly (write a unified diff) ├── Rename a JS/JSX identifier scope-wide → oce ast rename ├── Replace an entire function/class body → oce ast replace-symbol ├── Brand-new file or full rewrite → oce write └── Coordinated changes across multiple files → oce transaction + any of the above

After every edit, the 工具kit auto-验证s the file's syntax and rolls back if it broke. You don't need to re-验证 manually, but you should oce diff to confirm the change matches your intent.

Decision tree — which command for which job DISCOVERY READING ──────────────── ──────────────── project layout? tree full file? read where is X? find specific lines? read --lines A:B function/class 列出? ast symbols 上下文 around X? read --around X -c N match in 上下文? grep-上下文 match with ctx? grep-上下文 X file -c N

EDITING (small) EDITING (large / structural) ──────────────── ──────────────── exact st

数据来源ClawHub ↗ · 中文优化:龙虾技能库