跳到正文
Skillpedia
API 与服务器(后端)48k · #5615

repo-foundation

它能做什么

这个工具可以帮助你为现有的编程项目添加新功能、修复 bug,或开始项目的某个部分。它也可以用来搭建新项目的初始基础,或者接着完成之前中断的工作。

适用场景

  • ✓当你想为项目添加一个新功能时。
  • ✓当你需要修复某段代码中的 bug 时。
  • ✓当你开始一个新项目或项目的新部分时。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/repo-foundation/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/repo-foundation/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“在这个项目中添加一个功能,用来记录用户的登录日志。”

每周 5 个新技能,1 分钟读完。

工作原理

这个工具会分析当前项目、保护你已有的修改,并以有条理的方式实现新的指令。它力求高效完成工作,尽量避免返工。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Repo foundation

When to Use

  • Use when the user asks to add a feature, fix a bug, or start a module in an existing project.
  • Use when establishing the minimum foundation for a new repository or subsystem.
  • Use when requirements authorize a schema, public-contract, ownership, or architecture migration.
  • Use when resuming unfinished work or reconciling stale notes with repository evidence.

Build on a foundation that's just big enough, add features on top of it, and change the architecture only when requirements force it. Aim for the least total rework.


Core principles

  • No universal dogma: don't impose a layout, error pattern, or framework the project doesn't need. Plain standard library is fine.
  • Scope, baseline, and user work:
    • Establish a clean baseline before mutating code: use the pre-existing revision/commit when Git exists; use a file inventory or snapshot when uninitialized or greenfield.
    • In a dirty workspace, protect pre-existing uncommitted user modifications. You may edit distinct parts of the same file as long as user work is preserved. Stop and ask only if there is an actual collision or ambiguous intent.
    • Never create commits or force Git initialization solely for handoff or tracking.
    • Reuse conventions only with healthy repository precedent. Don't treat accidental patterns or temporary workarounds as precedent, and don't expand into out-of-scope cleanup.
    • Don't push, publish, deploy, change branch protection, install system hooks, or buy anything unless the user asks.
  • Prose, naming, and restraint:
    • Names reflect business domain concepts and ownership.
    • Add comments only for information code cannot express: grounded rationale, non-obvious invariants, units, rounding, ordering, protocol quirks, or compatibility.
    • Do not narrate syntax; do not invent tickets, incidents, owners, or production histories.
    • Treat error and CLI text as contract surface: check callers and parsers before rewording.
    • Never invent ticket, PR, or incident references. An inaccessible or unverified reference is not evidence of fabrication. Preserve existing references unless repository evidence establishes that they are incorrect or obsolete; report material uncertainty instead of deleting them.
    • Do not strip valuable comments merely for cosmetic brevity; do not enforce arbitrary comment ratios.
    • Do not add abstractions, wrappers, or factory layers without concrete ownership, contract, or test seam needs.
  • Preserve consumed public contracts as defined in references/shared-contracts.md §1: keep documented types, values, errors, and serialization. Change a contract only when the task clearly authorizes it, then update callers, tests, and docs in scope.
  • Verification rigor & proportionate testing:
    • Record baseline failures and distinguish: (1) pre-existing failures outside scope, (2) in-scope failures to fix, (3) regressions from current changes, and (4) environment errors.
    • Verify the final code state; never use pre-cleanup test results to certify modified code.
    • Add or update persistent tests when a change introduces behavior, fixes a defect, alters a contract, or exposes a meaningful coverage gap. Prefer the repository's existing test framework and structure. Do not add tests solely for file-count or coverage optics. For documentation-only or mechanically verified changes, use the relevant lightweight checks and explain any material verification gap.
    • Check every requirement before you say you're done. Say what you verified, what you only read, and what you assumed. A command that exits 0 doesn't count if the file it should make isn't there.
  • Failure invariants & state preservation: if an operation can fail halfway, decide what must stay untouched. Validate inputs and ownership first, build the replacement on the side, keep the old state until the new one is ready, and test the failure boundary.

Mode selection

Mode Trigger Core Actions Exit Criteria
Bootstrap New repository from scratch or an area lacking minimal foundation (no build/test/run commands, conventions, or boundaries). Elicit critical constraints, choose just-enough design, set up minimal tooling/checks, implement and verify the first representative slice. Read bootstrap. Representative slice works and is verified; run/build commands are documented; repo is stable for subsequent work.

…

常见问题

“保留用户修改”是什么意思?

意思是如果你已经对代码做了修改,工具不会抹掉你的工作,而是会尽量把新的指令与你已完成的内容整合在一起。

什么是“公共契约”?

它指的是代码各个部分之间如何通信的约定。工具会确保这些约定得到保持,并在需要时正确地更新它们。

工具会改变我项目的架构吗?

只有在为了满足新需求而确有必要时才会。目标是尽量少地改动,以避免返工。

详情

作者的原始描述

Implement features, fixes, modules, contract migrations, and resumed work while preserving user edits and authorized public contracts.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#5615
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能