coding
它能做什么
这个技能帮助 AI 智能体调查和修改代码仓库中的代码,然后检查结果。适合希望助手认真进行实际代码修改的人。
适用场景
- ✓当你希望智能体在项目文件夹中修复错误或添加功能时。
- ✓当你需要智能体遵循项目自身的规则和测试命令时。
- ✓当你希望在使用前通过运行项目测试来检查代码修改时。
技能链接
https://github.com/leon-ai/leon/blob/develop/skills/agent/coding/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我修复这个项目中错误的日期格式,并运行测试以确认它能正常工作。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会找到相关文件,阅读项目说明并进行修改。然后它会运行项目测试,并报告所做的更改和检查的内容。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Coding
Code directly with Leon's existing loop and tools. Respect scope: analysis does not authorize edits, commits, pushes or publication. Delegate only on owner request or applicable preference.
For delegation, use the owner's preferred available agent/interface. Pass the repository, task, instructions and authorized scope; inspect and verify results, not just prompt submission. If unavailable, explain briefly and continue directly within scope.
Repository and instructions
- Establish the exact workspace/cwd from the request and live observations. Read relevant manifests and nearby code; reuse helpers before adding abstractions.
- Before project commands or edits, inspect applicable
AGENTS.mdfiles from repository root through each target directory.file.readincludes them inrepositoryInstructionswith source reads; read missing instructions explicitly. Confirm full returned text, since shell success alone does not prove a file was read. Reuse complete returned instructions, including unchanged content referenced in earlier visible tool results, instead of rediscovering the same files. Apply their package manager and test commands to the baseline as well as final checks. Deeper rules override broader ones only in their subtree. For non-Git work, use the owner-selected boundary, excluding unrelated parent instructions. - In plan details, record workspace, instruction paths, constraints, and acceptance criteria with required checks from the request/references. Discover nested instructions before editing new directories. After compaction/continuation, reread applicable files in full before editing; summaries cannot replace current instructions.
- Inspect Git status and staged/unstaged diffs; record and preserve unrelated changed/untracked content. Never reset, clean, stage or commit owner work without authorization. Use an isolated worktree when concurrency or the requested workflow warrants it.
Investigate and change
- Select the functions needed for inspection, authorized edits and verification together from the tool index; reuse their schemas throughout the task. Expand discovery only when evidence requires another capability. Use bounded reads, ripgrep and available structural search. Trace definitions/callers and check installed dependencies; never invent symbols/APIs. Read package metadata from its manifest; respect package exports and resolve dependencies from their owning source rather than assuming a flat install layout.
- Batch independent reads of known files, searches and edits to different files in one response. Combine independent commands/checks when each result and exit status remains visible; keep dependent checks after their inputs exist. Include plan updates supported by prior evidence alongside the next independent action. Do not weaken verification or bypass dedicated tool safeguards to reduce call counts.
- Reproduce bugs before editing; use affected existing tests when baseline evidence is needed to distinguish existing failures from regressions. Run repository-required baseline checks even when an interactive reproduction already shows the bug; do not infer a full baseline suite requirement from a rule to run lint or relevant tests. Extend only meaningful coverage when authorized, and never weaken tests for a pass.
- Prefer
file.patchwith the current read's hash when available, unique exact context and unrelated changes preserved. For stale/ambiguous matches, reread and revise; never repeat unchanged patches or overwrite from partial views. - Use
file.writefor new files; overwriting requires complete current content. Follow project formatting and dependency rules. - Prefer
shell.executeCommandfor short finite commands/checks. Useshell.startSessionfor long checks, installs, servers, watchers and interactive programs so owner follow-ups can be handled without discarding running work. Supply the observed workspace cwd and use the project's commands and package manager. - Record session IDs and commands in the plan, follow output cursors and verify process status; starting is not completion/success. After follow-ups or interruptions, inspect retained work before restarting anything. Informational questions preserve the task and its sessions; stop affected sessions when the owner cancels or redirects work that is no longer applicable. Never invent handles, replay commands for output or send secrets through stdin.
Verify and finish
- Inspect test scripts be
常见问题
智能体会提交或发布我的代码吗?
不会主动这样做。该技能说明,除非你要求,分析过程不允许提交、推送或发布。
智能体会遵循项目规则吗?
会。它会阅读项目的说明文件,并应用其中指定的包管理器和测试命令。
它能让另一个智能体承担部分工作吗?
只有在你要求时,或你的设置偏好如此时才会。否则它会直接工作。
详情
作者的原始描述
Investigate, implement and verify code changes directly in a repository using Leon's file, search and shell tools.
repo: leon-ai/leon
热度
- GitHub 星标
- 18k
- 排名
- #10740
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …