daily-coding
它能做什么
这项技能是一份简短的清单,让日常代码修改更加谨慎和整洁。适合请 AI 在项目中编写、添加或修改代码的任何人。
适用场景
- ✓当你请 AI 在项目中编写、添加或修改代码时。
- ✓当你希望做小而安全的改动,不添加额外功能或无关修改时。
- ✓当你希望 AI 检查代码能否运行,并在最后清理调试输出的时候。
技能链接
https://github.com/Galaxy-Dawn/claude-scholar/blob/main/skills/daily-coding/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请在我的 utils 文件中添加一个格式化日期的函数,并保持改动小一些。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会先读取文件再编辑,只修改必要的部分,检查安全和类型问题,能运行时就运行代码,最后总结改动内容。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Daily Coding Checklist
A minimal coding quality assurance checklist ensuring every code modification follows best practices.
When to Use
Use this skill for:
- Implementing new features
- Adding code or modifying existing code
- User requests like "write a...", "implement...", "add...", or "modify..."
- Any coding task that involves Edit or Write tools
When Not to Use
Do not use this skill for:
- Pure reading or understanding tasks with no modification intent
- Work already covered by specialized skills such as
bug-detective,architecture-design, orverification-loop - Configuration-only changes
- Documentation-only writing
Core Checklist
Before Starting
- Read before modify - Must read target file with Read tool before making changes
- Understand context - Confirm understanding of existing code logic and design intent
During Coding
- Minimal changes - Only change what's necessary, no over-engineering, no unrelated features
- Type safety - Add type hints for Python, avoid
anyin TypeScript - Security check - Avoid command injection, XSS, SQL injection vulnerabilities
After Completion
- Verify execution - Ensure code runs correctly with no syntax errors
- Clean up - Remove print/console.log debug statements and temporary files
- Brief summary - Inform user what was changed and the scope of impact
Quick Reference
Common Mistakes to Avoid
# ❌ Don't
def process(data=[]): # Mutable default argument
pass
# ✅ Should
def process(data: list | None = None):
data = data or []
# ❌ Don't
except: # Bare except
pass
# ✅ Should
except ValueError as e:
logger.error(f"Processing failed: {e}")
raise
Security Check Points
- User input must be validated/escaped
- Use pathlib for file paths, avoid path traversal
- Never hardcode sensitive info (API keys, passwords)
常见问题
它适用于文档或配置的改动吗?
不适用。它只针对源代码改动,不适用于纯文档或纯配置的工作。
它会添加额外功能吗?
不会。清单要求做最小化改动,不加入无关功能。
它会留下调试输出吗?
不会。它要求在最后删除所有 print 和 console 调试语句。
详情
作者的原始描述
Use for everyday coding tasks that involve writing or modifying source code.
热度
- GitHub 星标
- 6.0k
- 排名
- #14483
- 许可证
- MIT
- 更新时间
- 2026/10/19
评论
- …
同一仓库的更多技能
agent-identifier
6.0k教你的智能体创建 Claude Code 智能体,正确编写其名称、触发描述、系统提示词和设置。
architecture-design
6.0k教你的智能体掌握机器学习项目代码的标准结构,在添加可注册组件时使用工厂和注册表模式。
bug-detective
6.0k帮你的智能体用清晰的方法找出并修复代码错误:先理解问题,收集证据,验证想法,再确认修复结果。
citation-verification
6.0k教你的智能体对照可信的学术来源检查论文中的每条引用,找出虚假或错误的参考文献。