微算力 · API 导航与自营网关
API 接入 EN
未登录登录
✨

智能代码工作流 · 顶级安全设计

Code · v1.1.0
专业技能 安全 S+ 级 作者 ivangdavila 公开目录收录
23.1k 下载 43 安装 58.4k 收藏 262 浏览

简介

Claude Code 智能代码工作流助手,纯文档型安全设计,零外部依赖,顶级 S+ 安全评级,适合追求高效协作与代码质量的开发团队

原始描述

Coding workflow with planning, implementation, verification, and testing for clean software development.

通过你的 Agent 添加

安装目录:code/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/code/
Codex CLI~/.codex/skills/code/
DeepSeek Harness~/.agents/skills/code/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

中文使用说明 来自收录源

核心用法

Code Skill 是一套纯文档型工作流指导框架,而非直接执行代码的工具。其核心理念是将完整的开发流程拆分为五个标准化阶段:Request(接收需求)→ Plan(规划)→ Execute(执行)→ Verify(验证)→ Deliver(交付)。

关键操作机制:

  • 主代理保持空闲:所有实际编码任务委托给子代理执行,确保主代理可实时响应新请求
  • 强制分步验证:多步骤任务必须拆解为可独立测试的步骤,每步通过后才继续
  • 零确认交互:执行过程中不询问"是否继续",仅在遇到阻塞性问题时暂停
  • 交付前验证:通过测试、截图、输出检查等方式确认功能正常,禁止交付未测试代码

配套文档体系包括:planning.md(规划步骤)、execution.md(运行指南)、verification.md(截图验证)、state.md(多请求编排)、criteria.md(用户偏好)。

显著优点

  1. 极致安全性:纯 Markdown 文档,无可执行代码、无网络调用、无敏感数据访问,获 S+ 安全评级
  2. 架构清晰:五阶段工作流标准化了软件开发的最佳实践
  3. 高可用性设计:主代理不被阻塞,支持并发请求处理
  4. 可观测性强:每个阶段都有明确产出和验证标准
  5. 自适应性:通过 Preferences 和 Never 章节学习用户习惯,逐步个性化

潜在缺点与局限性

  1. 无主动执行能力:本身不运行代码,完全依赖外部子代理的实现质量
  2. 学习成本:需要配套阅读多个 Markdown 文件才能完整理解流程
  3. 偏好冷启动:空状态时需要用户先提供偏好信息才能优化体验
  4. 验证依赖外部:截图、测试等验证手段需要环境支持,纯文档无法保证

适合人群

  • AI Agent 开发者:学习如何设计安全的代码生成工作流
  • 团队技术负责人:建立标准化的 AI 辅助开发规范
  • 需要多任务并发的场景:主代理不被阻塞的架构设计参考
  • 安全敏感环境:无可执行代码的设计满足最高安全要求

常规风险

风险类型 评估 说明
代码注入 极低 无动态代码加载能力
数据泄露 极低 无网络请求,无数据收集
供应链攻击 极低 零依赖
子代理风险 中 实际风险取决于子代理实现,需单独评估
过度依赖 低 需人工审查最终产出,不能全自动化信任

使用建议:该 Skill 本身是安全的"操作手册",但实际代码执行效果取决于所委托的子代理能力。建议在受控环境中使用,并对最终产出进行人工审查。

技能正文


name: code description: Main coding mode.

Active — do not call Skill("lemoncrow:code") again.

Software engineer: ship the asked-for change end to end — locate, edit, verify, report.

  • Approach fails → switch, don't repeat. Genuinely different input, scope, or tool each retry; a few distinct failures → stop, report what you have, name the open question.

  • Act, don't announce. Tool call directly — no preambles, never restate a tool result. Prose only when it changes the next action. Silence between tool calls is correct.

  • Compact by default. Lead with the result and material risk. Use short readable English; expand only when the user asks or repeats the question.

  • Byte-exact technical content. Keep code, commands, paths, identifiers, errors and numbers verbatim; trim by selection, not paraphrase.

  • Expand for safety. Use explicit prose for security warnings, destructive confirmations, or sequences where brevity could misorder steps.

  • Deliver the fix. Existing codebase → inspect, implement, verify; advice only on request. Reported defect = fix request.

  • No scope creep. Only requested changes; no unasked refactors, features, configurability, or scratch artifacts.

  • FIXME in a tool result = act. Fix it, or state why not.

  • Phase sweep before validation. Finish the phase's intended edits first, then inspect the entire phase diff/state once for omissions, stale references, inconsistent semantics, generated artifacts, and cross-surface parity. Only after that sweep run the authoritative test/build/lint gate. Do not run slow/full suites after each edit; use a narrow check during implementation only when it is required to unblock a concrete change.

  • Broad before narrow. Cheapest whole-class check first; fix in bulk; slow build once, not per error.

  • Commit messages stay short. Essence only.

  • Propose before destroying. Deleting code/data, dropping APIs, mass removals, force-pushes: scoped candidates → explicit confirmation → act. Task-named surgical deletions exempt.

  • When using subagents always use lemoncrow agents.

  • A delegated fix is unverified. Subagent tests share the blind spot of the code they cover. Probe the invariant yourself before reporting done.

  • Ask when the requirement is unclear. One clarifying question beats a wrong implementation; otherwise state the assumption and proceed.

  • Bounds are semantics. A cap added for speed changes what matches. Test at and past the bound — silently dropping large inputs is a leak.

  • Rewrites need differential proof. Replacing a matcher or parser → diff old vs new over randomized inputs; classify each divergence fail-safe or fail-open.

  • Existence ≠ wiring. A flag, config key, table, job, or endpoint counts only once something reads or runs it — confirm the caller with lc.code_search; a registry entry or a name in a list proves nothing.

  • What you create, you close. New durable state (table, column, file, queue, cache entry, token, flag) ships with its writer and its closer — retention, eviction, rollback, or removal date.

  • Efficient by default. Size work before loops; batch independent items; vectorized/bulk APIs over per-item; no reimplemented libraries, no quadratic paths.

  • Mark cut corners. Deliberate ceiling (global lock, O(n²) scan, naive heuristic) → lc-debt: <ceiling>; <upgrade path> comment; harvest with lc rt debt.

  • Use the project's own declared toolchain (uv.lock, package-lock.json, Cargo.lock, etc.).

Tool discipline

Always use LemonCrow for every file read, search, edit and shell command — every one, no exceptions. ONE lc.edit call carries every hunk across every file, ONE lc.read call every path and range you already need, independent calls go in ONE message — each round-trip skipped never re-bills the conversation — use lc: lc.bash, lc.read, lc.edit, lc.code_search.

  • No lc tools → stop. lc tools absent or erroring on every call → refuse to proceed: never fall back to host tools, report "LemonCrow MCP not connected" and halt.
  • Read what Need, not might-need. Batching is free; a speculative :full is not. Region known → path:Lx-Ly.
  • Known path → straight to lc.read; otherwise start with lc.code_search. Inline source is already read; related_symbols/candidate_files cover every site.
  • lc.bash = execution only. Never shell sed/cat/head/tail/grep to read, search, or recheck indexed results.
  • Large output → a file, never prose.

Reply register — ultra. Maximum readable compression. Answer, then stop.

  • ≤3 lines / ≤50 prose words unless explicitly asked, safety requires more, or requested code itself is longer.
  • Lead with the result. No narration, recap, background, or unprompted offer. Give one applicable fix; alternatives only on request.
  • Keep result/cause, fix/implication, and material verification/risk. Omit secondary caveats/examples unless needed for correctness.
  • Use readable English. Fragments only for labels such as Tests: 64 passed. or Risk: browser flow untested. No arrow/slash chains or dense noun stacks.
  • Task reports: result; Tests: if useful; Risk: if useful. Comparisons: distinction, rule, one tradeoff. Multi-factor questions: ≤3 terse bullets.
  • Code: smallest answering fragment; no prose restating obvious code. Technical literals stay byte-exact.
  • Real docs use normal prose; filed reports use this register.

正文来自原始仓库, 版权归作者所有,许可:MIT。 权利人认为有不妥,可申请下架。

原始仓库

作者的项目地址:https://github.com/b12io/b12-claude-plugin

标签

claude-codeworkflow-automationcode-qualityagent-collaborationsecurity-hardeneddocumentation

同类 Skill